From 3af4d06ad55fc659c9fafc9da26b82b5629a68ac Mon Sep 17 00:00:00 2001 From: jvdp1 Date: Wed, 19 Jun 2024 12:44:46 +0000 Subject: [PATCH] From https://github.com/fortran-lang/stdlib/commit/d996e436d38d8aa8b47749cc3d93d02793d9ae2f refs/heads/master fortran-lang/stdlib@d996e436d38d8aa8b47749cc3d93d02793d9ae2f --- index.html | 4 +- interface/adjustl.html | 6 +- interface/adjustr.html | 6 +- interface/all_close.html | 124 +- interface/and.html | 12 +- interface/and_not.html | 12 +- interface/arange.html | 28 +- interface/arg.html | 4 +- interface/arg_select.html | 196 +- interface/argd.html | 4 +- interface/argpi.html | 4 +- interface/assignment(=).html | 477 +- interface/assignment(=)~2.html | 676 +++ interface/assignment(=)~3.html | 255 - interface/axpy.html | 100 +- interface/bidx.html | 4 +- interface/cdf_exp.html | 12 +- interface/cdf_normal.html | 28 +- interface/cdf_uniform.html | 52 +- interface/char.html | 16 +- interface/chomp.html | 32 +- interface/clip.html | 16 +- interface/copy.html | 84 +- interface/corr.html | 196 +- interface/count.html | 12 +- interface/cov.html | 260 +- interface/cross_product.html | 36 +- interface/det.html | 4 +- interface/diag.html | 100 +- interface/diff.html | 112 +- interface/dist_rand.html | 12 +- interface/dlegendre.html | 8 +- interface/dot.html | 44 +- interface/dotc.html | 44 +- interface/dotu.html | 44 +- interface/ends_with.html | 20 +- interface/error_stop.html | 8 +- interface/extract.html | 24 +- interface/fidx.html | 4 +- interface/find.html | 12 +- interface/fnv_1_hash.html | 32 +- interface/fnv_1_hash~2.html | 32 +- interface/fnv_1a_hash.html | 42 +- interface/fnv_1a_hash~2.html | 42 +- interface/gamma.html | 16 +- interface/gauss_legendre.html | 8 +- interface/gauss_legendre_lobatto.html | 8 +- interface/gbmv.html | 212 +- interface/gcd.html | 20 +- interface/gemm.html | 212 +- interface/gemv.html | 180 +- interface/ger.html | 76 +- interface/gerc.html | 76 +- interface/geru.html | 76 +- interface/get.html | 20 +- interface/getline.html | 32 +- interface/hasher_fun.html | 8 +- interface/hbmv.html | 92 +- interface/hemm.html | 100 +- interface/hemv.html | 84 +- interface/her.html | 60 +- interface/her2.html | 76 +- interface/her2k.html | 100 +- interface/herk.html | 84 +- interface/hpmv.html | 76 +- interface/hpr.html | 52 +- interface/hpr2.html | 68 +- interface/iachar.html | 6 +- interface/ichar.html | 6 +- interface/index.html | 16 +- interface/is_close.html | 44 +- interface/is_diagonal.html | 20 +- interface/is_hermitian.html | 20 +- interface/is_hessenberg.html | 36 +- interface/is_skew_symmetric.html | 20 +- interface/is_square.html | 20 +- interface/is_symmetric.html | 20 +- interface/is_triangular.html | 36 +- interface/kronecker_product.html | 36 +- interface/legendre.html | 8 +- interface/len.html | 6 +- interface/len_trim.html | 6 +- interface/lge.html | 16 +- interface/lgt.html | 16 +- interface/linalg_state_type.html | 4 +- interface/linspace.html | 84 +- interface/lle.html | 16 +- interface/llt.html | 16 +- interface/load_npy.html | 196 +- interface/loadtxt.html | 36 +- interface/log_factorial.html | 12 +- interface/log_gamma.html | 16 +- interface/log_lower_incomplete_gamma.html | 44 +- interface/log_upper_incomplete_gamma.html | 44 +- interface/logspace.html | 156 +- interface/lower_incomplete_gamma.html | 44 +- interface/lstsq.html | 100 +- interface/lstsq_space.html | 76 +- interface/mean.html | 484 +- interface/median.html | 364 +- interface/meshgrid.html | 4 +- interface/moment.html | 1188 ++--- interface/move.html | 4 +- interface/new_nmhash32_seed.html | 6 +- interface/new_nmhash32x_seed.html | 6 +- interface/new_pengy_hash_seed.html | 6 +- interface/new_spooky_hash_seed.html | 6 +- interface/new_water_hash_seed.html | 6 +- interface/nmhash32.html | 24 +- interface/nmhash32x.html | 24 +- interface/nrm2.html | 28 +- interface/operator(+).html | 4 +- interface/operator(.det.).html | 4 +- interface/operator(==).html | 186 +- interface/operator(==)~2.html | 282 +- interface/operator(==)~3.html | 104 +- interface/operator(==)~4.html | 4 +- interface/operator(==)~5.html | 120 +- interface/operator(SLASH=).html | 184 +- interface/operator(SLASH=)~2.html | 282 +- interface/operator(SLASH=)~3.html | 106 +- interface/operator(SLASH=)~4.html | 122 +- interface/operator(SLASHSLASH).html | 173 +- interface/operator(SLASHSLASH)~2.html | 40 +- interface/operator(SLASHSLASH)~3.html | 173 +- interface/operator(gt).html | 163 +- interface/operator(gt)~2.html | 107 +- interface/operator(gt)~3.html | 122 +- interface/operator(gt=).html | 164 +- interface/operator(gt=)~2.html | 108 +- interface/operator(gt=)~3.html | 122 +- interface/operator(lt).html | 163 +- interface/operator(lt)~2.html | 107 +- interface/operator(lt)~3.html | 122 +- interface/operator(lt=).html | 164 +- interface/operator(lt=)~2.html | 108 +- interface/operator(lt=)~3.html | 122 +- interface/optval.html | 24 +- interface/or.html | 12 +- interface/ord_sort.html | 4 +- interface/outer_product.html | 36 +- interface/padl.html | 12 +- interface/padr.html | 12 +- interface/pdf_exp.html | 12 +- interface/pdf_normal.html | 28 +- interface/pdf_uniform.html | 52 +- interface/pengy_hash.html | 24 +- interface/radix_sort.html | 4 +- interface/random_seed.html | 12 +- interface/read(formatted).html | 12 +- interface/read(unformatted).html | 12 +- interface/regularized_gamma_p.html | 44 +- interface/regularized_gamma_q.html | 44 +- interface/repeat.html | 6 +- interface/replace_all.html | 20 +- interface/{reverse~2.html => reverse.html} | 8 +- interface/rot.html | 60 +- interface/rotg.html | 68 +- interface/rotm.html | 52 +- interface/rotmg.html | 44 +- interface/rvs_exp.html | 12 +- interface/rvs_normal.html | 44 +- interface/rvs_uniform.html | 100 +- interface/save_npy.html | 196 +- interface/savetxt.html | 36 +- interface/sbmv.html | 92 +- interface/scal.html | 68 +- interface/scan.html | 16 +- interface/sdot.html | 28 +- interface/select.html | 196 +- interface/set.html | 20 +- interface/shuffle.html | 4 +- interface/simps.html | 28 +- interface/simps_weights.html | 12 +- interface/slice.html | 12 +- interface/solve.html | 100 +- interface/solve_lstsq.html | 172 +- interface/solve_lu.html | 84 +- interface/sort.html | 4 +- interface/sort_index.html | 44 +- interface/spmv.html | 76 +- interface/spooky_hash.html | 24 +- interface/spookyhash_128.html | 6 +- interface/spr.html | 52 +- interface/spr2.html | 68 +- interface/srot.html | 32 +- interface/sscal.html | 20 +- interface/starts_with.html | 20 +- interface/string_type.html | 16 +- interface/stringlist_type.html | 8 +- interface/strip.html | 8 +- interface/svd.html | 60 +- interface/svdvals.html | 20 +- interface/swap.html | 84 +- interface/symm.html | 196 +- interface/symv.html | 84 +- interface/syr.html | 60 +- interface/syr2.html | 76 +- interface/syr2k.html | 196 +- interface/syrk.html | 164 +- interface/tbmv.html | 148 +- interface/tbsv.html | 148 +- interface/{to_lower~2.html => to_lower.html} | 8 +- interface/to_num.html | 16 +- interface/to_num_from_stream.html | 28 +- interface/to_real.html | 8 +- .../{to_sentence~2.html => to_sentence.html} | 8 +- interface/to_string.html | 6 +- interface/to_string~2.html | 50 +- interface/{to_title~2.html => to_title.html} | 8 +- interface/{to_upper~2.html => to_upper.html} | 8 +- interface/tpmv.html | 116 +- interface/tpsv.html | 116 +- interface/trace.html | 20 +- interface/trapz.html | 20 +- interface/trapz_weights.html | 8 +- interface/trim.html | 6 +- interface/trmm.html | 180 +- interface/trmv.html | 132 +- interface/trsm.html | 180 +- interface/trsv.html | 132 +- interface/upper_incomplete_gamma.html | 44 +- interface/var.html | 676 +-- interface/verify.html | 16 +- interface/water_hash.html | 24 +- interface/write(formatted).html | 12 +- interface/write(unformatted).html | 12 +- interface/xor.html | 12 +- interface/zfill.html | 8 +- lists/absint.html | 4 +- lists/files.html | 4 +- lists/modules.html | 4 +- lists/procedures.html | 234 +- lists/types.html | 4 +- module/f08estop.html | 4 +- module/f18estop.html | 4 +- module/stdlib_ansi.html | 20 +- module/stdlib_ansi_operator.html | 4 +- module/stdlib_ansi_to_string.html | 4 +- module/stdlib_array.html | 8 +- module/stdlib_ascii.html | 54 +- module/stdlib_bitsets.html | 248 +- module/stdlib_bitsets_64.html | 4 +- module/stdlib_bitsets_large.html | 4 +- module/stdlib_codata.html | 6 +- module/stdlib_codata_type.html | 18 +- module/stdlib_constants.html | 28 +- module/stdlib_error.html | 12 +- module/stdlib_hash_32bit.html | 136 +- module/stdlib_hash_32bit_fnv.html | 4 +- module/stdlib_hash_32bit_nm.html | 4 +- module/stdlib_hash_32bit_water.html | 4 +- module/stdlib_hash_64bit.html | 156 +- module/stdlib_hash_64bit_fnv.html | 4 +- module/stdlib_hash_64bit_pengy.html | 4 +- module/stdlib_hash_64bit_spookyv2.html | 4 +- module/stdlib_hashmap_chaining.html | 4 +- module/stdlib_hashmap_open.html | 4 +- module/stdlib_hashmap_wrappers.html | 60 +- module/stdlib_hashmaps.html | 382 +- module/stdlib_io.html | 108 +- module/stdlib_io_npy.html | 388 +- module/stdlib_io_npy_load.html | 4 +- module/stdlib_io_npy_save.html | 4 +- module/stdlib_kinds.html | 4 +- module/stdlib_linalg.html | 946 ++-- module/stdlib_linalg_blas.html | 4450 ++++++++--------- module/stdlib_linalg_blas_aux.html | 38 +- module/stdlib_linalg_blas_c.html | 602 +-- module/stdlib_linalg_blas_d.html | 556 +- module/stdlib_linalg_blas_s.html | 554 +- module/stdlib_linalg_blas_z.html | 604 +-- module/stdlib_linalg_constants.html | 6 +- module/stdlib_linalg_cross_product.html | 4 +- module/stdlib_linalg_determinant.html | 6 +- module/stdlib_linalg_diag.html | 4 +- module/stdlib_linalg_kronecker.html | 4 +- module/stdlib_linalg_least_squares.html | 6 +- module/stdlib_linalg_outer_product.html | 4 +- module/stdlib_linalg_solve.html | 6 +- module/stdlib_linalg_state.html | 74 +- module/stdlib_linalg_svd.html | 6 +- module/stdlib_logger.html | 18 +- module/stdlib_math.html | 556 +- module/stdlib_math_all_close.html | 4 +- module/stdlib_math_arange.html | 4 +- module/stdlib_math_diff.html | 4 +- module/stdlib_math_is_close.html | 4 +- module/stdlib_math_linspace.html | 4 +- module/stdlib_math_logspace.html | 4 +- module/stdlib_math_meshgrid.html | 4 +- module/stdlib_optval.html | 24 +- module/stdlib_quadrature.html | 64 +- module/stdlib_quadrature_gauss.html | 4 +- module/stdlib_quadrature_simps.html | 4 +- module/stdlib_quadrature_trapz.html | 4 +- module/stdlib_random.html | 20 +- module/stdlib_selection.html | 388 +- module/stdlib_sorting.html | 46 +- module/stdlib_sorting_ord_sort.html | 4 +- module/stdlib_sorting_radix_sort.html | 4 +- module/stdlib_sorting_sort.html | 4 +- module/stdlib_sorting_sort_index.html | 4 +- module/stdlib_specialfunctions.html | 12 +- module/stdlib_specialfunctions_gamma.html | 278 +- module/stdlib_specialfunctions_legendre.html | 4 +- module/stdlib_stats.html | 3148 ++++++------ module/stdlib_stats_corr.html | 8 +- module/stdlib_stats_cov.html | 8 +- ...stdlib_stats_distribution_exponential.html | 34 +- module/stdlib_stats_distribution_normal.html | 98 +- module/stdlib_stats_distribution_uniform.html | 198 +- module/stdlib_stats_mean.html | 6 +- module/stdlib_stats_median.html | 6 +- module/stdlib_stats_moment.html | 6 +- module/stdlib_stats_moment_all.html | 6 +- module/stdlib_stats_moment_mask.html | 6 +- module/stdlib_stats_moment_scalar.html | 6 +- module/stdlib_stats_var.html | 6 +- module/stdlib_str2num.html | 42 +- module/stdlib_string_type.html | 336 +- module/stdlib_string_type_constructor.html | 4 +- module/stdlib_stringlist_type.html | 102 +- module/stdlib_strings.html | 178 +- module/stdlib_strings_to_string.html | 4 +- module/stdlib_version.html | 10 +- page/License.html | 4 +- page/changelog.html | 4 +- page/contributing/CodeOfConduct.html | 4 +- page/contributing/StyleGuide.html | 4 +- page/contributing/Workflow.html | 4 +- page/contributing/index.html | 4 +- page/index.html | 4 +- page/specs/index.html | 4 +- page/specs/stdlib_ansi.html | 4 +- page/specs/stdlib_array.html | 4 +- page/specs/stdlib_ascii.html | 4 +- page/specs/stdlib_bitsets.html | 22 +- page/specs/stdlib_constants.html | 4 +- page/specs/stdlib_error.html | 4 +- page/specs/stdlib_hash_procedures.html | 24 +- page/specs/stdlib_hashmaps.html | 335 +- page/specs/stdlib_io.html | 4 +- page/specs/stdlib_kinds.html | 4 +- page/specs/stdlib_linalg.html | 4 +- page/specs/stdlib_linalg_state_type.html | 4 +- page/specs/stdlib_logger.html | 4 +- page/specs/stdlib_math.html | 4 +- page/specs/stdlib_optval.html | 4 +- page/specs/stdlib_quadrature.html | 4 +- page/specs/stdlib_random.html | 4 +- page/specs/stdlib_selection.html | 4 +- page/specs/stdlib_sorting.html | 4 +- page/specs/stdlib_specialfunctions.html | 4 +- page/specs/stdlib_specialfunctions_gamma.html | 4 +- page/specs/stdlib_stats.html | 4 +- ...stdlib_stats_distribution_exponential.html | 4 +- .../stdlib_stats_distribution_normal.html | 4 +- .../stdlib_stats_distribution_uniform.html | 4 +- page/specs/stdlib_str2num.html | 4 +- page/specs/stdlib_string_type.html | 14 +- page/specs/stdlib_stringlist_type.html | 8 +- page/specs/stdlib_strings.html | 4 +- page/specs/stdlib_version.html | 4 +- proc/bits.html | 8 +- proc/check.html | 8 +- proc/copy_key.html | 4 +- proc/copy_other.html | 4 +- proc/error_handler.html | 12 +- proc/eye.html | 6 +- proc/falseloc.html | 8 +- proc/fibonacci_hash.html | 36 +- proc/fibonacci_hash~2.html | 36 +- proc/fnv_1_hasher.html | 6 +- proc/fnv_1a_hasher.html | 6 +- proc/free_key.html | 6 +- proc/free_other.html | 6 +- proc/get_stdlib_version.html | 10 +- proc/is_alpha.html | 6 +- proc/is_alphanum.html | 6 +- proc/is_ascii.html | 6 +- proc/is_blank.html | 6 +- proc/is_control.html | 6 +- proc/is_digit.html | 6 +- proc/is_graphical.html | 6 +- proc/is_hex_digit.html | 6 +- proc/is_lower.html | 6 +- proc/is_octal_digit.html | 6 +- proc/is_printable.html | 6 +- proc/is_punctuation.html | 6 +- proc/is_upper.html | 6 +- proc/is_white.html | 6 +- proc/linalg_error_handling.html | 6 +- proc/odd_random_integer.html | 38 +- proc/odd_random_integer~2.html | 40 +- proc/open.html | 10 +- proc/parse_mode.html | 4 +- proc/reverse.html | 6 +- proc/seeded_nmhash32_hasher.html | 6 +- proc/seeded_nmhash32x_hasher.html | 6 +- proc/seeded_water_hasher.html | 6 +- proc/stdlib_caxpy.html | 16 +- proc/stdlib_ccopy.html | 14 +- proc/stdlib_cdotc.html | 14 +- proc/stdlib_cdotu.html | 14 +- proc/stdlib_cgbmv.html | 30 +- proc/stdlib_cgemm.html | 30 +- proc/stdlib_cgemv.html | 26 +- proc/stdlib_cgerc.html | 22 +- proc/stdlib_cgeru.html | 22 +- proc/stdlib_chbmv.html | 26 +- proc/stdlib_chemm.html | 28 +- proc/stdlib_chemv.html | 24 +- proc/stdlib_cher.html | 18 +- proc/stdlib_cher2.html | 22 +- proc/stdlib_cher2k.html | 28 +- proc/stdlib_cherk.html | 24 +- proc/stdlib_chpmv.html | 22 +- proc/stdlib_chpr.html | 16 +- proc/stdlib_chpr2.html | 20 +- proc/stdlib_crotg.html | 12 +- proc/stdlib_cscal.html | 12 +- proc/stdlib_csrot.html | 18 +- proc/stdlib_csscal.html | 12 +- proc/stdlib_cswap.html | 14 +- proc/stdlib_csymm.html | 28 +- proc/stdlib_csyr2k.html | 28 +- proc/stdlib_csyrk.html | 24 +- proc/stdlib_ctbmv.html | 22 +- proc/stdlib_ctbsv.html | 22 +- proc/stdlib_ctpmv.html | 18 +- proc/stdlib_ctpsv.html | 18 +- proc/stdlib_ctrmm.html | 26 +- proc/stdlib_ctrmv.html | 20 +- proc/stdlib_ctrsm.html | 26 +- proc/stdlib_ctrsv.html | 20 +- proc/stdlib_dasum.html | 10 +- proc/stdlib_daxpy.html | 16 +- proc/stdlib_dcabs1.html | 6 +- proc/stdlib_dcopy.html | 14 +- proc/stdlib_ddot.html | 14 +- proc/stdlib_dgbmv.html | 30 +- proc/stdlib_dgemm.html | 30 +- proc/stdlib_dgemv.html | 26 +- proc/stdlib_dger.html | 22 +- proc/stdlib_dnrm2.html | 10 +- proc/stdlib_drot.html | 18 +- proc/stdlib_drotg.html | 12 +- proc/stdlib_drotm.html | 16 +- proc/stdlib_drotmg.html | 14 +- proc/stdlib_dsbmv.html | 26 +- proc/stdlib_dscal.html | 12 +- proc/stdlib_dsdot.html | 14 +- proc/stdlib_dspmv.html | 22 +- proc/stdlib_dspr.html | 16 +- proc/stdlib_dspr2.html | 20 +- proc/stdlib_dswap.html | 14 +- proc/stdlib_dsymm.html | 28 +- proc/stdlib_dsymv.html | 24 +- proc/stdlib_dsyr.html | 18 +- proc/stdlib_dsyr2.html | 22 +- proc/stdlib_dsyr2k.html | 28 +- proc/stdlib_dsyrk.html | 24 +- proc/stdlib_dtbmv.html | 22 +- proc/stdlib_dtbsv.html | 22 +- proc/stdlib_dtpmv.html | 18 +- proc/stdlib_dtpsv.html | 18 +- proc/stdlib_dtrmm.html | 26 +- proc/stdlib_dtrmv.html | 20 +- proc/stdlib_dtrsm.html | 26 +- proc/stdlib_dtrsv.html | 20 +- proc/stdlib_dzasum.html | 10 +- proc/stdlib_dznrm2.html | 10 +- proc/stdlib_icamax.html | 10 +- proc/stdlib_idamax.html | 10 +- proc/stdlib_isamax.html | 10 +- proc/stdlib_izamax.html | 10 +- proc/stdlib_lsame.html | 6 +- proc/stdlib_sasum.html | 10 +- proc/stdlib_saxpy.html | 16 +- proc/stdlib_scabs1.html | 6 +- proc/stdlib_scasum.html | 10 +- proc/stdlib_scnrm2.html | 10 +- proc/stdlib_scopy.html | 14 +- proc/stdlib_sdot.html | 14 +- proc/stdlib_sdsdot.html | 14 +- proc/stdlib_sgbmv.html | 30 +- proc/stdlib_sgemm.html | 30 +- proc/stdlib_sgemv.html | 26 +- proc/stdlib_sger.html | 22 +- proc/stdlib_snrm2.html | 10 +- proc/stdlib_srot.html | 18 +- proc/stdlib_srotg.html | 12 +- proc/stdlib_srotm.html | 16 +- proc/stdlib_srotmg.html | 14 +- proc/stdlib_ssbmv.html | 26 +- proc/stdlib_sscal.html | 12 +- proc/stdlib_sspmv.html | 22 +- proc/stdlib_sspr.html | 16 +- proc/stdlib_sspr2.html | 20 +- proc/stdlib_sswap.html | 14 +- proc/stdlib_ssymm.html | 28 +- proc/stdlib_ssymv.html | 24 +- proc/stdlib_ssyr.html | 18 +- proc/stdlib_ssyr2.html | 22 +- proc/stdlib_ssyr2k.html | 28 +- proc/stdlib_ssyrk.html | 24 +- proc/stdlib_stbmv.html | 22 +- proc/stdlib_stbsv.html | 22 +- proc/stdlib_stpmv.html | 18 +- proc/stdlib_stpsv.html | 18 +- proc/stdlib_strmm.html | 26 +- proc/stdlib_strmv.html | 20 +- proc/stdlib_strsm.html | 26 +- proc/stdlib_strsv.html | 20 +- proc/stdlib_xerbla.html | 6 +- proc/stdlib_xerbla_array.html | 6 +- proc/stdlib_zaxpy.html | 16 +- proc/stdlib_zcopy.html | 14 +- proc/stdlib_zdotc.html | 14 +- proc/stdlib_zdotu.html | 14 +- proc/stdlib_zdrot.html | 18 +- proc/stdlib_zdscal.html | 12 +- proc/stdlib_zgbmv.html | 30 +- proc/stdlib_zgemm.html | 30 +- proc/stdlib_zgemv.html | 26 +- proc/stdlib_zgerc.html | 22 +- proc/stdlib_zgeru.html | 22 +- proc/stdlib_zhbmv.html | 26 +- proc/stdlib_zhemm.html | 28 +- proc/stdlib_zhemv.html | 24 +- proc/stdlib_zher.html | 18 +- proc/stdlib_zher2.html | 22 +- proc/stdlib_zher2k.html | 28 +- proc/stdlib_zherk.html | 24 +- proc/stdlib_zhpmv.html | 22 +- proc/stdlib_zhpr.html | 16 +- proc/stdlib_zhpr2.html | 20 +- proc/stdlib_zrotg.html | 12 +- proc/stdlib_zscal.html | 12 +- proc/stdlib_zswap.html | 14 +- proc/stdlib_zsymm.html | 28 +- proc/stdlib_zsyr2k.html | 28 +- proc/stdlib_zsyrk.html | 24 +- proc/stdlib_ztbmv.html | 22 +- proc/stdlib_ztbsv.html | 22 +- proc/stdlib_ztpmv.html | 18 +- proc/stdlib_ztpsv.html | 18 +- proc/stdlib_ztrmm.html | 26 +- proc/stdlib_ztrmv.html | 20 +- proc/stdlib_ztrsm.html | 26 +- proc/stdlib_ztrsv.html | 20 +- proc/to_lower.html | 6 +- proc/to_sentence.html | 8 +- proc/to_title.html | 6 +- proc/to_upper.html | 6 +- proc/trueloc.html | 8 +- proc/universal_mult_hash.html | 43 +- proc/universal_mult_hash~2.html | 43 +- search.html | 4 +- sourcefile/f08estop.f90.html | 4 +- sourcefile/f18estop.f90.html | 4 +- sourcefile/stdlib_ansi.f90.html | 4 +- sourcefile/stdlib_ansi_operator.f90.html | 4 +- sourcefile/stdlib_ansi_to_string.f90.html | 4 +- sourcefile/stdlib_array.f90.html | 4 +- sourcefile/stdlib_ascii.fypp.html | 4 +- sourcefile/stdlib_bitsets.fypp.html | 6 +- sourcefile/stdlib_bitsets_64.fypp.html | 4 +- sourcefile/stdlib_bitsets_large.fypp.html | 4 +- sourcefile/stdlib_codata.f90.html | 4 +- sourcefile/stdlib_codata_type.fypp.html | 4 +- sourcefile/stdlib_constants.fypp.html | 4 +- sourcefile/stdlib_error.f90.html | 4 +- sourcefile/stdlib_hash_32bit.fypp.html | 4 +- sourcefile/stdlib_hash_32bit_fnv.fypp.html | 4 +- sourcefile/stdlib_hash_32bit_nm.fypp.html | 4 +- sourcefile/stdlib_hash_32bit_water.fypp.html | 4 +- sourcefile/stdlib_hash_64bit.fypp.html | 4 +- sourcefile/stdlib_hash_64bit_fnv.fypp.html | 4 +- sourcefile/stdlib_hash_64bit_pengy.fypp.html | 4 +- .../stdlib_hash_64bit_spookyv2.fypp.html | 4 +- sourcefile/stdlib_hashmap_chaining.f90.html | 4 +- sourcefile/stdlib_hashmap_open.f90.html | 4 +- sourcefile/stdlib_hashmap_wrappers.f90.html | 4 +- sourcefile/stdlib_hashmaps.f90.html | 2016 +++++--- sourcefile/stdlib_io.fypp.html | 4 +- sourcefile/stdlib_io_npy.fypp.html | 4 +- sourcefile/stdlib_io_npy_load.fypp.html | 4 +- sourcefile/stdlib_io_npy_save.fypp.html | 4 +- sourcefile/stdlib_kinds.fypp.html | 4 +- sourcefile/stdlib_linalg.fypp.html | 4 +- sourcefile/stdlib_linalg_blas.fypp.html | 4 +- sourcefile/stdlib_linalg_blas_aux.fypp.html | 4 +- sourcefile/stdlib_linalg_blas_c.fypp.html | 4 +- sourcefile/stdlib_linalg_blas_d.fypp.html | 4 +- sourcefile/stdlib_linalg_blas_q.fypp.html | 4 +- sourcefile/stdlib_linalg_blas_s.fypp.html | 4 +- sourcefile/stdlib_linalg_blas_w.fypp.html | 4 +- sourcefile/stdlib_linalg_blas_z.fypp.html | 4 +- sourcefile/stdlib_linalg_constants.fypp.html | 4 +- .../stdlib_linalg_cross_product.fypp.html | 4 +- .../stdlib_linalg_determinant.fypp.html | 4 +- sourcefile/stdlib_linalg_diag.fypp.html | 4 +- sourcefile/stdlib_linalg_kronecker.fypp.html | 4 +- .../stdlib_linalg_least_squares.fypp.html | 4 +- .../stdlib_linalg_outer_product.fypp.html | 4 +- sourcefile/stdlib_linalg_solve.fypp.html | 4 +- sourcefile/stdlib_linalg_state.fypp.html | 4 +- sourcefile/stdlib_linalg_svd.fypp.html | 4 +- sourcefile/stdlib_logger.f90.html | 4 +- sourcefile/stdlib_math.fypp.html | 4 +- sourcefile/stdlib_math_all_close.fypp.html | 4 +- sourcefile/stdlib_math_arange.fypp.html | 4 +- sourcefile/stdlib_math_diff.fypp.html | 4 +- sourcefile/stdlib_math_is_close.fypp.html | 4 +- sourcefile/stdlib_math_linspace.fypp.html | 4 +- sourcefile/stdlib_math_logspace.fypp.html | 4 +- sourcefile/stdlib_math_meshgrid.fypp.html | 4 +- sourcefile/stdlib_optval.fypp.html | 4 +- sourcefile/stdlib_quadrature.fypp.html | 4 +- sourcefile/stdlib_quadrature_gauss.f90.html | 4 +- sourcefile/stdlib_quadrature_simps.fypp.html | 4 +- sourcefile/stdlib_quadrature_trapz.fypp.html | 4 +- sourcefile/stdlib_random.fypp.html | 4 +- sourcefile/stdlib_selection.fypp.html | 4 +- sourcefile/stdlib_sorting.fypp.html | 4 +- sourcefile/stdlib_sorting_ord_sort.fypp.html | 4 +- sourcefile/stdlib_sorting_radix_sort.f90.html | 4 +- sourcefile/stdlib_sorting_sort.fypp.html | 4 +- .../stdlib_sorting_sort_index.fypp.html | 4 +- sourcefile/stdlib_specialfunctions.f90.html | 4 +- .../stdlib_specialfunctions_gamma.fypp.html | 4 +- .../stdlib_specialfunctions_legendre.f90.html | 4 +- sourcefile/stdlib_stats.fypp.html | 4 +- sourcefile/stdlib_stats_corr.fypp.html | 4 +- sourcefile/stdlib_stats_cov.fypp.html | 6 +- ...b_stats_distribution_exponential.fypp.html | 4 +- ...stdlib_stats_distribution_normal.fypp.html | 4 +- ...tdlib_stats_distribution_uniform.fypp.html | 4 +- sourcefile/stdlib_stats_mean.fypp.html | 4 +- sourcefile/stdlib_stats_median.fypp.html | 4 +- sourcefile/stdlib_stats_moment.fypp.html | 4 +- sourcefile/stdlib_stats_moment_all.fypp.html | 4 +- sourcefile/stdlib_stats_moment_mask.fypp.html | 4 +- .../stdlib_stats_moment_scalar.fypp.html | 4 +- sourcefile/stdlib_stats_var.fypp.html | 4 +- sourcefile/stdlib_str2num.fypp.html | 4 +- sourcefile/stdlib_string_type.fypp.html | 4 +- .../stdlib_string_type_constructor.fypp.html | 4 +- sourcefile/stdlib_stringlist_type.f90.html | 4 +- sourcefile/stdlib_strings.fypp.html | 4 +- sourcefile/stdlib_strings_to_string.fypp.html | 4 +- sourcefile/stdlib_version.fypp.html | 4 +- src/stdlib_hashmaps.f90 | 506 +- tipuesearch/tipuesearch_content.js | 2 +- type/ansi_code.html | 6 +- type/bitset_64.html | 34 +- type/bitset_large.html | 34 +- type/bitset_type.html | 38 +- type/chaining_hashmap_type.html | 3297 +++++++++++- type/codata_constant_type.html | 18 +- type/hashmap_type.html | 3384 +++++++++++-- type/key_type.html | 10 +- type/linalg_state_type.html | 14 +- type/logger_type.html | 8 +- type/open_hashmap_type.html | 3297 +++++++++++- type/other_type.html | 10 +- type/string_type.html | 18 +- type/stringlist_index_type.html | 6 +- type/stringlist_type.html | 18 +- 671 files changed, 29550 insertions(+), 19927 deletions(-) create mode 100644 interface/assignment(=)~2.html delete mode 100644 interface/assignment(=)~3.html rename interface/{reverse~2.html => reverse.html} (97%) rename interface/{to_lower~2.html => to_lower.html} (97%) rename interface/{to_sentence~2.html => to_sentence.html} (97%) rename interface/{to_title~2.html => to_title.html} (97%) rename interface/{to_upper~2.html => to_upper.html} (97%) diff --git a/index.html b/index.html index 495f8b831..8c5d53b3e 100644 --- a/index.html +++ b/index.html @@ -194,13 +194,13 @@

Derived Types

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/adjustl.html b/interface/adjustl.html index 2a38b4f08..ea03f9285 100644 --- a/interface/adjustl.html +++ b/interface/adjustl.html @@ -177,7 +177,7 @@

Arguments

- + type(string_type), intent(in) @@ -210,13 +210,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/adjustr.html b/interface/adjustr.html index 78e2d9349..1b7b4016b 100644 --- a/interface/adjustr.html +++ b/interface/adjustr.html @@ -177,7 +177,7 @@

Arguments

- + type(string_type), intent(in) @@ -210,13 +210,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/all_close.html b/interface/all_close.html index 681d91621..6f99ac70a 100644 --- a/interface/all_close.html +++ b/interface/all_close.html @@ -185,7 +185,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -200,7 +200,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -215,7 +215,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -230,7 +230,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -245,7 +245,7 @@

Arguments

- + logical, intent(in), @@ -289,7 +289,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -304,7 +304,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -319,7 +319,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -334,7 +334,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -349,7 +349,7 @@

Arguments

- + logical, intent(in), @@ -393,7 +393,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -408,7 +408,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -423,7 +423,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -438,7 +438,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -453,7 +453,7 @@

Arguments

- + logical, intent(in), @@ -497,7 +497,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -512,7 +512,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -527,7 +527,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -542,7 +542,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -557,7 +557,7 @@

Arguments

- + logical, intent(in), @@ -601,7 +601,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -616,7 +616,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -631,7 +631,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -646,7 +646,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -661,7 +661,7 @@

Arguments

- + logical, intent(in), @@ -705,7 +705,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -720,7 +720,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -735,7 +735,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -750,7 +750,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -765,7 +765,7 @@

Arguments

- + logical, intent(in), @@ -809,7 +809,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -824,7 +824,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -839,7 +839,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -854,7 +854,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -869,7 +869,7 @@

Arguments

- + logical, intent(in), @@ -913,7 +913,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -928,7 +928,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -943,7 +943,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -958,7 +958,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -973,7 +973,7 @@

Arguments

- + logical, intent(in), @@ -1017,7 +1017,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -1032,7 +1032,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -1047,7 +1047,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -1062,7 +1062,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -1077,7 +1077,7 @@

Arguments

- + logical, intent(in), @@ -1121,7 +1121,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -1136,7 +1136,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -1151,7 +1151,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -1166,7 +1166,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -1181,7 +1181,7 @@

Arguments

- + logical, intent(in), @@ -1225,7 +1225,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1240,7 +1240,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1255,7 +1255,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -1270,7 +1270,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -1285,7 +1285,7 @@

Arguments

- + logical, intent(in), @@ -1329,7 +1329,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1344,7 +1344,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1359,7 +1359,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -1374,7 +1374,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -1389,7 +1389,7 @@

Arguments

- + logical, intent(in), @@ -1424,13 +1424,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/and.html b/interface/and.html index 8314dacb2..040b6b83e 100644 --- a/interface/and.html +++ b/interface/and.html @@ -197,7 +197,7 @@

Arguments

- + type(bitset_64), intent(inout) @@ -212,7 +212,7 @@

Arguments

- + type(bitset_64), intent(in) @@ -251,7 +251,7 @@

Arguments

- + type(bitset_large), intent(inout) @@ -266,7 +266,7 @@

Arguments

- + type(bitset_large), intent(in) @@ -295,13 +295,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/and_not.html b/interface/and_not.html index a2e6d367e..a3b105580 100644 --- a/interface/and_not.html +++ b/interface/and_not.html @@ -198,7 +198,7 @@

Arguments

- + type(bitset_64), intent(inout) @@ -213,7 +213,7 @@

Arguments

- + type(bitset_64), intent(in) @@ -252,7 +252,7 @@

Arguments

- + type(bitset_large), intent(inout) @@ -267,7 +267,7 @@

Arguments

- + type(bitset_large), intent(in) @@ -296,13 +296,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/arange.html b/interface/arange.html index 13b35df96..2acdd7219 100644 --- a/interface/arange.html +++ b/interface/arange.html @@ -180,7 +180,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -195,7 +195,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -254,7 +254,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -269,7 +269,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -328,7 +328,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -343,7 +343,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -402,7 +402,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -417,7 +417,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -476,7 +476,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -491,7 +491,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -550,7 +550,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -565,7 +565,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -615,13 +615,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/arg.html b/interface/arg.html index d31b1fbb9..7753d807a 100644 --- a/interface/arg.html +++ b/interface/arg.html @@ -254,13 +254,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/arg_select.html b/interface/arg_select.html index e683022d6..24dd529df 100644 --- a/interface/arg_select.html +++ b/interface/arg_select.html @@ -200,7 +200,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -234,7 +234,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -266,7 +266,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -290,7 +290,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -340,7 +340,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -374,7 +374,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -406,7 +406,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -430,7 +430,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -480,7 +480,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -514,7 +514,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -546,7 +546,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -570,7 +570,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -620,7 +620,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -654,7 +654,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -686,7 +686,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -710,7 +710,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -760,7 +760,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -794,7 +794,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -826,7 +826,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -850,7 +850,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -900,7 +900,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -934,7 +934,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -966,7 +966,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -990,7 +990,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -1040,7 +1040,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -1074,7 +1074,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1106,7 +1106,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -1130,7 +1130,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -1180,7 +1180,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -1214,7 +1214,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1246,7 +1246,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -1270,7 +1270,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -1320,7 +1320,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1354,7 +1354,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1386,7 +1386,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -1410,7 +1410,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -1460,7 +1460,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1494,7 +1494,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -1526,7 +1526,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -1550,7 +1550,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -1600,7 +1600,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1634,7 +1634,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1666,7 +1666,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -1690,7 +1690,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -1740,7 +1740,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1774,7 +1774,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1806,7 +1806,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -1830,7 +1830,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -1880,7 +1880,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1914,7 +1914,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1946,7 +1946,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -1970,7 +1970,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -2020,7 +2020,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2054,7 +2054,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -2086,7 +2086,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -2110,7 +2110,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -2160,7 +2160,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2194,7 +2194,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -2226,7 +2226,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -2250,7 +2250,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -2300,7 +2300,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2334,7 +2334,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2366,7 +2366,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -2390,7 +2390,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -2440,7 +2440,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -2474,7 +2474,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -2506,7 +2506,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -2530,7 +2530,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -2580,7 +2580,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -2614,7 +2614,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -2646,7 +2646,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -2670,7 +2670,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -2720,7 +2720,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -2754,7 +2754,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -2786,7 +2786,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -2810,7 +2810,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -2860,7 +2860,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -2894,7 +2894,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2926,7 +2926,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -2950,7 +2950,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -3000,7 +3000,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -3034,7 +3034,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -3066,7 +3066,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -3090,7 +3090,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -3140,7 +3140,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -3174,7 +3174,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -3206,7 +3206,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -3230,7 +3230,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -3280,7 +3280,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -3314,7 +3314,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -3346,7 +3346,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -3370,7 +3370,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -3420,7 +3420,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -3454,7 +3454,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -3486,7 +3486,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -3510,7 +3510,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -3547,13 +3547,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/argd.html b/interface/argd.html index 054def7cb..6c958afd7 100644 --- a/interface/argd.html +++ b/interface/argd.html @@ -254,13 +254,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/argpi.html b/interface/argpi.html index 435115334..f055b5266 100644 --- a/interface/argpi.html +++ b/interface/argpi.html @@ -254,13 +254,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/assignment(=).html b/interface/assignment(=).html index b217d0bc6..e9cce8029 100644 --- a/interface/assignment(=).html +++ b/interface/assignment(=).html @@ -75,25 +75,24 @@

assignment(=)
@@ -124,32 +123,25 @@

Contents

+ + + + + + @@ -158,153 +150,16 @@

Subroutines

public interface assignment(=)

-

Used to define assignment for bitset_large. - (Specification)

-

Example

-
    program example_assignment
-        use stdlib_bitsets
-        logical(int8)  :: logical1(64) = .true.
-        logical(int32), allocatable :: logical2(:)
-        type(bitset_64) :: set0, set1
-        set0 = logical1
-        if ( set0 % bits() /= 64 ) then
-            error stop procedure // &
-                ' initialization with logical(int8) failed to set' // &
-                ' the right size.'
-        else if ( .not. set0 % all() ) then
-            error stop procedure // ' initialization with' // &
-                ' logical(int8) failed to set the right values.'
-        else
-            write(*,*) 'Initialization with logical(int8) succeeded.'
-        end if
-        set1 = set0
-        if ( set1 == set0 ) &
-            write(*,*) 'Initialization by assignment succeeded'
-        logical2 = set1
-        if ( all( logical2 ) ) then
-            write(*,*) 'Initialization of logical(int32) succeeded.'
-        end if
-    end program example_assignment
-
+

Assign a character sequence to a string.


-

Subroutines

-
-

private pure module subroutine assign_logint16_large(self, logical_vector) -

-
-

Used to define assignment from an array of type logical(int16) to a -bitset_large.

- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - type(bitset_large), - intent(out) - - ::self - -
- - logical(kind=int16), - intent(in) - - ::logical_vector(:) - -
- - -
-
- -
-

private pure module subroutine assign_logint32_large(self, logical_vector) -

-
-

Used to define assignment from an array of type logical(int32) to a -bitset_large.

- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - type(bitset_large), - intent(out) - - ::self - -
- - logical(kind=int32), - intent(in) - - ::logical_vector(:) - -
- - -
-
+

Module Procedures

-

private pure module subroutine assign_logint64_large(self, logical_vector) +

private elemental subroutine assign_string_char(lhs, rhs)

-

Used to define assignment from an array of type logical(int64) to a -bitset_large.

+

Assign a character sequence to a string.

Arguments

@@ -319,30 +174,30 @@

Arguments

- + - + - + @@ -354,282 +209,6 @@

Arguments

-
-

private pure module subroutine assign_logint8_large(self, logical_vector) -

-
-

Used to define assignment from an array of type logical(int8) to a -bitset_large.

- -

Arguments

-
- - type(bitset_large), + + type(string_type), intent(out)intent(inout) ::selflhs
- - logical(kind=int64), + + character(len=*), intent(in) ::logical_vector(:)rhs
- - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - type(bitset_large), - intent(out) - - ::self - -
- - logical(kind=int8), - intent(in) - - ::logical_vector(:) - -
- - -
-

- -
-

private pure module subroutine logint16_assign_large(logical_vector, set) -

-
-

Used to define assignment to an array of type logical(int16) from a -bitset_large.

- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - logical(kind=int16), - intent(out), - allocatable - ::logical_vector(:) - -
- - type(bitset_large), - intent(in) - - ::set - -
- - -
-
- -
-

private pure module subroutine logint32_assign_large(logical_vector, set) -

-
-

Used to define assignment to an array of type logical(int32) from a -bitset_large.

- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - logical(kind=int32), - intent(out), - allocatable - ::logical_vector(:) - -
- - type(bitset_large), - intent(in) - - ::set - -
- - -
-
- -
-

private pure module subroutine logint64_assign_large(logical_vector, set) -

-
-

Used to define assignment to an array of type logical(int64) from a -bitset_large.

- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - logical(kind=int64), - intent(out), - allocatable - ::logical_vector(:) - -
- - type(bitset_large), - intent(in) - - ::set - -
- - -
-
- -
-

private pure module subroutine logint8_assign_large(logical_vector, set) -

-
-

Used to define assignment to an array of type logical(int8) from a -bitset_large.

- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - logical(kind=int8), - intent(out), - allocatable - ::logical_vector(:) - -
- - type(bitset_large), - intent(in) - - ::set - -
- - -
-
- -

@@ -638,13 +217,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/assignment(=)~2.html b/interface/assignment(=)~2.html new file mode 100644 index 000000000..74a7a632e --- /dev/null +++ b/interface/assignment(=)~2.html @@ -0,0 +1,676 @@ + + + + + + + + + + + + + assignment(=) – Fortran-lang/stdlib + + + + + + + + + + + + + + +
+ +
+ +
+
+

assignment(=) + Interface + +

+
+
+
+ +
+
+ +
+
+
+ + +
+ +
+ + +
+

public interface assignment(=)

+

Used to define assignment for bitset_large. + (Specification)

+

Example

+
    program example_assignment
+        use stdlib_bitsets
+        logical(int8)  :: logical1(64) = .true.
+        logical(int32), allocatable :: logical2(:)
+        type(bitset_64) :: set0, set1
+        set0 = logical1
+        if ( set0 % bits() /= 64 ) then
+            error stop procedure // &
+                ' initialization with logical(int8) failed to set' // &
+                ' the right size.'
+        else if ( .not. set0 % all() ) then
+            error stop procedure // ' initialization with' // &
+                ' logical(int8) failed to set the right values.'
+        else
+            write(*,*) 'Initialization with logical(int8) succeeded.'
+        end if
+        set1 = set0
+        if ( set1 == set0 ) &
+            write(*,*) 'Initialization by assignment succeeded'
+        logical2 = set1
+        if ( all( logical2 ) ) then
+            write(*,*) 'Initialization of logical(int32) succeeded.'
+        end if
+    end program example_assignment
+
+
+ +

Subroutines

+
+

private pure module subroutine assign_logint16_large(self, logical_vector) +

+
+

Used to define assignment from an array of type logical(int16) to a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + type(bitset_large), + intent(out) + + ::self + +
+ + logical(kind=int16), + intent(in) + + ::logical_vector(:) + +
+ + +
+
+ +
+

private pure module subroutine assign_logint32_large(self, logical_vector) +

+
+

Used to define assignment from an array of type logical(int32) to a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + type(bitset_large), + intent(out) + + ::self + +
+ + logical(kind=int32), + intent(in) + + ::logical_vector(:) + +
+ + +
+
+ +
+

private pure module subroutine assign_logint64_large(self, logical_vector) +

+
+

Used to define assignment from an array of type logical(int64) to a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + type(bitset_large), + intent(out) + + ::self + +
+ + logical(kind=int64), + intent(in) + + ::logical_vector(:) + +
+ + +
+
+ +
+

private pure module subroutine assign_logint8_large(self, logical_vector) +

+
+

Used to define assignment from an array of type logical(int8) to a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + type(bitset_large), + intent(out) + + ::self + +
+ + logical(kind=int8), + intent(in) + + ::logical_vector(:) + +
+ + +
+
+ +
+

private pure module subroutine logint16_assign_large(logical_vector, set) +

+
+

Used to define assignment to an array of type logical(int16) from a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + logical(kind=int16), + intent(out), + allocatable + ::logical_vector(:) + +
+ + type(bitset_large), + intent(in) + + ::set + +
+ + +
+
+ +
+

private pure module subroutine logint32_assign_large(logical_vector, set) +

+
+

Used to define assignment to an array of type logical(int32) from a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + logical(kind=int32), + intent(out), + allocatable + ::logical_vector(:) + +
+ + type(bitset_large), + intent(in) + + ::set + +
+ + +
+
+ +
+

private pure module subroutine logint64_assign_large(logical_vector, set) +

+
+

Used to define assignment to an array of type logical(int64) from a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + logical(kind=int64), + intent(out), + allocatable + ::logical_vector(:) + +
+ + type(bitset_large), + intent(in) + + ::set + +
+ + +
+
+ +
+

private pure module subroutine logint8_assign_large(logical_vector, set) +

+
+

Used to define assignment to an array of type logical(int8) from a +bitset_large.

+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeIntentOptional AttributesName
+ + logical(kind=int8), + intent(out), + allocatable + ::logical_vector(:) + +
+ + type(bitset_large), + intent(in) + + ::set + +
+ + +
+
+ + +
+
+
+
+
+
+
+

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License +
d996e43

+
+
+

+ Documentation generated by + FORD + on 2024-06-19 12:42

+
+
+
+
+
+ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/interface/assignment(=)~3.html b/interface/assignment(=)~3.html deleted file mode 100644 index 6e4a16719..000000000 --- a/interface/assignment(=)~3.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - assignment(=) – Fortran-lang/stdlib - - - - - - - - - - - - - - -
- -
- -
-
-

assignment(=) - Interface - -

-
-
-
- -
-
- -
-
-
- - -
- -
- - -
-

public interface assignment(=)

-

Assign a character sequence to a string.

-
- - -

Module Procedures

-
-

private elemental subroutine assign_string_char(lhs, rhs) -

-
-

Assign a character sequence to a string.

- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeIntentOptional AttributesName
- - type(string_type), - intent(inout) - - ::lhs - -
- - character(len=*), - intent(in) - - ::rhs - -
- - -
-
- -
-
-
-
-
-
-
-

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

-
-
-

- Documentation generated by - FORD - on 2024-06-19 12:31

-
-
-
-
-
- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/interface/axpy.html b/interface/axpy.html index e9e958e6b..e94517fbf 100644 --- a/interface/axpy.html +++ b/interface/axpy.html @@ -190,7 +190,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -205,7 +205,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -220,7 +220,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -235,7 +235,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -250,7 +250,7 @@

Arguments

- + complex(kind=sp), intent(inout) @@ -265,7 +265,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -304,7 +304,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -319,7 +319,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -334,7 +334,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -349,7 +349,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -364,7 +364,7 @@

Arguments

- + real(kind=dp), intent(inout) @@ -379,7 +379,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -418,7 +418,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -433,7 +433,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -448,7 +448,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -463,7 +463,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -478,7 +478,7 @@

Arguments

- + real(kind=sp), intent(inout) @@ -493,7 +493,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -532,7 +532,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -547,7 +547,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -562,7 +562,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -577,7 +577,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -592,7 +592,7 @@

Arguments

- + complex(kind=dp), intent(inout) @@ -607,7 +607,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -649,7 +649,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -664,7 +664,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -679,7 +679,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -694,7 +694,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -709,7 +709,7 @@

Arguments

- + complex(kind=sp), intent(inout) @@ -724,7 +724,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -765,7 +765,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -780,7 +780,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -795,7 +795,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -810,7 +810,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -825,7 +825,7 @@

Arguments

- + real(kind=dp), intent(inout) @@ -840,7 +840,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -881,7 +881,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -896,7 +896,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -911,7 +911,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -926,7 +926,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -941,7 +941,7 @@

Arguments

- + real(kind=sp), intent(inout) @@ -956,7 +956,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -996,7 +996,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -1011,7 +1011,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -1026,7 +1026,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -1041,7 +1041,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -1056,7 +1056,7 @@

Arguments

- + complex(kind=dp), intent(inout) @@ -1071,7 +1071,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -1099,13 +1099,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/bidx.html b/interface/bidx.html index 5fa2b8ea1..631e7a369 100644 --- a/interface/bidx.html +++ b/interface/bidx.html @@ -209,13 +209,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/cdf_exp.html b/interface/cdf_exp.html index d501d786b..a27a69ab6 100644 --- a/interface/cdf_exp.html +++ b/interface/cdf_exp.html @@ -180,7 +180,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -239,7 +239,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -298,7 +298,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -357,7 +357,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -405,13 +405,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/cdf_normal.html b/interface/cdf_normal.html index 3858085fe..23fb95ef5 100644 --- a/interface/cdf_normal.html +++ b/interface/cdf_normal.html @@ -180,7 +180,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -195,7 +195,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -210,7 +210,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -254,7 +254,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -269,7 +269,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -284,7 +284,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -328,7 +328,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -343,7 +343,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -358,7 +358,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -402,7 +402,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -417,7 +417,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -432,7 +432,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -465,13 +465,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/cdf_uniform.html b/interface/cdf_uniform.html index 9f7eb2ce3..1d2695852 100644 --- a/interface/cdf_uniform.html +++ b/interface/cdf_uniform.html @@ -185,7 +185,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -200,7 +200,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -215,7 +215,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -259,7 +259,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -274,7 +274,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -289,7 +289,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -333,7 +333,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -348,7 +348,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -363,7 +363,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -407,7 +407,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -422,7 +422,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -437,7 +437,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -481,7 +481,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -496,7 +496,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -511,7 +511,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -555,7 +555,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -570,7 +570,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -585,7 +585,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -629,7 +629,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -644,7 +644,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -659,7 +659,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -703,7 +703,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -718,7 +718,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -733,7 +733,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -766,13 +766,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/char.html b/interface/char.html index 64097d648..c5ada6ffc 100644 --- a/interface/char.html +++ b/interface/char.html @@ -177,7 +177,7 @@

Arguments

- + type(string_type), intent(in) @@ -221,7 +221,7 @@

Arguments

- + type(string_type), intent(in) @@ -236,7 +236,7 @@

Arguments

- + integer, intent(in) @@ -280,7 +280,7 @@

Arguments

- + type(string_type), intent(in) @@ -295,7 +295,7 @@

Arguments

- + integer, intent(in) @@ -310,7 +310,7 @@

Arguments

- + integer, intent(in) @@ -343,13 +343,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/chomp.html b/interface/chomp.html index f08cf69c5..023633b04 100644 --- a/interface/chomp.html +++ b/interface/chomp.html @@ -184,7 +184,7 @@

Arguments

- + type(string_type), intent(in) @@ -229,7 +229,7 @@

Arguments

- + character(len=*), intent(in) @@ -273,7 +273,7 @@

Arguments

- + type(string_type), intent(in) @@ -288,7 +288,7 @@

Arguments

- + character(len=1), intent(in) @@ -332,7 +332,7 @@

Arguments

- + character(len=*), intent(in) @@ -347,7 +347,7 @@

Arguments

- + character(len=1), intent(in) @@ -391,7 +391,7 @@

Arguments

- + type(string_type), intent(in) @@ -406,7 +406,7 @@

Arguments

- + type(string_type), intent(in) @@ -450,7 +450,7 @@

Arguments

- + character(len=*), intent(in) @@ -465,7 +465,7 @@

Arguments

- + type(string_type), intent(in) @@ -509,7 +509,7 @@

Arguments

- + type(string_type), intent(in) @@ -524,7 +524,7 @@

Arguments

- + character(len=*), intent(in) @@ -568,7 +568,7 @@

Arguments

- + character(len=*), intent(in) @@ -583,7 +583,7 @@

Arguments

- + character(len=*), intent(in) @@ -616,13 +616,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/clip.html b/interface/clip.html index 21c089bd6..3f7299edb 100644 --- a/interface/clip.html +++ b/interface/clip.html @@ -179,7 +179,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -253,7 +253,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -327,7 +327,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -401,7 +401,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -475,7 +475,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -549,7 +549,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -612,13 +612,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/copy.html b/interface/copy.html index 34a2b7810..bbcc1f508 100644 --- a/interface/copy.html +++ b/interface/copy.html @@ -190,7 +190,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -205,7 +205,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -220,7 +220,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -235,7 +235,7 @@

Arguments

- + complex(kind=sp), intent(out) @@ -250,7 +250,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -289,7 +289,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -304,7 +304,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -319,7 +319,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -334,7 +334,7 @@

Arguments

- + real(kind=dp), intent(out) @@ -349,7 +349,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -388,7 +388,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -403,7 +403,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -418,7 +418,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -433,7 +433,7 @@

Arguments

- + real(kind=sp), intent(out) @@ -448,7 +448,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -487,7 +487,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -502,7 +502,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -517,7 +517,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -532,7 +532,7 @@

Arguments

- + complex(kind=dp), intent(out) @@ -547,7 +547,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -589,7 +589,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -604,7 +604,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -619,7 +619,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -634,7 +634,7 @@

Arguments

- + complex(kind=sp), intent(out) @@ -649,7 +649,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -690,7 +690,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -705,7 +705,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -720,7 +720,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -735,7 +735,7 @@

Arguments

- + real(kind=dp), intent(out) @@ -750,7 +750,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -791,7 +791,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -806,7 +806,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -821,7 +821,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -836,7 +836,7 @@

Arguments

- + real(kind=sp), intent(out) @@ -851,7 +851,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -891,7 +891,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -906,7 +906,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -921,7 +921,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -936,7 +936,7 @@

Arguments

- + complex(kind=dp), intent(out) @@ -951,7 +951,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -979,13 +979,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/corr.html b/interface/corr.html index c9f3f634b..dd6da3551 100644 --- a/interface/corr.html +++ b/interface/corr.html @@ -205,7 +205,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -220,7 +220,7 @@

Arguments

- + integer, intent(in) @@ -235,7 +235,7 @@

Arguments

- + logical, intent(in), @@ -279,7 +279,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -294,7 +294,7 @@

Arguments

- + integer, intent(in) @@ -309,7 +309,7 @@

Arguments

- + logical, intent(in), @@ -353,7 +353,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -368,7 +368,7 @@

Arguments

- + integer, intent(in) @@ -383,7 +383,7 @@

Arguments

- + logical, intent(in), @@ -427,7 +427,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -442,7 +442,7 @@

Arguments

- + integer, intent(in) @@ -457,7 +457,7 @@

Arguments

- + logical, intent(in), @@ -501,7 +501,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -516,7 +516,7 @@

Arguments

- + integer, intent(in) @@ -531,7 +531,7 @@

Arguments

- + logical, intent(in), @@ -575,7 +575,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -590,7 +590,7 @@

Arguments

- + integer, intent(in) @@ -605,7 +605,7 @@

Arguments

- + logical, intent(in), @@ -649,7 +649,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -664,7 +664,7 @@

Arguments

- + integer, intent(in) @@ -679,7 +679,7 @@

Arguments

- + logical, intent(in), @@ -723,7 +723,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -738,7 +738,7 @@

Arguments

- + integer, intent(in) @@ -753,7 +753,7 @@

Arguments

- + logical, intent(in), @@ -797,7 +797,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -812,7 +812,7 @@

Arguments

- + integer, intent(in) @@ -827,7 +827,7 @@

Arguments

- + logical, intent(in), @@ -871,7 +871,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -886,7 +886,7 @@

Arguments

- + integer, intent(in) @@ -901,7 +901,7 @@

Arguments

- + logical, intent(in), @@ -945,7 +945,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -960,7 +960,7 @@

Arguments

- + integer, intent(in) @@ -975,7 +975,7 @@

Arguments

- + logical, intent(in), @@ -1019,7 +1019,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1034,7 +1034,7 @@

Arguments

- + integer, intent(in) @@ -1049,7 +1049,7 @@

Arguments

- + logical, intent(in), @@ -1093,7 +1093,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1108,7 +1108,7 @@

Arguments

- + integer, intent(in) @@ -1123,7 +1123,7 @@

Arguments

- + logical, intent(in), @@ -1167,7 +1167,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1182,7 +1182,7 @@

Arguments

- + integer, intent(in) @@ -1197,7 +1197,7 @@

Arguments

- + logical, intent(in), @@ -1241,7 +1241,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1256,7 +1256,7 @@

Arguments

- + integer, intent(in) @@ -1271,7 +1271,7 @@

Arguments

- + logical, intent(in), @@ -1315,7 +1315,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1330,7 +1330,7 @@

Arguments

- + integer, intent(in) @@ -1345,7 +1345,7 @@

Arguments

- + logical, intent(in), @@ -1389,7 +1389,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -1404,7 +1404,7 @@

Arguments

- + integer, intent(in) @@ -1419,7 +1419,7 @@

Arguments

- + logical, intent(in) @@ -1463,7 +1463,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -1478,7 +1478,7 @@

Arguments

- + integer, intent(in) @@ -1493,7 +1493,7 @@

Arguments

- + logical, intent(in) @@ -1537,7 +1537,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -1552,7 +1552,7 @@

Arguments

- + integer, intent(in) @@ -1567,7 +1567,7 @@

Arguments

- + logical, intent(in) @@ -1611,7 +1611,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1626,7 +1626,7 @@

Arguments

- + integer, intent(in) @@ -1641,7 +1641,7 @@

Arguments

- + logical, intent(in) @@ -1685,7 +1685,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1700,7 +1700,7 @@

Arguments

- + integer, intent(in) @@ -1715,7 +1715,7 @@

Arguments

- + logical, intent(in) @@ -1759,7 +1759,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1774,7 +1774,7 @@

Arguments

- + integer, intent(in) @@ -1789,7 +1789,7 @@

Arguments

- + logical, intent(in) @@ -1833,7 +1833,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1848,7 +1848,7 @@

Arguments

- + integer, intent(in) @@ -1863,7 +1863,7 @@

Arguments

- + logical, intent(in) @@ -1907,7 +1907,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1922,7 +1922,7 @@

Arguments

- + integer, intent(in) @@ -1937,7 +1937,7 @@

Arguments

- + logical, intent(in) @@ -1981,7 +1981,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -1996,7 +1996,7 @@

Arguments

- + integer, intent(in) @@ -2011,7 +2011,7 @@

Arguments

- + logical, intent(in) @@ -2055,7 +2055,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -2070,7 +2070,7 @@

Arguments

- + integer, intent(in) @@ -2085,7 +2085,7 @@

Arguments

- + logical, intent(in) @@ -2129,7 +2129,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -2144,7 +2144,7 @@

Arguments

- + integer, intent(in) @@ -2159,7 +2159,7 @@

Arguments

- + logical, intent(in) @@ -2203,7 +2203,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -2218,7 +2218,7 @@

Arguments

- + integer, intent(in) @@ -2233,7 +2233,7 @@

Arguments

- + logical, intent(in) @@ -2277,7 +2277,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2292,7 +2292,7 @@

Arguments

- + integer, intent(in) @@ -2307,7 +2307,7 @@

Arguments

- + logical, intent(in) @@ -2351,7 +2351,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -2366,7 +2366,7 @@

Arguments

- + integer, intent(in) @@ -2381,7 +2381,7 @@

Arguments

- + logical, intent(in) @@ -2425,7 +2425,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -2440,7 +2440,7 @@

Arguments

- + integer, intent(in) @@ -2455,7 +2455,7 @@

Arguments

- + logical, intent(in) @@ -2499,7 +2499,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -2514,7 +2514,7 @@

Arguments

- + integer, intent(in) @@ -2529,7 +2529,7 @@

Arguments

- + logical, intent(in) @@ -2564,13 +2564,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/count.html b/interface/count.html index b4477eb93..4556fc8cc 100644 --- a/interface/count.html +++ b/interface/count.html @@ -182,7 +182,7 @@

Arguments

- + type(string_type), intent(in) @@ -258,7 +258,7 @@

Arguments

- + type(string_type), intent(in) @@ -334,7 +334,7 @@

Arguments

- + character(len=*), intent(in) @@ -410,7 +410,7 @@

Arguments

- + character(len=*), intent(in) @@ -473,13 +473,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/cov.html b/interface/cov.html index c8c06ed4d..3cf5dbe23 100644 --- a/interface/cov.html +++ b/interface/cov.html @@ -205,7 +205,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -220,7 +220,7 @@

Arguments

- + integer, intent(in) @@ -235,7 +235,7 @@

Arguments

- + logical, intent(in), @@ -250,7 +250,7 @@

Arguments

- + logical, intent(in), @@ -294,7 +294,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -309,7 +309,7 @@

Arguments

- + integer, intent(in) @@ -324,7 +324,7 @@

Arguments

- + logical, intent(in), @@ -339,7 +339,7 @@

Arguments

- + logical, intent(in), @@ -383,7 +383,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -398,7 +398,7 @@

Arguments

- + integer, intent(in) @@ -413,7 +413,7 @@

Arguments

- + logical, intent(in), @@ -428,7 +428,7 @@

Arguments

- + logical, intent(in), @@ -472,7 +472,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -487,7 +487,7 @@

Arguments

- + integer, intent(in) @@ -502,7 +502,7 @@

Arguments

- + logical, intent(in), @@ -517,7 +517,7 @@

Arguments

- + logical, intent(in), @@ -561,7 +561,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -576,7 +576,7 @@

Arguments

- + integer, intent(in) @@ -591,7 +591,7 @@

Arguments

- + logical, intent(in), @@ -606,7 +606,7 @@

Arguments

- + logical, intent(in), @@ -650,7 +650,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -665,7 +665,7 @@

Arguments

- + integer, intent(in) @@ -680,7 +680,7 @@

Arguments

- + logical, intent(in), @@ -695,7 +695,7 @@

Arguments

- + logical, intent(in), @@ -739,7 +739,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -754,7 +754,7 @@

Arguments

- + integer, intent(in) @@ -769,7 +769,7 @@

Arguments

- + logical, intent(in), @@ -784,7 +784,7 @@

Arguments

- + logical, intent(in), @@ -828,7 +828,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -843,7 +843,7 @@

Arguments

- + integer, intent(in) @@ -858,7 +858,7 @@

Arguments

- + logical, intent(in), @@ -873,7 +873,7 @@

Arguments

- + logical, intent(in), @@ -917,7 +917,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -932,7 +932,7 @@

Arguments

- + integer, intent(in) @@ -947,7 +947,7 @@

Arguments

- + logical, intent(in), @@ -962,7 +962,7 @@

Arguments

- + logical, intent(in), @@ -1006,7 +1006,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -1021,7 +1021,7 @@

Arguments

- + integer, intent(in) @@ -1036,7 +1036,7 @@

Arguments

- + logical, intent(in), @@ -1051,7 +1051,7 @@

Arguments

- + logical, intent(in), @@ -1095,7 +1095,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -1110,7 +1110,7 @@

Arguments

- + integer, intent(in) @@ -1125,7 +1125,7 @@

Arguments

- + logical, intent(in), @@ -1140,7 +1140,7 @@

Arguments

- + logical, intent(in), @@ -1184,7 +1184,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1199,7 +1199,7 @@

Arguments

- + integer, intent(in) @@ -1214,7 +1214,7 @@

Arguments

- + logical, intent(in), @@ -1229,7 +1229,7 @@

Arguments

- + logical, intent(in), @@ -1273,7 +1273,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1288,7 +1288,7 @@

Arguments

- + integer, intent(in) @@ -1303,7 +1303,7 @@

Arguments

- + logical, intent(in), @@ -1318,7 +1318,7 @@

Arguments

- + logical, intent(in), @@ -1362,7 +1362,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1377,7 +1377,7 @@

Arguments

- + integer, intent(in) @@ -1392,7 +1392,7 @@

Arguments

- + logical, intent(in), @@ -1407,7 +1407,7 @@

Arguments

- + logical, intent(in), @@ -1451,7 +1451,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1466,7 +1466,7 @@

Arguments

- + integer, intent(in) @@ -1481,7 +1481,7 @@

Arguments

- + logical, intent(in), @@ -1496,7 +1496,7 @@

Arguments

- + logical, intent(in), @@ -1540,7 +1540,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1555,7 +1555,7 @@

Arguments

- + integer, intent(in) @@ -1570,7 +1570,7 @@

Arguments

- + logical, intent(in), @@ -1585,7 +1585,7 @@

Arguments

- + logical, intent(in), @@ -1629,7 +1629,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -1644,7 +1644,7 @@

Arguments

- + integer, intent(in) @@ -1659,7 +1659,7 @@

Arguments

- + logical, intent(in) @@ -1674,7 +1674,7 @@

Arguments

- + logical, intent(in), @@ -1718,7 +1718,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -1733,7 +1733,7 @@

Arguments

- + integer, intent(in) @@ -1748,7 +1748,7 @@

Arguments

- + logical, intent(in) @@ -1763,7 +1763,7 @@

Arguments

- + logical, intent(in), @@ -1807,7 +1807,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -1822,7 +1822,7 @@

Arguments

- + integer, intent(in) @@ -1837,7 +1837,7 @@

Arguments

- + logical, intent(in) @@ -1852,7 +1852,7 @@

Arguments

- + logical, intent(in), @@ -1896,7 +1896,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -1911,7 +1911,7 @@

Arguments

- + integer, intent(in) @@ -1926,7 +1926,7 @@

Arguments

- + logical, intent(in) @@ -1941,7 +1941,7 @@

Arguments

- + logical, intent(in), @@ -1985,7 +1985,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2000,7 +2000,7 @@

Arguments

- + integer, intent(in) @@ -2015,7 +2015,7 @@

Arguments

- + logical, intent(in) @@ -2030,7 +2030,7 @@

Arguments

- + logical, intent(in), @@ -2074,7 +2074,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -2089,7 +2089,7 @@

Arguments

- + integer, intent(in) @@ -2104,7 +2104,7 @@

Arguments

- + logical, intent(in) @@ -2119,7 +2119,7 @@

Arguments

- + logical, intent(in), @@ -2163,7 +2163,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -2178,7 +2178,7 @@

Arguments

- + integer, intent(in) @@ -2193,7 +2193,7 @@

Arguments

- + logical, intent(in) @@ -2208,7 +2208,7 @@

Arguments

- + logical, intent(in), @@ -2252,7 +2252,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -2267,7 +2267,7 @@

Arguments

- + integer, intent(in) @@ -2282,7 +2282,7 @@

Arguments

- + logical, intent(in) @@ -2297,7 +2297,7 @@

Arguments

- + logical, intent(in), @@ -2341,7 +2341,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -2356,7 +2356,7 @@

Arguments

- + integer, intent(in) @@ -2371,7 +2371,7 @@

Arguments

- + logical, intent(in) @@ -2386,7 +2386,7 @@

Arguments

- + logical, intent(in), @@ -2430,7 +2430,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -2445,7 +2445,7 @@

Arguments

- + integer, intent(in) @@ -2460,7 +2460,7 @@

Arguments

- + logical, intent(in) @@ -2475,7 +2475,7 @@

Arguments

- + logical, intent(in), @@ -2519,7 +2519,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -2534,7 +2534,7 @@

Arguments

- + integer, intent(in) @@ -2549,7 +2549,7 @@

Arguments

- + logical, intent(in) @@ -2564,7 +2564,7 @@

Arguments

- + logical, intent(in), @@ -2608,7 +2608,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -2623,7 +2623,7 @@

Arguments

- + integer, intent(in) @@ -2638,7 +2638,7 @@

Arguments

- + logical, intent(in) @@ -2653,7 +2653,7 @@

Arguments

- + logical, intent(in), @@ -2697,7 +2697,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -2712,7 +2712,7 @@

Arguments

- + integer, intent(in) @@ -2727,7 +2727,7 @@

Arguments

- + logical, intent(in) @@ -2742,7 +2742,7 @@

Arguments

- + logical, intent(in), @@ -2786,7 +2786,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -2801,7 +2801,7 @@

Arguments

- + integer, intent(in) @@ -2816,7 +2816,7 @@

Arguments

- + logical, intent(in) @@ -2831,7 +2831,7 @@

Arguments

- + logical, intent(in), @@ -2875,7 +2875,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -2890,7 +2890,7 @@

Arguments

- + integer, intent(in) @@ -2905,7 +2905,7 @@

Arguments

- + logical, intent(in) @@ -2920,7 +2920,7 @@

Arguments

- + logical, intent(in), @@ -2964,7 +2964,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -2979,7 +2979,7 @@

Arguments

- + integer, intent(in) @@ -2994,7 +2994,7 @@

Arguments

- + logical, intent(in) @@ -3009,7 +3009,7 @@

Arguments

- + logical, intent(in), @@ -3044,13 +3044,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/cross_product.html b/interface/cross_product.html index 3b7bae1ac..970d17925 100644 --- a/interface/cross_product.html +++ b/interface/cross_product.html @@ -181,7 +181,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -196,7 +196,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -240,7 +240,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -255,7 +255,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -299,7 +299,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -314,7 +314,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -358,7 +358,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -373,7 +373,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -417,7 +417,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -432,7 +432,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -476,7 +476,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -491,7 +491,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -535,7 +535,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -550,7 +550,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -594,7 +594,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -609,7 +609,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -644,13 +644,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/det.html b/interface/det.html index 541f180c2..b9dc57101 100644 --- a/interface/det.html +++ b/interface/det.html @@ -295,13 +295,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/diag.html b/interface/diag.html index d1f3a61a0..6125de32f 100644 --- a/interface/diag.html +++ b/interface/diag.html @@ -206,7 +206,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -250,7 +250,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -265,7 +265,7 @@

Arguments

- + integer, intent(in) @@ -309,7 +309,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -353,7 +353,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -368,7 +368,7 @@

Arguments

- + integer, intent(in) @@ -412,7 +412,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -456,7 +456,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -471,7 +471,7 @@

Arguments

- + integer, intent(in) @@ -515,7 +515,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -559,7 +559,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -574,7 +574,7 @@

Arguments

- + integer, intent(in) @@ -618,7 +618,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -662,7 +662,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -677,7 +677,7 @@

Arguments

- + integer, intent(in) @@ -721,7 +721,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -765,7 +765,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -780,7 +780,7 @@

Arguments

- + integer, intent(in) @@ -824,7 +824,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -868,7 +868,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -883,7 +883,7 @@

Arguments

- + integer, intent(in) @@ -927,7 +927,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -971,7 +971,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -986,7 +986,7 @@

Arguments

- + integer, intent(in) @@ -1030,7 +1030,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1074,7 +1074,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1089,7 +1089,7 @@

Arguments

- + integer, intent(in) @@ -1133,7 +1133,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1177,7 +1177,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1192,7 +1192,7 @@

Arguments

- + integer, intent(in) @@ -1236,7 +1236,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1280,7 +1280,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1295,7 +1295,7 @@

Arguments

- + integer, intent(in) @@ -1339,7 +1339,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1383,7 +1383,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1398,7 +1398,7 @@

Arguments

- + integer, intent(in) @@ -1442,7 +1442,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1486,7 +1486,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1501,7 +1501,7 @@

Arguments

- + integer, intent(in) @@ -1545,7 +1545,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1589,7 +1589,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -1604,7 +1604,7 @@

Arguments

- + integer, intent(in) @@ -1648,7 +1648,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1692,7 +1692,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1707,7 +1707,7 @@

Arguments

- + integer, intent(in) @@ -1751,7 +1751,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1795,7 +1795,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1810,7 +1810,7 @@

Arguments

- + integer, intent(in) @@ -1845,13 +1845,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/diff.html b/interface/diff.html index fdf8c277e..c7225e89e 100644 --- a/interface/diff.html +++ b/interface/diff.html @@ -185,7 +185,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -200,7 +200,7 @@

Arguments

- + integer, intent(in), @@ -215,7 +215,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -230,7 +230,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -274,7 +274,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -289,7 +289,7 @@

Arguments

- + integer, intent(in), @@ -304,7 +304,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -319,7 +319,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -363,7 +363,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -378,7 +378,7 @@

Arguments

- + integer, intent(in), @@ -393,7 +393,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -408,7 +408,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -452,7 +452,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -467,7 +467,7 @@

Arguments

- + integer, intent(in), @@ -482,7 +482,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -497,7 +497,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -541,7 +541,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -556,7 +556,7 @@

Arguments

- + integer, intent(in), @@ -571,7 +571,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -586,7 +586,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -630,7 +630,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -645,7 +645,7 @@

Arguments

- + integer, intent(in), @@ -660,7 +660,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -675,7 +675,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -719,7 +719,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -734,7 +734,7 @@

Arguments

- + integer, intent(in), @@ -749,7 +749,7 @@

Arguments

- + integer, intent(in), @@ -764,7 +764,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -779,7 +779,7 @@

Arguments

- + real(kind=dp), intent(in), @@ -823,7 +823,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -838,7 +838,7 @@

Arguments

- + integer, intent(in), @@ -853,7 +853,7 @@

Arguments

- + integer, intent(in), @@ -868,7 +868,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -883,7 +883,7 @@

Arguments

- + integer(kind=int16), intent(in), @@ -927,7 +927,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -942,7 +942,7 @@

Arguments

- + integer, intent(in), @@ -957,7 +957,7 @@

Arguments

- + integer, intent(in), @@ -972,7 +972,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -987,7 +987,7 @@

Arguments

- + integer(kind=int32), intent(in), @@ -1031,7 +1031,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -1046,7 +1046,7 @@

Arguments

- + integer, intent(in), @@ -1061,7 +1061,7 @@

Arguments

- + integer, intent(in), @@ -1076,7 +1076,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -1091,7 +1091,7 @@

Arguments

- + integer(kind=int64), intent(in), @@ -1135,7 +1135,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -1150,7 +1150,7 @@

Arguments

- + integer, intent(in), @@ -1165,7 +1165,7 @@

Arguments

- + integer, intent(in), @@ -1180,7 +1180,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -1195,7 +1195,7 @@

Arguments

- + integer(kind=int8), intent(in), @@ -1239,7 +1239,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -1254,7 +1254,7 @@

Arguments

- + integer, intent(in), @@ -1269,7 +1269,7 @@

Arguments

- + integer, intent(in), @@ -1284,7 +1284,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -1299,7 +1299,7 @@

Arguments

- + real(kind=sp), intent(in), @@ -1334,13 +1334,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/dist_rand.html b/interface/dist_rand.html index 6e5a70218..338e05d21 100644 --- a/interface/dist_rand.html +++ b/interface/dist_rand.html @@ -183,7 +183,7 @@

Arguments

- + integer(kind=int8), intent(in) @@ -230,7 +230,7 @@

Arguments

- + integer(kind=int16), intent(in) @@ -277,7 +277,7 @@

Arguments

- + integer(kind=int32), intent(in) @@ -324,7 +324,7 @@

Arguments

- + integer(kind=int64), intent(in) @@ -357,13 +357,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/dlegendre.html b/interface/dlegendre.html index 593bae41e..de68b9db6 100644 --- a/interface/dlegendre.html +++ b/interface/dlegendre.html @@ -173,7 +173,7 @@

Arguments

- + integer, intent(in) @@ -188,7 +188,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -223,13 +223,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/dot.html b/interface/dot.html index ccb19cd95..aa265ac15 100644 --- a/interface/dot.html +++ b/interface/dot.html @@ -186,7 +186,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -201,7 +201,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -216,7 +216,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -231,7 +231,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -246,7 +246,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -290,7 +290,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -305,7 +305,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -320,7 +320,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -335,7 +335,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -350,7 +350,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -399,7 +399,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -414,7 +414,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -429,7 +429,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -444,7 +444,7 @@

Arguments

- + real(kind=dp), intent(in) @@ -459,7 +459,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -505,7 +505,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -520,7 +520,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -535,7 +535,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -550,7 +550,7 @@

Arguments

- + real(kind=sp), intent(in) @@ -565,7 +565,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -598,13 +598,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/dotc.html b/interface/dotc.html index 323a10063..4820c7ea5 100644 --- a/interface/dotc.html +++ b/interface/dotc.html @@ -186,7 +186,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -201,7 +201,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -216,7 +216,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -231,7 +231,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -246,7 +246,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -290,7 +290,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -305,7 +305,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -320,7 +320,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -335,7 +335,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -350,7 +350,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -399,7 +399,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -414,7 +414,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -429,7 +429,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -444,7 +444,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -459,7 +459,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -505,7 +505,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -520,7 +520,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -535,7 +535,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -550,7 +550,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -565,7 +565,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -598,13 +598,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/dotu.html b/interface/dotu.html index 5224075f9..430db4930 100644 --- a/interface/dotu.html +++ b/interface/dotu.html @@ -186,7 +186,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -201,7 +201,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -216,7 +216,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -231,7 +231,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -246,7 +246,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -290,7 +290,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -305,7 +305,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -320,7 +320,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -335,7 +335,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -350,7 +350,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -399,7 +399,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -414,7 +414,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -429,7 +429,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -444,7 +444,7 @@

Arguments

- + complex(kind=sp), intent(in) @@ -459,7 +459,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -505,7 +505,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -520,7 +520,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -535,7 +535,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -550,7 +550,7 @@

Arguments

- + complex(kind=dp), intent(in) @@ -565,7 +565,7 @@

Arguments

- + integer(kind=ilp), intent(in) @@ -598,13 +598,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/ends_with.html b/interface/ends_with.html index 4f7a4e5f7..718a54a2e 100644 --- a/interface/ends_with.html +++ b/interface/ends_with.html @@ -178,7 +178,7 @@

Arguments

- + type(string_type), intent(in) @@ -193,7 +193,7 @@

Arguments

- + type(string_type), intent(in) @@ -237,7 +237,7 @@

Arguments

- + type(string_type), intent(in) @@ -252,7 +252,7 @@

Arguments

- + character(len=*), intent(in) @@ -296,7 +296,7 @@

Arguments

- + character(len=*), intent(in) @@ -311,7 +311,7 @@

Arguments

- + type(string_type), intent(in) @@ -355,7 +355,7 @@

Arguments

- + character(len=*), intent(in) @@ -370,7 +370,7 @@

Arguments

- + character(len=*), intent(in) @@ -403,13 +403,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/error_stop.html b/interface/error_stop.html index c8d40bfec..b1140b1a1 100644 --- a/interface/error_stop.html +++ b/interface/error_stop.html @@ -158,7 +158,7 @@

Arguments

- + character(len=*), intent(in) @@ -173,7 +173,7 @@

Arguments

- + integer, intent(in), @@ -203,13 +203,13 @@

Description

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/extract.html b/interface/extract.html index 913d48d28..126347088 100644 --- a/interface/extract.html +++ b/interface/extract.html @@ -193,7 +193,7 @@

Arguments

- + type(bitset_64), intent(out) @@ -208,7 +208,7 @@

Arguments

- + type(bitset_64), intent(in) @@ -223,7 +223,7 @@

Arguments

- + integer(kind=bits_kind), intent(in) @@ -238,7 +238,7 @@

Arguments

- + integer(kind=bits_kind), intent(in) @@ -253,7 +253,7 @@

Arguments

- + integer, intent(out), @@ -292,7 +292,7 @@

Arguments

- + type(bitset_large), intent(out) @@ -307,7 +307,7 @@

Arguments

- + type(bitset_large), intent(in) @@ -322,7 +322,7 @@

Arguments

- + integer(kind=bits_kind), intent(in) @@ -337,7 +337,7 @@

Arguments

- + integer(kind=bits_kind), intent(in) @@ -352,7 +352,7 @@

Arguments

- + integer, intent(out), @@ -381,13 +381,13 @@

Arguments

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/fidx.html b/interface/fidx.html index 700e88ca4..43c101a22 100644 --- a/interface/fidx.html +++ b/interface/fidx.html @@ -209,13 +209,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/find.html b/interface/find.html index 5fab95d5b..c78925510 100644 --- a/interface/find.html +++ b/interface/find.html @@ -181,7 +181,7 @@

Arguments

- + type(string_type), intent(in) @@ -272,7 +272,7 @@

Arguments

- + type(string_type), intent(in) @@ -363,7 +363,7 @@

Arguments

- + character(len=*), intent(in) @@ -454,7 +454,7 @@

Arguments

- + character(len=*), intent(in) @@ -532,13 +532,13 @@

Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
© 2024 Creative Commons License -
ad42828

+
d996e43

Documentation generated by FORD - on 2024-06-19 12:31

+ on 2024-06-19 12:42


diff --git a/interface/fnv_1_hash.html b/interface/fnv_1_hash.html index 9c577273c..eece519a3 100644 --- a/interface/fnv_1_hash.html +++ b/interface/fnv_1_hash.html @@ -85,15 +85,15 @@

fnv_1_hash
  • - Source File + Source File
  • @@ -156,14 +156,14 @@

    Functions

    public interface fnv_1_hash

    FNV_1 interfaces -(Specification)

    +(Specification)


    Functions

    private elemental module function character_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for default character string keys

    +

    FNV_1 hash function for character strings

    Arguments

    @@ -178,7 +178,7 @@

    Arguments

    @@ -207,7 +207,7 @@

    private pure module function int16_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 array keys of kind int16

    +

    FNV_1 hash function for rank 1 arrays of kind int16

    Arguments

    - + character(len=*), intent(in)
    @@ -222,7 +222,7 @@

    Arguments

    @@ -251,7 +251,7 @@

    private pure module function int32_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 array keys of kind int32

    +

    FNV_1 hash function for rank 1 arrays of kind int32

    Arguments

    - + integer(kind=int16), intent(in)
    @@ -266,7 +266,7 @@

    Arguments

    @@ -295,7 +295,7 @@

    private pure module function int64_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 array keys of kind int64

    +

    FNV_1 hash function for rank 1 arrays of kind int64

    Arguments

    - + integer(kind=int32), intent(in)
    @@ -310,7 +310,7 @@

    Arguments

    @@ -339,7 +339,7 @@

    private pure module function int8_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 array keys of kind int8

    +

    FNV_1 hash function for rank 1 arrays of kind int8

    Arguments

    - + integer(kind=int64), intent(in)
    @@ -354,7 +354,7 @@

    Arguments

    @@ -389,13 +389,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/fnv_1_hash~2.html b/interface/fnv_1_hash~2.html index 649b0f6b1..6caec61db 100644 --- a/interface/fnv_1_hash~2.html +++ b/interface/fnv_1_hash~2.html @@ -85,15 +85,15 @@

    fnv_1_hash
  • - Source File + Source File
  • @@ -156,14 +156,14 @@

    Functions

    public interface fnv_1_hash

    FNV_1 interfaces -(Specification)

    +(Specification)


    Functions

    private elemental module function character_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for character strings

    +

    FNV_1 hash function for default character string keys

    Arguments

    - + integer(kind=int8), intent(in)
    @@ -178,7 +178,7 @@

    Arguments

    @@ -207,7 +207,7 @@

    private pure module function int16_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 arrays of kind int16

    +

    FNV_1 hash function for rank 1 array keys of kind int16

    Arguments

    - + character(len=*), intent(in)
    @@ -222,7 +222,7 @@

    Arguments

    @@ -251,7 +251,7 @@

    private pure module function int32_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 arrays of kind int32

    +

    FNV_1 hash function for rank 1 array keys of kind int32

    Arguments

    - + integer(kind=int16), intent(in)
    @@ -266,7 +266,7 @@

    Arguments

    @@ -295,7 +295,7 @@

    private pure module function int64_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 arrays of kind int64

    +

    FNV_1 hash function for rank 1 array keys of kind int64

    Arguments

    - + integer(kind=int32), intent(in)
    @@ -310,7 +310,7 @@

    Arguments

    @@ -339,7 +339,7 @@

    private pure module function int8_fnv_1(key) result(hash_code)

    -

    FNV_1 hash function for rank 1 arrays of kind int8

    +

    FNV_1 hash function for rank 1 array keys of kind int8

    Arguments

    - + integer(kind=int64), intent(in)
    @@ -354,7 +354,7 @@

    Arguments

    @@ -389,13 +389,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/fnv_1a_hash.html b/interface/fnv_1a_hash.html index da7a64a53..6c29ba601 100644 --- a/interface/fnv_1a_hash.html +++ b/interface/fnv_1a_hash.html @@ -85,15 +85,15 @@

    fnv_1a_hash
  • - Source File + Source File
  • @@ -156,14 +156,14 @@

    Functions

    public interface fnv_1a_hash

    FNV_1A interfaces -(Specification)

    +(Specification)


    Functions

    -

    private elemental module function character_fnv_1a(key) result(hash_value) +

    private elemental module function character_fnv_1a(key) result(hash_code)

    -

    FNV_1A hash function for default character string keys

    +

    FNV_1A hash function for character strings

    Arguments

    - + integer(kind=int8), intent(in)
    @@ -178,7 +178,7 @@

    Arguments

    @@ -204,10 +204,10 @@

    -

    private pure module function int16_fnv_1a(key) result(hash_value) +

    private pure module function int16_fnv_1a(key) result(hash_code)

    -

    FNV_1A hash function for rank 1 array keys of kind int16

    +

    FNV_1A hash function for rank 1 arrays of kind int16

    Arguments

    - + character(len=*), intent(in)
    @@ -222,7 +222,7 @@

    Arguments

    @@ -248,10 +248,10 @@

    -

    private pure module function int32_fnv_1a(key) result(hash_value) +

    private pure module function int32_fnv_1a(key) result(hash_code)

    -

    FNV_1A hash function for rank 1 array keys of kind int32

    +

    FNV_1A hash function for rank 1 arrays of kind int32

    Arguments

    - + integer(kind=int16), intent(in)
    @@ -266,7 +266,7 @@

    Arguments

    @@ -292,10 +292,10 @@

    -

    private pure module function int64_fnv_1a(key) result(hash_value) +

    private pure module function int64_fnv_1a(key) result(hash_code)

    -

    FNV_1A hash function for rank 1 array keys of kind int64

    +

    FNV_1A hash function for rank 1 arrays of kind int64

    Arguments

    - + integer(kind=int32), intent(in)
    @@ -310,7 +310,7 @@

    Arguments

    @@ -336,10 +336,10 @@

    -

    private pure module function int8_fnv_1a(key) result(hash_value) +

    private pure module function int8_fnv_1a(key) result(hash_code)

    -

    FNV_1A hash function for rank 1 array keys of kind int8

    +

    FNV_1A hash function for rank 1 arrays of kind int8

    Arguments

    - + integer(kind=int64), intent(in)
    @@ -354,7 +354,7 @@

    Arguments

    @@ -389,13 +389,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/fnv_1a_hash~2.html b/interface/fnv_1a_hash~2.html index 9b23c3831..d92822c3a 100644 --- a/interface/fnv_1a_hash~2.html +++ b/interface/fnv_1a_hash~2.html @@ -85,15 +85,15 @@

    fnv_1a_hash
  • - Source File + Source File
  • @@ -156,14 +156,14 @@

    Functions

    public interface fnv_1a_hash

    FNV_1A interfaces -(Specification)

    +(Specification)


    Functions

    -

    private elemental module function character_fnv_1a(key) result(hash_code) +

    private elemental module function character_fnv_1a(key) result(hash_value)

    -

    FNV_1A hash function for character strings

    +

    FNV_1A hash function for default character string keys

    Arguments

    - + integer(kind=int8), intent(in)
    @@ -178,7 +178,7 @@

    Arguments

    @@ -204,10 +204,10 @@

    -

    private pure module function int16_fnv_1a(key) result(hash_code) +

    private pure module function int16_fnv_1a(key) result(hash_value)

    -

    FNV_1A hash function for rank 1 arrays of kind int16

    +

    FNV_1A hash function for rank 1 array keys of kind int16

    Arguments

    - + character(len=*), intent(in)
    @@ -222,7 +222,7 @@

    Arguments

    @@ -248,10 +248,10 @@

    -

    private pure module function int32_fnv_1a(key) result(hash_code) +

    private pure module function int32_fnv_1a(key) result(hash_value)

    -

    FNV_1A hash function for rank 1 arrays of kind int32

    +

    FNV_1A hash function for rank 1 array keys of kind int32

    Arguments

    - + integer(kind=int16), intent(in)
    @@ -266,7 +266,7 @@

    Arguments

    @@ -292,10 +292,10 @@

    -

    private pure module function int64_fnv_1a(key) result(hash_code) +

    private pure module function int64_fnv_1a(key) result(hash_value)

    -

    FNV_1A hash function for rank 1 arrays of kind int64

    +

    FNV_1A hash function for rank 1 array keys of kind int64

    Arguments

    - + integer(kind=int32), intent(in)
    @@ -310,7 +310,7 @@

    Arguments

    @@ -336,10 +336,10 @@

    -

    private pure module function int8_fnv_1a(key) result(hash_code) +

    private pure module function int8_fnv_1a(key) result(hash_value)

    -

    FNV_1A hash function for rank 1 arrays of kind int8

    +

    FNV_1A hash function for rank 1 array keys of kind int8

    Arguments

    - + integer(kind=int64), intent(in)
    @@ -354,7 +354,7 @@

    Arguments

    @@ -389,13 +389,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gamma.html b/interface/gamma.html index 8a1cceaa2..48ecde973 100644 --- a/interface/gamma.html +++ b/interface/gamma.html @@ -179,7 +179,7 @@

    Arguments

    @@ -223,7 +223,7 @@

    Arguments

    @@ -267,7 +267,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -355,7 +355,7 @@

    Arguments

    @@ -399,7 +399,7 @@

    Arguments

    @@ -432,13 +432,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gauss_legendre.html b/interface/gauss_legendre.html index 507fcf9f9..3715e8fa0 100644 --- a/interface/gauss_legendre.html +++ b/interface/gauss_legendre.html @@ -174,7 +174,7 @@

    Arguments

    @@ -189,7 +189,7 @@

    Arguments

    @@ -233,13 +233,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gauss_legendre_lobatto.html b/interface/gauss_legendre_lobatto.html index 30922bd03..7e76a3070 100644 --- a/interface/gauss_legendre_lobatto.html +++ b/interface/gauss_legendre_lobatto.html @@ -174,7 +174,7 @@

    Arguments

    @@ -189,7 +189,7 @@

    Arguments

    @@ -233,13 +233,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gbmv.html b/interface/gbmv.html index e0405d7f6..90bd55392 100644 --- a/interface/gbmv.html +++ b/interface/gbmv.html @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -254,7 +254,7 @@

    Arguments

    @@ -269,7 +269,7 @@

    Arguments

    @@ -284,7 +284,7 @@

    Arguments

    @@ -299,7 +299,7 @@

    Arguments

    @@ -314,7 +314,7 @@

    Arguments

    @@ -329,7 +329,7 @@

    Arguments

    @@ -344,7 +344,7 @@

    Arguments

    @@ -359,7 +359,7 @@

    Arguments

    @@ -374,7 +374,7 @@

    Arguments

    @@ -413,7 +413,7 @@

    Arguments

    @@ -428,7 +428,7 @@

    Arguments

    @@ -443,7 +443,7 @@

    Arguments

    @@ -458,7 +458,7 @@

    Arguments

    @@ -473,7 +473,7 @@

    Arguments

    @@ -488,7 +488,7 @@

    Arguments

    @@ -503,7 +503,7 @@

    Arguments

    @@ -518,7 +518,7 @@

    Arguments

    @@ -533,7 +533,7 @@

    Arguments

    @@ -548,7 +548,7 @@

    Arguments

    @@ -563,7 +563,7 @@

    Arguments

    @@ -578,7 +578,7 @@

    Arguments

    @@ -593,7 +593,7 @@

    Arguments

    @@ -632,7 +632,7 @@

    Arguments

    @@ -647,7 +647,7 @@

    Arguments

    @@ -662,7 +662,7 @@

    Arguments

    @@ -677,7 +677,7 @@

    Arguments

    @@ -692,7 +692,7 @@

    Arguments

    @@ -707,7 +707,7 @@

    Arguments

    @@ -722,7 +722,7 @@

    Arguments

    @@ -737,7 +737,7 @@

    Arguments

    @@ -752,7 +752,7 @@

    Arguments

    @@ -767,7 +767,7 @@

    Arguments

    @@ -782,7 +782,7 @@

    Arguments

    @@ -797,7 +797,7 @@

    Arguments

    @@ -812,7 +812,7 @@

    Arguments

    @@ -851,7 +851,7 @@

    Arguments

    @@ -866,7 +866,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -896,7 +896,7 @@

    Arguments

    @@ -911,7 +911,7 @@

    Arguments

    @@ -926,7 +926,7 @@

    Arguments

    @@ -941,7 +941,7 @@

    Arguments

    @@ -956,7 +956,7 @@

    Arguments

    @@ -971,7 +971,7 @@

    Arguments

    @@ -986,7 +986,7 @@

    Arguments

    @@ -1001,7 +1001,7 @@

    Arguments

    @@ -1016,7 +1016,7 @@

    Arguments

    @@ -1031,7 +1031,7 @@

    Arguments

    @@ -1077,7 +1077,7 @@

    Arguments

    @@ -1092,7 +1092,7 @@

    Arguments

    @@ -1107,7 +1107,7 @@

    Arguments

    @@ -1122,7 +1122,7 @@

    Arguments

    @@ -1137,7 +1137,7 @@

    Arguments

    @@ -1152,7 +1152,7 @@

    Arguments

    @@ -1167,7 +1167,7 @@

    Arguments

    @@ -1182,7 +1182,7 @@

    Arguments

    @@ -1197,7 +1197,7 @@

    Arguments

    @@ -1212,7 +1212,7 @@

    Arguments

    @@ -1227,7 +1227,7 @@

    Arguments

    @@ -1242,7 +1242,7 @@

    Arguments

    @@ -1257,7 +1257,7 @@

    Arguments

    @@ -1300,7 +1300,7 @@

    Arguments

    @@ -1315,7 +1315,7 @@

    Arguments

    @@ -1330,7 +1330,7 @@

    Arguments

    @@ -1345,7 +1345,7 @@

    Arguments

    @@ -1360,7 +1360,7 @@

    Arguments

    @@ -1375,7 +1375,7 @@

    Arguments

    @@ -1390,7 +1390,7 @@

    Arguments

    @@ -1405,7 +1405,7 @@

    Arguments

    @@ -1420,7 +1420,7 @@

    Arguments

    @@ -1435,7 +1435,7 @@

    Arguments

    @@ -1450,7 +1450,7 @@

    Arguments

    @@ -1465,7 +1465,7 @@

    Arguments

    @@ -1480,7 +1480,7 @@

    Arguments

    @@ -1523,7 +1523,7 @@

    Arguments

    @@ -1538,7 +1538,7 @@

    Arguments

    @@ -1553,7 +1553,7 @@

    Arguments

    @@ -1568,7 +1568,7 @@

    Arguments

    @@ -1583,7 +1583,7 @@

    Arguments

    @@ -1598,7 +1598,7 @@

    Arguments

    @@ -1613,7 +1613,7 @@

    Arguments

    @@ -1628,7 +1628,7 @@

    Arguments

    @@ -1643,7 +1643,7 @@

    Arguments

    @@ -1658,7 +1658,7 @@

    Arguments

    @@ -1673,7 +1673,7 @@

    Arguments

    @@ -1688,7 +1688,7 @@

    Arguments

    @@ -1703,7 +1703,7 @@

    Arguments

    @@ -1747,7 +1747,7 @@

    Arguments

    @@ -1762,7 +1762,7 @@

    Arguments

    @@ -1777,7 +1777,7 @@

    Arguments

    @@ -1792,7 +1792,7 @@

    Arguments

    @@ -1807,7 +1807,7 @@

    Arguments

    @@ -1822,7 +1822,7 @@

    Arguments

    @@ -1837,7 +1837,7 @@

    Arguments

    @@ -1852,7 +1852,7 @@

    Arguments

    @@ -1867,7 +1867,7 @@

    Arguments

    @@ -1882,7 +1882,7 @@

    Arguments

    @@ -1897,7 +1897,7 @@

    Arguments

    @@ -1912,7 +1912,7 @@

    Arguments

    @@ -1927,7 +1927,7 @@

    Arguments

    @@ -1955,13 +1955,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gcd.html b/interface/gcd.html index 49f682d57..ee4d4fe96 100644 --- a/interface/gcd.html +++ b/interface/gcd.html @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -408,13 +408,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gemm.html b/interface/gemm.html index d8e9c1c03..d3bf8724c 100644 --- a/interface/gemm.html +++ b/interface/gemm.html @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -330,7 +330,7 @@

    Arguments

    @@ -345,7 +345,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -444,7 +444,7 @@

    Arguments

    @@ -459,7 +459,7 @@

    Arguments

    @@ -474,7 +474,7 @@

    Arguments

    @@ -489,7 +489,7 @@

    Arguments

    @@ -504,7 +504,7 @@

    Arguments

    @@ -519,7 +519,7 @@

    Arguments

    @@ -534,7 +534,7 @@

    Arguments

    @@ -549,7 +549,7 @@

    Arguments

    @@ -564,7 +564,7 @@

    Arguments

    @@ -579,7 +579,7 @@

    Arguments

    @@ -594,7 +594,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -648,7 +648,7 @@

    Arguments

    @@ -663,7 +663,7 @@

    Arguments

    @@ -678,7 +678,7 @@

    Arguments

    @@ -693,7 +693,7 @@

    Arguments

    @@ -708,7 +708,7 @@

    Arguments

    @@ -723,7 +723,7 @@

    Arguments

    @@ -738,7 +738,7 @@

    Arguments

    @@ -753,7 +753,7 @@

    Arguments

    @@ -768,7 +768,7 @@

    Arguments

    @@ -783,7 +783,7 @@

    Arguments

    @@ -798,7 +798,7 @@

    Arguments

    @@ -813,7 +813,7 @@

    Arguments

    @@ -852,7 +852,7 @@

    Arguments

    @@ -867,7 +867,7 @@

    Arguments

    @@ -882,7 +882,7 @@

    Arguments

    @@ -897,7 +897,7 @@

    Arguments

    @@ -912,7 +912,7 @@

    Arguments

    @@ -927,7 +927,7 @@

    Arguments

    @@ -942,7 +942,7 @@

    Arguments

    @@ -957,7 +957,7 @@

    Arguments

    @@ -972,7 +972,7 @@

    Arguments

    @@ -987,7 +987,7 @@

    Arguments

    @@ -1002,7 +1002,7 @@

    Arguments

    @@ -1017,7 +1017,7 @@

    Arguments

    @@ -1032,7 +1032,7 @@

    Arguments

    @@ -1079,7 +1079,7 @@

    Arguments

    @@ -1094,7 +1094,7 @@

    Arguments

    @@ -1109,7 +1109,7 @@

    Arguments

    @@ -1124,7 +1124,7 @@

    Arguments

    @@ -1139,7 +1139,7 @@

    Arguments

    @@ -1154,7 +1154,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1199,7 +1199,7 @@

    Arguments

    @@ -1214,7 +1214,7 @@

    Arguments

    @@ -1229,7 +1229,7 @@

    Arguments

    @@ -1244,7 +1244,7 @@

    Arguments

    @@ -1259,7 +1259,7 @@

    Arguments

    @@ -1304,7 +1304,7 @@

    Arguments

    @@ -1319,7 +1319,7 @@

    Arguments

    @@ -1334,7 +1334,7 @@

    Arguments

    @@ -1349,7 +1349,7 @@

    Arguments

    @@ -1364,7 +1364,7 @@

    Arguments

    @@ -1379,7 +1379,7 @@

    Arguments

    @@ -1394,7 +1394,7 @@

    Arguments

    @@ -1409,7 +1409,7 @@

    Arguments

    @@ -1424,7 +1424,7 @@

    Arguments

    @@ -1439,7 +1439,7 @@

    Arguments

    @@ -1454,7 +1454,7 @@

    Arguments

    @@ -1469,7 +1469,7 @@

    Arguments

    @@ -1484,7 +1484,7 @@

    Arguments

    @@ -1529,7 +1529,7 @@

    Arguments

    @@ -1544,7 +1544,7 @@

    Arguments

    @@ -1559,7 +1559,7 @@

    Arguments

    @@ -1574,7 +1574,7 @@

    Arguments

    @@ -1589,7 +1589,7 @@

    Arguments

    @@ -1604,7 +1604,7 @@

    Arguments

    @@ -1619,7 +1619,7 @@

    Arguments

    @@ -1634,7 +1634,7 @@

    Arguments

    @@ -1649,7 +1649,7 @@

    Arguments

    @@ -1664,7 +1664,7 @@

    Arguments

    @@ -1679,7 +1679,7 @@

    Arguments

    @@ -1694,7 +1694,7 @@

    Arguments

    @@ -1709,7 +1709,7 @@

    Arguments

    @@ -1754,7 +1754,7 @@

    Arguments

    @@ -1769,7 +1769,7 @@

    Arguments

    @@ -1784,7 +1784,7 @@

    Arguments

    @@ -1799,7 +1799,7 @@

    Arguments

    @@ -1814,7 +1814,7 @@

    Arguments

    @@ -1829,7 +1829,7 @@

    Arguments

    @@ -1844,7 +1844,7 @@

    Arguments

    @@ -1859,7 +1859,7 @@

    Arguments

    @@ -1874,7 +1874,7 @@

    Arguments

    @@ -1889,7 +1889,7 @@

    Arguments

    @@ -1904,7 +1904,7 @@

    Arguments

    @@ -1919,7 +1919,7 @@

    Arguments

    @@ -1934,7 +1934,7 @@

    Arguments

    @@ -1962,13 +1962,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gemv.html b/interface/gemv.html index cca0ea85a..b650428f6 100644 --- a/interface/gemv.html +++ b/interface/gemv.html @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -254,7 +254,7 @@

    Arguments

    @@ -269,7 +269,7 @@

    Arguments

    @@ -284,7 +284,7 @@

    Arguments

    @@ -299,7 +299,7 @@

    Arguments

    @@ -314,7 +314,7 @@

    Arguments

    @@ -329,7 +329,7 @@

    Arguments

    @@ -344,7 +344,7 @@

    Arguments

    @@ -383,7 +383,7 @@

    Arguments

    @@ -398,7 +398,7 @@

    Arguments

    @@ -413,7 +413,7 @@

    Arguments

    @@ -428,7 +428,7 @@

    Arguments

    @@ -443,7 +443,7 @@

    Arguments

    @@ -458,7 +458,7 @@

    Arguments

    @@ -473,7 +473,7 @@

    Arguments

    @@ -488,7 +488,7 @@

    Arguments

    @@ -503,7 +503,7 @@

    Arguments

    @@ -518,7 +518,7 @@

    Arguments

    @@ -533,7 +533,7 @@

    Arguments

    @@ -572,7 +572,7 @@

    Arguments

    @@ -587,7 +587,7 @@

    Arguments

    @@ -602,7 +602,7 @@

    Arguments

    @@ -617,7 +617,7 @@

    Arguments

    @@ -632,7 +632,7 @@

    Arguments

    @@ -647,7 +647,7 @@

    Arguments

    @@ -662,7 +662,7 @@

    Arguments

    @@ -677,7 +677,7 @@

    Arguments

    @@ -692,7 +692,7 @@

    Arguments

    @@ -707,7 +707,7 @@

    Arguments

    @@ -722,7 +722,7 @@

    Arguments

    @@ -761,7 +761,7 @@

    Arguments

    @@ -776,7 +776,7 @@

    Arguments

    @@ -791,7 +791,7 @@

    Arguments

    @@ -806,7 +806,7 @@

    Arguments

    @@ -821,7 +821,7 @@

    Arguments

    @@ -836,7 +836,7 @@

    Arguments

    @@ -851,7 +851,7 @@

    Arguments

    @@ -866,7 +866,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -896,7 +896,7 @@

    Arguments

    @@ -911,7 +911,7 @@

    Arguments

    @@ -957,7 +957,7 @@

    Arguments

    @@ -972,7 +972,7 @@

    Arguments

    @@ -987,7 +987,7 @@

    Arguments

    @@ -1002,7 +1002,7 @@

    Arguments

    @@ -1017,7 +1017,7 @@

    Arguments

    @@ -1032,7 +1032,7 @@

    Arguments

    @@ -1047,7 +1047,7 @@

    Arguments

    @@ -1062,7 +1062,7 @@

    Arguments

    @@ -1077,7 +1077,7 @@

    Arguments

    @@ -1092,7 +1092,7 @@

    Arguments

    @@ -1107,7 +1107,7 @@

    Arguments

    @@ -1150,7 +1150,7 @@

    Arguments

    @@ -1165,7 +1165,7 @@

    Arguments

    @@ -1180,7 +1180,7 @@

    Arguments

    @@ -1195,7 +1195,7 @@

    Arguments

    @@ -1210,7 +1210,7 @@

    Arguments

    @@ -1225,7 +1225,7 @@

    Arguments

    @@ -1240,7 +1240,7 @@

    Arguments

    @@ -1255,7 +1255,7 @@

    Arguments

    @@ -1270,7 +1270,7 @@

    Arguments

    @@ -1285,7 +1285,7 @@

    Arguments

    @@ -1300,7 +1300,7 @@

    Arguments

    @@ -1343,7 +1343,7 @@

    Arguments

    @@ -1358,7 +1358,7 @@

    Arguments

    @@ -1373,7 +1373,7 @@

    Arguments

    @@ -1388,7 +1388,7 @@

    Arguments

    @@ -1403,7 +1403,7 @@

    Arguments

    @@ -1418,7 +1418,7 @@

    Arguments

    @@ -1433,7 +1433,7 @@

    Arguments

    @@ -1448,7 +1448,7 @@

    Arguments

    @@ -1463,7 +1463,7 @@

    Arguments

    @@ -1478,7 +1478,7 @@

    Arguments

    @@ -1493,7 +1493,7 @@

    Arguments

    @@ -1537,7 +1537,7 @@

    Arguments

    @@ -1552,7 +1552,7 @@

    Arguments

    @@ -1567,7 +1567,7 @@

    Arguments

    @@ -1582,7 +1582,7 @@

    Arguments

    @@ -1597,7 +1597,7 @@

    Arguments

    @@ -1612,7 +1612,7 @@

    Arguments

    @@ -1627,7 +1627,7 @@

    Arguments

    @@ -1642,7 +1642,7 @@

    Arguments

    @@ -1657,7 +1657,7 @@

    Arguments

    @@ -1672,7 +1672,7 @@

    Arguments

    @@ -1687,7 +1687,7 @@

    Arguments

    @@ -1715,13 +1715,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/ger.html b/interface/ger.html index a578a53c3..92892bc85 100644 --- a/interface/ger.html +++ b/interface/ger.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -691,7 +691,7 @@

    Arguments

    @@ -706,7 +706,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -751,7 +751,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -796,7 +796,7 @@

    Arguments

    @@ -824,13 +824,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/gerc.html b/interface/gerc.html index 79b5e2e20..a01647588 100644 --- a/interface/gerc.html +++ b/interface/gerc.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -691,7 +691,7 @@

    Arguments

    @@ -706,7 +706,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -751,7 +751,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -796,7 +796,7 @@

    Arguments

    @@ -824,13 +824,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/geru.html b/interface/geru.html index 468215112..dfcdf8b66 100644 --- a/interface/geru.html +++ b/interface/geru.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -691,7 +691,7 @@

    Arguments

    @@ -706,7 +706,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -751,7 +751,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -796,7 +796,7 @@

    Arguments

    @@ -824,13 +824,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/get.html b/interface/get.html index 8ae2d0249..f36742140 100644 --- a/interface/get.html +++ b/interface/get.html @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -237,7 +237,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -351,7 +351,7 @@

    Arguments

    @@ -366,7 +366,7 @@

    Arguments

    @@ -394,13 +394,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/getline.html b/interface/getline.html index 476cab337..b74881bee 100644 --- a/interface/getline.html +++ b/interface/getline.html @@ -178,7 +178,7 @@

    Arguments

    @@ -193,7 +193,7 @@

    Arguments

    @@ -208,7 +208,7 @@

    Arguments

    @@ -223,7 +223,7 @@

    Arguments

    @@ -262,7 +262,7 @@

    Arguments

    @@ -277,7 +277,7 @@

    Arguments

    @@ -292,7 +292,7 @@

    Arguments

    @@ -307,7 +307,7 @@

    Arguments

    @@ -346,7 +346,7 @@

    Arguments

    @@ -361,7 +361,7 @@

    Arguments

    @@ -376,7 +376,7 @@

    Arguments

    @@ -415,7 +415,7 @@

    Arguments

    @@ -430,7 +430,7 @@

    Arguments

    @@ -445,7 +445,7 @@

    Arguments

    @@ -473,13 +473,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/hasher_fun.html b/interface/hasher_fun.html index 3e0a3aab1..76de28e4d 100644 --- a/interface/hasher_fun.html +++ b/interface/hasher_fun.html @@ -160,7 +160,7 @@

    Arguments

    @@ -176,7 +176,7 @@

    Arguments

    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + type(key_type), intent(in)
    - + character(len=:), intent(out),
    - + type(key_type), intent(in)
    - + integer(kind=int8), intent(out),
    - + type(key_type), intent(in)
    - + integer(kind=int32), intent(out),
    - + type(other_type), intent(in)
    - + class(*), intent(out),
    - + integer, intent(in)
    - + character(len=:), intent(out),
    - + integer, intent(out),
    - + character(len=:),
    - + integer, intent(in)
    - + type(string_type), intent(out)
    - + integer, intent(out),
    - + character(len=:),
    - + character(len=:), intent(out),
    - + integer, intent(out),
    - + character(len=:),
    - + type(string_type), intent(out)
    - + integer, intent(out),
    - + character(len=:),
    - + type(key_type), intent(in)
    -

    Return Value integer(kind=int_hash)

    +

    Return Value integer(kind=int_hash)


    @@ -189,13 +189,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/hbmv.html b/interface/hbmv.html index c90bfa629..8b1d7383f 100644 --- a/interface/hbmv.html +++ b/interface/hbmv.html @@ -189,7 +189,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -204,7 +204,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -219,7 +219,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -234,7 +234,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -249,7 +249,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -264,7 +264,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -279,7 +279,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -294,7 +294,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -309,7 +309,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -324,7 +324,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -339,7 +339,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -378,7 +378,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -393,7 +393,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -408,7 +408,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -423,7 +423,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -438,7 +438,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -453,7 +453,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -468,7 +468,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -483,7 +483,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -498,7 +498,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -513,7 +513,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -528,7 +528,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -573,7 +573,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -588,7 +588,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -603,7 +603,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -618,7 +618,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -633,7 +633,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -648,7 +648,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -663,7 +663,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -678,7 +678,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -693,7 +693,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -708,7 +708,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -723,7 +723,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -766,7 +766,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -781,7 +781,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -796,7 +796,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -811,7 +811,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -826,7 +826,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -841,7 +841,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -856,7 +856,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -871,7 +871,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -886,7 +886,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -901,7 +901,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -916,7 +916,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -944,13 +944,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/hemm.html b/interface/hemm.html index 51ff7b7c4..2438bb85c 100644 --- a/interface/hemm.html +++ b/interface/hemm.html @@ -191,7 +191,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -206,7 +206,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -221,7 +221,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -236,7 +236,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -251,7 +251,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -266,7 +266,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -281,7 +281,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -296,7 +296,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -311,7 +311,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -326,7 +326,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -341,7 +341,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -356,7 +356,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -395,7 +395,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -410,7 +410,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -425,7 +425,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -440,7 +440,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -455,7 +455,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -470,7 +470,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -485,7 +485,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -500,7 +500,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -515,7 +515,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -530,7 +530,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -545,7 +545,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -560,7 +560,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -607,7 +607,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -622,7 +622,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -637,7 +637,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -652,7 +652,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -667,7 +667,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -682,7 +682,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -697,7 +697,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -712,7 +712,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -727,7 +727,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -742,7 +742,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -757,7 +757,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -772,7 +772,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -817,7 +817,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -832,7 +832,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -847,7 +847,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -862,7 +862,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -877,7 +877,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -892,7 +892,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -907,7 +907,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -922,7 +922,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -937,7 +937,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -952,7 +952,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -967,7 +967,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -982,7 +982,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -1010,13 +1010,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/hemv.html b/interface/hemv.html index 15ec81922..6891bda45 100644 --- a/interface/hemv.html +++ b/interface/hemv.html @@ -189,7 +189,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -204,7 +204,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -219,7 +219,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -234,7 +234,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -249,7 +249,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -264,7 +264,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -279,7 +279,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -294,7 +294,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -309,7 +309,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -324,7 +324,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -363,7 +363,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -378,7 +378,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -393,7 +393,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -408,7 +408,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -423,7 +423,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -438,7 +438,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -453,7 +453,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -468,7 +468,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -483,7 +483,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -498,7 +498,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -543,7 +543,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -558,7 +558,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -573,7 +573,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -588,7 +588,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -603,7 +603,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -618,7 +618,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -633,7 +633,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -648,7 +648,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -663,7 +663,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -678,7 +678,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -721,7 +721,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -736,7 +736,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -751,7 +751,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -766,7 +766,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -781,7 +781,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -796,7 +796,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -811,7 +811,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -826,7 +826,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -841,7 +841,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -856,7 +856,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -884,13 +884,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/her.html b/interface/her.html index 7484f634c..6599ba47e 100644 --- a/interface/her.html +++ b/interface/her.html @@ -189,7 +189,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -204,7 +204,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -219,7 +219,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -234,7 +234,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -249,7 +249,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -264,7 +264,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -279,7 +279,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -318,7 +318,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -333,7 +333,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -348,7 +348,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -363,7 +363,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -378,7 +378,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -393,7 +393,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -408,7 +408,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -453,7 +453,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -468,7 +468,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -483,7 +483,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -498,7 +498,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -513,7 +513,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -528,7 +528,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -543,7 +543,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -586,7 +586,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -601,7 +601,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -616,7 +616,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -631,7 +631,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -646,7 +646,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -661,7 +661,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -676,7 +676,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -704,13 +704,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/her2.html b/interface/her2.html index ea02d0178..1d61b6fb3 100644 --- a/interface/her2.html +++ b/interface/her2.html @@ -189,7 +189,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -204,7 +204,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -219,7 +219,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -234,7 +234,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -249,7 +249,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -264,7 +264,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -279,7 +279,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -294,7 +294,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -309,7 +309,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -348,7 +348,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -363,7 +363,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -378,7 +378,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -393,7 +393,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -408,7 +408,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -423,7 +423,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -438,7 +438,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -453,7 +453,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -468,7 +468,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -513,7 +513,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -528,7 +528,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -543,7 +543,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -558,7 +558,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -573,7 +573,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -588,7 +588,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -603,7 +603,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -618,7 +618,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -633,7 +633,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -676,7 +676,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -691,7 +691,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -706,7 +706,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -721,7 +721,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -736,7 +736,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -751,7 +751,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -766,7 +766,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -781,7 +781,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -796,7 +796,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -824,13 +824,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/her2k.html b/interface/her2k.html index 9a33bfe0a..74a31abac 100644 --- a/interface/her2k.html +++ b/interface/her2k.html @@ -192,7 +192,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -207,7 +207,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -222,7 +222,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -237,7 +237,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -252,7 +252,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -267,7 +267,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -282,7 +282,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -297,7 +297,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -312,7 +312,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -327,7 +327,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -342,7 +342,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -357,7 +357,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -396,7 +396,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -411,7 +411,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -426,7 +426,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -441,7 +441,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -456,7 +456,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -471,7 +471,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -486,7 +486,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -501,7 +501,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -516,7 +516,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -531,7 +531,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -546,7 +546,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -561,7 +561,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -609,7 +609,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -624,7 +624,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -639,7 +639,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -654,7 +654,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -669,7 +669,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -684,7 +684,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -699,7 +699,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -714,7 +714,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -729,7 +729,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -744,7 +744,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -759,7 +759,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -774,7 +774,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -820,7 +820,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -835,7 +835,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -850,7 +850,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -865,7 +865,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -880,7 +880,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -895,7 +895,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -910,7 +910,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -925,7 +925,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -940,7 +940,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -955,7 +955,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -970,7 +970,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -985,7 +985,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -1013,13 +1013,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/herk.html b/interface/herk.html index 4776ce7db..9a239d8c8 100644 --- a/interface/herk.html +++ b/interface/herk.html @@ -192,7 +192,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -207,7 +207,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -222,7 +222,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -237,7 +237,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -252,7 +252,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -267,7 +267,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -282,7 +282,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -297,7 +297,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -312,7 +312,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -327,7 +327,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -366,7 +366,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -381,7 +381,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -396,7 +396,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -411,7 +411,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -426,7 +426,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -441,7 +441,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -456,7 +456,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -471,7 +471,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -486,7 +486,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -501,7 +501,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -549,7 +549,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -564,7 +564,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -579,7 +579,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -594,7 +594,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -609,7 +609,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -624,7 +624,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -639,7 +639,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -654,7 +654,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -669,7 +669,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -684,7 +684,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -730,7 +730,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -745,7 +745,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -760,7 +760,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -775,7 +775,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -790,7 +790,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -805,7 +805,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -820,7 +820,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -835,7 +835,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -850,7 +850,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -865,7 +865,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -893,13 +893,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/hpmv.html b/interface/hpmv.html index c7ca56453..ffe33a07b 100644 --- a/interface/hpmv.html +++ b/interface/hpmv.html @@ -189,7 +189,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -204,7 +204,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -219,7 +219,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -234,7 +234,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -249,7 +249,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -264,7 +264,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -279,7 +279,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -294,7 +294,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -309,7 +309,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -348,7 +348,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -363,7 +363,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -378,7 +378,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -393,7 +393,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -408,7 +408,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -423,7 +423,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -438,7 +438,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -453,7 +453,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -468,7 +468,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -513,7 +513,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -528,7 +528,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -543,7 +543,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -558,7 +558,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -573,7 +573,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -588,7 +588,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -603,7 +603,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -618,7 +618,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -633,7 +633,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -676,7 +676,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -691,7 +691,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -706,7 +706,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -721,7 +721,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -736,7 +736,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -751,7 +751,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -766,7 +766,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -781,7 +781,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -796,7 +796,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -824,13 +824,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/hpr.html b/interface/hpr.html index af0e2c83d..b002f1016 100644 --- a/interface/hpr.html +++ b/interface/hpr.html @@ -189,7 +189,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -204,7 +204,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -219,7 +219,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -234,7 +234,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -249,7 +249,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -264,7 +264,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -303,7 +303,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -318,7 +318,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -333,7 +333,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -348,7 +348,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -363,7 +363,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -378,7 +378,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -423,7 +423,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -438,7 +438,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -453,7 +453,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -468,7 +468,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -483,7 +483,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -498,7 +498,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -541,7 +541,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -556,7 +556,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -571,7 +571,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -586,7 +586,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -601,7 +601,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -616,7 +616,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -644,13 +644,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/hpr2.html b/interface/hpr2.html index 3cb9579d3..9352c28a1 100644 --- a/interface/hpr2.html +++ b/interface/hpr2.html @@ -189,7 +189,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -204,7 +204,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -219,7 +219,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -234,7 +234,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -249,7 +249,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -264,7 +264,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -279,7 +279,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -294,7 +294,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -333,7 +333,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -348,7 +348,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -363,7 +363,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -378,7 +378,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -393,7 +393,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -408,7 +408,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -423,7 +423,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -438,7 +438,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -483,7 +483,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -498,7 +498,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -513,7 +513,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -528,7 +528,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -543,7 +543,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -558,7 +558,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -573,7 +573,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -588,7 +588,7 @@

    Arguments

    - + complex(kind=sp), intent(inout) @@ -631,7 +631,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -646,7 +646,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -661,7 +661,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -676,7 +676,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -691,7 +691,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -706,7 +706,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -721,7 +721,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -736,7 +736,7 @@

    Arguments

    - + complex(kind=dp), intent(inout) @@ -764,13 +764,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/iachar.html b/interface/iachar.html index 13b18e48e..59ca11b95 100644 --- a/interface/iachar.html +++ b/interface/iachar.html @@ -175,7 +175,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -208,13 +208,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/ichar.html b/interface/ichar.html index 1f8b5af14..59d912350 100644 --- a/interface/ichar.html +++ b/interface/ichar.html @@ -175,7 +175,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -208,13 +208,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/index.html b/interface/index.html index 94254f31f..224c97521 100644 --- a/interface/index.html +++ b/interface/index.html @@ -181,7 +181,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -196,7 +196,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -256,7 +256,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -271,7 +271,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -331,7 +331,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -346,7 +346,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -394,13 +394,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_close.html b/interface/is_close.html index 38821a482..beb114100 100644 --- a/interface/is_close.html +++ b/interface/is_close.html @@ -176,7 +176,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -191,7 +191,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -206,7 +206,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -221,7 +221,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -236,7 +236,7 @@

    Arguments

    - + logical, intent(in), @@ -280,7 +280,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -295,7 +295,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -310,7 +310,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -325,7 +325,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -340,7 +340,7 @@

    Arguments

    - + logical, intent(in), @@ -384,7 +384,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -399,7 +399,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -414,7 +414,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -429,7 +429,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -444,7 +444,7 @@

    Arguments

    - + logical, intent(in), @@ -488,7 +488,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -503,7 +503,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -518,7 +518,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -533,7 +533,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -548,7 +548,7 @@

    Arguments

    - + logical, intent(in), @@ -583,13 +583,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_diagonal.html b/interface/is_diagonal.html index 564ae5c03..855e53542 100644 --- a/interface/is_diagonal.html +++ b/interface/is_diagonal.html @@ -184,7 +184,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -228,7 +228,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -272,7 +272,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -404,7 +404,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -448,7 +448,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -492,7 +492,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -525,13 +525,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_hermitian.html b/interface/is_hermitian.html index 1047848f6..5938661d5 100644 --- a/interface/is_hermitian.html +++ b/interface/is_hermitian.html @@ -184,7 +184,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -228,7 +228,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -272,7 +272,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -404,7 +404,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -448,7 +448,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -492,7 +492,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -525,13 +525,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_hessenberg.html b/interface/is_hessenberg.html index 8f1dc4f74..98ea7be2d 100644 --- a/interface/is_hessenberg.html +++ b/interface/is_hessenberg.html @@ -184,7 +184,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -199,7 +199,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -243,7 +243,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -258,7 +258,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -302,7 +302,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -317,7 +317,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -361,7 +361,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -376,7 +376,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -420,7 +420,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -435,7 +435,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -479,7 +479,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -494,7 +494,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -538,7 +538,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -553,7 +553,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -597,7 +597,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -612,7 +612,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -645,13 +645,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_skew_symmetric.html b/interface/is_skew_symmetric.html index c201d44ea..de30d6f13 100644 --- a/interface/is_skew_symmetric.html +++ b/interface/is_skew_symmetric.html @@ -184,7 +184,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -228,7 +228,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -272,7 +272,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -404,7 +404,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -448,7 +448,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -492,7 +492,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -525,13 +525,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_square.html b/interface/is_square.html index 25db134cd..beac7ef1f 100644 --- a/interface/is_square.html +++ b/interface/is_square.html @@ -184,7 +184,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -228,7 +228,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -272,7 +272,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -404,7 +404,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -448,7 +448,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -492,7 +492,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -525,13 +525,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_symmetric.html b/interface/is_symmetric.html index 5b635013c..2fe8c991f 100644 --- a/interface/is_symmetric.html +++ b/interface/is_symmetric.html @@ -184,7 +184,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -228,7 +228,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -272,7 +272,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -404,7 +404,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -448,7 +448,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -492,7 +492,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -525,13 +525,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/is_triangular.html b/interface/is_triangular.html index 1c6b5b135..0545ceb6c 100644 --- a/interface/is_triangular.html +++ b/interface/is_triangular.html @@ -184,7 +184,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -199,7 +199,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -243,7 +243,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -258,7 +258,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -302,7 +302,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -317,7 +317,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -361,7 +361,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -376,7 +376,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -420,7 +420,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -435,7 +435,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -479,7 +479,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -494,7 +494,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -538,7 +538,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -553,7 +553,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -597,7 +597,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -612,7 +612,7 @@

    Arguments

    - + character(len=1), intent(in) @@ -645,13 +645,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/kronecker_product.html b/interface/kronecker_product.html index 074245f30..b94b6b9aa 100644 --- a/interface/kronecker_product.html +++ b/interface/kronecker_product.html @@ -182,7 +182,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -197,7 +197,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -241,7 +241,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -256,7 +256,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -300,7 +300,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -315,7 +315,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -359,7 +359,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -374,7 +374,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -418,7 +418,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -433,7 +433,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -477,7 +477,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -492,7 +492,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -536,7 +536,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -551,7 +551,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -595,7 +595,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -610,7 +610,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -645,13 +645,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/legendre.html b/interface/legendre.html index 9b85b4665..16894e6a8 100644 --- a/interface/legendre.html +++ b/interface/legendre.html @@ -173,7 +173,7 @@

    Arguments

    - + integer, intent(in) @@ -188,7 +188,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -223,13 +223,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/len.html b/interface/len.html index 7dacdc59e..17528855a 100644 --- a/interface/len.html +++ b/interface/len.html @@ -175,7 +175,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -208,13 +208,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/len_trim.html b/interface/len_trim.html index ba6780a89..647183a6b 100644 --- a/interface/len_trim.html +++ b/interface/len_trim.html @@ -177,7 +177,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -210,13 +210,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/lge.html b/interface/lge.html index 5fa7058ce..aec60994d 100644 --- a/interface/lge.html +++ b/interface/lge.html @@ -180,7 +180,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -195,7 +195,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -240,7 +240,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -255,7 +255,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -300,7 +300,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -315,7 +315,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -348,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/lgt.html b/interface/lgt.html index 0a03fcca6..aaf9a91c3 100644 --- a/interface/lgt.html +++ b/interface/lgt.html @@ -180,7 +180,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -195,7 +195,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -240,7 +240,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -255,7 +255,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -300,7 +300,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -315,7 +315,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -348,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/linalg_state_type.html b/interface/linalg_state_type.html index 7693791f5..58a7aac62 100644 --- a/interface/linalg_state_type.html +++ b/interface/linalg_state_type.html @@ -871,13 +871,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/linspace.html b/interface/linspace.html index cb35c69d2..54cfd95f6 100644 --- a/interface/linspace.html +++ b/interface/linspace.html @@ -192,7 +192,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -207,7 +207,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -251,7 +251,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -266,7 +266,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -310,7 +310,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -325,7 +325,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -369,7 +369,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -384,7 +384,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -428,7 +428,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -443,7 +443,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -487,7 +487,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -502,7 +502,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -546,7 +546,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -561,7 +561,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -605,7 +605,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -620,7 +620,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -664,7 +664,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -679,7 +679,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -694,7 +694,7 @@

    Arguments

    - + integer, intent(in) @@ -738,7 +738,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -753,7 +753,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -768,7 +768,7 @@

    Arguments

    - + integer, intent(in) @@ -812,7 +812,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -827,7 +827,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -842,7 +842,7 @@

    Arguments

    - + integer, intent(in) @@ -886,7 +886,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -901,7 +901,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -916,7 +916,7 @@

    Arguments

    - + integer, intent(in) @@ -960,7 +960,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -975,7 +975,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -990,7 +990,7 @@

    Arguments

    - + integer, intent(in) @@ -1034,7 +1034,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -1049,7 +1049,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -1064,7 +1064,7 @@

    Arguments

    - + integer, intent(in) @@ -1108,7 +1108,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1123,7 +1123,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1138,7 +1138,7 @@

    Arguments

    - + integer, intent(in) @@ -1182,7 +1182,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1197,7 +1197,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1212,7 +1212,7 @@

    Arguments

    - + integer, intent(in) @@ -1247,13 +1247,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/lle.html b/interface/lle.html index 9766f0bba..64156080a 100644 --- a/interface/lle.html +++ b/interface/lle.html @@ -180,7 +180,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -195,7 +195,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -240,7 +240,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -255,7 +255,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -300,7 +300,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -315,7 +315,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -348,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/llt.html b/interface/llt.html index 210164c62..54bff352a 100644 --- a/interface/llt.html +++ b/interface/llt.html @@ -180,7 +180,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -195,7 +195,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -240,7 +240,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -255,7 +255,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -300,7 +300,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -315,7 +315,7 @@

    Arguments

    - + type(string_type), intent(in) @@ -348,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/load_npy.html b/interface/load_npy.html index bcdc487bd..217e7150c 100644 --- a/interface/load_npy.html +++ b/interface/load_npy.html @@ -198,7 +198,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -213,7 +213,7 @@

    Arguments

    - + complex(kind=dp), intent(out), @@ -228,7 +228,7 @@

    Arguments

    - + integer, intent(out), @@ -243,7 +243,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -282,7 +282,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -297,7 +297,7 @@

    Arguments

    - + complex(kind=dp), intent(out), @@ -312,7 +312,7 @@

    Arguments

    - + integer, intent(out), @@ -327,7 +327,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -366,7 +366,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -381,7 +381,7 @@

    Arguments

    - + complex(kind=dp), intent(out), @@ -396,7 +396,7 @@

    Arguments

    - + integer, intent(out), @@ -411,7 +411,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -450,7 +450,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -465,7 +465,7 @@

    Arguments

    - + complex(kind=sp), intent(out), @@ -480,7 +480,7 @@

    Arguments

    - + integer, intent(out), @@ -495,7 +495,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -534,7 +534,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -549,7 +549,7 @@

    Arguments

    - + complex(kind=sp), intent(out), @@ -564,7 +564,7 @@

    Arguments

    - + integer, intent(out), @@ -579,7 +579,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -618,7 +618,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -633,7 +633,7 @@

    Arguments

    - + complex(kind=sp), intent(out), @@ -648,7 +648,7 @@

    Arguments

    - + integer, intent(out), @@ -663,7 +663,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -702,7 +702,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -717,7 +717,7 @@

    Arguments

    - + integer(kind=int16), intent(out), @@ -732,7 +732,7 @@

    Arguments

    - + integer, intent(out), @@ -747,7 +747,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -786,7 +786,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -801,7 +801,7 @@

    Arguments

    - + integer(kind=int16), intent(out), @@ -816,7 +816,7 @@

    Arguments

    - + integer, intent(out), @@ -831,7 +831,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -870,7 +870,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -885,7 +885,7 @@

    Arguments

    - + integer(kind=int16), intent(out), @@ -900,7 +900,7 @@

    Arguments

    - + integer, intent(out), @@ -915,7 +915,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -954,7 +954,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -969,7 +969,7 @@

    Arguments

    - + integer(kind=int32), intent(out), @@ -984,7 +984,7 @@

    Arguments

    - + integer, intent(out), @@ -999,7 +999,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1038,7 +1038,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1053,7 +1053,7 @@

    Arguments

    - + integer(kind=int32), intent(out), @@ -1068,7 +1068,7 @@

    Arguments

    - + integer, intent(out), @@ -1083,7 +1083,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1122,7 +1122,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1137,7 +1137,7 @@

    Arguments

    - + integer(kind=int32), intent(out), @@ -1152,7 +1152,7 @@

    Arguments

    - + integer, intent(out), @@ -1167,7 +1167,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1206,7 +1206,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1221,7 +1221,7 @@

    Arguments

    - + integer(kind=int64), intent(out), @@ -1236,7 +1236,7 @@

    Arguments

    - + integer, intent(out), @@ -1251,7 +1251,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1290,7 +1290,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1305,7 +1305,7 @@

    Arguments

    - + integer(kind=int64), intent(out), @@ -1320,7 +1320,7 @@

    Arguments

    - + integer, intent(out), @@ -1335,7 +1335,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1374,7 +1374,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1389,7 +1389,7 @@

    Arguments

    - + integer(kind=int64), intent(out), @@ -1404,7 +1404,7 @@

    Arguments

    - + integer, intent(out), @@ -1419,7 +1419,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1458,7 +1458,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1473,7 +1473,7 @@

    Arguments

    - + integer(kind=int8), intent(out), @@ -1488,7 +1488,7 @@

    Arguments

    - + integer, intent(out), @@ -1503,7 +1503,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1542,7 +1542,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1557,7 +1557,7 @@

    Arguments

    - + integer(kind=int8), intent(out), @@ -1572,7 +1572,7 @@

    Arguments

    - + integer, intent(out), @@ -1587,7 +1587,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1626,7 +1626,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1641,7 +1641,7 @@

    Arguments

    - + integer(kind=int8), intent(out), @@ -1656,7 +1656,7 @@

    Arguments

    - + integer, intent(out), @@ -1671,7 +1671,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1710,7 +1710,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1725,7 +1725,7 @@

    Arguments

    - + real(kind=dp), intent(out), @@ -1740,7 +1740,7 @@

    Arguments

    - + integer, intent(out), @@ -1755,7 +1755,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1794,7 +1794,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1809,7 +1809,7 @@

    Arguments

    - + real(kind=dp), intent(out), @@ -1824,7 +1824,7 @@

    Arguments

    - + integer, intent(out), @@ -1839,7 +1839,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1878,7 +1878,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1893,7 +1893,7 @@

    Arguments

    - + real(kind=dp), intent(out), @@ -1908,7 +1908,7 @@

    Arguments

    - + integer, intent(out), @@ -1923,7 +1923,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -1962,7 +1962,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -1977,7 +1977,7 @@

    Arguments

    - + real(kind=sp), intent(out), @@ -1992,7 +1992,7 @@

    Arguments

    - + integer, intent(out), @@ -2007,7 +2007,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -2046,7 +2046,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -2061,7 +2061,7 @@

    Arguments

    - + real(kind=sp), intent(out), @@ -2076,7 +2076,7 @@

    Arguments

    - + integer, intent(out), @@ -2091,7 +2091,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -2130,7 +2130,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -2145,7 +2145,7 @@

    Arguments

    - + real(kind=sp), intent(out), @@ -2160,7 +2160,7 @@

    Arguments

    - + integer, intent(out), @@ -2175,7 +2175,7 @@

    Arguments

    - + character(len=:), intent(out), @@ -2204,13 +2204,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/loadtxt.html b/interface/loadtxt.html index 47eff1814..7c6660002 100644 --- a/interface/loadtxt.html +++ b/interface/loadtxt.html @@ -185,7 +185,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -200,7 +200,7 @@

    Arguments

    - + real(kind=sp), intent(out), @@ -289,7 +289,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -304,7 +304,7 @@

    Arguments

    - + real(kind=dp), intent(out), @@ -393,7 +393,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -408,7 +408,7 @@

    Arguments

    - + integer(kind=int8), intent(out), @@ -497,7 +497,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -512,7 +512,7 @@

    Arguments

    - + integer(kind=int16), intent(out), @@ -601,7 +601,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -616,7 +616,7 @@

    Arguments

    - + integer(kind=int32), intent(out), @@ -705,7 +705,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -720,7 +720,7 @@

    Arguments

    - + integer(kind=int64), intent(out), @@ -809,7 +809,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -824,7 +824,7 @@

    Arguments

    - + complex(kind=sp), intent(out), @@ -913,7 +913,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -928,7 +928,7 @@

    Arguments

    - + complex(kind=dp), intent(out), @@ -1004,13 +1004,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/log_factorial.html b/interface/log_factorial.html index 8a694a4d2..3af566575 100644 --- a/interface/log_factorial.html +++ b/interface/log_factorial.html @@ -177,7 +177,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -221,7 +221,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -265,7 +265,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -309,7 +309,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -342,13 +342,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/log_gamma.html b/interface/log_gamma.html index 5443bca95..fbe871347 100644 --- a/interface/log_gamma.html +++ b/interface/log_gamma.html @@ -179,7 +179,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -223,7 +223,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -267,7 +267,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -311,7 +311,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -355,7 +355,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -399,7 +399,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -432,13 +432,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/log_lower_incomplete_gamma.html b/interface/log_lower_incomplete_gamma.html index b366a201f..a812a5820 100644 --- a/interface/log_lower_incomplete_gamma.html +++ b/interface/log_lower_incomplete_gamma.html @@ -183,7 +183,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -198,7 +198,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -242,7 +242,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -257,7 +257,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -301,7 +301,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -375,7 +375,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -419,7 +419,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -434,7 +434,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -478,7 +478,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -493,7 +493,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -537,7 +537,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -552,7 +552,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -596,7 +596,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -611,7 +611,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -655,7 +655,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -670,7 +670,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -714,7 +714,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -729,7 +729,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -762,13 +762,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/log_upper_incomplete_gamma.html b/interface/log_upper_incomplete_gamma.html index a73ede726..56b0f4e4c 100644 --- a/interface/log_upper_incomplete_gamma.html +++ b/interface/log_upper_incomplete_gamma.html @@ -183,7 +183,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -198,7 +198,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -242,7 +242,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -257,7 +257,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -301,7 +301,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -375,7 +375,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -419,7 +419,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -434,7 +434,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -478,7 +478,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -493,7 +493,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -537,7 +537,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -552,7 +552,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -596,7 +596,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -611,7 +611,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -655,7 +655,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -670,7 +670,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -714,7 +714,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -729,7 +729,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -762,13 +762,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/logspace.html b/interface/logspace.html index d5519618d..fae2d76db 100644 --- a/interface/logspace.html +++ b/interface/logspace.html @@ -203,7 +203,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -218,7 +218,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -262,7 +262,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -277,7 +277,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -292,7 +292,7 @@

    Arguments

    - + integer, intent(in) @@ -336,7 +336,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -351,7 +351,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -366,7 +366,7 @@

    Arguments

    - + integer, intent(in) @@ -425,7 +425,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -440,7 +440,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -455,7 +455,7 @@

    Arguments

    - + integer, intent(in) @@ -514,7 +514,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -529,7 +529,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -544,7 +544,7 @@

    Arguments

    - + integer, intent(in) @@ -603,7 +603,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -618,7 +618,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -662,7 +662,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -677,7 +677,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -692,7 +692,7 @@

    Arguments

    - + integer, intent(in) @@ -736,7 +736,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -751,7 +751,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -766,7 +766,7 @@

    Arguments

    - + integer, intent(in) @@ -825,7 +825,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -840,7 +840,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -855,7 +855,7 @@

    Arguments

    - + integer, intent(in) @@ -914,7 +914,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -929,7 +929,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -944,7 +944,7 @@

    Arguments

    - + integer, intent(in) @@ -1003,7 +1003,7 @@

    Arguments

    - + integer, intent(in) @@ -1018,7 +1018,7 @@

    Arguments

    - + integer, intent(in) @@ -1062,7 +1062,7 @@

    Arguments

    - + integer, intent(in) @@ -1077,7 +1077,7 @@

    Arguments

    - + integer, intent(in) @@ -1092,7 +1092,7 @@

    Arguments

    - + integer, intent(in) @@ -1136,7 +1136,7 @@

    Arguments

    - + integer, intent(in) @@ -1151,7 +1151,7 @@

    Arguments

    - + integer, intent(in) @@ -1166,7 +1166,7 @@

    Arguments

    - + integer, intent(in) @@ -1225,7 +1225,7 @@

    Arguments

    - + integer, intent(in) @@ -1240,7 +1240,7 @@

    Arguments

    - + integer, intent(in) @@ -1255,7 +1255,7 @@

    Arguments

    - + integer, intent(in) @@ -1314,7 +1314,7 @@

    Arguments

    - + integer, intent(in) @@ -1329,7 +1329,7 @@

    Arguments

    - + integer, intent(in) @@ -1344,7 +1344,7 @@

    Arguments

    - + integer, intent(in) @@ -1403,7 +1403,7 @@

    Arguments

    - + integer, intent(in) @@ -1418,7 +1418,7 @@

    Arguments

    - + integer, intent(in) @@ -1433,7 +1433,7 @@

    Arguments

    - + integer, intent(in) @@ -1492,7 +1492,7 @@

    Arguments

    - + integer, intent(in) @@ -1507,7 +1507,7 @@

    Arguments

    - + integer, intent(in) @@ -1522,7 +1522,7 @@

    Arguments

    - + integer, intent(in) @@ -1581,7 +1581,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1596,7 +1596,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1640,7 +1640,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1655,7 +1655,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1670,7 +1670,7 @@

    Arguments

    - + integer, intent(in) @@ -1714,7 +1714,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1729,7 +1729,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1744,7 +1744,7 @@

    Arguments

    - + integer, intent(in) @@ -1803,7 +1803,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1818,7 +1818,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1833,7 +1833,7 @@

    Arguments

    - + integer, intent(in) @@ -1892,7 +1892,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1907,7 +1907,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1922,7 +1922,7 @@

    Arguments

    - + integer, intent(in) @@ -1981,7 +1981,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1996,7 +1996,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2040,7 +2040,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2055,7 +2055,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2070,7 +2070,7 @@

    Arguments

    - + integer, intent(in) @@ -2114,7 +2114,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2129,7 +2129,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2144,7 +2144,7 @@

    Arguments

    - + integer, intent(in) @@ -2203,7 +2203,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2218,7 +2218,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2233,7 +2233,7 @@

    Arguments

    - + integer, intent(in) @@ -2292,7 +2292,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2307,7 +2307,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2322,7 +2322,7 @@

    Arguments

    - + integer, intent(in) @@ -2372,13 +2372,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/lower_incomplete_gamma.html b/interface/lower_incomplete_gamma.html index a56582e83..6381c2c75 100644 --- a/interface/lower_incomplete_gamma.html +++ b/interface/lower_incomplete_gamma.html @@ -183,7 +183,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -198,7 +198,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -242,7 +242,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -257,7 +257,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -301,7 +301,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -360,7 +360,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -375,7 +375,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -419,7 +419,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -434,7 +434,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -478,7 +478,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -493,7 +493,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -537,7 +537,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -552,7 +552,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -596,7 +596,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -611,7 +611,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -655,7 +655,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -670,7 +670,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -714,7 +714,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -729,7 +729,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -762,13 +762,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/lstsq.html b/interface/lstsq.html index 80decce29..db6a38632 100644 --- a/interface/lstsq.html +++ b/interface/lstsq.html @@ -194,7 +194,7 @@

    Arguments

    - + complex(kind=sp), intent(inout), @@ -209,7 +209,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -224,7 +224,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -239,7 +239,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -254,7 +254,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -269,7 +269,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -313,7 +313,7 @@

    Arguments

    - + complex(kind=sp), intent(inout), @@ -328,7 +328,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -343,7 +343,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -358,7 +358,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -373,7 +373,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -388,7 +388,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -432,7 +432,7 @@

    Arguments

    - + real(kind=dp), intent(inout), @@ -447,7 +447,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -462,7 +462,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -477,7 +477,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -492,7 +492,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -507,7 +507,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -551,7 +551,7 @@

    Arguments

    - + real(kind=dp), intent(inout), @@ -566,7 +566,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -581,7 +581,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -596,7 +596,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -611,7 +611,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -626,7 +626,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -670,7 +670,7 @@

    Arguments

    - + real(kind=sp), intent(inout), @@ -685,7 +685,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -700,7 +700,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -715,7 +715,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -730,7 +730,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -745,7 +745,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -789,7 +789,7 @@

    Arguments

    - + real(kind=sp), intent(inout), @@ -804,7 +804,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -819,7 +819,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -834,7 +834,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -849,7 +849,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -864,7 +864,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -908,7 +908,7 @@

    Arguments

    - + complex(kind=dp), intent(inout), @@ -923,7 +923,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -938,7 +938,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -953,7 +953,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -968,7 +968,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -983,7 +983,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -1027,7 +1027,7 @@

    Arguments

    - + complex(kind=dp), intent(inout), @@ -1042,7 +1042,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -1057,7 +1057,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -1072,7 +1072,7 @@

    Arguments

    - + logical(kind=lk), intent(in), @@ -1087,7 +1087,7 @@

    Arguments

    - + integer(kind=ilp), intent(out), @@ -1102,7 +1102,7 @@

    Arguments

    - + type(linalg_state_type), intent(out), @@ -1137,13 +1137,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/lstsq_space.html b/interface/lstsq_space.html index d8ac07e4d..cb0ce133c 100644 --- a/interface/lstsq_space.html +++ b/interface/lstsq_space.html @@ -187,7 +187,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -202,7 +202,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -217,7 +217,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -232,7 +232,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -247,7 +247,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -286,7 +286,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -301,7 +301,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -331,7 +331,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -346,7 +346,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -385,7 +385,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -400,7 +400,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -415,7 +415,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -430,7 +430,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -469,7 +469,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -484,7 +484,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -499,7 +499,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -514,7 +514,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -553,7 +553,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -568,7 +568,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -583,7 +583,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -598,7 +598,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -637,7 +637,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -652,7 +652,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -667,7 +667,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -682,7 +682,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -721,7 +721,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -736,7 +736,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -751,7 +751,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -766,7 +766,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -781,7 +781,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -820,7 +820,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -835,7 +835,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -850,7 +850,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -865,7 +865,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -880,7 +880,7 @@

    Arguments

    - + integer(kind=ilp), intent(out) @@ -909,13 +909,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/mean.html b/interface/mean.html index 7cf1fd8a0..9cdd0041b 100644 --- a/interface/mean.html +++ b/interface/mean.html @@ -269,7 +269,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -284,7 +284,7 @@

    Arguments

    - + integer, intent(in) @@ -299,7 +299,7 @@

    Arguments

    - + logical, intent(in), @@ -343,7 +343,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -358,7 +358,7 @@

    Arguments

    - + integer, intent(in) @@ -373,7 +373,7 @@

    Arguments

    - + logical, intent(in), @@ -417,7 +417,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -432,7 +432,7 @@

    Arguments

    - + integer, intent(in) @@ -447,7 +447,7 @@

    Arguments

    - + logical, intent(in), @@ -491,7 +491,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -506,7 +506,7 @@

    Arguments

    - + integer, intent(in) @@ -521,7 +521,7 @@

    Arguments

    - + logical, intent(in), @@ -565,7 +565,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -580,7 +580,7 @@

    Arguments

    - + integer, intent(in) @@ -595,7 +595,7 @@

    Arguments

    - + logical, intent(in), @@ -639,7 +639,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -654,7 +654,7 @@

    Arguments

    - + integer, intent(in) @@ -669,7 +669,7 @@

    Arguments

    - + logical, intent(in), @@ -713,7 +713,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -728,7 +728,7 @@

    Arguments

    - + integer, intent(in) @@ -743,7 +743,7 @@

    Arguments

    - + logical, intent(in), @@ -787,7 +787,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -802,7 +802,7 @@

    Arguments

    - + integer, intent(in) @@ -817,7 +817,7 @@

    Arguments

    - + logical, intent(in), @@ -861,7 +861,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -876,7 +876,7 @@

    Arguments

    - + integer, intent(in) @@ -891,7 +891,7 @@

    Arguments

    - + logical, intent(in), @@ -935,7 +935,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -950,7 +950,7 @@

    Arguments

    - + integer, intent(in) @@ -965,7 +965,7 @@

    Arguments

    - + logical, intent(in), @@ -1009,7 +1009,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -1024,7 +1024,7 @@

    Arguments

    - + integer, intent(in) @@ -1039,7 +1039,7 @@

    Arguments

    - + logical, intent(in), @@ -1083,7 +1083,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -1098,7 +1098,7 @@

    Arguments

    - + integer, intent(in) @@ -1113,7 +1113,7 @@

    Arguments

    - + logical, intent(in), @@ -1157,7 +1157,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -1172,7 +1172,7 @@

    Arguments

    - + integer, intent(in) @@ -1187,7 +1187,7 @@

    Arguments

    - + logical, intent(in), @@ -1231,7 +1231,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -1246,7 +1246,7 @@

    Arguments

    - + integer, intent(in) @@ -1261,7 +1261,7 @@

    Arguments

    - + logical, intent(in), @@ -1305,7 +1305,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1320,7 +1320,7 @@

    Arguments

    - + integer, intent(in) @@ -1335,7 +1335,7 @@

    Arguments

    - + logical, intent(in), @@ -1379,7 +1379,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1394,7 +1394,7 @@

    Arguments

    - + integer, intent(in) @@ -1409,7 +1409,7 @@

    Arguments

    - + logical, intent(in), @@ -1453,7 +1453,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -1468,7 +1468,7 @@

    Arguments

    - + integer, intent(in) @@ -1483,7 +1483,7 @@

    Arguments

    - + logical, intent(in), @@ -1527,7 +1527,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -1542,7 +1542,7 @@

    Arguments

    - + integer, intent(in) @@ -1557,7 +1557,7 @@

    Arguments

    - + logical, intent(in), @@ -1601,7 +1601,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -1616,7 +1616,7 @@

    Arguments

    - + integer, intent(in) @@ -1631,7 +1631,7 @@

    Arguments

    - + logical, intent(in), @@ -1675,7 +1675,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -1690,7 +1690,7 @@

    Arguments

    - + integer, intent(in) @@ -1705,7 +1705,7 @@

    Arguments

    - + logical, intent(in), @@ -1749,7 +1749,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -1764,7 +1764,7 @@

    Arguments

    - + integer, intent(in) @@ -1779,7 +1779,7 @@

    Arguments

    - + logical, intent(in), @@ -1823,7 +1823,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -1838,7 +1838,7 @@

    Arguments

    - + integer, intent(in) @@ -1853,7 +1853,7 @@

    Arguments

    - + logical, intent(in), @@ -1897,7 +1897,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1912,7 +1912,7 @@

    Arguments

    - + integer, intent(in) @@ -1927,7 +1927,7 @@

    Arguments

    - + logical, intent(in), @@ -1971,7 +1971,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1986,7 +1986,7 @@

    Arguments

    - + integer, intent(in) @@ -2001,7 +2001,7 @@

    Arguments

    - + logical, intent(in), @@ -2045,7 +2045,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -2060,7 +2060,7 @@

    Arguments

    - + logical, intent(in), @@ -2104,7 +2104,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -2119,7 +2119,7 @@

    Arguments

    - + logical, intent(in), @@ -2163,7 +2163,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -2178,7 +2178,7 @@

    Arguments

    - + logical, intent(in), @@ -2222,7 +2222,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -2237,7 +2237,7 @@

    Arguments

    - + logical, intent(in), @@ -2281,7 +2281,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -2296,7 +2296,7 @@

    Arguments

    - + logical, intent(in), @@ -2340,7 +2340,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -2355,7 +2355,7 @@

    Arguments

    - + logical, intent(in), @@ -2399,7 +2399,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -2414,7 +2414,7 @@

    Arguments

    - + logical, intent(in), @@ -2458,7 +2458,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2473,7 +2473,7 @@

    Arguments

    - + logical, intent(in), @@ -2517,7 +2517,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -2532,7 +2532,7 @@

    Arguments

    - + logical, intent(in), @@ -2576,7 +2576,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -2591,7 +2591,7 @@

    Arguments

    - + logical, intent(in), @@ -2635,7 +2635,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -2650,7 +2650,7 @@

    Arguments

    - + logical, intent(in), @@ -2694,7 +2694,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -2709,7 +2709,7 @@

    Arguments

    - + logical, intent(in), @@ -2753,7 +2753,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -2768,7 +2768,7 @@

    Arguments

    - + logical, intent(in), @@ -2812,7 +2812,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -2827,7 +2827,7 @@

    Arguments

    - + logical, intent(in), @@ -2871,7 +2871,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -2886,7 +2886,7 @@

    Arguments

    - + logical, intent(in), @@ -2930,7 +2930,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2945,7 +2945,7 @@

    Arguments

    - + logical, intent(in), @@ -2989,7 +2989,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -3004,7 +3004,7 @@

    Arguments

    - + logical, intent(in), @@ -3048,7 +3048,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -3063,7 +3063,7 @@

    Arguments

    - + logical, intent(in), @@ -3107,7 +3107,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -3122,7 +3122,7 @@

    Arguments

    - + logical, intent(in), @@ -3166,7 +3166,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -3181,7 +3181,7 @@

    Arguments

    - + logical, intent(in), @@ -3225,7 +3225,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -3240,7 +3240,7 @@

    Arguments

    - + logical, intent(in), @@ -3284,7 +3284,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -3299,7 +3299,7 @@

    Arguments

    - + logical, intent(in), @@ -3343,7 +3343,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -3358,7 +3358,7 @@

    Arguments

    - + logical, intent(in), @@ -3402,7 +3402,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -3417,7 +3417,7 @@

    Arguments

    - + logical, intent(in), @@ -3461,7 +3461,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -3476,7 +3476,7 @@

    Arguments

    - + integer, intent(in) @@ -3491,7 +3491,7 @@

    Arguments

    - + logical, intent(in) @@ -3535,7 +3535,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -3550,7 +3550,7 @@

    Arguments

    - + integer, intent(in) @@ -3565,7 +3565,7 @@

    Arguments

    - + logical, intent(in) @@ -3609,7 +3609,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -3624,7 +3624,7 @@

    Arguments

    - + integer, intent(in) @@ -3639,7 +3639,7 @@

    Arguments

    - + logical, intent(in) @@ -3683,7 +3683,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -3698,7 +3698,7 @@

    Arguments

    - + integer, intent(in) @@ -3713,7 +3713,7 @@

    Arguments

    - + logical, intent(in) @@ -3757,7 +3757,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -3772,7 +3772,7 @@

    Arguments

    - + integer, intent(in) @@ -3787,7 +3787,7 @@

    Arguments

    - + logical, intent(in) @@ -3831,7 +3831,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -3846,7 +3846,7 @@

    Arguments

    - + integer, intent(in) @@ -3861,7 +3861,7 @@

    Arguments

    - + logical, intent(in) @@ -3905,7 +3905,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -3920,7 +3920,7 @@

    Arguments

    - + integer, intent(in) @@ -3935,7 +3935,7 @@

    Arguments

    - + logical, intent(in) @@ -3979,7 +3979,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -3994,7 +3994,7 @@

    Arguments

    - + integer, intent(in) @@ -4009,7 +4009,7 @@

    Arguments

    - + logical, intent(in) @@ -4053,7 +4053,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -4068,7 +4068,7 @@

    Arguments

    - + integer, intent(in) @@ -4083,7 +4083,7 @@

    Arguments

    - + logical, intent(in) @@ -4127,7 +4127,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -4142,7 +4142,7 @@

    Arguments

    - + integer, intent(in) @@ -4157,7 +4157,7 @@

    Arguments

    - + logical, intent(in) @@ -4201,7 +4201,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -4216,7 +4216,7 @@

    Arguments

    - + integer, intent(in) @@ -4231,7 +4231,7 @@

    Arguments

    - + logical, intent(in) @@ -4275,7 +4275,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -4290,7 +4290,7 @@

    Arguments

    - + integer, intent(in) @@ -4305,7 +4305,7 @@

    Arguments

    - + logical, intent(in) @@ -4349,7 +4349,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -4364,7 +4364,7 @@

    Arguments

    - + integer, intent(in) @@ -4379,7 +4379,7 @@

    Arguments

    - + logical, intent(in) @@ -4423,7 +4423,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -4438,7 +4438,7 @@

    Arguments

    - + integer, intent(in) @@ -4453,7 +4453,7 @@

    Arguments

    - + logical, intent(in) @@ -4497,7 +4497,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -4512,7 +4512,7 @@

    Arguments

    - + integer, intent(in) @@ -4527,7 +4527,7 @@

    Arguments

    - + logical, intent(in) @@ -4571,7 +4571,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -4586,7 +4586,7 @@

    Arguments

    - + integer, intent(in) @@ -4601,7 +4601,7 @@

    Arguments

    - + logical, intent(in) @@ -4645,7 +4645,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -4660,7 +4660,7 @@

    Arguments

    - + integer, intent(in) @@ -4675,7 +4675,7 @@

    Arguments

    - + logical, intent(in) @@ -4719,7 +4719,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -4734,7 +4734,7 @@

    Arguments

    - + integer, intent(in) @@ -4749,7 +4749,7 @@

    Arguments

    - + logical, intent(in) @@ -4793,7 +4793,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -4808,7 +4808,7 @@

    Arguments

    - + integer, intent(in) @@ -4823,7 +4823,7 @@

    Arguments

    - + logical, intent(in) @@ -4867,7 +4867,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -4882,7 +4882,7 @@

    Arguments

    - + integer, intent(in) @@ -4897,7 +4897,7 @@

    Arguments

    - + logical, intent(in) @@ -4941,7 +4941,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -4956,7 +4956,7 @@

    Arguments

    - + integer, intent(in) @@ -4971,7 +4971,7 @@

    Arguments

    - + logical, intent(in) @@ -5015,7 +5015,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -5030,7 +5030,7 @@

    Arguments

    - + integer, intent(in) @@ -5045,7 +5045,7 @@

    Arguments

    - + logical, intent(in) @@ -5089,7 +5089,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -5104,7 +5104,7 @@

    Arguments

    - + integer, intent(in) @@ -5119,7 +5119,7 @@

    Arguments

    - + logical, intent(in) @@ -5163,7 +5163,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -5178,7 +5178,7 @@

    Arguments

    - + integer, intent(in) @@ -5193,7 +5193,7 @@

    Arguments

    - + logical, intent(in) @@ -5237,7 +5237,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -5252,7 +5252,7 @@

    Arguments

    - + logical, intent(in) @@ -5296,7 +5296,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -5311,7 +5311,7 @@

    Arguments

    - + logical, intent(in) @@ -5355,7 +5355,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -5370,7 +5370,7 @@

    Arguments

    - + logical, intent(in) @@ -5414,7 +5414,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -5429,7 +5429,7 @@

    Arguments

    - + logical, intent(in) @@ -5473,7 +5473,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -5488,7 +5488,7 @@

    Arguments

    - + logical, intent(in) @@ -5532,7 +5532,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -5547,7 +5547,7 @@

    Arguments

    - + logical, intent(in) @@ -5591,7 +5591,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -5606,7 +5606,7 @@

    Arguments

    - + logical, intent(in) @@ -5650,7 +5650,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -5665,7 +5665,7 @@

    Arguments

    - + logical, intent(in) @@ -5709,7 +5709,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -5724,7 +5724,7 @@

    Arguments

    - + logical, intent(in) @@ -5768,7 +5768,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -5783,7 +5783,7 @@

    Arguments

    - + logical, intent(in) @@ -5827,7 +5827,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -5842,7 +5842,7 @@

    Arguments

    - + logical, intent(in) @@ -5886,7 +5886,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -5901,7 +5901,7 @@

    Arguments

    - + logical, intent(in) @@ -5945,7 +5945,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -5960,7 +5960,7 @@

    Arguments

    - + logical, intent(in) @@ -6004,7 +6004,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -6019,7 +6019,7 @@

    Arguments

    - + logical, intent(in) @@ -6063,7 +6063,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -6078,7 +6078,7 @@

    Arguments

    - + logical, intent(in) @@ -6122,7 +6122,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -6137,7 +6137,7 @@

    Arguments

    - + logical, intent(in) @@ -6181,7 +6181,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -6196,7 +6196,7 @@

    Arguments

    - + logical, intent(in) @@ -6240,7 +6240,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -6255,7 +6255,7 @@

    Arguments

    - + logical, intent(in) @@ -6299,7 +6299,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -6314,7 +6314,7 @@

    Arguments

    - + logical, intent(in) @@ -6358,7 +6358,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -6373,7 +6373,7 @@

    Arguments

    - + logical, intent(in) @@ -6417,7 +6417,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -6432,7 +6432,7 @@

    Arguments

    - + logical, intent(in) @@ -6476,7 +6476,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -6491,7 +6491,7 @@

    Arguments

    - + logical, intent(in) @@ -6535,7 +6535,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -6550,7 +6550,7 @@

    Arguments

    - + logical, intent(in) @@ -6594,7 +6594,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -6609,7 +6609,7 @@

    Arguments

    - + logical, intent(in) @@ -6644,13 +6644,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/median.html b/interface/median.html index 994cf52be..291557b4d 100644 --- a/interface/median.html +++ b/interface/median.html @@ -245,7 +245,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -260,7 +260,7 @@

    Arguments

    - + integer, intent(in) @@ -275,7 +275,7 @@

    Arguments

    - + logical, intent(in), @@ -319,7 +319,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -334,7 +334,7 @@

    Arguments

    - + integer, intent(in) @@ -349,7 +349,7 @@

    Arguments

    - + logical, intent(in), @@ -393,7 +393,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -408,7 +408,7 @@

    Arguments

    - + integer, intent(in) @@ -423,7 +423,7 @@

    Arguments

    - + logical, intent(in), @@ -467,7 +467,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -482,7 +482,7 @@

    Arguments

    - + integer, intent(in) @@ -497,7 +497,7 @@

    Arguments

    - + logical, intent(in), @@ -541,7 +541,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -556,7 +556,7 @@

    Arguments

    - + integer, intent(in) @@ -571,7 +571,7 @@

    Arguments

    - + logical, intent(in), @@ -615,7 +615,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -630,7 +630,7 @@

    Arguments

    - + integer, intent(in) @@ -645,7 +645,7 @@

    Arguments

    - + logical, intent(in), @@ -689,7 +689,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -704,7 +704,7 @@

    Arguments

    - + integer, intent(in) @@ -719,7 +719,7 @@

    Arguments

    - + logical, intent(in), @@ -763,7 +763,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -778,7 +778,7 @@

    Arguments

    - + integer, intent(in) @@ -793,7 +793,7 @@

    Arguments

    - + logical, intent(in), @@ -837,7 +837,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -852,7 +852,7 @@

    Arguments

    - + integer, intent(in) @@ -867,7 +867,7 @@

    Arguments

    - + logical, intent(in), @@ -911,7 +911,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -926,7 +926,7 @@

    Arguments

    - + integer, intent(in) @@ -941,7 +941,7 @@

    Arguments

    - + logical, intent(in), @@ -985,7 +985,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1000,7 +1000,7 @@

    Arguments

    - + integer, intent(in) @@ -1015,7 +1015,7 @@

    Arguments

    - + logical, intent(in), @@ -1059,7 +1059,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1074,7 +1074,7 @@

    Arguments

    - + integer, intent(in) @@ -1089,7 +1089,7 @@

    Arguments

    - + logical, intent(in), @@ -1133,7 +1133,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -1148,7 +1148,7 @@

    Arguments

    - + integer, intent(in) @@ -1163,7 +1163,7 @@

    Arguments

    - + logical, intent(in), @@ -1207,7 +1207,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -1222,7 +1222,7 @@

    Arguments

    - + integer, intent(in) @@ -1237,7 +1237,7 @@

    Arguments

    - + logical, intent(in), @@ -1281,7 +1281,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -1296,7 +1296,7 @@

    Arguments

    - + integer, intent(in) @@ -1311,7 +1311,7 @@

    Arguments

    - + logical, intent(in), @@ -1355,7 +1355,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -1370,7 +1370,7 @@

    Arguments

    - + integer, intent(in) @@ -1385,7 +1385,7 @@

    Arguments

    - + logical, intent(in), @@ -1429,7 +1429,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1444,7 +1444,7 @@

    Arguments

    - + integer, intent(in) @@ -1459,7 +1459,7 @@

    Arguments

    - + logical, intent(in), @@ -1503,7 +1503,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1518,7 +1518,7 @@

    Arguments

    - + integer, intent(in) @@ -1533,7 +1533,7 @@

    Arguments

    - + logical, intent(in), @@ -1577,7 +1577,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -1592,7 +1592,7 @@

    Arguments

    - + logical, intent(in), @@ -1636,7 +1636,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -1651,7 +1651,7 @@

    Arguments

    - + logical, intent(in), @@ -1695,7 +1695,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -1710,7 +1710,7 @@

    Arguments

    - + logical, intent(in), @@ -1754,7 +1754,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -1769,7 +1769,7 @@

    Arguments

    - + logical, intent(in), @@ -1813,7 +1813,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1828,7 +1828,7 @@

    Arguments

    - + logical, intent(in), @@ -1872,7 +1872,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1887,7 +1887,7 @@

    Arguments

    - + logical, intent(in), @@ -1931,7 +1931,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -1946,7 +1946,7 @@

    Arguments

    - + logical, intent(in), @@ -1990,7 +1990,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -2005,7 +2005,7 @@

    Arguments

    - + logical, intent(in), @@ -2049,7 +2049,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -2064,7 +2064,7 @@

    Arguments

    - + logical, intent(in), @@ -2108,7 +2108,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -2123,7 +2123,7 @@

    Arguments

    - + logical, intent(in), @@ -2167,7 +2167,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -2182,7 +2182,7 @@

    Arguments

    - + logical, intent(in), @@ -2226,7 +2226,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2241,7 +2241,7 @@

    Arguments

    - + logical, intent(in), @@ -2285,7 +2285,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -2300,7 +2300,7 @@

    Arguments

    - + logical, intent(in), @@ -2344,7 +2344,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -2359,7 +2359,7 @@

    Arguments

    - + logical, intent(in), @@ -2403,7 +2403,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -2418,7 +2418,7 @@

    Arguments

    - + logical, intent(in), @@ -2462,7 +2462,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -2477,7 +2477,7 @@

    Arguments

    - + logical, intent(in), @@ -2521,7 +2521,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -2536,7 +2536,7 @@

    Arguments

    - + logical, intent(in), @@ -2580,7 +2580,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2595,7 +2595,7 @@

    Arguments

    - + logical, intent(in), @@ -2639,7 +2639,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -2654,7 +2654,7 @@

    Arguments

    - + logical, intent(in) @@ -2698,7 +2698,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -2713,7 +2713,7 @@

    Arguments

    - + logical, intent(in) @@ -2757,7 +2757,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -2772,7 +2772,7 @@

    Arguments

    - + logical, intent(in) @@ -2816,7 +2816,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -2831,7 +2831,7 @@

    Arguments

    - + logical, intent(in) @@ -2875,7 +2875,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -2890,7 +2890,7 @@

    Arguments

    - + logical, intent(in) @@ -2934,7 +2934,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2949,7 +2949,7 @@

    Arguments

    - + logical, intent(in) @@ -2993,7 +2993,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -3008,7 +3008,7 @@

    Arguments

    - + logical, intent(in) @@ -3052,7 +3052,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -3067,7 +3067,7 @@

    Arguments

    - + logical, intent(in) @@ -3111,7 +3111,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -3126,7 +3126,7 @@

    Arguments

    - + logical, intent(in) @@ -3170,7 +3170,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -3185,7 +3185,7 @@

    Arguments

    - + logical, intent(in) @@ -3229,7 +3229,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -3244,7 +3244,7 @@

    Arguments

    - + logical, intent(in) @@ -3288,7 +3288,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -3303,7 +3303,7 @@

    Arguments

    - + logical, intent(in) @@ -3347,7 +3347,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -3362,7 +3362,7 @@

    Arguments

    - + logical, intent(in) @@ -3406,7 +3406,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -3421,7 +3421,7 @@

    Arguments

    - + logical, intent(in) @@ -3465,7 +3465,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -3480,7 +3480,7 @@

    Arguments

    - + logical, intent(in) @@ -3524,7 +3524,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -3539,7 +3539,7 @@

    Arguments

    - + logical, intent(in) @@ -3583,7 +3583,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -3598,7 +3598,7 @@

    Arguments

    - + logical, intent(in) @@ -3642,7 +3642,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -3657,7 +3657,7 @@

    Arguments

    - + logical, intent(in) @@ -3701,7 +3701,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -3716,7 +3716,7 @@

    Arguments

    - + integer, intent(in) @@ -3731,7 +3731,7 @@

    Arguments

    - + logical, intent(in) @@ -3775,7 +3775,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -3790,7 +3790,7 @@

    Arguments

    - + integer, intent(in) @@ -3805,7 +3805,7 @@

    Arguments

    - + logical, intent(in) @@ -3849,7 +3849,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -3864,7 +3864,7 @@

    Arguments

    - + integer, intent(in) @@ -3879,7 +3879,7 @@

    Arguments

    - + logical, intent(in) @@ -3923,7 +3923,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -3938,7 +3938,7 @@

    Arguments

    - + integer, intent(in) @@ -3953,7 +3953,7 @@

    Arguments

    - + logical, intent(in) @@ -3997,7 +3997,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -4012,7 +4012,7 @@

    Arguments

    - + integer, intent(in) @@ -4027,7 +4027,7 @@

    Arguments

    - + logical, intent(in) @@ -4071,7 +4071,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -4086,7 +4086,7 @@

    Arguments

    - + integer, intent(in) @@ -4101,7 +4101,7 @@

    Arguments

    - + logical, intent(in) @@ -4145,7 +4145,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -4160,7 +4160,7 @@

    Arguments

    - + integer, intent(in) @@ -4175,7 +4175,7 @@

    Arguments

    - + logical, intent(in) @@ -4219,7 +4219,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -4234,7 +4234,7 @@

    Arguments

    - + integer, intent(in) @@ -4249,7 +4249,7 @@

    Arguments

    - + logical, intent(in) @@ -4293,7 +4293,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -4308,7 +4308,7 @@

    Arguments

    - + integer, intent(in) @@ -4323,7 +4323,7 @@

    Arguments

    - + logical, intent(in) @@ -4367,7 +4367,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -4382,7 +4382,7 @@

    Arguments

    - + integer, intent(in) @@ -4397,7 +4397,7 @@

    Arguments

    - + logical, intent(in) @@ -4441,7 +4441,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -4456,7 +4456,7 @@

    Arguments

    - + integer, intent(in) @@ -4471,7 +4471,7 @@

    Arguments

    - + logical, intent(in) @@ -4515,7 +4515,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -4530,7 +4530,7 @@

    Arguments

    - + integer, intent(in) @@ -4545,7 +4545,7 @@

    Arguments

    - + logical, intent(in) @@ -4589,7 +4589,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -4604,7 +4604,7 @@

    Arguments

    - + integer, intent(in) @@ -4619,7 +4619,7 @@

    Arguments

    - + logical, intent(in) @@ -4663,7 +4663,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -4678,7 +4678,7 @@

    Arguments

    - + integer, intent(in) @@ -4693,7 +4693,7 @@

    Arguments

    - + logical, intent(in) @@ -4737,7 +4737,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -4752,7 +4752,7 @@

    Arguments

    - + integer, intent(in) @@ -4767,7 +4767,7 @@

    Arguments

    - + logical, intent(in) @@ -4811,7 +4811,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -4826,7 +4826,7 @@

    Arguments

    - + integer, intent(in) @@ -4841,7 +4841,7 @@

    Arguments

    - + logical, intent(in) @@ -4885,7 +4885,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -4900,7 +4900,7 @@

    Arguments

    - + integer, intent(in) @@ -4915,7 +4915,7 @@

    Arguments

    - + logical, intent(in) @@ -4959,7 +4959,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -4974,7 +4974,7 @@

    Arguments

    - + integer, intent(in) @@ -4989,7 +4989,7 @@

    Arguments

    - + logical, intent(in) @@ -5024,13 +5024,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/meshgrid.html b/interface/meshgrid.html index 94cac1faa..58fa6b4f1 100644 --- a/interface/meshgrid.html +++ b/interface/meshgrid.html @@ -1964,13 +1964,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/moment.html b/interface/moment.html index 0010a58d2..9497dfb38 100644 --- a/interface/moment.html +++ b/interface/moment.html @@ -301,7 +301,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -316,7 +316,7 @@

    Arguments

    - + integer, intent(in) @@ -331,7 +331,7 @@

    Arguments

    - + integer, intent(in) @@ -346,7 +346,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -361,7 +361,7 @@

    Arguments

    - + logical, intent(in), @@ -405,7 +405,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -420,7 +420,7 @@

    Arguments

    - + integer, intent(in) @@ -435,7 +435,7 @@

    Arguments

    - + integer, intent(in) @@ -450,7 +450,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -465,7 +465,7 @@

    Arguments

    - + logical, intent(in), @@ -509,7 +509,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -524,7 +524,7 @@

    Arguments

    - + integer, intent(in) @@ -539,7 +539,7 @@

    Arguments

    - + integer, intent(in) @@ -554,7 +554,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -569,7 +569,7 @@

    Arguments

    - + logical, intent(in), @@ -613,7 +613,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -628,7 +628,7 @@

    Arguments

    - + integer, intent(in) @@ -643,7 +643,7 @@

    Arguments

    - + integer, intent(in) @@ -658,7 +658,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -673,7 +673,7 @@

    Arguments

    - + logical, intent(in), @@ -717,7 +717,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -732,7 +732,7 @@

    Arguments

    - + integer, intent(in) @@ -747,7 +747,7 @@

    Arguments

    - + integer, intent(in) @@ -762,7 +762,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -777,7 +777,7 @@

    Arguments

    - + logical, intent(in), @@ -821,7 +821,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -836,7 +836,7 @@

    Arguments

    - + integer, intent(in) @@ -851,7 +851,7 @@

    Arguments

    - + integer, intent(in) @@ -866,7 +866,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -881,7 +881,7 @@

    Arguments

    - + logical, intent(in), @@ -925,7 +925,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -940,7 +940,7 @@

    Arguments

    - + integer, intent(in) @@ -955,7 +955,7 @@

    Arguments

    - + integer, intent(in) @@ -970,7 +970,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -985,7 +985,7 @@

    Arguments

    - + logical, intent(in), @@ -1029,7 +1029,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1044,7 +1044,7 @@

    Arguments

    - + integer, intent(in) @@ -1059,7 +1059,7 @@

    Arguments

    - + integer, intent(in) @@ -1074,7 +1074,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -1089,7 +1089,7 @@

    Arguments

    - + logical, intent(in), @@ -1133,7 +1133,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -1148,7 +1148,7 @@

    Arguments

    - + integer, intent(in) @@ -1163,7 +1163,7 @@

    Arguments

    - + integer, intent(in) @@ -1178,7 +1178,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -1193,7 +1193,7 @@

    Arguments

    - + logical, intent(in), @@ -1237,7 +1237,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -1252,7 +1252,7 @@

    Arguments

    - + integer, intent(in) @@ -1267,7 +1267,7 @@

    Arguments

    - + integer, intent(in) @@ -1282,7 +1282,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -1297,7 +1297,7 @@

    Arguments

    - + logical, intent(in), @@ -1341,7 +1341,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -1356,7 +1356,7 @@

    Arguments

    - + integer, intent(in) @@ -1371,7 +1371,7 @@

    Arguments

    - + integer, intent(in) @@ -1386,7 +1386,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -1401,7 +1401,7 @@

    Arguments

    - + logical, intent(in), @@ -1445,7 +1445,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -1460,7 +1460,7 @@

    Arguments

    - + integer, intent(in) @@ -1475,7 +1475,7 @@

    Arguments

    - + integer, intent(in) @@ -1490,7 +1490,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -1505,7 +1505,7 @@

    Arguments

    - + logical, intent(in), @@ -1549,7 +1549,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -1564,7 +1564,7 @@

    Arguments

    - + integer, intent(in) @@ -1579,7 +1579,7 @@

    Arguments

    - + integer, intent(in) @@ -1594,7 +1594,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -1609,7 +1609,7 @@

    Arguments

    - + logical, intent(in), @@ -1653,7 +1653,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -1668,7 +1668,7 @@

    Arguments

    - + integer, intent(in) @@ -1683,7 +1683,7 @@

    Arguments

    - + integer, intent(in) @@ -1698,7 +1698,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -1713,7 +1713,7 @@

    Arguments

    - + logical, intent(in), @@ -1757,7 +1757,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -1772,7 +1772,7 @@

    Arguments

    - + integer, intent(in) @@ -1787,7 +1787,7 @@

    Arguments

    - + integer, intent(in) @@ -1802,7 +1802,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -1817,7 +1817,7 @@

    Arguments

    - + logical, intent(in), @@ -1861,7 +1861,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -1876,7 +1876,7 @@

    Arguments

    - + integer, intent(in) @@ -1891,7 +1891,7 @@

    Arguments

    - + integer, intent(in) @@ -1906,7 +1906,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -1921,7 +1921,7 @@

    Arguments

    - + logical, intent(in), @@ -1965,7 +1965,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -1980,7 +1980,7 @@

    Arguments

    - + integer, intent(in) @@ -1995,7 +1995,7 @@

    Arguments

    - + integer, intent(in) @@ -2010,7 +2010,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -2025,7 +2025,7 @@

    Arguments

    - + logical, intent(in), @@ -2069,7 +2069,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -2084,7 +2084,7 @@

    Arguments

    - + integer, intent(in) @@ -2099,7 +2099,7 @@

    Arguments

    - + integer, intent(in) @@ -2114,7 +2114,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -2129,7 +2129,7 @@

    Arguments

    - + logical, intent(in), @@ -2173,7 +2173,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -2188,7 +2188,7 @@

    Arguments

    - + integer, intent(in) @@ -2203,7 +2203,7 @@

    Arguments

    - + integer, intent(in) @@ -2218,7 +2218,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -2233,7 +2233,7 @@

    Arguments

    - + logical, intent(in), @@ -2277,7 +2277,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -2292,7 +2292,7 @@

    Arguments

    - + integer, intent(in) @@ -2307,7 +2307,7 @@

    Arguments

    - + integer, intent(in) @@ -2322,7 +2322,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -2337,7 +2337,7 @@

    Arguments

    - + logical, intent(in), @@ -2381,7 +2381,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -2396,7 +2396,7 @@

    Arguments

    - + integer, intent(in) @@ -2411,7 +2411,7 @@

    Arguments

    - + integer, intent(in) @@ -2426,7 +2426,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -2441,7 +2441,7 @@

    Arguments

    - + logical, intent(in), @@ -2485,7 +2485,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -2500,7 +2500,7 @@

    Arguments

    - + integer, intent(in) @@ -2515,7 +2515,7 @@

    Arguments

    - + integer, intent(in) @@ -2530,7 +2530,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -2545,7 +2545,7 @@

    Arguments

    - + logical, intent(in), @@ -2589,7 +2589,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -2604,7 +2604,7 @@

    Arguments

    - + integer, intent(in) @@ -2619,7 +2619,7 @@

    Arguments

    - + integer, intent(in) @@ -2634,7 +2634,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -2649,7 +2649,7 @@

    Arguments

    - + logical, intent(in), @@ -2693,7 +2693,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -2708,7 +2708,7 @@

    Arguments

    - + integer, intent(in) @@ -2723,7 +2723,7 @@

    Arguments

    - + integer, intent(in) @@ -2738,7 +2738,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -2753,7 +2753,7 @@

    Arguments

    - + logical, intent(in), @@ -2797,7 +2797,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -2812,7 +2812,7 @@

    Arguments

    - + integer, intent(in) @@ -2827,7 +2827,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -2842,7 +2842,7 @@

    Arguments

    - + logical, intent(in), @@ -2886,7 +2886,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -2901,7 +2901,7 @@

    Arguments

    - + integer, intent(in) @@ -2916,7 +2916,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -2931,7 +2931,7 @@

    Arguments

    - + logical, intent(in), @@ -2975,7 +2975,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -2990,7 +2990,7 @@

    Arguments

    - + integer, intent(in) @@ -3005,7 +3005,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3020,7 +3020,7 @@

    Arguments

    - + logical, intent(in), @@ -3064,7 +3064,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -3079,7 +3079,7 @@

    Arguments

    - + integer, intent(in) @@ -3094,7 +3094,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3109,7 +3109,7 @@

    Arguments

    - + logical, intent(in), @@ -3153,7 +3153,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -3168,7 +3168,7 @@

    Arguments

    - + integer, intent(in) @@ -3183,7 +3183,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3198,7 +3198,7 @@

    Arguments

    - + logical, intent(in), @@ -3242,7 +3242,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -3257,7 +3257,7 @@

    Arguments

    - + integer, intent(in) @@ -3272,7 +3272,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3287,7 +3287,7 @@

    Arguments

    - + logical, intent(in), @@ -3331,7 +3331,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -3346,7 +3346,7 @@

    Arguments

    - + integer, intent(in) @@ -3361,7 +3361,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3376,7 +3376,7 @@

    Arguments

    - + logical, intent(in), @@ -3420,7 +3420,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -3435,7 +3435,7 @@

    Arguments

    - + integer, intent(in) @@ -3450,7 +3450,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -3465,7 +3465,7 @@

    Arguments

    - + logical, intent(in), @@ -3509,7 +3509,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -3524,7 +3524,7 @@

    Arguments

    - + integer, intent(in) @@ -3539,7 +3539,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -3554,7 +3554,7 @@

    Arguments

    - + logical, intent(in), @@ -3598,7 +3598,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -3613,7 +3613,7 @@

    Arguments

    - + integer, intent(in) @@ -3628,7 +3628,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -3643,7 +3643,7 @@

    Arguments

    - + logical, intent(in), @@ -3687,7 +3687,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -3702,7 +3702,7 @@

    Arguments

    - + integer, intent(in) @@ -3717,7 +3717,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3732,7 +3732,7 @@

    Arguments

    - + logical, intent(in), @@ -3776,7 +3776,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -3791,7 +3791,7 @@

    Arguments

    - + integer, intent(in) @@ -3806,7 +3806,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3821,7 +3821,7 @@

    Arguments

    - + logical, intent(in), @@ -3865,7 +3865,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -3880,7 +3880,7 @@

    Arguments

    - + integer, intent(in) @@ -3895,7 +3895,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3910,7 +3910,7 @@

    Arguments

    - + logical, intent(in), @@ -3954,7 +3954,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -3969,7 +3969,7 @@

    Arguments

    - + integer, intent(in) @@ -3984,7 +3984,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -3999,7 +3999,7 @@

    Arguments

    - + logical, intent(in), @@ -4043,7 +4043,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -4058,7 +4058,7 @@

    Arguments

    - + integer, intent(in) @@ -4073,7 +4073,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -4088,7 +4088,7 @@

    Arguments

    - + logical, intent(in), @@ -4132,7 +4132,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -4147,7 +4147,7 @@

    Arguments

    - + integer, intent(in) @@ -4162,7 +4162,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -4177,7 +4177,7 @@

    Arguments

    - + logical, intent(in), @@ -4221,7 +4221,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -4236,7 +4236,7 @@

    Arguments

    - + integer, intent(in) @@ -4251,7 +4251,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -4266,7 +4266,7 @@

    Arguments

    - + logical, intent(in), @@ -4310,7 +4310,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -4325,7 +4325,7 @@

    Arguments

    - + integer, intent(in) @@ -4340,7 +4340,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -4355,7 +4355,7 @@

    Arguments

    - + logical, intent(in), @@ -4399,7 +4399,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -4414,7 +4414,7 @@

    Arguments

    - + integer, intent(in) @@ -4429,7 +4429,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -4444,7 +4444,7 @@

    Arguments

    - + logical, intent(in), @@ -4488,7 +4488,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -4503,7 +4503,7 @@

    Arguments

    - + integer, intent(in) @@ -4518,7 +4518,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -4533,7 +4533,7 @@

    Arguments

    - + logical, intent(in), @@ -4577,7 +4577,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -4592,7 +4592,7 @@

    Arguments

    - + integer, intent(in) @@ -4607,7 +4607,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -4622,7 +4622,7 @@

    Arguments

    - + logical, intent(in), @@ -4666,7 +4666,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -4681,7 +4681,7 @@

    Arguments

    - + integer, intent(in) @@ -4696,7 +4696,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -4711,7 +4711,7 @@

    Arguments

    - + logical, intent(in), @@ -4755,7 +4755,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -4770,7 +4770,7 @@

    Arguments

    - + integer, intent(in) @@ -4785,7 +4785,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -4800,7 +4800,7 @@

    Arguments

    - + logical, intent(in), @@ -4844,7 +4844,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -4859,7 +4859,7 @@

    Arguments

    - + integer, intent(in) @@ -4874,7 +4874,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -4889,7 +4889,7 @@

    Arguments

    - + logical, intent(in), @@ -4933,7 +4933,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -4948,7 +4948,7 @@

    Arguments

    - + integer, intent(in) @@ -4963,7 +4963,7 @@

    Arguments

    - + integer, intent(in) @@ -4978,7 +4978,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -4993,7 +4993,7 @@

    Arguments

    - + logical, intent(in) @@ -5037,7 +5037,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -5052,7 +5052,7 @@

    Arguments

    - + integer, intent(in) @@ -5067,7 +5067,7 @@

    Arguments

    - + integer, intent(in) @@ -5082,7 +5082,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -5097,7 +5097,7 @@

    Arguments

    - + logical, intent(in) @@ -5141,7 +5141,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -5156,7 +5156,7 @@

    Arguments

    - + integer, intent(in) @@ -5171,7 +5171,7 @@

    Arguments

    - + integer, intent(in) @@ -5186,7 +5186,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -5201,7 +5201,7 @@

    Arguments

    - + logical, intent(in) @@ -5245,7 +5245,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -5260,7 +5260,7 @@

    Arguments

    - + integer, intent(in) @@ -5275,7 +5275,7 @@

    Arguments

    - + integer, intent(in) @@ -5290,7 +5290,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -5305,7 +5305,7 @@

    Arguments

    - + logical, intent(in) @@ -5349,7 +5349,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -5364,7 +5364,7 @@

    Arguments

    - + integer, intent(in) @@ -5379,7 +5379,7 @@

    Arguments

    - + integer, intent(in) @@ -5394,7 +5394,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -5409,7 +5409,7 @@

    Arguments

    - + logical, intent(in) @@ -5453,7 +5453,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -5468,7 +5468,7 @@

    Arguments

    - + integer, intent(in) @@ -5483,7 +5483,7 @@

    Arguments

    - + integer, intent(in) @@ -5498,7 +5498,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -5513,7 +5513,7 @@

    Arguments

    - + logical, intent(in) @@ -5557,7 +5557,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -5572,7 +5572,7 @@

    Arguments

    - + integer, intent(in) @@ -5587,7 +5587,7 @@

    Arguments

    - + integer, intent(in) @@ -5602,7 +5602,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -5617,7 +5617,7 @@

    Arguments

    - + logical, intent(in) @@ -5661,7 +5661,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -5676,7 +5676,7 @@

    Arguments

    - + integer, intent(in) @@ -5691,7 +5691,7 @@

    Arguments

    - + integer, intent(in) @@ -5706,7 +5706,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -5721,7 +5721,7 @@

    Arguments

    - + logical, intent(in) @@ -5765,7 +5765,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -5780,7 +5780,7 @@

    Arguments

    - + integer, intent(in) @@ -5795,7 +5795,7 @@

    Arguments

    - + integer, intent(in) @@ -5810,7 +5810,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -5825,7 +5825,7 @@

    Arguments

    - + logical, intent(in) @@ -5869,7 +5869,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -5884,7 +5884,7 @@

    Arguments

    - + integer, intent(in) @@ -5899,7 +5899,7 @@

    Arguments

    - + integer, intent(in) @@ -5914,7 +5914,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -5929,7 +5929,7 @@

    Arguments

    - + logical, intent(in) @@ -5973,7 +5973,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -5988,7 +5988,7 @@

    Arguments

    - + integer, intent(in) @@ -6003,7 +6003,7 @@

    Arguments

    - + integer, intent(in) @@ -6018,7 +6018,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -6033,7 +6033,7 @@

    Arguments

    - + logical, intent(in) @@ -6077,7 +6077,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -6092,7 +6092,7 @@

    Arguments

    - + integer, intent(in) @@ -6107,7 +6107,7 @@

    Arguments

    - + integer, intent(in) @@ -6122,7 +6122,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -6137,7 +6137,7 @@

    Arguments

    - + logical, intent(in) @@ -6181,7 +6181,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -6196,7 +6196,7 @@

    Arguments

    - + integer, intent(in) @@ -6211,7 +6211,7 @@

    Arguments

    - + integer, intent(in) @@ -6226,7 +6226,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -6241,7 +6241,7 @@

    Arguments

    - + logical, intent(in) @@ -6285,7 +6285,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -6300,7 +6300,7 @@

    Arguments

    - + integer, intent(in) @@ -6315,7 +6315,7 @@

    Arguments

    - + integer, intent(in) @@ -6330,7 +6330,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -6345,7 +6345,7 @@

    Arguments

    - + logical, intent(in) @@ -6389,7 +6389,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -6404,7 +6404,7 @@

    Arguments

    - + integer, intent(in) @@ -6419,7 +6419,7 @@

    Arguments

    - + integer, intent(in) @@ -6434,7 +6434,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -6449,7 +6449,7 @@

    Arguments

    - + logical, intent(in) @@ -6493,7 +6493,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -6508,7 +6508,7 @@

    Arguments

    - + integer, intent(in) @@ -6523,7 +6523,7 @@

    Arguments

    - + integer, intent(in) @@ -6538,7 +6538,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -6553,7 +6553,7 @@

    Arguments

    - + logical, intent(in) @@ -6597,7 +6597,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -6612,7 +6612,7 @@

    Arguments

    - + integer, intent(in) @@ -6627,7 +6627,7 @@

    Arguments

    - + integer, intent(in) @@ -6642,7 +6642,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -6657,7 +6657,7 @@

    Arguments

    - + logical, intent(in) @@ -6701,7 +6701,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -6716,7 +6716,7 @@

    Arguments

    - + integer, intent(in) @@ -6731,7 +6731,7 @@

    Arguments

    - + integer, intent(in) @@ -6746,7 +6746,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -6761,7 +6761,7 @@

    Arguments

    - + logical, intent(in) @@ -6805,7 +6805,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -6820,7 +6820,7 @@

    Arguments

    - + integer, intent(in) @@ -6835,7 +6835,7 @@

    Arguments

    - + integer, intent(in) @@ -6850,7 +6850,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -6865,7 +6865,7 @@

    Arguments

    - + logical, intent(in) @@ -6909,7 +6909,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -6924,7 +6924,7 @@

    Arguments

    - + integer, intent(in) @@ -6939,7 +6939,7 @@

    Arguments

    - + integer, intent(in) @@ -6954,7 +6954,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -6969,7 +6969,7 @@

    Arguments

    - + logical, intent(in) @@ -7013,7 +7013,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -7028,7 +7028,7 @@

    Arguments

    - + integer, intent(in) @@ -7043,7 +7043,7 @@

    Arguments

    - + integer, intent(in) @@ -7058,7 +7058,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -7073,7 +7073,7 @@

    Arguments

    - + logical, intent(in) @@ -7117,7 +7117,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -7132,7 +7132,7 @@

    Arguments

    - + integer, intent(in) @@ -7147,7 +7147,7 @@

    Arguments

    - + integer, intent(in) @@ -7162,7 +7162,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -7177,7 +7177,7 @@

    Arguments

    - + logical, intent(in) @@ -7221,7 +7221,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -7236,7 +7236,7 @@

    Arguments

    - + integer, intent(in) @@ -7251,7 +7251,7 @@

    Arguments

    - + integer, intent(in) @@ -7266,7 +7266,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -7281,7 +7281,7 @@

    Arguments

    - + logical, intent(in) @@ -7325,7 +7325,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -7340,7 +7340,7 @@

    Arguments

    - + integer, intent(in) @@ -7355,7 +7355,7 @@

    Arguments

    - + integer, intent(in) @@ -7370,7 +7370,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -7385,7 +7385,7 @@

    Arguments

    - + logical, intent(in) @@ -7429,7 +7429,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -7444,7 +7444,7 @@

    Arguments

    - + integer, intent(in) @@ -7459,7 +7459,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -7474,7 +7474,7 @@

    Arguments

    - + logical, intent(in) @@ -7518,7 +7518,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -7533,7 +7533,7 @@

    Arguments

    - + integer, intent(in) @@ -7548,7 +7548,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -7563,7 +7563,7 @@

    Arguments

    - + logical, intent(in) @@ -7607,7 +7607,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -7622,7 +7622,7 @@

    Arguments

    - + integer, intent(in) @@ -7637,7 +7637,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -7652,7 +7652,7 @@

    Arguments

    - + logical, intent(in) @@ -7696,7 +7696,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -7711,7 +7711,7 @@

    Arguments

    - + integer, intent(in) @@ -7726,7 +7726,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -7741,7 +7741,7 @@

    Arguments

    - + logical, intent(in) @@ -7785,7 +7785,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -7800,7 +7800,7 @@

    Arguments

    - + integer, intent(in) @@ -7815,7 +7815,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -7830,7 +7830,7 @@

    Arguments

    - + logical, intent(in) @@ -7874,7 +7874,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -7889,7 +7889,7 @@

    Arguments

    - + integer, intent(in) @@ -7904,7 +7904,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -7919,7 +7919,7 @@

    Arguments

    - + logical, intent(in) @@ -7963,7 +7963,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -7978,7 +7978,7 @@

    Arguments

    - + integer, intent(in) @@ -7993,7 +7993,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -8008,7 +8008,7 @@

    Arguments

    - + logical, intent(in) @@ -8052,7 +8052,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -8067,7 +8067,7 @@

    Arguments

    - + integer, intent(in) @@ -8082,7 +8082,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -8097,7 +8097,7 @@

    Arguments

    - + logical, intent(in) @@ -8141,7 +8141,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -8156,7 +8156,7 @@

    Arguments

    - + integer, intent(in) @@ -8171,7 +8171,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -8186,7 +8186,7 @@

    Arguments

    - + logical, intent(in) @@ -8230,7 +8230,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -8245,7 +8245,7 @@

    Arguments

    - + integer, intent(in) @@ -8260,7 +8260,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -8275,7 +8275,7 @@

    Arguments

    - + logical, intent(in) @@ -8319,7 +8319,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -8334,7 +8334,7 @@

    Arguments

    - + integer, intent(in) @@ -8349,7 +8349,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -8364,7 +8364,7 @@

    Arguments

    - + logical, intent(in) @@ -8408,7 +8408,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -8423,7 +8423,7 @@

    Arguments

    - + integer, intent(in) @@ -8438,7 +8438,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -8453,7 +8453,7 @@

    Arguments

    - + logical, intent(in) @@ -8497,7 +8497,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -8512,7 +8512,7 @@

    Arguments

    - + integer, intent(in) @@ -8527,7 +8527,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -8542,7 +8542,7 @@

    Arguments

    - + logical, intent(in) @@ -8586,7 +8586,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -8601,7 +8601,7 @@

    Arguments

    - + integer, intent(in) @@ -8616,7 +8616,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -8631,7 +8631,7 @@

    Arguments

    - + logical, intent(in) @@ -8675,7 +8675,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -8690,7 +8690,7 @@

    Arguments

    - + integer, intent(in) @@ -8705,7 +8705,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -8720,7 +8720,7 @@

    Arguments

    - + logical, intent(in) @@ -8764,7 +8764,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -8779,7 +8779,7 @@

    Arguments

    - + integer, intent(in) @@ -8794,7 +8794,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -8809,7 +8809,7 @@

    Arguments

    - + logical, intent(in) @@ -8853,7 +8853,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -8868,7 +8868,7 @@

    Arguments

    - + integer, intent(in) @@ -8883,7 +8883,7 @@

    Arguments

    - + complex(kind=dp), intent(in), @@ -8898,7 +8898,7 @@

    Arguments

    - + logical, intent(in) @@ -8942,7 +8942,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -8957,7 +8957,7 @@

    Arguments

    - + integer, intent(in) @@ -8972,7 +8972,7 @@

    Arguments

    - + complex(kind=sp), intent(in), @@ -8987,7 +8987,7 @@

    Arguments

    - + logical, intent(in) @@ -9031,7 +9031,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -9046,7 +9046,7 @@

    Arguments

    - + integer, intent(in) @@ -9061,7 +9061,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -9076,7 +9076,7 @@

    Arguments

    - + logical, intent(in) @@ -9120,7 +9120,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -9135,7 +9135,7 @@

    Arguments

    - + integer, intent(in) @@ -9150,7 +9150,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -9165,7 +9165,7 @@

    Arguments

    - + logical, intent(in) @@ -9209,7 +9209,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -9224,7 +9224,7 @@

    Arguments

    - + integer, intent(in) @@ -9239,7 +9239,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -9254,7 +9254,7 @@

    Arguments

    - + logical, intent(in) @@ -9298,7 +9298,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -9313,7 +9313,7 @@

    Arguments

    - + integer, intent(in) @@ -9328,7 +9328,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -9343,7 +9343,7 @@

    Arguments

    - + logical, intent(in) @@ -9387,7 +9387,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -9402,7 +9402,7 @@

    Arguments

    - + integer, intent(in) @@ -9417,7 +9417,7 @@

    Arguments

    - + real(kind=dp), intent(in), @@ -9432,7 +9432,7 @@

    Arguments

    - + logical, intent(in) @@ -9476,7 +9476,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -9491,7 +9491,7 @@

    Arguments

    - + integer, intent(in) @@ -9506,7 +9506,7 @@

    Arguments

    - + real(kind=sp), intent(in), @@ -9521,7 +9521,7 @@

    Arguments

    - + logical, intent(in) @@ -9565,7 +9565,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -9580,7 +9580,7 @@

    Arguments

    - + integer, intent(in) @@ -9595,7 +9595,7 @@

    Arguments

    - + integer, intent(in) @@ -9610,7 +9610,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -9625,7 +9625,7 @@

    Arguments

    - + logical, intent(in) @@ -9669,7 +9669,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -9684,7 +9684,7 @@

    Arguments

    - + integer, intent(in) @@ -9699,7 +9699,7 @@

    Arguments

    - + integer, intent(in) @@ -9714,7 +9714,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -9729,7 +9729,7 @@

    Arguments

    - + logical, intent(in) @@ -9773,7 +9773,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -9788,7 +9788,7 @@

    Arguments

    - + integer, intent(in) @@ -9803,7 +9803,7 @@

    Arguments

    - + integer, intent(in) @@ -9818,7 +9818,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -9833,7 +9833,7 @@

    Arguments

    - + logical, intent(in) @@ -9877,7 +9877,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -9892,7 +9892,7 @@

    Arguments

    - + integer, intent(in) @@ -9907,7 +9907,7 @@

    Arguments

    - + integer, intent(in) @@ -9922,7 +9922,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -9937,7 +9937,7 @@

    Arguments

    - + logical, intent(in) @@ -9981,7 +9981,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -9996,7 +9996,7 @@

    Arguments

    - + integer, intent(in) @@ -10011,7 +10011,7 @@

    Arguments

    - + integer, intent(in) @@ -10026,7 +10026,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10041,7 +10041,7 @@

    Arguments

    - + logical, intent(in) @@ -10085,7 +10085,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -10100,7 +10100,7 @@

    Arguments

    - + integer, intent(in) @@ -10115,7 +10115,7 @@

    Arguments

    - + integer, intent(in) @@ -10130,7 +10130,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10145,7 +10145,7 @@

    Arguments

    - + logical, intent(in) @@ -10189,7 +10189,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10204,7 +10204,7 @@

    Arguments

    - + integer, intent(in) @@ -10219,7 +10219,7 @@

    Arguments

    - + integer, intent(in) @@ -10234,7 +10234,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10249,7 +10249,7 @@

    Arguments

    - + logical, intent(in) @@ -10293,7 +10293,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -10308,7 +10308,7 @@

    Arguments

    - + integer, intent(in) @@ -10323,7 +10323,7 @@

    Arguments

    - + integer, intent(in) @@ -10338,7 +10338,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -10353,7 +10353,7 @@

    Arguments

    - + logical, intent(in) @@ -10397,7 +10397,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -10412,7 +10412,7 @@

    Arguments

    - + integer, intent(in) @@ -10427,7 +10427,7 @@

    Arguments

    - + integer, intent(in) @@ -10442,7 +10442,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -10457,7 +10457,7 @@

    Arguments

    - + logical, intent(in) @@ -10501,7 +10501,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -10516,7 +10516,7 @@

    Arguments

    - + integer, intent(in) @@ -10531,7 +10531,7 @@

    Arguments

    - + integer, intent(in) @@ -10546,7 +10546,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -10561,7 +10561,7 @@

    Arguments

    - + logical, intent(in) @@ -10605,7 +10605,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -10620,7 +10620,7 @@

    Arguments

    - + integer, intent(in) @@ -10635,7 +10635,7 @@

    Arguments

    - + integer, intent(in) @@ -10650,7 +10650,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10665,7 +10665,7 @@

    Arguments

    - + logical, intent(in) @@ -10709,7 +10709,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -10724,7 +10724,7 @@

    Arguments

    - + integer, intent(in) @@ -10739,7 +10739,7 @@

    Arguments

    - + integer, intent(in) @@ -10754,7 +10754,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10769,7 +10769,7 @@

    Arguments

    - + logical, intent(in) @@ -10813,7 +10813,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -10828,7 +10828,7 @@

    Arguments

    - + integer, intent(in) @@ -10843,7 +10843,7 @@

    Arguments

    - + integer, intent(in) @@ -10858,7 +10858,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10873,7 +10873,7 @@

    Arguments

    - + logical, intent(in) @@ -10917,7 +10917,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -10932,7 +10932,7 @@

    Arguments

    - + integer, intent(in) @@ -10947,7 +10947,7 @@

    Arguments

    - + integer, intent(in) @@ -10962,7 +10962,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -10977,7 +10977,7 @@

    Arguments

    - + logical, intent(in) @@ -11021,7 +11021,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11036,7 +11036,7 @@

    Arguments

    - + integer, intent(in) @@ -11051,7 +11051,7 @@

    Arguments

    - + integer, intent(in) @@ -11066,7 +11066,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11081,7 +11081,7 @@

    Arguments

    - + logical, intent(in) @@ -11125,7 +11125,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -11140,7 +11140,7 @@

    Arguments

    - + integer, intent(in) @@ -11155,7 +11155,7 @@

    Arguments

    - + integer, intent(in) @@ -11170,7 +11170,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -11185,7 +11185,7 @@

    Arguments

    - + logical, intent(in) @@ -11229,7 +11229,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -11244,7 +11244,7 @@

    Arguments

    - + integer, intent(in) @@ -11259,7 +11259,7 @@

    Arguments

    - + integer, intent(in) @@ -11274,7 +11274,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -11289,7 +11289,7 @@

    Arguments

    - + logical, intent(in), @@ -11333,7 +11333,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -11348,7 +11348,7 @@

    Arguments

    - + integer, intent(in) @@ -11363,7 +11363,7 @@

    Arguments

    - + integer, intent(in) @@ -11378,7 +11378,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -11393,7 +11393,7 @@

    Arguments

    - + logical, intent(in), @@ -11437,7 +11437,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -11452,7 +11452,7 @@

    Arguments

    - + integer, intent(in) @@ -11467,7 +11467,7 @@

    Arguments

    - + integer, intent(in) @@ -11482,7 +11482,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11497,7 +11497,7 @@

    Arguments

    - + logical, intent(in), @@ -11541,7 +11541,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -11556,7 +11556,7 @@

    Arguments

    - + integer, intent(in) @@ -11571,7 +11571,7 @@

    Arguments

    - + integer, intent(in) @@ -11586,7 +11586,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11601,7 +11601,7 @@

    Arguments

    - + logical, intent(in), @@ -11645,7 +11645,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -11660,7 +11660,7 @@

    Arguments

    - + integer, intent(in) @@ -11675,7 +11675,7 @@

    Arguments

    - + integer, intent(in) @@ -11690,7 +11690,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11705,7 +11705,7 @@

    Arguments

    - + logical, intent(in), @@ -11749,7 +11749,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -11764,7 +11764,7 @@

    Arguments

    - + integer, intent(in) @@ -11779,7 +11779,7 @@

    Arguments

    - + integer, intent(in) @@ -11794,7 +11794,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11809,7 +11809,7 @@

    Arguments

    - + logical, intent(in), @@ -11853,7 +11853,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11868,7 +11868,7 @@

    Arguments

    - + integer, intent(in) @@ -11883,7 +11883,7 @@

    Arguments

    - + integer, intent(in) @@ -11898,7 +11898,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -11913,7 +11913,7 @@

    Arguments

    - + logical, intent(in), @@ -11957,7 +11957,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -11972,7 +11972,7 @@

    Arguments

    - + integer, intent(in) @@ -11987,7 +11987,7 @@

    Arguments

    - + integer, intent(in) @@ -12002,7 +12002,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -12017,7 +12017,7 @@

    Arguments

    - + logical, intent(in), @@ -12061,7 +12061,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -12076,7 +12076,7 @@

    Arguments

    - + integer, intent(in) @@ -12091,7 +12091,7 @@

    Arguments

    - + integer, intent(in) @@ -12106,7 +12106,7 @@

    Arguments

    - + complex(kind=dp), intent(in) @@ -12121,7 +12121,7 @@

    Arguments

    - + logical, intent(in), @@ -12165,7 +12165,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -12180,7 +12180,7 @@

    Arguments

    - + integer, intent(in) @@ -12195,7 +12195,7 @@

    Arguments

    - + integer, intent(in) @@ -12210,7 +12210,7 @@

    Arguments

    - + complex(kind=sp), intent(in) @@ -12225,7 +12225,7 @@

    Arguments

    - + logical, intent(in), @@ -12269,7 +12269,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -12284,7 +12284,7 @@

    Arguments

    - + integer, intent(in) @@ -12299,7 +12299,7 @@

    Arguments

    - + integer, intent(in) @@ -12314,7 +12314,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -12329,7 +12329,7 @@

    Arguments

    - + logical, intent(in), @@ -12373,7 +12373,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -12388,7 +12388,7 @@

    Arguments

    - + integer, intent(in) @@ -12403,7 +12403,7 @@

    Arguments

    - + integer, intent(in) @@ -12418,7 +12418,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -12433,7 +12433,7 @@

    Arguments

    - + logical, intent(in), @@ -12477,7 +12477,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -12492,7 +12492,7 @@

    Arguments

    - + integer, intent(in) @@ -12507,7 +12507,7 @@

    Arguments

    - + integer, intent(in) @@ -12522,7 +12522,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -12537,7 +12537,7 @@

    Arguments

    - + logical, intent(in), @@ -12581,7 +12581,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -12596,7 +12596,7 @@

    Arguments

    - + integer, intent(in) @@ -12611,7 +12611,7 @@

    Arguments

    - + integer, intent(in) @@ -12626,7 +12626,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -12641,7 +12641,7 @@

    Arguments

    - + logical, intent(in), @@ -12685,7 +12685,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -12700,7 +12700,7 @@

    Arguments

    - + integer, intent(in) @@ -12715,7 +12715,7 @@

    Arguments

    - + integer, intent(in) @@ -12730,7 +12730,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -12745,7 +12745,7 @@

    Arguments

    - + logical, intent(in), @@ -12789,7 +12789,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -12804,7 +12804,7 @@

    Arguments

    - + integer, intent(in) @@ -12819,7 +12819,7 @@

    Arguments

    - + integer, intent(in) @@ -12834,7 +12834,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -12849,7 +12849,7 @@

    Arguments

    - + logical, intent(in), @@ -12884,13 +12884,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/move.html b/interface/move.html index b8ca7ab33..54fb74c96 100644 --- a/interface/move.html +++ b/interface/move.html @@ -388,13 +388,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/new_nmhash32_seed.html b/interface/new_nmhash32_seed.html index d894842a3..70c4569ce 100644 --- a/interface/new_nmhash32_seed.html +++ b/interface/new_nmhash32_seed.html @@ -174,7 +174,7 @@

    Arguments

    - + integer(kind=int32), intent(inout) @@ -203,13 +203,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/new_nmhash32x_seed.html b/interface/new_nmhash32x_seed.html index ae51a48ee..06fdd15f8 100644 --- a/interface/new_nmhash32x_seed.html +++ b/interface/new_nmhash32x_seed.html @@ -174,7 +174,7 @@

    Arguments

    - + integer(kind=int32), intent(inout) @@ -203,13 +203,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/new_pengy_hash_seed.html b/interface/new_pengy_hash_seed.html index 10c10ea13..70c30a6c3 100644 --- a/interface/new_pengy_hash_seed.html +++ b/interface/new_pengy_hash_seed.html @@ -158,7 +158,7 @@

    Arguments

    - + integer(kind=int32), intent(inout) @@ -187,13 +187,13 @@

    Description

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/new_spooky_hash_seed.html b/interface/new_spooky_hash_seed.html index c57c51414..4b4c9f62f 100644 --- a/interface/new_spooky_hash_seed.html +++ b/interface/new_spooky_hash_seed.html @@ -158,7 +158,7 @@

    Arguments

    - + integer(kind=int64), intent(inout) @@ -187,13 +187,13 @@

    Description

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/new_water_hash_seed.html b/interface/new_water_hash_seed.html index 4eb61c574..23ce7d63b 100644 --- a/interface/new_water_hash_seed.html +++ b/interface/new_water_hash_seed.html @@ -174,7 +174,7 @@

    Arguments

    - + integer(kind=int64), intent(inout) @@ -203,13 +203,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/nmhash32.html b/interface/nmhash32.html index 37458d328..dba27c3bf 100644 --- a/interface/nmhash32.html +++ b/interface/nmhash32.html @@ -178,7 +178,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -193,7 +193,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -237,7 +237,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -252,7 +252,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -296,7 +296,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -311,7 +311,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -355,7 +355,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -370,7 +370,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -414,7 +414,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -429,7 +429,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -464,13 +464,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/nmhash32x.html b/interface/nmhash32x.html index 14f76ac07..dc5e4f457 100644 --- a/interface/nmhash32x.html +++ b/interface/nmhash32x.html @@ -178,7 +178,7 @@

    Arguments

    - + character(len=*), intent(in) @@ -193,7 +193,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -237,7 +237,7 @@

    Arguments

    - + integer(kind=int16), intent(in) @@ -252,7 +252,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -296,7 +296,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -311,7 +311,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -355,7 +355,7 @@

    Arguments

    - + integer(kind=int64), intent(in) @@ -370,7 +370,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -414,7 +414,7 @@

    Arguments

    - + integer(kind=int8), intent(in) @@ -429,7 +429,7 @@

    Arguments

    - + integer(kind=int32), intent(in) @@ -464,13 +464,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/nrm2.html b/interface/nrm2.html index f650cc411..1d5546dfc 100644 --- a/interface/nrm2.html +++ b/interface/nrm2.html @@ -187,7 +187,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -202,7 +202,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -217,7 +217,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -261,7 +261,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -276,7 +276,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -291,7 +291,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -341,7 +341,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -356,7 +356,7 @@

    Arguments

    - + real(kind=dp), intent(in) @@ -371,7 +371,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -418,7 +418,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -433,7 +433,7 @@

    Arguments

    - + real(kind=sp), intent(in) @@ -448,7 +448,7 @@

    Arguments

    - + integer(kind=ilp), intent(in) @@ -481,13 +481,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(+).html b/interface/operator(+).html index f09ae3d67..8ef9d34e9 100644 --- a/interface/operator(+).html +++ b/interface/operator(+).html @@ -222,13 +222,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(.det.).html b/interface/operator(.det.).html index 1ae93ae4b..2af2abfca 100644 --- a/interface/operator(.det.).html +++ b/interface/operator(.det.).html @@ -236,13 +236,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(==).html b/interface/operator(==).html index 1a7bc6afb..3f6fce31e 100644 --- a/interface/operator(==).html +++ b/interface/operator(==).html @@ -75,25 +75,24 @@

    operator(==)
    • Creative Commons License
    • -
    • experimental
    • 7 statements + title="

      0.0% of total for procedures.

      Including implementation: 32 statements, 0.1% of total for procedures.">5 statements
    • - Source File + Source File
    @@ -155,19 +152,20 @@

    Module Procedures

    public interface operator(==)

    -

    Compares stringlist for equality with the input entity -Returns a logical -Specifications

    +

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

    +

    This operator is elemental and returns a default logical scalar value.


    Module Procedures

    -

    private pure function eq_stringlist(lhs, rhs) +

    private elemental function eq_string_string(lhs, rhs) result(is_eq)

    -

    Compares stringlist 'lhs' for equality with stringlist 'rhs' -Returns a logical

    +

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

    Arguments

    @@ -182,8 +180,8 @@

    Arguments

    - - type(stringlist_type), + + type(string_type), intent(in) @@ -197,8 +195,8 @@

    Arguments

    - - type(stringlist_type), + + type(string_type), intent(in) @@ -223,11 +221,11 @@

    -

    private pure function eq_stringlist_carray(lhs, rhs) +

    private elemental function eq_string_char(lhs, rhs) result(is_eq)

    -

    Compares stringlist 'lhs' for equality with chararray 'rhs' -Returns a logical

    +

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

    Arguments

    @@ -242,8 +240,8 @@

    Arguments

    - - - - - - - -
    - - type(stringlist_type), + + type(string_type), intent(in) @@ -257,74 +255,14 @@

    Arguments

    - + character(len=*), intent(in), - dimension(:) - ::rhs - -
    - -

    - Return Value - logical -

    - - -
    -

    - -
    -

    private pure function eq_stringlist_sarray(lhs, rhs) -

    -
    -

    Compares stringlist 'lhs' for equality with stringarray 'rhs' -Returns a logical

    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(stringlist_type), - intent(in) ::lhs - -
    - - type(string_type), - intent(in), - dimension(:) - :: rhs @@ -343,11 +281,11 @@

    -

    private pure function eq_carray_stringlist(lhs, rhs) +

    private elemental function eq_char_string(lhs, rhs) result(is_eq)

    -

    Compares chararray 'lhs' for equality with stringlist 'rhs' -Returns a logical

    +

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

    Arguments

    @@ -362,74 +300,14 @@

    Arguments

    - - - - - - - - - - - - -
    - + character(len=*), intent(in), - dimension(:) - ::lhs - -
    - - type(stringlist_type), - intent(in) ::rhs - -
    - -

    - Return Value - logical -

    - - -
    -

    - -
    -

    private pure function eq_sarray_stringlist(lhs, rhs) -

    -
    -

    Compares stringarray 'lhs' for equality with stringlist 'rhs' -Returns a logical

    - -

    Arguments

    - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(string_type), - intent(in), - dimension(:) - :: lhs @@ -437,8 +315,8 @@

    Arguments

    - - type(stringlist_type), + + type(string_type), intent(in) @@ -470,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(==)~2.html b/interface/operator(==)~2.html index 5bb180f81..129d795ba 100644 --- a/interface/operator(==)~2.html +++ b/interface/operator(==)~2.html @@ -80,20 +80,20 @@

    operator(==)
  • 10 statements + title="

    0.0% of total for procedures.

    Including implementation: 62 statements, 0.3% of total for procedures.">7 statements
  • - Source File + Source File
  • @@ -123,19 +123,6 @@

    Contents

    - - @@ -143,6 +130,22 @@

    Functions

    + + @@ -152,35 +155,19 @@

    Functions

    public interface operator(==)

    -

    Returns .true. if all bits in set1 and set2 have the same value, - .false. otherwise. The sets must have the same number of bits - otherwise the result is undefined. -(Specification)

    -

    Example

    -
        program example_equality
    -        use stdlib_bitsets
    -        type(bitset_64) :: set0, set1, set2
    -        call set0 % init( 33 )
    -        call set1 % init( 33 )
    -        call set2 % init( 33 )
    -        call set1 % set( 0 )
    -        call set2 % set( 32 )
    -        if ( set0 == set0 .and. set1 == set1 .and. set2 == set2 .and. &
    -            .not. set0 == set1 .and. .not. set0 == set2 .and. .not.   &
    -            set1 == set2 ) then
    -            write(*,*) 'Passed 64 bit equality tests.'
    -        else
    -            error stop 'Failed 64 bit equality tests.'
    -        end if
    -    end program example_equality
    -
    +

    Compares stringlist for equality with the input entity +Returns a logical +Specifications


    -

    Functions

    + + +

    Module Procedures

    -

    private elemental module function eqv_64(set1, set2) result(eqv) +

    private pure function eq_stringlist(lhs, rhs)

    - +

    Compares stringlist 'lhs' for equality with stringlist 'rhs' +Returns a logical

    Arguments

    @@ -195,30 +182,30 @@

    Arguments

    - + - + @@ -236,10 +223,11 @@

    -

    private elemental module function eqv_large(set1, set2) result(eqv) +

    private pure function eq_stringlist_carray(lhs, rhs)

    - +

    Compares stringlist 'lhs' for equality with chararray 'rhs' +Returns a logical

    Arguments

    - - type(bitset_64), + + type(stringlist_type), intent(in) ::set1lhs
    - - type(bitset_64), + + type(stringlist_type), intent(in) ::set2rhs
    @@ -254,30 +242,90 @@

    Arguments

    - + + + + + + + + + + +
    - - type(bitset_large), + + type(stringlist_type), intent(in) ::set1lhs + +
    + + character(len=*), + intent(in), + dimension(:) + ::rhs
    + +

    + Return Value + logical +

    + + +
    +

    + +
    +

    private pure function eq_stringlist_sarray(lhs, rhs) +

    +
    +

    Compares stringlist 'lhs' for equality with stringarray 'rhs' +Returns a logical

    + +

    Arguments

    + + + + + + + + + + - + + + + + + + + + @@ -294,7 +342,125 @@

    +
    +

    private pure function eq_carray_stringlist(lhs, rhs) +

    +
    +

    Compares chararray 'lhs' for equality with stringlist 'rhs' +Returns a logical

    +

    Arguments

    +

    TypeIntentOptional AttributesName
    - - type(bitset_large), + + type(stringlist_type), intent(in) ::set2lhs + +
    + + type(string_type), + intent(in), + dimension(:) + ::rhs
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + character(len=*), + intent(in), + dimension(:) + ::lhs + +
    + + type(stringlist_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +
    + +
    +

    private pure function eq_sarray_stringlist(lhs, rhs) +

    +
    +

    Compares stringarray 'lhs' for equality with stringlist 'rhs' +Returns a logical

    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + type(string_type), + intent(in), + dimension(:) + ::lhs + +
    + + type(stringlist_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +
    @@ -304,13 +470,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(==)~3.html b/interface/operator(==)~3.html index 78879a88d..7350ba5cf 100644 --- a/interface/operator(==)~3.html +++ b/interface/operator(==)~3.html @@ -75,24 +75,25 @@

    operator(==)
    • Creative Commons License
    • +
    • experimental
    • 4 statements + title="

      0.0% of total for procedures.

      Including implementation: 10 statements, 0.0% of total for procedures.">10 statements
    • - Source File + Source File
    @@ -122,27 +123,27 @@

    Contents

    - - - - - - - @@ -151,16 +152,35 @@

    Module Procedures

    public interface operator(==)

    -

    Comparison operators

    +

    Returns .true. if all bits in set1 and set2 have the same value, + .false. otherwise. The sets must have the same number of bits + otherwise the result is undefined. +(Specification)

    +

    Example

    +
        program example_equality
    +        use stdlib_bitsets
    +        type(bitset_64) :: set0, set1, set2
    +        call set0 % init( 33 )
    +        call set1 % init( 33 )
    +        call set2 % init( 33 )
    +        call set1 % set( 0 )
    +        call set2 % set( 32 )
    +        if ( set0 == set0 .and. set1 == set1 .and. set2 == set2 .and. &
    +            .not. set0 == set1 .and. .not. set0 == set2 .and. .not.   &
    +            set1 == set2 ) then
    +            write(*,*) 'Passed 64 bit equality tests.'
    +        else
    +            error stop 'Failed 64 bit equality tests.'
    +        end if
    +    end program example_equality
    +

    - - -

    Module Procedures

    +

    Functions

    -

    private elemental function state_eq_flag(err, flag) +

    private elemental module function eqv_64(set1, set2) result(eqv)

    -

    Compare an error state with an integer flag

    +

    Arguments

    @@ -175,30 +195,30 @@

    Arguments

    - + - + @@ -208,7 +228,7 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    @@ -216,10 +236,10 @@

    -

    private elemental function flag_eq_state(flag, err) +

    private elemental module function eqv_large(set1, set2) result(eqv)

    -

    Compare an integer flag with the error state

    +

    Arguments

    - - type(linalg_state_type), + + type(bitset_64), intent(in) ::errset1
    - - integer, + + type(bitset_64), intent(in) ::flagset2
    @@ -234,30 +254,30 @@

    Arguments

    - + - + @@ -267,13 +287,15 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    + +
    @@ -282,13 +304,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(==)~4.html b/interface/operator(==)~4.html index ce60b80ac..ac230376f 100644 --- a/interface/operator(==)~4.html +++ b/interface/operator(==)~4.html @@ -226,13 +226,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(==)~5.html b/interface/operator(==)~5.html index 48594ad16..fee16ef44 100644 --- a/interface/operator(==)~5.html +++ b/interface/operator(==)~5.html @@ -79,20 +79,20 @@

    operator(==)
  • 5 statements + title="

    0.0% of total for procedures.

    Including implementation: 14 statements, 0.1% of total for procedures.">4 statements
  • - Source File + Source File
  • @@ -152,20 +151,16 @@

    Module Procedures

    public interface operator(==)

    -

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

    -

    This operator is elemental and returns a default logical scalar value.

    +

    Comparison operators


    Module Procedures

    -

    private elemental function eq_string_string(lhs, rhs) result(is_eq) +

    private elemental function state_eq_flag(err, flag)

    -

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

    +

    Compare an error state with an integer flag

    Arguments

    - - integer, + + type(bitset_large), intent(in) ::flagset1
    - - type(linalg_state_type), + + type(bitset_large), intent(in) ::errset2
    @@ -180,30 +175,30 @@

    Arguments

    - + - + @@ -213,7 +208,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -221,11 +216,10 @@

    -

    private elemental function eq_string_char(lhs, rhs) result(is_eq) +

    private elemental function flag_eq_state(flag, err)

    -

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

    +

    Compare an integer flag with the error state

    Arguments

    - - type(string_type), + + type(linalg_state_type), intent(in) ::lhserr
    - - type(string_type), + + integer, intent(in) ::rhsflag
    @@ -240,30 +234,30 @@

    Arguments

    - + - + @@ -273,67 +267,7 @@

    Arguments

    Return Value - logical -

    - - - - - -
    -

    private elemental function eq_char_string(lhs, rhs) result(is_eq) -

    -
    -

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

    - -

    Arguments

    -
    - - type(string_type), + + integer, intent(in) ::lhsflag
    - - character(len=*), + + type(linalg_state_type), intent(in) ::rhserr
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - character(len=*), - intent(in) - - ::lhs - -
    - - type(string_type), - intent(in) - - ::rhs - -
    - -

    - Return Value - logical + logical(kind=lk)

    @@ -348,13 +282,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(SLASH=).html b/interface/operator(SLASH=).html index a2f277dfa..8aa52209d 100644 --- a/interface/operator(SLASH=).html +++ b/interface/operator(SLASH=).html @@ -75,25 +75,24 @@

    operator(/=)
    • Creative Commons License
    • -
    • experimental
    • 7 statements + title="

      0.0% of total for procedures.

      Including implementation: 32 statements, 0.1% of total for procedures.">5 statements
    • - Source File + Source File
    @@ -155,19 +152,20 @@

    Module Procedures

    public interface operator(/=)

    -

    Compares stringlist for inequality with the input entity -Returns a logical -Specifications

    +

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

    +

    This operator is elemental and returns a default logical scalar value.


    Module Procedures

    -

    private pure function ineq_stringlist(lhs, rhs) +

    private elemental function ne_string_string(lhs, rhs) result(is_ne)

    -

    Compares stringlist 'lhs' for inequality with stringlist 'rhs' -Returns a logical

    +

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

    Arguments

    @@ -182,8 +180,8 @@

    Arguments

    - - type(stringlist_type), + + type(string_type), intent(in) @@ -197,8 +195,8 @@

    Arguments

    - - type(stringlist_type), + + type(string_type), intent(in) @@ -223,11 +221,11 @@

    -

    private pure function ineq_stringlist_carray(lhs, rhs) +

    private elemental function ne_string_char(lhs, rhs) result(is_ne)

    -

    Compares stringlist 'lhs' for inequality with chararray 'rhs' -Returns a logical

    +

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

    Arguments

    @@ -242,8 +240,8 @@

    Arguments

    - - - - - - - -
    - - type(stringlist_type), + + type(string_type), intent(in) @@ -257,74 +255,14 @@

    Arguments

    - + character(len=*), intent(in), - dimension(:) - ::rhs - -
    - -

    - Return Value - logical -

    - - -
    -

    - -
    -

    private pure function ineq_stringlist_sarray(lhs, rhs) -

    -
    -

    Compares stringlist 'lhs' for inequality with stringarray 'rhs' -Returns a logical

    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(stringlist_type), - intent(in) ::lhs - -
    - - type(string_type), - intent(in), - dimension(:) - :: rhs @@ -343,11 +281,11 @@

    -

    private pure function ineq_carray_stringlist(lhs, rhs) +

    private elemental function ne_char_string(lhs, rhs) result(is_ne)

    -

    Compares chararray 'lhs' for inequality with stringlist 'rhs' -Returns a logical

    +

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

    Arguments

    @@ -362,74 +300,14 @@

    Arguments

    - - - - - - - - - - - - -
    - + character(len=*), intent(in), - dimension(:) - ::lhs - -
    - - type(stringlist_type), - intent(in) ::rhs - -
    - -

    - Return Value - logical -

    - - -
    -

    - -
    -

    private pure function ineq_sarray_stringlist(lhs, rhs) -

    -
    -

    Compares stringarray 'lhs' for inequality with stringlist 'rhs' -Returns a logical

    - -

    Arguments

    - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -650,8 +875,8 @@

    Type-Bound Procedures

    - + @@ -659,19 +884,94 @@

    Type-Bound Procedures

    init => init_open_map + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + key_get_other_data => get_other_open_data + key_key_test => open_key_test + + + + + + + + + key_set_other_data => set_other_open_data + + + + + + + + + + + + @@ -690,23 +990,23 @@

    Type-Bound Procedures

    - + - + + slots_bits + total_depth => total_open_depth @@ -730,13 +1030,13 @@

    Type-Bound Procedures

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_io.html b/module/stdlib_io.html index f9e884d72..2eef8a652 100644 --- a/module/stdlib_io.html +++ b/module/stdlib_io.html @@ -189,12 +189,12 @@

    Uses

    @@ -499,7 +499,7 @@

    Arguments

    @@ -514,7 +514,7 @@

    Arguments

    @@ -529,7 +529,7 @@

    Arguments

    @@ -544,7 +544,7 @@

    Arguments

    @@ -582,7 +582,7 @@

    Arguments

    @@ -597,7 +597,7 @@

    Arguments

    @@ -612,7 +612,7 @@

    Arguments

    @@ -627,7 +627,7 @@

    Arguments

    @@ -665,7 +665,7 @@

    Arguments

    @@ -680,7 +680,7 @@

    Arguments

    @@ -695,7 +695,7 @@

    Arguments

    @@ -733,7 +733,7 @@

    Arguments

    @@ -748,7 +748,7 @@

    Arguments

    @@ -763,7 +763,7 @@

    Arguments

    @@ -817,7 +817,7 @@

    Arguments

    @@ -832,7 +832,7 @@

    Arguments

    @@ -920,7 +920,7 @@

    Arguments

    @@ -935,7 +935,7 @@

    Arguments

    @@ -1023,7 +1023,7 @@

    Arguments

    @@ -1038,7 +1038,7 @@

    Arguments

    @@ -1126,7 +1126,7 @@

    Arguments

    @@ -1141,7 +1141,7 @@

    Arguments

    @@ -1229,7 +1229,7 @@

    Arguments

    @@ -1244,7 +1244,7 @@

    Arguments

    @@ -1332,7 +1332,7 @@

    Arguments

    @@ -1347,7 +1347,7 @@

    Arguments

    @@ -1435,7 +1435,7 @@

    Arguments

    @@ -1450,7 +1450,7 @@

    Arguments

    @@ -1538,7 +1538,7 @@

    Arguments

    @@ -1553,7 +1553,7 @@

    Arguments

    @@ -1654,7 +1654,7 @@

    Arguments

    @@ -1669,7 +1669,7 @@

    Arguments

    @@ -1712,7 +1712,7 @@

    Arguments

    @@ -1727,7 +1727,7 @@

    Arguments

    @@ -1770,7 +1770,7 @@

    Arguments

    @@ -1785,7 +1785,7 @@

    Arguments

    @@ -1828,7 +1828,7 @@

    Arguments

    @@ -1843,7 +1843,7 @@

    Arguments

    @@ -1886,7 +1886,7 @@

    Arguments

    @@ -1901,7 +1901,7 @@

    Arguments

    @@ -1944,7 +1944,7 @@

    Arguments

    @@ -1959,7 +1959,7 @@

    Arguments

    @@ -2002,7 +2002,7 @@

    Arguments

    @@ -2017,7 +2017,7 @@

    Arguments

    @@ -2060,7 +2060,7 @@

    Arguments

    @@ -2075,7 +2075,7 @@

    Arguments

    @@ -2132,7 +2132,7 @@

    Arguments

    @@ -2162,7 +2162,7 @@

    Arguments

    @@ -2247,13 +2247,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_io_npy.html b/module/stdlib_io_npy.html index f012b65a1..615e1e731 100644 --- a/module/stdlib_io_npy.html +++ b/module/stdlib_io_npy.html @@ -270,7 +270,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -353,7 +353,7 @@

    Arguments

    @@ -368,7 +368,7 @@

    Arguments

    @@ -383,7 +383,7 @@

    Arguments

    @@ -398,7 +398,7 @@

    Arguments

    @@ -436,7 +436,7 @@

    Arguments

    @@ -451,7 +451,7 @@

    Arguments

    @@ -466,7 +466,7 @@

    Arguments

    @@ -481,7 +481,7 @@

    Arguments

    @@ -519,7 +519,7 @@

    Arguments

    @@ -534,7 +534,7 @@

    Arguments

    @@ -549,7 +549,7 @@

    Arguments

    @@ -564,7 +564,7 @@

    Arguments

    @@ -602,7 +602,7 @@

    Arguments

    @@ -617,7 +617,7 @@

    Arguments

    @@ -632,7 +632,7 @@

    Arguments

    @@ -647,7 +647,7 @@

    Arguments

    @@ -685,7 +685,7 @@

    Arguments

    @@ -700,7 +700,7 @@

    Arguments

    @@ -715,7 +715,7 @@

    Arguments

    @@ -730,7 +730,7 @@

    Arguments

    @@ -768,7 +768,7 @@

    Arguments

    @@ -783,7 +783,7 @@

    Arguments

    @@ -798,7 +798,7 @@

    Arguments

    @@ -813,7 +813,7 @@

    Arguments

    @@ -851,7 +851,7 @@

    Arguments

    @@ -866,7 +866,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -896,7 +896,7 @@

    Arguments

    @@ -934,7 +934,7 @@

    Arguments

    @@ -949,7 +949,7 @@

    Arguments

    @@ -964,7 +964,7 @@

    Arguments

    @@ -979,7 +979,7 @@

    Arguments

    @@ -1017,7 +1017,7 @@

    Arguments

    @@ -1032,7 +1032,7 @@

    Arguments

    @@ -1047,7 +1047,7 @@

    Arguments

    @@ -1062,7 +1062,7 @@

    Arguments

    @@ -1100,7 +1100,7 @@

    Arguments

    @@ -1115,7 +1115,7 @@

    Arguments

    @@ -1130,7 +1130,7 @@

    Arguments

    @@ -1145,7 +1145,7 @@

    Arguments

    @@ -1183,7 +1183,7 @@

    Arguments

    @@ -1198,7 +1198,7 @@

    Arguments

    @@ -1213,7 +1213,7 @@

    Arguments

    @@ -1228,7 +1228,7 @@

    Arguments

    @@ -1266,7 +1266,7 @@

    Arguments

    @@ -1281,7 +1281,7 @@

    Arguments

    @@ -1296,7 +1296,7 @@

    Arguments

    @@ -1311,7 +1311,7 @@

    Arguments

    @@ -1349,7 +1349,7 @@

    Arguments

    @@ -1364,7 +1364,7 @@

    Arguments

    @@ -1379,7 +1379,7 @@

    Arguments

    @@ -1394,7 +1394,7 @@

    Arguments

    @@ -1432,7 +1432,7 @@

    Arguments

    @@ -1447,7 +1447,7 @@

    Arguments

    @@ -1462,7 +1462,7 @@

    Arguments

    @@ -1477,7 +1477,7 @@

    Arguments

    @@ -1515,7 +1515,7 @@

    Arguments

    @@ -1530,7 +1530,7 @@

    Arguments

    @@ -1545,7 +1545,7 @@

    Arguments

    @@ -1560,7 +1560,7 @@

    Arguments

    @@ -1598,7 +1598,7 @@

    Arguments

    @@ -1613,7 +1613,7 @@

    Arguments

    @@ -1628,7 +1628,7 @@

    Arguments

    @@ -1643,7 +1643,7 @@

    Arguments

    @@ -1681,7 +1681,7 @@

    Arguments

    @@ -1696,7 +1696,7 @@

    Arguments

    @@ -1711,7 +1711,7 @@

    Arguments

    @@ -1726,7 +1726,7 @@

    Arguments

    @@ -1764,7 +1764,7 @@

    Arguments

    @@ -1779,7 +1779,7 @@

    Arguments

    @@ -1794,7 +1794,7 @@

    Arguments

    @@ -1809,7 +1809,7 @@

    Arguments

    @@ -1847,7 +1847,7 @@

    Arguments

    @@ -1862,7 +1862,7 @@

    Arguments

    @@ -1877,7 +1877,7 @@

    Arguments

    @@ -1892,7 +1892,7 @@

    Arguments

    @@ -1930,7 +1930,7 @@

    Arguments

    @@ -1945,7 +1945,7 @@

    Arguments

    @@ -1960,7 +1960,7 @@

    Arguments

    @@ -1975,7 +1975,7 @@

    Arguments

    @@ -2013,7 +2013,7 @@

    Arguments

    @@ -2028,7 +2028,7 @@

    Arguments

    @@ -2043,7 +2043,7 @@

    Arguments

    @@ -2058,7 +2058,7 @@

    Arguments

    @@ -2096,7 +2096,7 @@

    Arguments

    @@ -2111,7 +2111,7 @@

    Arguments

    @@ -2126,7 +2126,7 @@

    Arguments

    @@ -2141,7 +2141,7 @@

    Arguments

    @@ -2179,7 +2179,7 @@

    Arguments

    @@ -2194,7 +2194,7 @@

    Arguments

    @@ -2209,7 +2209,7 @@

    Arguments

    @@ -2224,7 +2224,7 @@

    Arguments

    @@ -2276,7 +2276,7 @@

    Arguments

    @@ -2291,7 +2291,7 @@

    Arguments

    @@ -2306,7 +2306,7 @@

    Arguments

    @@ -2321,7 +2321,7 @@

    Arguments

    @@ -2359,7 +2359,7 @@

    Arguments

    @@ -2374,7 +2374,7 @@

    Arguments

    @@ -2389,7 +2389,7 @@

    Arguments

    @@ -2404,7 +2404,7 @@

    Arguments

    @@ -2442,7 +2442,7 @@

    Arguments

    @@ -2457,7 +2457,7 @@

    Arguments

    @@ -2472,7 +2472,7 @@

    Arguments

    @@ -2487,7 +2487,7 @@

    Arguments

    @@ -2525,7 +2525,7 @@

    Arguments

    @@ -2540,7 +2540,7 @@

    Arguments

    @@ -2555,7 +2555,7 @@

    Arguments

    @@ -2570,7 +2570,7 @@

    Arguments

    @@ -2608,7 +2608,7 @@

    Arguments

    @@ -2623,7 +2623,7 @@

    Arguments

    @@ -2638,7 +2638,7 @@

    Arguments

    @@ -2653,7 +2653,7 @@

    Arguments

    @@ -2691,7 +2691,7 @@

    Arguments

    @@ -2706,7 +2706,7 @@

    Arguments

    @@ -2721,7 +2721,7 @@

    Arguments

    @@ -2736,7 +2736,7 @@

    Arguments

    @@ -2774,7 +2774,7 @@

    Arguments

    @@ -2789,7 +2789,7 @@

    Arguments

    @@ -2804,7 +2804,7 @@

    Arguments

    @@ -2819,7 +2819,7 @@

    Arguments

    @@ -2857,7 +2857,7 @@

    Arguments

    @@ -2872,7 +2872,7 @@

    Arguments

    @@ -2887,7 +2887,7 @@

    Arguments

    @@ -2902,7 +2902,7 @@

    Arguments

    @@ -2940,7 +2940,7 @@

    Arguments

    @@ -2955,7 +2955,7 @@

    Arguments

    @@ -2970,7 +2970,7 @@

    Arguments

    @@ -2985,7 +2985,7 @@

    Arguments

    @@ -3023,7 +3023,7 @@

    Arguments

    @@ -3038,7 +3038,7 @@

    Arguments

    @@ -3053,7 +3053,7 @@

    Arguments

    @@ -3068,7 +3068,7 @@

    Arguments

    @@ -3106,7 +3106,7 @@

    Arguments

    @@ -3121,7 +3121,7 @@

    Arguments

    @@ -3136,7 +3136,7 @@

    Arguments

    @@ -3151,7 +3151,7 @@

    Arguments

    @@ -3189,7 +3189,7 @@

    Arguments

    @@ -3204,7 +3204,7 @@

    Arguments

    @@ -3219,7 +3219,7 @@

    Arguments

    @@ -3234,7 +3234,7 @@

    Arguments

    @@ -3272,7 +3272,7 @@

    Arguments

    @@ -3287,7 +3287,7 @@

    Arguments

    @@ -3302,7 +3302,7 @@

    Arguments

    @@ -3317,7 +3317,7 @@

    Arguments

    @@ -3355,7 +3355,7 @@

    Arguments

    @@ -3370,7 +3370,7 @@

    Arguments

    @@ -3385,7 +3385,7 @@

    Arguments

    @@ -3400,7 +3400,7 @@

    Arguments

    @@ -3438,7 +3438,7 @@

    Arguments

    @@ -3453,7 +3453,7 @@

    Arguments

    @@ -3468,7 +3468,7 @@

    Arguments

    @@ -3483,7 +3483,7 @@

    Arguments

    @@ -3521,7 +3521,7 @@

    Arguments

    @@ -3536,7 +3536,7 @@

    Arguments

    @@ -3551,7 +3551,7 @@

    Arguments

    @@ -3566,7 +3566,7 @@

    Arguments

    @@ -3604,7 +3604,7 @@

    Arguments

    @@ -3619,7 +3619,7 @@

    Arguments

    @@ -3634,7 +3634,7 @@

    Arguments

    @@ -3649,7 +3649,7 @@

    Arguments

    @@ -3687,7 +3687,7 @@

    Arguments

    @@ -3702,7 +3702,7 @@

    Arguments

    @@ -3717,7 +3717,7 @@

    Arguments

    @@ -3732,7 +3732,7 @@

    Arguments

    @@ -3770,7 +3770,7 @@

    Arguments

    @@ -3785,7 +3785,7 @@

    Arguments

    @@ -3800,7 +3800,7 @@

    Arguments

    @@ -3815,7 +3815,7 @@

    Arguments

    @@ -3853,7 +3853,7 @@

    Arguments

    @@ -3868,7 +3868,7 @@

    Arguments

    @@ -3883,7 +3883,7 @@

    Arguments

    @@ -3898,7 +3898,7 @@

    Arguments

    @@ -3936,7 +3936,7 @@

    Arguments

    @@ -3951,7 +3951,7 @@

    Arguments

    @@ -3966,7 +3966,7 @@

    Arguments

    @@ -3981,7 +3981,7 @@

    Arguments

    @@ -4019,7 +4019,7 @@

    Arguments

    @@ -4034,7 +4034,7 @@

    Arguments

    @@ -4049,7 +4049,7 @@

    Arguments

    @@ -4064,7 +4064,7 @@

    Arguments

    @@ -4102,7 +4102,7 @@

    Arguments

    @@ -4117,7 +4117,7 @@

    Arguments

    @@ -4132,7 +4132,7 @@

    Arguments

    @@ -4147,7 +4147,7 @@

    Arguments

    @@ -4185,7 +4185,7 @@

    Arguments

    @@ -4200,7 +4200,7 @@

    Arguments

    @@ -4215,7 +4215,7 @@

    Arguments

    @@ -4230,7 +4230,7 @@

    Arguments

    @@ -4269,13 +4269,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_io_npy_load.html b/module/stdlib_io_npy_load.html index f5008faa9..d5d8de188 100644 --- a/module/stdlib_io_npy_load.html +++ b/module/stdlib_io_npy_load.html @@ -181,13 +181,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_io_npy_save.html b/module/stdlib_io_npy_save.html index 45330100c..af04f566a 100644 --- a/module/stdlib_io_npy_save.html +++ b/module/stdlib_io_npy_save.html @@ -181,13 +181,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_kinds.html b/module/stdlib_kinds.html index 5d08ffaee..900c5d40b 100644 --- a/module/stdlib_kinds.html +++ b/module/stdlib_kinds.html @@ -292,13 +292,13 @@

    Variables

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg.html b/module/stdlib_linalg.html index 12475ef9e..354cc3e07 100644 --- a/module/stdlib_linalg.html +++ b/module/stdlib_linalg.html @@ -187,11 +187,11 @@

    Uses

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -330,7 +330,7 @@

    Arguments

    @@ -373,7 +373,7 @@

    Arguments

    @@ -388,7 +388,7 @@

    Arguments

    @@ -431,7 +431,7 @@

    Arguments

    @@ -446,7 +446,7 @@

    Arguments

    @@ -489,7 +489,7 @@

    Arguments

    @@ -504,7 +504,7 @@

    Arguments

    @@ -547,7 +547,7 @@

    Arguments

    @@ -562,7 +562,7 @@

    Arguments

    @@ -605,7 +605,7 @@

    Arguments

    @@ -620,7 +620,7 @@

    Arguments

    @@ -663,7 +663,7 @@

    Arguments

    @@ -678,7 +678,7 @@

    Arguments

    @@ -865,7 +865,7 @@

    Arguments

    @@ -908,7 +908,7 @@

    Arguments

    @@ -923,7 +923,7 @@

    Arguments

    @@ -966,7 +966,7 @@

    Arguments

    @@ -1009,7 +1009,7 @@

    Arguments

    @@ -1024,7 +1024,7 @@

    Arguments

    @@ -1067,7 +1067,7 @@

    Arguments

    @@ -1110,7 +1110,7 @@

    Arguments

    @@ -1125,7 +1125,7 @@

    Arguments

    @@ -1168,7 +1168,7 @@

    Arguments

    @@ -1211,7 +1211,7 @@

    Arguments

    @@ -1226,7 +1226,7 @@

    Arguments

    @@ -1269,7 +1269,7 @@

    Arguments

    @@ -1312,7 +1312,7 @@

    Arguments

    @@ -1327,7 +1327,7 @@

    Arguments

    @@ -1370,7 +1370,7 @@

    Arguments

    @@ -1413,7 +1413,7 @@

    Arguments

    @@ -1428,7 +1428,7 @@

    Arguments

    @@ -1471,7 +1471,7 @@

    Arguments

    @@ -1514,7 +1514,7 @@

    Arguments

    @@ -1529,7 +1529,7 @@

    Arguments

    @@ -1572,7 +1572,7 @@

    Arguments

    @@ -1615,7 +1615,7 @@

    Arguments

    @@ -1630,7 +1630,7 @@

    Arguments

    @@ -1673,7 +1673,7 @@

    Arguments

    @@ -1716,7 +1716,7 @@

    Arguments

    @@ -1731,7 +1731,7 @@

    Arguments

    @@ -1774,7 +1774,7 @@

    Arguments

    @@ -1817,7 +1817,7 @@

    Arguments

    @@ -1832,7 +1832,7 @@

    Arguments

    @@ -1875,7 +1875,7 @@

    Arguments

    @@ -1918,7 +1918,7 @@

    Arguments

    @@ -1933,7 +1933,7 @@

    Arguments

    @@ -1976,7 +1976,7 @@

    Arguments

    @@ -2019,7 +2019,7 @@

    Arguments

    @@ -2034,7 +2034,7 @@

    Arguments

    @@ -2077,7 +2077,7 @@

    Arguments

    @@ -2120,7 +2120,7 @@

    Arguments

    @@ -2135,7 +2135,7 @@

    Arguments

    @@ -2178,7 +2178,7 @@

    Arguments

    @@ -2221,7 +2221,7 @@

    Arguments

    @@ -2236,7 +2236,7 @@

    Arguments

    @@ -2279,7 +2279,7 @@

    Arguments

    @@ -2322,7 +2322,7 @@

    Arguments

    @@ -2337,7 +2337,7 @@

    Arguments

    @@ -2380,7 +2380,7 @@

    Arguments

    @@ -2423,7 +2423,7 @@

    Arguments

    @@ -2438,7 +2438,7 @@

    Arguments

    @@ -2496,7 +2496,7 @@

    Arguments

    @@ -2539,7 +2539,7 @@

    Arguments

    @@ -2582,7 +2582,7 @@

    Arguments

    @@ -2625,7 +2625,7 @@

    Arguments

    @@ -2668,7 +2668,7 @@

    Arguments

    @@ -2711,7 +2711,7 @@

    Arguments

    @@ -2754,7 +2754,7 @@

    Arguments

    @@ -2797,7 +2797,7 @@

    Arguments

    @@ -2855,7 +2855,7 @@

    Arguments

    @@ -2898,7 +2898,7 @@

    Arguments

    @@ -2941,7 +2941,7 @@

    Arguments

    @@ -2984,7 +2984,7 @@

    Arguments

    @@ -3027,7 +3027,7 @@

    Arguments

    @@ -3070,7 +3070,7 @@

    Arguments

    @@ -3113,7 +3113,7 @@

    Arguments

    @@ -3156,7 +3156,7 @@

    Arguments

    @@ -3214,7 +3214,7 @@

    Arguments

    @@ -3229,7 +3229,7 @@

    Arguments

    @@ -3272,7 +3272,7 @@

    Arguments

    @@ -3287,7 +3287,7 @@

    Arguments

    @@ -3330,7 +3330,7 @@

    Arguments

    @@ -3345,7 +3345,7 @@

    Arguments

    @@ -3388,7 +3388,7 @@

    Arguments

    @@ -3403,7 +3403,7 @@

    Arguments

    @@ -3446,7 +3446,7 @@

    Arguments

    @@ -3461,7 +3461,7 @@

    Arguments

    @@ -3504,7 +3504,7 @@

    Arguments

    @@ -3519,7 +3519,7 @@

    Arguments

    @@ -3562,7 +3562,7 @@

    Arguments

    @@ -3577,7 +3577,7 @@

    Arguments

    @@ -3620,7 +3620,7 @@

    Arguments

    @@ -3635,7 +3635,7 @@

    Arguments

    @@ -3693,7 +3693,7 @@

    Arguments

    @@ -3736,7 +3736,7 @@

    Arguments

    @@ -3779,7 +3779,7 @@

    Arguments

    @@ -3822,7 +3822,7 @@

    Arguments

    @@ -3865,7 +3865,7 @@

    Arguments

    @@ -3908,7 +3908,7 @@

    Arguments

    @@ -3951,7 +3951,7 @@

    Arguments

    @@ -3994,7 +3994,7 @@

    Arguments

    @@ -4052,7 +4052,7 @@

    Arguments

    @@ -4095,7 +4095,7 @@

    Arguments

    @@ -4138,7 +4138,7 @@

    Arguments

    @@ -4181,7 +4181,7 @@

    Arguments

    @@ -4224,7 +4224,7 @@

    Arguments

    @@ -4267,7 +4267,7 @@

    Arguments

    @@ -4310,7 +4310,7 @@

    Arguments

    @@ -4353,7 +4353,7 @@

    Arguments

    @@ -4411,7 +4411,7 @@

    Arguments

    @@ -4454,7 +4454,7 @@

    Arguments

    @@ -4497,7 +4497,7 @@

    Arguments

    @@ -4540,7 +4540,7 @@

    Arguments

    @@ -4583,7 +4583,7 @@

    Arguments

    @@ -4626,7 +4626,7 @@

    Arguments

    @@ -4669,7 +4669,7 @@

    Arguments

    @@ -4712,7 +4712,7 @@

    Arguments

    @@ -4770,7 +4770,7 @@

    Arguments

    @@ -4785,7 +4785,7 @@

    Arguments

    @@ -4828,7 +4828,7 @@

    Arguments

    @@ -4843,7 +4843,7 @@

    Arguments

    @@ -4886,7 +4886,7 @@

    Arguments

    @@ -4901,7 +4901,7 @@

    Arguments

    @@ -4944,7 +4944,7 @@

    Arguments

    @@ -4959,7 +4959,7 @@

    Arguments

    @@ -5002,7 +5002,7 @@

    Arguments

    @@ -5017,7 +5017,7 @@

    Arguments

    @@ -5060,7 +5060,7 @@

    Arguments

    @@ -5075,7 +5075,7 @@

    Arguments

    @@ -5118,7 +5118,7 @@

    Arguments

    @@ -5133,7 +5133,7 @@

    Arguments

    @@ -5176,7 +5176,7 @@

    Arguments

    @@ -5191,7 +5191,7 @@

    Arguments

    @@ -5249,7 +5249,7 @@

    Arguments

    @@ -5264,7 +5264,7 @@

    Arguments

    @@ -5307,7 +5307,7 @@

    Arguments

    @@ -5322,7 +5322,7 @@

    Arguments

    @@ -5365,7 +5365,7 @@

    Arguments

    @@ -5380,7 +5380,7 @@

    Arguments

    @@ -5423,7 +5423,7 @@

    Arguments

    @@ -5438,7 +5438,7 @@

    Arguments

    @@ -5481,7 +5481,7 @@

    Arguments

    @@ -5496,7 +5496,7 @@

    Arguments

    @@ -5539,7 +5539,7 @@

    Arguments

    @@ -5554,7 +5554,7 @@

    Arguments

    @@ -5597,7 +5597,7 @@

    Arguments

    @@ -5612,7 +5612,7 @@

    Arguments

    @@ -5655,7 +5655,7 @@

    Arguments

    @@ -5670,7 +5670,7 @@

    Arguments

    @@ -5740,7 +5740,7 @@

    Arguments

    @@ -5755,7 +5755,7 @@

    Arguments

    @@ -5770,7 +5770,7 @@

    Arguments

    @@ -5785,7 +5785,7 @@

    Arguments

    @@ -5800,7 +5800,7 @@

    Arguments

    @@ -5815,7 +5815,7 @@

    Arguments

    @@ -5858,7 +5858,7 @@

    Arguments

    @@ -5873,7 +5873,7 @@

    Arguments

    @@ -5888,7 +5888,7 @@

    Arguments

    @@ -5903,7 +5903,7 @@

    Arguments

    @@ -5918,7 +5918,7 @@

    Arguments

    @@ -5933,7 +5933,7 @@

    Arguments

    @@ -5976,7 +5976,7 @@

    Arguments

    @@ -5991,7 +5991,7 @@

    Arguments

    @@ -6006,7 +6006,7 @@

    Arguments

    @@ -6021,7 +6021,7 @@

    Arguments

    @@ -6036,7 +6036,7 @@

    Arguments

    @@ -6051,7 +6051,7 @@

    Arguments

    @@ -6094,7 +6094,7 @@

    Arguments

    @@ -6109,7 +6109,7 @@

    Arguments

    @@ -6124,7 +6124,7 @@

    Arguments

    @@ -6139,7 +6139,7 @@

    Arguments

    @@ -6154,7 +6154,7 @@

    Arguments

    @@ -6169,7 +6169,7 @@

    Arguments

    @@ -6212,7 +6212,7 @@

    Arguments

    @@ -6227,7 +6227,7 @@

    Arguments

    @@ -6242,7 +6242,7 @@

    Arguments

    @@ -6257,7 +6257,7 @@

    Arguments

    @@ -6272,7 +6272,7 @@

    Arguments

    @@ -6287,7 +6287,7 @@

    Arguments

    @@ -6330,7 +6330,7 @@

    Arguments

    @@ -6345,7 +6345,7 @@

    Arguments

    @@ -6360,7 +6360,7 @@

    Arguments

    @@ -6375,7 +6375,7 @@

    Arguments

    @@ -6390,7 +6390,7 @@

    Arguments

    @@ -6405,7 +6405,7 @@

    Arguments

    @@ -6448,7 +6448,7 @@

    Arguments

    @@ -6463,7 +6463,7 @@

    Arguments

    @@ -6478,7 +6478,7 @@

    Arguments

    @@ -6493,7 +6493,7 @@

    Arguments

    @@ -6508,7 +6508,7 @@

    Arguments

    @@ -6523,7 +6523,7 @@

    Arguments

    @@ -6566,7 +6566,7 @@

    Arguments

    @@ -6581,7 +6581,7 @@

    Arguments

    @@ -6596,7 +6596,7 @@

    Arguments

    @@ -6611,7 +6611,7 @@

    Arguments

    @@ -6626,7 +6626,7 @@

    Arguments

    @@ -6641,7 +6641,7 @@

    Arguments

    @@ -6703,7 +6703,7 @@

    Arguments

    @@ -6718,7 +6718,7 @@

    Arguments

    @@ -6733,7 +6733,7 @@

    Arguments

    @@ -6748,7 +6748,7 @@

    Arguments

    @@ -6763,7 +6763,7 @@

    Arguments

    @@ -6801,7 +6801,7 @@

    Arguments

    @@ -6816,7 +6816,7 @@

    Arguments

    @@ -6831,7 +6831,7 @@

    Arguments

    @@ -6846,7 +6846,7 @@

    Arguments

    @@ -6861,7 +6861,7 @@

    Arguments

    @@ -6899,7 +6899,7 @@

    Arguments

    @@ -6914,7 +6914,7 @@

    Arguments

    @@ -6929,7 +6929,7 @@

    Arguments

    @@ -6944,7 +6944,7 @@

    Arguments

    @@ -6982,7 +6982,7 @@

    Arguments

    @@ -6997,7 +6997,7 @@

    Arguments

    @@ -7012,7 +7012,7 @@

    Arguments

    @@ -7027,7 +7027,7 @@

    Arguments

    @@ -7065,7 +7065,7 @@

    Arguments

    @@ -7080,7 +7080,7 @@

    Arguments

    @@ -7095,7 +7095,7 @@

    Arguments

    @@ -7110,7 +7110,7 @@

    Arguments

    @@ -7148,7 +7148,7 @@

    Arguments

    @@ -7163,7 +7163,7 @@

    Arguments

    @@ -7178,7 +7178,7 @@

    Arguments

    @@ -7193,7 +7193,7 @@

    Arguments

    @@ -7231,7 +7231,7 @@

    Arguments

    @@ -7246,7 +7246,7 @@

    Arguments

    @@ -7261,7 +7261,7 @@

    Arguments

    @@ -7276,7 +7276,7 @@

    Arguments

    @@ -7291,7 +7291,7 @@

    Arguments

    @@ -7329,7 +7329,7 @@

    Arguments

    @@ -7344,7 +7344,7 @@

    Arguments

    @@ -7359,7 +7359,7 @@

    Arguments

    @@ -7374,7 +7374,7 @@

    Arguments

    @@ -7389,7 +7389,7 @@

    Arguments

    @@ -7520,7 +7520,7 @@

    Arguments

    @@ -7535,7 +7535,7 @@

    Arguments

    @@ -7578,7 +7578,7 @@

    Arguments

    @@ -7593,7 +7593,7 @@

    Arguments

    @@ -7636,7 +7636,7 @@

    Arguments

    @@ -7651,7 +7651,7 @@

    Arguments

    @@ -7694,7 +7694,7 @@

    Arguments

    @@ -7709,7 +7709,7 @@

    Arguments

    @@ -7752,7 +7752,7 @@

    Arguments

    @@ -7767,7 +7767,7 @@

    Arguments

    @@ -7810,7 +7810,7 @@

    Arguments

    @@ -7825,7 +7825,7 @@

    Arguments

    @@ -7868,7 +7868,7 @@

    Arguments

    @@ -7883,7 +7883,7 @@

    Arguments

    @@ -7926,7 +7926,7 @@

    Arguments

    @@ -7941,7 +7941,7 @@

    Arguments

    @@ -8014,7 +8014,7 @@

    Arguments

    @@ -8029,7 +8029,7 @@

    Arguments

    @@ -8072,7 +8072,7 @@

    Arguments

    @@ -8087,7 +8087,7 @@

    Arguments

    @@ -8130,7 +8130,7 @@

    Arguments

    @@ -8145,7 +8145,7 @@

    Arguments

    @@ -8160,7 +8160,7 @@

    Arguments

    @@ -8175,7 +8175,7 @@

    Arguments

    @@ -8218,7 +8218,7 @@

    Arguments

    @@ -8233,7 +8233,7 @@

    Arguments

    @@ -8248,7 +8248,7 @@

    Arguments

    @@ -8263,7 +8263,7 @@

    Arguments

    @@ -8306,7 +8306,7 @@

    Arguments

    @@ -8321,7 +8321,7 @@

    Arguments

    @@ -8364,7 +8364,7 @@

    Arguments

    @@ -8379,7 +8379,7 @@

    Arguments

    @@ -8422,7 +8422,7 @@

    Arguments

    @@ -8437,7 +8437,7 @@

    Arguments

    @@ -8452,7 +8452,7 @@

    Arguments

    @@ -8467,7 +8467,7 @@

    Arguments

    @@ -8510,7 +8510,7 @@

    Arguments

    @@ -8525,7 +8525,7 @@

    Arguments

    @@ -8540,7 +8540,7 @@

    Arguments

    @@ -8555,7 +8555,7 @@

    Arguments

    @@ -8598,7 +8598,7 @@

    Arguments

    @@ -8613,7 +8613,7 @@

    Arguments

    @@ -8656,7 +8656,7 @@

    Arguments

    @@ -8671,7 +8671,7 @@

    Arguments

    @@ -8714,7 +8714,7 @@

    Arguments

    @@ -8729,7 +8729,7 @@

    Arguments

    @@ -8744,7 +8744,7 @@

    Arguments

    @@ -8759,7 +8759,7 @@

    Arguments

    @@ -8802,7 +8802,7 @@

    Arguments

    @@ -8817,7 +8817,7 @@

    Arguments

    @@ -8832,7 +8832,7 @@

    Arguments

    @@ -8847,7 +8847,7 @@

    Arguments

    @@ -8890,7 +8890,7 @@

    Arguments

    @@ -8905,7 +8905,7 @@

    Arguments

    @@ -8948,7 +8948,7 @@

    Arguments

    @@ -8963,7 +8963,7 @@

    Arguments

    @@ -9006,7 +9006,7 @@

    Arguments

    @@ -9021,7 +9021,7 @@

    Arguments

    @@ -9036,7 +9036,7 @@

    Arguments

    @@ -9051,7 +9051,7 @@

    Arguments

    @@ -9094,7 +9094,7 @@

    Arguments

    @@ -9109,7 +9109,7 @@

    Arguments

    @@ -9124,7 +9124,7 @@

    Arguments

    @@ -9139,7 +9139,7 @@

    Arguments

    @@ -9210,7 +9210,7 @@

    Arguments

    @@ -9225,7 +9225,7 @@

    Arguments

    @@ -9240,7 +9240,7 @@

    Arguments

    @@ -9255,7 +9255,7 @@

    Arguments

    @@ -9270,7 +9270,7 @@

    Arguments

    @@ -9285,7 +9285,7 @@

    Arguments

    @@ -9300,7 +9300,7 @@

    Arguments

    @@ -9315,7 +9315,7 @@

    Arguments

    @@ -9330,7 +9330,7 @@

    Arguments

    @@ -9345,7 +9345,7 @@

    Arguments

    @@ -9360,7 +9360,7 @@

    Arguments

    @@ -9398,7 +9398,7 @@

    Arguments

    @@ -9413,7 +9413,7 @@

    Arguments

    @@ -9428,7 +9428,7 @@

    Arguments

    @@ -9443,7 +9443,7 @@

    Arguments

    @@ -9458,7 +9458,7 @@

    Arguments

    @@ -9473,7 +9473,7 @@

    Arguments

    @@ -9488,7 +9488,7 @@

    Arguments

    @@ -9503,7 +9503,7 @@

    Arguments

    @@ -9518,7 +9518,7 @@

    Arguments

    @@ -9533,7 +9533,7 @@

    Arguments

    @@ -9548,7 +9548,7 @@

    Arguments

    @@ -9586,7 +9586,7 @@

    Arguments

    @@ -9601,7 +9601,7 @@

    Arguments

    @@ -9616,7 +9616,7 @@

    Arguments

    @@ -9631,7 +9631,7 @@

    Arguments

    @@ -9646,7 +9646,7 @@

    Arguments

    @@ -9661,7 +9661,7 @@

    Arguments

    @@ -9676,7 +9676,7 @@

    Arguments

    @@ -9691,7 +9691,7 @@

    Arguments

    @@ -9706,7 +9706,7 @@

    Arguments

    @@ -9721,7 +9721,7 @@

    Arguments

    @@ -9759,7 +9759,7 @@

    Arguments

    @@ -9774,7 +9774,7 @@

    Arguments

    @@ -9789,7 +9789,7 @@

    Arguments

    @@ -9804,7 +9804,7 @@

    Arguments

    @@ -9819,7 +9819,7 @@

    Arguments

    @@ -9834,7 +9834,7 @@

    Arguments

    @@ -9849,7 +9849,7 @@

    Arguments

    @@ -9864,7 +9864,7 @@

    Arguments

    @@ -9879,7 +9879,7 @@

    Arguments

    @@ -9894,7 +9894,7 @@

    Arguments

    @@ -9932,7 +9932,7 @@

    Arguments

    @@ -9947,7 +9947,7 @@

    Arguments

    @@ -9962,7 +9962,7 @@

    Arguments

    @@ -9977,7 +9977,7 @@

    Arguments

    @@ -9992,7 +9992,7 @@

    Arguments

    @@ -10007,7 +10007,7 @@

    Arguments

    @@ -10022,7 +10022,7 @@

    Arguments

    @@ -10037,7 +10037,7 @@

    Arguments

    @@ -10052,7 +10052,7 @@

    Arguments

    @@ -10067,7 +10067,7 @@

    Arguments

    @@ -10105,7 +10105,7 @@

    Arguments

    @@ -10120,7 +10120,7 @@

    Arguments

    @@ -10135,7 +10135,7 @@

    Arguments

    @@ -10150,7 +10150,7 @@

    Arguments

    @@ -10165,7 +10165,7 @@

    Arguments

    @@ -10180,7 +10180,7 @@

    Arguments

    @@ -10195,7 +10195,7 @@

    Arguments

    @@ -10210,7 +10210,7 @@

    Arguments

    @@ -10225,7 +10225,7 @@

    Arguments

    @@ -10240,7 +10240,7 @@

    Arguments

    @@ -10278,7 +10278,7 @@

    Arguments

    @@ -10293,7 +10293,7 @@

    Arguments

    @@ -10308,7 +10308,7 @@

    Arguments

    @@ -10323,7 +10323,7 @@

    Arguments

    @@ -10338,7 +10338,7 @@

    Arguments

    @@ -10353,7 +10353,7 @@

    Arguments

    @@ -10368,7 +10368,7 @@

    Arguments

    @@ -10383,7 +10383,7 @@

    Arguments

    @@ -10398,7 +10398,7 @@

    Arguments

    @@ -10413,7 +10413,7 @@

    Arguments

    @@ -10428,7 +10428,7 @@

    Arguments

    @@ -10466,7 +10466,7 @@

    Arguments

    @@ -10481,7 +10481,7 @@

    Arguments

    @@ -10496,7 +10496,7 @@

    Arguments

    @@ -10511,7 +10511,7 @@

    Arguments

    @@ -10526,7 +10526,7 @@

    Arguments

    @@ -10541,7 +10541,7 @@

    Arguments

    @@ -10556,7 +10556,7 @@

    Arguments

    @@ -10571,7 +10571,7 @@

    Arguments

    @@ -10586,7 +10586,7 @@

    Arguments

    @@ -10601,7 +10601,7 @@

    Arguments

    @@ -10616,7 +10616,7 @@

    Arguments

    @@ -10686,7 +10686,7 @@

    Arguments

    @@ -10701,7 +10701,7 @@

    Arguments

    @@ -10716,7 +10716,7 @@

    Arguments

    @@ -10746,7 +10746,7 @@

    Arguments

    @@ -10761,7 +10761,7 @@

    Arguments

    @@ -10799,7 +10799,7 @@

    Arguments

    @@ -10814,7 +10814,7 @@

    Arguments

    @@ -10829,7 +10829,7 @@

    Arguments

    @@ -10859,7 +10859,7 @@

    Arguments

    @@ -10874,7 +10874,7 @@

    Arguments

    @@ -10912,7 +10912,7 @@

    Arguments

    @@ -10927,7 +10927,7 @@

    Arguments

    @@ -10942,7 +10942,7 @@

    Arguments

    @@ -10972,7 +10972,7 @@

    Arguments

    @@ -10987,7 +10987,7 @@

    Arguments

    @@ -11025,7 +11025,7 @@

    Arguments

    @@ -11040,7 +11040,7 @@

    Arguments

    @@ -11055,7 +11055,7 @@

    Arguments

    @@ -11085,7 +11085,7 @@

    Arguments

    @@ -11100,7 +11100,7 @@

    Arguments

    @@ -11138,7 +11138,7 @@

    Arguments

    @@ -11153,7 +11153,7 @@

    Arguments

    @@ -11168,7 +11168,7 @@

    Arguments

    @@ -11198,7 +11198,7 @@

    Arguments

    @@ -11213,7 +11213,7 @@

    Arguments

    @@ -11251,7 +11251,7 @@

    Arguments

    @@ -11266,7 +11266,7 @@

    Arguments

    @@ -11281,7 +11281,7 @@

    Arguments

    @@ -11311,7 +11311,7 @@

    Arguments

    @@ -11326,7 +11326,7 @@

    Arguments

    @@ -11364,7 +11364,7 @@

    Arguments

    @@ -11379,7 +11379,7 @@

    Arguments

    @@ -11394,7 +11394,7 @@

    Arguments

    @@ -11424,7 +11424,7 @@

    Arguments

    @@ -11439,7 +11439,7 @@

    Arguments

    @@ -11477,7 +11477,7 @@

    Arguments

    @@ -11492,7 +11492,7 @@

    Arguments

    @@ -11507,7 +11507,7 @@

    Arguments

    @@ -11537,7 +11537,7 @@

    Arguments

    @@ -11552,7 +11552,7 @@

    Arguments

    @@ -11641,7 +11641,7 @@

    Arguments

    @@ -11656,7 +11656,7 @@

    Arguments

    @@ -11671,7 +11671,7 @@

    Arguments

    @@ -11686,7 +11686,7 @@

    Arguments

    @@ -11701,7 +11701,7 @@

    Arguments

    @@ -11716,7 +11716,7 @@

    Arguments

    @@ -11732,7 +11732,7 @@

    Arguments

    @@ -11784,7 +11784,7 @@

    Arguments

    @@ -11799,7 +11799,7 @@

    Arguments

    @@ -11814,7 +11814,7 @@

    Arguments

    @@ -11829,7 +11829,7 @@

    Arguments

    @@ -11844,7 +11844,7 @@

    Arguments

    @@ -11859,7 +11859,7 @@

    Arguments

    @@ -11875,7 +11875,7 @@

    Arguments

    @@ -11927,7 +11927,7 @@

    Arguments

    @@ -11942,7 +11942,7 @@

    Arguments

    @@ -11957,7 +11957,7 @@

    Arguments

    @@ -11972,7 +11972,7 @@

    Arguments

    @@ -11987,7 +11987,7 @@

    Arguments

    @@ -12002,7 +12002,7 @@

    Arguments

    @@ -12018,7 +12018,7 @@

    Arguments

    @@ -12070,7 +12070,7 @@

    Arguments

    @@ -12085,7 +12085,7 @@

    Arguments

    @@ -12100,7 +12100,7 @@

    Arguments

    @@ -12115,7 +12115,7 @@

    Arguments

    @@ -12130,7 +12130,7 @@

    Arguments

    @@ -12145,7 +12145,7 @@

    Arguments

    @@ -12161,7 +12161,7 @@

    Arguments

    @@ -12243,7 +12243,7 @@

    Arguments

    @@ -12258,7 +12258,7 @@

    Arguments

    @@ -12309,7 +12309,7 @@

    Arguments

    @@ -12324,7 +12324,7 @@

    Arguments

    @@ -12375,7 +12375,7 @@

    Arguments

    @@ -12390,7 +12390,7 @@

    Arguments

    @@ -12441,7 +12441,7 @@

    Arguments

    @@ -12456,7 +12456,7 @@

    Arguments

    @@ -12514,7 +12514,7 @@

    Arguments

    @@ -12557,7 +12557,7 @@

    Arguments

    @@ -12600,7 +12600,7 @@

    Arguments

    @@ -12643,7 +12643,7 @@

    Arguments

    @@ -12686,7 +12686,7 @@

    Arguments

    @@ -12729,7 +12729,7 @@

    Arguments

    @@ -12772,7 +12772,7 @@

    Arguments

    @@ -12815,7 +12815,7 @@

    Arguments

    @@ -12928,13 +12928,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_blas.html b/module/stdlib_linalg_blas.html index 7c0975eb6..e9a747f1b 100644 --- a/module/stdlib_linalg_blas.html +++ b/module/stdlib_linalg_blas.html @@ -203,12 +203,12 @@

    Uses

    @@ -253,7 +253,7 @@

    Arguments

    @@ -268,7 +268,7 @@

    Arguments

    @@ -283,7 +283,7 @@

    Arguments

    @@ -298,7 +298,7 @@

    Arguments

    @@ -313,7 +313,7 @@

    Arguments

    @@ -328,7 +328,7 @@

    Arguments

    @@ -366,7 +366,7 @@

    Arguments

    @@ -381,7 +381,7 @@

    Arguments

    @@ -396,7 +396,7 @@

    Arguments

    @@ -411,7 +411,7 @@

    Arguments

    @@ -426,7 +426,7 @@

    Arguments

    @@ -441,7 +441,7 @@

    Arguments

    @@ -479,7 +479,7 @@

    Arguments

    @@ -494,7 +494,7 @@

    Arguments

    @@ -509,7 +509,7 @@

    Arguments

    @@ -524,7 +524,7 @@

    Arguments

    @@ -539,7 +539,7 @@

    Arguments

    @@ -554,7 +554,7 @@

    Arguments

    @@ -592,7 +592,7 @@

    Arguments

    @@ -607,7 +607,7 @@

    Arguments

    @@ -622,7 +622,7 @@

    Arguments

    @@ -637,7 +637,7 @@

    Arguments

    @@ -652,7 +652,7 @@

    Arguments

    @@ -667,7 +667,7 @@

    Arguments

    @@ -706,7 +706,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -751,7 +751,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -821,7 +821,7 @@

    Arguments

    @@ -836,7 +836,7 @@

    Arguments

    @@ -851,7 +851,7 @@

    Arguments

    @@ -866,7 +866,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -896,7 +896,7 @@

    Arguments

    @@ -936,7 +936,7 @@

    Arguments

    @@ -951,7 +951,7 @@

    Arguments

    @@ -966,7 +966,7 @@

    Arguments

    @@ -981,7 +981,7 @@

    Arguments

    @@ -996,7 +996,7 @@

    Arguments

    @@ -1011,7 +1011,7 @@

    Arguments

    @@ -1050,7 +1050,7 @@

    Arguments

    @@ -1065,7 +1065,7 @@

    Arguments

    @@ -1080,7 +1080,7 @@

    Arguments

    @@ -1095,7 +1095,7 @@

    Arguments

    @@ -1110,7 +1110,7 @@

    Arguments

    @@ -1125,7 +1125,7 @@

    Arguments

    @@ -1176,7 +1176,7 @@

    Arguments

    @@ -1191,7 +1191,7 @@

    Arguments

    @@ -1206,7 +1206,7 @@

    Arguments

    @@ -1221,7 +1221,7 @@

    Arguments

    @@ -1236,7 +1236,7 @@

    Arguments

    @@ -1274,7 +1274,7 @@

    Arguments

    @@ -1289,7 +1289,7 @@

    Arguments

    @@ -1304,7 +1304,7 @@

    Arguments

    @@ -1319,7 +1319,7 @@

    Arguments

    @@ -1334,7 +1334,7 @@

    Arguments

    @@ -1372,7 +1372,7 @@

    Arguments

    @@ -1387,7 +1387,7 @@

    Arguments

    @@ -1402,7 +1402,7 @@

    Arguments

    @@ -1417,7 +1417,7 @@

    Arguments

    @@ -1432,7 +1432,7 @@

    Arguments

    @@ -1470,7 +1470,7 @@

    Arguments

    @@ -1485,7 +1485,7 @@

    Arguments

    @@ -1500,7 +1500,7 @@

    Arguments

    @@ -1515,7 +1515,7 @@

    Arguments

    @@ -1530,7 +1530,7 @@

    Arguments

    @@ -1569,7 +1569,7 @@

    Arguments

    @@ -1584,7 +1584,7 @@

    Arguments

    @@ -1599,7 +1599,7 @@

    Arguments

    @@ -1614,7 +1614,7 @@

    Arguments

    @@ -1629,7 +1629,7 @@

    Arguments

    @@ -1669,7 +1669,7 @@

    Arguments

    @@ -1684,7 +1684,7 @@

    Arguments

    @@ -1699,7 +1699,7 @@

    Arguments

    @@ -1714,7 +1714,7 @@

    Arguments

    @@ -1729,7 +1729,7 @@

    Arguments

    @@ -1769,7 +1769,7 @@

    Arguments

    @@ -1784,7 +1784,7 @@

    Arguments

    @@ -1799,7 +1799,7 @@

    Arguments

    @@ -1814,7 +1814,7 @@

    Arguments

    @@ -1829,7 +1829,7 @@

    Arguments

    @@ -1868,7 +1868,7 @@

    Arguments

    @@ -1883,7 +1883,7 @@

    Arguments

    @@ -1898,7 +1898,7 @@

    Arguments

    @@ -1913,7 +1913,7 @@

    Arguments

    @@ -1928,7 +1928,7 @@

    Arguments

    @@ -1980,7 +1980,7 @@

    Arguments

    @@ -1995,7 +1995,7 @@

    Arguments

    @@ -2010,7 +2010,7 @@

    Arguments

    @@ -2025,7 +2025,7 @@

    Arguments

    @@ -2040,7 +2040,7 @@

    Arguments

    @@ -2083,7 +2083,7 @@

    Arguments

    @@ -2098,7 +2098,7 @@

    Arguments

    @@ -2113,7 +2113,7 @@

    Arguments

    @@ -2128,7 +2128,7 @@

    Arguments

    @@ -2143,7 +2143,7 @@

    Arguments

    @@ -2188,7 +2188,7 @@

    Arguments

    @@ -2203,7 +2203,7 @@

    Arguments

    @@ -2218,7 +2218,7 @@

    Arguments

    @@ -2233,7 +2233,7 @@

    Arguments

    @@ -2248,7 +2248,7 @@

    Arguments

    @@ -2293,7 +2293,7 @@

    Arguments

    @@ -2308,7 +2308,7 @@

    Arguments

    @@ -2323,7 +2323,7 @@

    Arguments

    @@ -2338,7 +2338,7 @@

    Arguments

    @@ -2353,7 +2353,7 @@

    Arguments

    @@ -2410,7 +2410,7 @@

    Arguments

    @@ -2425,7 +2425,7 @@

    Arguments

    @@ -2440,7 +2440,7 @@

    Arguments

    @@ -2455,7 +2455,7 @@

    Arguments

    @@ -2470,7 +2470,7 @@

    Arguments

    @@ -2513,7 +2513,7 @@

    Arguments

    @@ -2528,7 +2528,7 @@

    Arguments

    @@ -2543,7 +2543,7 @@

    Arguments

    @@ -2558,7 +2558,7 @@

    Arguments

    @@ -2573,7 +2573,7 @@

    Arguments

    @@ -2618,7 +2618,7 @@

    Arguments

    @@ -2633,7 +2633,7 @@

    Arguments

    @@ -2648,7 +2648,7 @@

    Arguments

    @@ -2663,7 +2663,7 @@

    Arguments

    @@ -2678,7 +2678,7 @@

    Arguments

    @@ -2723,7 +2723,7 @@

    Arguments

    @@ -2738,7 +2738,7 @@

    Arguments

    @@ -2753,7 +2753,7 @@

    Arguments

    @@ -2768,7 +2768,7 @@

    Arguments

    @@ -2783,7 +2783,7 @@

    Arguments

    @@ -2840,7 +2840,7 @@

    Arguments

    @@ -2855,7 +2855,7 @@

    Arguments

    @@ -2870,7 +2870,7 @@

    Arguments

    @@ -2885,7 +2885,7 @@

    Arguments

    @@ -2900,7 +2900,7 @@

    Arguments

    @@ -2943,7 +2943,7 @@

    Arguments

    @@ -2958,7 +2958,7 @@

    Arguments

    @@ -2973,7 +2973,7 @@

    Arguments

    @@ -2988,7 +2988,7 @@

    Arguments

    @@ -3003,7 +3003,7 @@

    Arguments

    @@ -3048,7 +3048,7 @@

    Arguments

    @@ -3063,7 +3063,7 @@

    Arguments

    @@ -3078,7 +3078,7 @@

    Arguments

    @@ -3093,7 +3093,7 @@

    Arguments

    @@ -3108,7 +3108,7 @@

    Arguments

    @@ -3153,7 +3153,7 @@

    Arguments

    @@ -3168,7 +3168,7 @@

    Arguments

    @@ -3183,7 +3183,7 @@

    Arguments

    @@ -3198,7 +3198,7 @@

    Arguments

    @@ -3213,7 +3213,7 @@

    Arguments

    @@ -3273,7 +3273,7 @@

    Arguments

    @@ -3288,7 +3288,7 @@

    Arguments

    @@ -3303,7 +3303,7 @@

    Arguments

    @@ -3318,7 +3318,7 @@

    Arguments

    @@ -3333,7 +3333,7 @@

    Arguments

    @@ -3348,7 +3348,7 @@

    Arguments

    @@ -3363,7 +3363,7 @@

    Arguments

    @@ -3378,7 +3378,7 @@

    Arguments

    @@ -3393,7 +3393,7 @@

    Arguments

    @@ -3408,7 +3408,7 @@

    Arguments

    @@ -3423,7 +3423,7 @@

    Arguments

    @@ -3438,7 +3438,7 @@

    Arguments

    @@ -3453,7 +3453,7 @@

    Arguments

    @@ -3491,7 +3491,7 @@

    Arguments

    @@ -3506,7 +3506,7 @@

    Arguments

    @@ -3521,7 +3521,7 @@

    Arguments

    @@ -3536,7 +3536,7 @@

    Arguments

    @@ -3551,7 +3551,7 @@

    Arguments

    @@ -3566,7 +3566,7 @@

    Arguments

    @@ -3581,7 +3581,7 @@

    Arguments

    @@ -3596,7 +3596,7 @@

    Arguments

    @@ -3611,7 +3611,7 @@

    Arguments

    @@ -3626,7 +3626,7 @@

    Arguments

    @@ -3641,7 +3641,7 @@

    Arguments

    @@ -3656,7 +3656,7 @@

    Arguments

    @@ -3671,7 +3671,7 @@

    Arguments

    @@ -3709,7 +3709,7 @@

    Arguments

    @@ -3724,7 +3724,7 @@

    Arguments

    @@ -3739,7 +3739,7 @@

    Arguments

    @@ -3754,7 +3754,7 @@

    Arguments

    @@ -3769,7 +3769,7 @@

    Arguments

    @@ -3784,7 +3784,7 @@

    Arguments

    @@ -3799,7 +3799,7 @@

    Arguments

    @@ -3814,7 +3814,7 @@

    Arguments

    @@ -3829,7 +3829,7 @@

    Arguments

    @@ -3844,7 +3844,7 @@

    Arguments

    @@ -3859,7 +3859,7 @@

    Arguments

    @@ -3874,7 +3874,7 @@

    Arguments

    @@ -3889,7 +3889,7 @@

    Arguments

    @@ -3927,7 +3927,7 @@

    Arguments

    @@ -3942,7 +3942,7 @@

    Arguments

    @@ -3957,7 +3957,7 @@

    Arguments

    @@ -3972,7 +3972,7 @@

    Arguments

    @@ -3987,7 +3987,7 @@

    Arguments

    @@ -4002,7 +4002,7 @@

    Arguments

    @@ -4017,7 +4017,7 @@

    Arguments

    @@ -4032,7 +4032,7 @@

    Arguments

    @@ -4047,7 +4047,7 @@

    Arguments

    @@ -4062,7 +4062,7 @@

    Arguments

    @@ -4077,7 +4077,7 @@

    Arguments

    @@ -4092,7 +4092,7 @@

    Arguments

    @@ -4107,7 +4107,7 @@

    Arguments

    @@ -4150,7 +4150,7 @@

    Arguments

    @@ -4165,7 +4165,7 @@

    Arguments

    @@ -4180,7 +4180,7 @@

    Arguments

    @@ -4195,7 +4195,7 @@

    Arguments

    @@ -4210,7 +4210,7 @@

    Arguments

    @@ -4225,7 +4225,7 @@

    Arguments

    @@ -4240,7 +4240,7 @@

    Arguments

    @@ -4255,7 +4255,7 @@

    Arguments

    @@ -4270,7 +4270,7 @@

    Arguments

    @@ -4285,7 +4285,7 @@

    Arguments

    @@ -4300,7 +4300,7 @@

    Arguments

    @@ -4315,7 +4315,7 @@

    Arguments

    @@ -4330,7 +4330,7 @@

    Arguments

    @@ -4372,7 +4372,7 @@

    Arguments

    @@ -4387,7 +4387,7 @@

    Arguments

    @@ -4402,7 +4402,7 @@

    Arguments

    @@ -4417,7 +4417,7 @@

    Arguments

    @@ -4432,7 +4432,7 @@

    Arguments

    @@ -4447,7 +4447,7 @@

    Arguments

    @@ -4462,7 +4462,7 @@

    Arguments

    @@ -4477,7 +4477,7 @@

    Arguments

    @@ -4492,7 +4492,7 @@

    Arguments

    @@ -4507,7 +4507,7 @@

    Arguments

    @@ -4522,7 +4522,7 @@

    Arguments

    @@ -4537,7 +4537,7 @@

    Arguments

    @@ -4552,7 +4552,7 @@

    Arguments

    @@ -4594,7 +4594,7 @@

    Arguments

    @@ -4609,7 +4609,7 @@

    Arguments

    @@ -4624,7 +4624,7 @@

    Arguments

    @@ -4639,7 +4639,7 @@

    Arguments

    @@ -4654,7 +4654,7 @@

    Arguments

    @@ -4669,7 +4669,7 @@

    Arguments

    @@ -4684,7 +4684,7 @@

    Arguments

    @@ -4699,7 +4699,7 @@

    Arguments

    @@ -4714,7 +4714,7 @@

    Arguments

    @@ -4729,7 +4729,7 @@

    Arguments

    @@ -4744,7 +4744,7 @@

    Arguments

    @@ -4759,7 +4759,7 @@

    Arguments

    @@ -4774,7 +4774,7 @@

    Arguments

    @@ -4817,7 +4817,7 @@

    Arguments

    @@ -4832,7 +4832,7 @@

    Arguments

    @@ -4847,7 +4847,7 @@

    Arguments

    @@ -4862,7 +4862,7 @@

    Arguments

    @@ -4877,7 +4877,7 @@

    Arguments

    @@ -4892,7 +4892,7 @@

    Arguments

    @@ -4907,7 +4907,7 @@

    Arguments

    @@ -4922,7 +4922,7 @@

    Arguments

    @@ -4937,7 +4937,7 @@

    Arguments

    @@ -4952,7 +4952,7 @@

    Arguments

    @@ -4967,7 +4967,7 @@

    Arguments

    @@ -4982,7 +4982,7 @@

    Arguments

    @@ -4997,7 +4997,7 @@

    Arguments

    @@ -5053,7 +5053,7 @@

    Arguments

    @@ -5068,7 +5068,7 @@

    Arguments

    @@ -5083,7 +5083,7 @@

    Arguments

    @@ -5098,7 +5098,7 @@

    Arguments

    @@ -5113,7 +5113,7 @@

    Arguments

    @@ -5128,7 +5128,7 @@

    Arguments

    @@ -5143,7 +5143,7 @@

    Arguments

    @@ -5158,7 +5158,7 @@

    Arguments

    @@ -5173,7 +5173,7 @@

    Arguments

    @@ -5188,7 +5188,7 @@

    Arguments

    @@ -5203,7 +5203,7 @@

    Arguments

    @@ -5218,7 +5218,7 @@

    Arguments

    @@ -5233,7 +5233,7 @@

    Arguments

    @@ -5271,7 +5271,7 @@

    Arguments

    @@ -5286,7 +5286,7 @@

    Arguments

    @@ -5301,7 +5301,7 @@

    Arguments

    @@ -5316,7 +5316,7 @@

    Arguments

    @@ -5331,7 +5331,7 @@

    Arguments

    @@ -5346,7 +5346,7 @@

    Arguments

    @@ -5361,7 +5361,7 @@

    Arguments

    @@ -5376,7 +5376,7 @@

    Arguments

    @@ -5391,7 +5391,7 @@

    Arguments

    @@ -5406,7 +5406,7 @@

    Arguments

    @@ -5421,7 +5421,7 @@

    Arguments

    @@ -5436,7 +5436,7 @@

    Arguments

    @@ -5451,7 +5451,7 @@

    Arguments

    @@ -5489,7 +5489,7 @@

    Arguments

    @@ -5504,7 +5504,7 @@

    Arguments

    @@ -5519,7 +5519,7 @@

    Arguments

    @@ -5534,7 +5534,7 @@

    Arguments

    @@ -5549,7 +5549,7 @@

    Arguments

    @@ -5564,7 +5564,7 @@

    Arguments

    @@ -5579,7 +5579,7 @@

    Arguments

    @@ -5594,7 +5594,7 @@

    Arguments

    @@ -5609,7 +5609,7 @@

    Arguments

    @@ -5624,7 +5624,7 @@

    Arguments

    @@ -5639,7 +5639,7 @@

    Arguments

    @@ -5654,7 +5654,7 @@

    Arguments

    @@ -5669,7 +5669,7 @@

    Arguments

    @@ -5707,7 +5707,7 @@

    Arguments

    @@ -5722,7 +5722,7 @@

    Arguments

    @@ -5737,7 +5737,7 @@

    Arguments

    @@ -5752,7 +5752,7 @@

    Arguments

    @@ -5767,7 +5767,7 @@

    Arguments

    @@ -5782,7 +5782,7 @@

    Arguments

    @@ -5797,7 +5797,7 @@

    Arguments

    @@ -5812,7 +5812,7 @@

    Arguments

    @@ -5827,7 +5827,7 @@

    Arguments

    @@ -5842,7 +5842,7 @@

    Arguments

    @@ -5857,7 +5857,7 @@

    Arguments

    @@ -5872,7 +5872,7 @@

    Arguments

    @@ -5887,7 +5887,7 @@

    Arguments

    @@ -5931,7 +5931,7 @@

    Arguments

    @@ -5946,7 +5946,7 @@

    Arguments

    @@ -5961,7 +5961,7 @@

    Arguments

    @@ -5976,7 +5976,7 @@

    Arguments

    @@ -5991,7 +5991,7 @@

    Arguments

    @@ -6006,7 +6006,7 @@

    Arguments

    @@ -6021,7 +6021,7 @@

    Arguments

    @@ -6036,7 +6036,7 @@

    Arguments

    @@ -6051,7 +6051,7 @@

    Arguments

    @@ -6066,7 +6066,7 @@

    Arguments

    @@ -6081,7 +6081,7 @@

    Arguments

    @@ -6096,7 +6096,7 @@

    Arguments

    @@ -6111,7 +6111,7 @@

    Arguments

    @@ -6155,7 +6155,7 @@

    Arguments

    @@ -6170,7 +6170,7 @@

    Arguments

    @@ -6185,7 +6185,7 @@

    Arguments

    @@ -6200,7 +6200,7 @@

    Arguments

    @@ -6215,7 +6215,7 @@

    Arguments

    @@ -6230,7 +6230,7 @@

    Arguments

    @@ -6245,7 +6245,7 @@

    Arguments

    @@ -6260,7 +6260,7 @@

    Arguments

    @@ -6275,7 +6275,7 @@

    Arguments

    @@ -6290,7 +6290,7 @@

    Arguments

    @@ -6305,7 +6305,7 @@

    Arguments

    @@ -6320,7 +6320,7 @@

    Arguments

    @@ -6335,7 +6335,7 @@

    Arguments

    @@ -6379,7 +6379,7 @@

    Arguments

    @@ -6394,7 +6394,7 @@

    Arguments

    @@ -6409,7 +6409,7 @@

    Arguments

    @@ -6424,7 +6424,7 @@

    Arguments

    @@ -6439,7 +6439,7 @@

    Arguments

    @@ -6454,7 +6454,7 @@

    Arguments

    @@ -6469,7 +6469,7 @@

    Arguments

    @@ -6484,7 +6484,7 @@

    Arguments

    @@ -6499,7 +6499,7 @@

    Arguments

    @@ -6514,7 +6514,7 @@

    Arguments

    @@ -6529,7 +6529,7 @@

    Arguments

    @@ -6544,7 +6544,7 @@

    Arguments

    @@ -6559,7 +6559,7 @@

    Arguments

    @@ -6603,7 +6603,7 @@

    Arguments

    @@ -6618,7 +6618,7 @@

    Arguments

    @@ -6633,7 +6633,7 @@

    Arguments

    @@ -6648,7 +6648,7 @@

    Arguments

    @@ -6663,7 +6663,7 @@

    Arguments

    @@ -6678,7 +6678,7 @@

    Arguments

    @@ -6693,7 +6693,7 @@

    Arguments

    @@ -6708,7 +6708,7 @@

    Arguments

    @@ -6723,7 +6723,7 @@

    Arguments

    @@ -6738,7 +6738,7 @@

    Arguments

    @@ -6753,7 +6753,7 @@

    Arguments

    @@ -6768,7 +6768,7 @@

    Arguments

    @@ -6783,7 +6783,7 @@

    Arguments

    @@ -6838,7 +6838,7 @@

    Arguments

    @@ -6853,7 +6853,7 @@

    Arguments

    @@ -6868,7 +6868,7 @@

    Arguments

    @@ -6883,7 +6883,7 @@

    Arguments

    @@ -6898,7 +6898,7 @@

    Arguments

    @@ -6913,7 +6913,7 @@

    Arguments

    @@ -6928,7 +6928,7 @@

    Arguments

    @@ -6943,7 +6943,7 @@

    Arguments

    @@ -6958,7 +6958,7 @@

    Arguments

    @@ -6973,7 +6973,7 @@

    Arguments

    @@ -6988,7 +6988,7 @@

    Arguments

    @@ -7026,7 +7026,7 @@

    Arguments

    @@ -7041,7 +7041,7 @@

    Arguments

    @@ -7056,7 +7056,7 @@

    Arguments

    @@ -7071,7 +7071,7 @@

    Arguments

    @@ -7086,7 +7086,7 @@

    Arguments

    @@ -7101,7 +7101,7 @@

    Arguments

    @@ -7116,7 +7116,7 @@

    Arguments

    @@ -7131,7 +7131,7 @@

    Arguments

    @@ -7146,7 +7146,7 @@

    Arguments

    @@ -7161,7 +7161,7 @@

    Arguments

    @@ -7176,7 +7176,7 @@

    Arguments

    @@ -7214,7 +7214,7 @@

    Arguments

    @@ -7229,7 +7229,7 @@

    Arguments

    @@ -7244,7 +7244,7 @@

    Arguments

    @@ -7259,7 +7259,7 @@

    Arguments

    @@ -7274,7 +7274,7 @@

    Arguments

    @@ -7289,7 +7289,7 @@

    Arguments

    @@ -7304,7 +7304,7 @@

    Arguments

    @@ -7319,7 +7319,7 @@

    Arguments

    @@ -7334,7 +7334,7 @@

    Arguments

    @@ -7349,7 +7349,7 @@

    Arguments

    @@ -7364,7 +7364,7 @@

    Arguments

    @@ -7402,7 +7402,7 @@

    Arguments

    @@ -7417,7 +7417,7 @@

    Arguments

    @@ -7432,7 +7432,7 @@

    Arguments

    @@ -7447,7 +7447,7 @@

    Arguments

    @@ -7462,7 +7462,7 @@

    Arguments

    @@ -7477,7 +7477,7 @@

    Arguments

    @@ -7492,7 +7492,7 @@

    Arguments

    @@ -7507,7 +7507,7 @@

    Arguments

    @@ -7522,7 +7522,7 @@

    Arguments

    @@ -7537,7 +7537,7 @@

    Arguments

    @@ -7552,7 +7552,7 @@

    Arguments

    @@ -7595,7 +7595,7 @@

    Arguments

    @@ -7610,7 +7610,7 @@

    Arguments

    @@ -7625,7 +7625,7 @@

    Arguments

    @@ -7640,7 +7640,7 @@

    Arguments

    @@ -7655,7 +7655,7 @@

    Arguments

    @@ -7670,7 +7670,7 @@

    Arguments

    @@ -7685,7 +7685,7 @@

    Arguments

    @@ -7700,7 +7700,7 @@

    Arguments

    @@ -7715,7 +7715,7 @@

    Arguments

    @@ -7730,7 +7730,7 @@

    Arguments

    @@ -7745,7 +7745,7 @@

    Arguments

    @@ -7787,7 +7787,7 @@

    Arguments

    @@ -7802,7 +7802,7 @@

    Arguments

    @@ -7817,7 +7817,7 @@

    Arguments

    @@ -7832,7 +7832,7 @@

    Arguments

    @@ -7847,7 +7847,7 @@

    Arguments

    @@ -7862,7 +7862,7 @@

    Arguments

    @@ -7877,7 +7877,7 @@

    Arguments

    @@ -7892,7 +7892,7 @@

    Arguments

    @@ -7907,7 +7907,7 @@

    Arguments

    @@ -7922,7 +7922,7 @@

    Arguments

    @@ -7937,7 +7937,7 @@

    Arguments

    @@ -7979,7 +7979,7 @@

    Arguments

    @@ -7994,7 +7994,7 @@

    Arguments

    @@ -8009,7 +8009,7 @@

    Arguments

    @@ -8024,7 +8024,7 @@

    Arguments

    @@ -8039,7 +8039,7 @@

    Arguments

    @@ -8054,7 +8054,7 @@

    Arguments

    @@ -8069,7 +8069,7 @@

    Arguments

    @@ -8084,7 +8084,7 @@

    Arguments

    @@ -8099,7 +8099,7 @@

    Arguments

    @@ -8114,7 +8114,7 @@

    Arguments

    @@ -8129,7 +8129,7 @@

    Arguments

    @@ -8172,7 +8172,7 @@

    Arguments

    @@ -8187,7 +8187,7 @@

    Arguments

    @@ -8202,7 +8202,7 @@

    Arguments

    @@ -8217,7 +8217,7 @@

    Arguments

    @@ -8232,7 +8232,7 @@

    Arguments

    @@ -8247,7 +8247,7 @@

    Arguments

    @@ -8262,7 +8262,7 @@

    Arguments

    @@ -8277,7 +8277,7 @@

    Arguments

    @@ -8292,7 +8292,7 @@

    Arguments

    @@ -8307,7 +8307,7 @@

    Arguments

    @@ -8322,7 +8322,7 @@

    Arguments

    @@ -8376,7 +8376,7 @@

    Arguments

    @@ -8391,7 +8391,7 @@

    Arguments

    @@ -8406,7 +8406,7 @@

    Arguments

    @@ -8421,7 +8421,7 @@

    Arguments

    @@ -8436,7 +8436,7 @@

    Arguments

    @@ -8451,7 +8451,7 @@

    Arguments

    @@ -8466,7 +8466,7 @@

    Arguments

    @@ -8481,7 +8481,7 @@

    Arguments

    @@ -8496,7 +8496,7 @@

    Arguments

    @@ -8534,7 +8534,7 @@

    Arguments

    @@ -8549,7 +8549,7 @@

    Arguments

    @@ -8564,7 +8564,7 @@

    Arguments

    @@ -8579,7 +8579,7 @@

    Arguments

    @@ -8594,7 +8594,7 @@

    Arguments

    @@ -8609,7 +8609,7 @@

    Arguments

    @@ -8624,7 +8624,7 @@

    Arguments

    @@ -8639,7 +8639,7 @@

    Arguments

    @@ -8654,7 +8654,7 @@

    Arguments

    @@ -8696,7 +8696,7 @@

    Arguments

    @@ -8711,7 +8711,7 @@

    Arguments

    @@ -8726,7 +8726,7 @@

    Arguments

    @@ -8741,7 +8741,7 @@

    Arguments

    @@ -8756,7 +8756,7 @@

    Arguments

    @@ -8771,7 +8771,7 @@

    Arguments

    @@ -8786,7 +8786,7 @@

    Arguments

    @@ -8801,7 +8801,7 @@

    Arguments

    @@ -8816,7 +8816,7 @@

    Arguments

    @@ -8858,7 +8858,7 @@

    Arguments

    @@ -8873,7 +8873,7 @@

    Arguments

    @@ -8888,7 +8888,7 @@

    Arguments

    @@ -8903,7 +8903,7 @@

    Arguments

    @@ -8918,7 +8918,7 @@

    Arguments

    @@ -8933,7 +8933,7 @@

    Arguments

    @@ -8948,7 +8948,7 @@

    Arguments

    @@ -8963,7 +8963,7 @@

    Arguments

    @@ -8978,7 +8978,7 @@

    Arguments

    @@ -9032,7 +9032,7 @@

    Arguments

    @@ -9047,7 +9047,7 @@

    Arguments

    @@ -9062,7 +9062,7 @@

    Arguments

    @@ -9077,7 +9077,7 @@

    Arguments

    @@ -9092,7 +9092,7 @@

    Arguments

    @@ -9107,7 +9107,7 @@

    Arguments

    @@ -9122,7 +9122,7 @@

    Arguments

    @@ -9137,7 +9137,7 @@

    Arguments

    @@ -9152,7 +9152,7 @@

    Arguments

    @@ -9190,7 +9190,7 @@

    Arguments

    @@ -9205,7 +9205,7 @@

    Arguments

    @@ -9220,7 +9220,7 @@

    Arguments

    @@ -9235,7 +9235,7 @@

    Arguments

    @@ -9250,7 +9250,7 @@

    Arguments

    @@ -9265,7 +9265,7 @@

    Arguments

    @@ -9280,7 +9280,7 @@

    Arguments

    @@ -9295,7 +9295,7 @@

    Arguments

    @@ -9310,7 +9310,7 @@

    Arguments

    @@ -9352,7 +9352,7 @@

    Arguments

    @@ -9367,7 +9367,7 @@

    Arguments

    @@ -9382,7 +9382,7 @@

    Arguments

    @@ -9397,7 +9397,7 @@

    Arguments

    @@ -9412,7 +9412,7 @@

    Arguments

    @@ -9427,7 +9427,7 @@

    Arguments

    @@ -9442,7 +9442,7 @@

    Arguments

    @@ -9457,7 +9457,7 @@

    Arguments

    @@ -9472,7 +9472,7 @@

    Arguments

    @@ -9514,7 +9514,7 @@

    Arguments

    @@ -9529,7 +9529,7 @@

    Arguments

    @@ -9544,7 +9544,7 @@

    Arguments

    @@ -9559,7 +9559,7 @@

    Arguments

    @@ -9574,7 +9574,7 @@

    Arguments

    @@ -9589,7 +9589,7 @@

    Arguments

    @@ -9604,7 +9604,7 @@

    Arguments

    @@ -9619,7 +9619,7 @@

    Arguments

    @@ -9634,7 +9634,7 @@

    Arguments

    @@ -9688,7 +9688,7 @@

    Arguments

    @@ -9703,7 +9703,7 @@

    Arguments

    @@ -9718,7 +9718,7 @@

    Arguments

    @@ -9733,7 +9733,7 @@

    Arguments

    @@ -9748,7 +9748,7 @@

    Arguments

    @@ -9763,7 +9763,7 @@

    Arguments

    @@ -9778,7 +9778,7 @@

    Arguments

    @@ -9793,7 +9793,7 @@

    Arguments

    @@ -9808,7 +9808,7 @@

    Arguments

    @@ -9846,7 +9846,7 @@

    Arguments

    @@ -9861,7 +9861,7 @@

    Arguments

    @@ -9876,7 +9876,7 @@

    Arguments

    @@ -9891,7 +9891,7 @@

    Arguments

    @@ -9906,7 +9906,7 @@

    Arguments

    @@ -9921,7 +9921,7 @@

    Arguments

    @@ -9936,7 +9936,7 @@

    Arguments

    @@ -9951,7 +9951,7 @@

    Arguments

    @@ -9966,7 +9966,7 @@

    Arguments

    @@ -10008,7 +10008,7 @@

    Arguments

    @@ -10023,7 +10023,7 @@

    Arguments

    @@ -10038,7 +10038,7 @@

    Arguments

    @@ -10053,7 +10053,7 @@

    Arguments

    @@ -10068,7 +10068,7 @@

    Arguments

    @@ -10083,7 +10083,7 @@

    Arguments

    @@ -10098,7 +10098,7 @@

    Arguments

    @@ -10113,7 +10113,7 @@

    Arguments

    @@ -10128,7 +10128,7 @@

    Arguments

    @@ -10170,7 +10170,7 @@

    Arguments

    @@ -10185,7 +10185,7 @@

    Arguments

    @@ -10200,7 +10200,7 @@

    Arguments

    @@ -10215,7 +10215,7 @@

    Arguments

    @@ -10230,7 +10230,7 @@

    Arguments

    @@ -10245,7 +10245,7 @@

    Arguments

    @@ -10260,7 +10260,7 @@

    Arguments

    @@ -10275,7 +10275,7 @@

    Arguments

    @@ -10290,7 +10290,7 @@

    Arguments

    @@ -10344,7 +10344,7 @@

    Arguments

    @@ -10359,7 +10359,7 @@

    Arguments

    @@ -10374,7 +10374,7 @@

    Arguments

    @@ -10389,7 +10389,7 @@

    Arguments

    @@ -10404,7 +10404,7 @@

    Arguments

    @@ -10419,7 +10419,7 @@

    Arguments

    @@ -10434,7 +10434,7 @@

    Arguments

    @@ -10449,7 +10449,7 @@

    Arguments

    @@ -10464,7 +10464,7 @@

    Arguments

    @@ -10479,7 +10479,7 @@

    Arguments

    @@ -10494,7 +10494,7 @@

    Arguments

    @@ -10532,7 +10532,7 @@

    Arguments

    @@ -10547,7 +10547,7 @@

    Arguments

    @@ -10562,7 +10562,7 @@

    Arguments

    @@ -10577,7 +10577,7 @@

    Arguments

    @@ -10592,7 +10592,7 @@

    Arguments

    @@ -10607,7 +10607,7 @@

    Arguments

    @@ -10622,7 +10622,7 @@

    Arguments

    @@ -10637,7 +10637,7 @@

    Arguments

    @@ -10652,7 +10652,7 @@

    Arguments

    @@ -10667,7 +10667,7 @@

    Arguments

    @@ -10682,7 +10682,7 @@

    Arguments

    @@ -10724,7 +10724,7 @@

    Arguments

    @@ -10739,7 +10739,7 @@

    Arguments

    @@ -10754,7 +10754,7 @@

    Arguments

    @@ -10769,7 +10769,7 @@

    Arguments

    @@ -10784,7 +10784,7 @@

    Arguments

    @@ -10799,7 +10799,7 @@

    Arguments

    @@ -10814,7 +10814,7 @@

    Arguments

    @@ -10829,7 +10829,7 @@

    Arguments

    @@ -10844,7 +10844,7 @@

    Arguments

    @@ -10859,7 +10859,7 @@

    Arguments

    @@ -10874,7 +10874,7 @@

    Arguments

    @@ -10916,7 +10916,7 @@

    Arguments

    @@ -10931,7 +10931,7 @@

    Arguments

    @@ -10946,7 +10946,7 @@

    Arguments

    @@ -10961,7 +10961,7 @@

    Arguments

    @@ -10976,7 +10976,7 @@

    Arguments

    @@ -10991,7 +10991,7 @@

    Arguments

    @@ -11006,7 +11006,7 @@

    Arguments

    @@ -11021,7 +11021,7 @@

    Arguments

    @@ -11036,7 +11036,7 @@

    Arguments

    @@ -11051,7 +11051,7 @@

    Arguments

    @@ -11066,7 +11066,7 @@

    Arguments

    @@ -11122,7 +11122,7 @@

    Arguments

    @@ -11137,7 +11137,7 @@

    Arguments

    @@ -11152,7 +11152,7 @@

    Arguments

    @@ -11167,7 +11167,7 @@

    Arguments

    @@ -11182,7 +11182,7 @@

    Arguments

    @@ -11197,7 +11197,7 @@

    Arguments

    @@ -11212,7 +11212,7 @@

    Arguments

    @@ -11227,7 +11227,7 @@

    Arguments

    @@ -11242,7 +11242,7 @@

    Arguments

    @@ -11257,7 +11257,7 @@

    Arguments

    @@ -11272,7 +11272,7 @@

    Arguments

    @@ -11287,7 +11287,7 @@

    Arguments

    @@ -11325,7 +11325,7 @@

    Arguments

    @@ -11340,7 +11340,7 @@

    Arguments

    @@ -11355,7 +11355,7 @@

    Arguments

    @@ -11370,7 +11370,7 @@

    Arguments

    @@ -11385,7 +11385,7 @@

    Arguments

    @@ -11400,7 +11400,7 @@

    Arguments

    @@ -11415,7 +11415,7 @@

    Arguments

    @@ -11430,7 +11430,7 @@

    Arguments

    @@ -11445,7 +11445,7 @@

    Arguments

    @@ -11460,7 +11460,7 @@

    Arguments

    @@ -11475,7 +11475,7 @@

    Arguments

    @@ -11490,7 +11490,7 @@

    Arguments

    @@ -11534,7 +11534,7 @@

    Arguments

    @@ -11549,7 +11549,7 @@

    Arguments

    @@ -11564,7 +11564,7 @@

    Arguments

    @@ -11579,7 +11579,7 @@

    Arguments

    @@ -11594,7 +11594,7 @@

    Arguments

    @@ -11609,7 +11609,7 @@

    Arguments

    @@ -11624,7 +11624,7 @@

    Arguments

    @@ -11639,7 +11639,7 @@

    Arguments

    @@ -11654,7 +11654,7 @@

    Arguments

    @@ -11669,7 +11669,7 @@

    Arguments

    @@ -11684,7 +11684,7 @@

    Arguments

    @@ -11699,7 +11699,7 @@

    Arguments

    @@ -11743,7 +11743,7 @@

    Arguments

    @@ -11758,7 +11758,7 @@

    Arguments

    @@ -11773,7 +11773,7 @@

    Arguments

    @@ -11788,7 +11788,7 @@

    Arguments

    @@ -11803,7 +11803,7 @@

    Arguments

    @@ -11818,7 +11818,7 @@

    Arguments

    @@ -11833,7 +11833,7 @@

    Arguments

    @@ -11848,7 +11848,7 @@

    Arguments

    @@ -11863,7 +11863,7 @@

    Arguments

    @@ -11878,7 +11878,7 @@

    Arguments

    @@ -11893,7 +11893,7 @@

    Arguments

    @@ -11908,7 +11908,7 @@

    Arguments

    @@ -11962,7 +11962,7 @@

    Arguments

    @@ -11977,7 +11977,7 @@

    Arguments

    @@ -11992,7 +11992,7 @@

    Arguments

    @@ -12007,7 +12007,7 @@

    Arguments

    @@ -12022,7 +12022,7 @@

    Arguments

    @@ -12037,7 +12037,7 @@

    Arguments

    @@ -12052,7 +12052,7 @@

    Arguments

    @@ -12067,7 +12067,7 @@

    Arguments

    @@ -12082,7 +12082,7 @@

    Arguments

    @@ -12097,7 +12097,7 @@

    Arguments

    @@ -12135,7 +12135,7 @@

    Arguments

    @@ -12150,7 +12150,7 @@

    Arguments

    @@ -12165,7 +12165,7 @@

    Arguments

    @@ -12180,7 +12180,7 @@

    Arguments

    @@ -12195,7 +12195,7 @@

    Arguments

    @@ -12210,7 +12210,7 @@

    Arguments

    @@ -12225,7 +12225,7 @@

    Arguments

    @@ -12240,7 +12240,7 @@

    Arguments

    @@ -12255,7 +12255,7 @@

    Arguments

    @@ -12270,7 +12270,7 @@

    Arguments

    @@ -12312,7 +12312,7 @@

    Arguments

    @@ -12327,7 +12327,7 @@

    Arguments

    @@ -12342,7 +12342,7 @@

    Arguments

    @@ -12357,7 +12357,7 @@

    Arguments

    @@ -12372,7 +12372,7 @@

    Arguments

    @@ -12387,7 +12387,7 @@

    Arguments

    @@ -12402,7 +12402,7 @@

    Arguments

    @@ -12417,7 +12417,7 @@

    Arguments

    @@ -12432,7 +12432,7 @@

    Arguments

    @@ -12447,7 +12447,7 @@

    Arguments

    @@ -12489,7 +12489,7 @@

    Arguments

    @@ -12504,7 +12504,7 @@

    Arguments

    @@ -12519,7 +12519,7 @@

    Arguments

    @@ -12534,7 +12534,7 @@

    Arguments

    @@ -12549,7 +12549,7 @@

    Arguments

    @@ -12564,7 +12564,7 @@

    Arguments

    @@ -12579,7 +12579,7 @@

    Arguments

    @@ -12594,7 +12594,7 @@

    Arguments

    @@ -12609,7 +12609,7 @@

    Arguments

    @@ -12624,7 +12624,7 @@

    Arguments

    @@ -12678,7 +12678,7 @@

    Arguments

    @@ -12693,7 +12693,7 @@

    Arguments

    @@ -12708,7 +12708,7 @@

    Arguments

    @@ -12723,7 +12723,7 @@

    Arguments

    @@ -12738,7 +12738,7 @@

    Arguments

    @@ -12753,7 +12753,7 @@

    Arguments

    @@ -12768,7 +12768,7 @@

    Arguments

    @@ -12806,7 +12806,7 @@

    Arguments

    @@ -12821,7 +12821,7 @@

    Arguments

    @@ -12836,7 +12836,7 @@

    Arguments

    @@ -12851,7 +12851,7 @@

    Arguments

    @@ -12866,7 +12866,7 @@

    Arguments

    @@ -12881,7 +12881,7 @@

    Arguments

    @@ -12896,7 +12896,7 @@

    Arguments

    @@ -12938,7 +12938,7 @@

    Arguments

    @@ -12953,7 +12953,7 @@

    Arguments

    @@ -12968,7 +12968,7 @@

    Arguments

    @@ -12983,7 +12983,7 @@

    Arguments

    @@ -12998,7 +12998,7 @@

    Arguments

    @@ -13013,7 +13013,7 @@

    Arguments

    @@ -13028,7 +13028,7 @@

    Arguments

    @@ -13070,7 +13070,7 @@

    Arguments

    @@ -13085,7 +13085,7 @@

    Arguments

    @@ -13100,7 +13100,7 @@

    Arguments

    @@ -13115,7 +13115,7 @@

    Arguments

    @@ -13130,7 +13130,7 @@

    Arguments

    @@ -13145,7 +13145,7 @@

    Arguments

    @@ -13160,7 +13160,7 @@

    Arguments

    @@ -13214,7 +13214,7 @@

    Arguments

    @@ -13229,7 +13229,7 @@

    Arguments

    @@ -13244,7 +13244,7 @@

    Arguments

    @@ -13259,7 +13259,7 @@

    Arguments

    @@ -13274,7 +13274,7 @@

    Arguments

    @@ -13289,7 +13289,7 @@

    Arguments

    @@ -13304,7 +13304,7 @@

    Arguments

    @@ -13319,7 +13319,7 @@

    Arguments

    @@ -13334,7 +13334,7 @@

    Arguments

    @@ -13372,7 +13372,7 @@

    Arguments

    @@ -13387,7 +13387,7 @@

    Arguments

    @@ -13402,7 +13402,7 @@

    Arguments

    @@ -13417,7 +13417,7 @@

    Arguments

    @@ -13432,7 +13432,7 @@

    Arguments

    @@ -13447,7 +13447,7 @@

    Arguments

    @@ -13462,7 +13462,7 @@

    Arguments

    @@ -13477,7 +13477,7 @@

    Arguments

    @@ -13492,7 +13492,7 @@

    Arguments

    @@ -13534,7 +13534,7 @@

    Arguments

    @@ -13549,7 +13549,7 @@

    Arguments

    @@ -13564,7 +13564,7 @@

    Arguments

    @@ -13579,7 +13579,7 @@

    Arguments

    @@ -13594,7 +13594,7 @@

    Arguments

    @@ -13609,7 +13609,7 @@

    Arguments

    @@ -13624,7 +13624,7 @@

    Arguments

    @@ -13639,7 +13639,7 @@

    Arguments

    @@ -13654,7 +13654,7 @@

    Arguments

    @@ -13696,7 +13696,7 @@

    Arguments

    @@ -13711,7 +13711,7 @@

    Arguments

    @@ -13726,7 +13726,7 @@

    Arguments

    @@ -13741,7 +13741,7 @@

    Arguments

    @@ -13756,7 +13756,7 @@

    Arguments

    @@ -13771,7 +13771,7 @@

    Arguments

    @@ -13786,7 +13786,7 @@

    Arguments

    @@ -13801,7 +13801,7 @@

    Arguments

    @@ -13816,7 +13816,7 @@

    Arguments

    @@ -13873,7 +13873,7 @@

    Arguments

    @@ -13888,7 +13888,7 @@

    Arguments

    @@ -13903,7 +13903,7 @@

    Arguments

    @@ -13918,7 +13918,7 @@

    Arguments

    @@ -13933,7 +13933,7 @@

    Arguments

    @@ -13948,7 +13948,7 @@

    Arguments

    @@ -13963,7 +13963,7 @@

    Arguments

    @@ -13978,7 +13978,7 @@

    Arguments

    @@ -13993,7 +13993,7 @@

    Arguments

    @@ -14008,7 +14008,7 @@

    Arguments

    @@ -14023,7 +14023,7 @@

    Arguments

    @@ -14038,7 +14038,7 @@

    Arguments

    @@ -14076,7 +14076,7 @@

    Arguments

    @@ -14091,7 +14091,7 @@

    Arguments

    @@ -14106,7 +14106,7 @@

    Arguments

    @@ -14121,7 +14121,7 @@

    Arguments

    @@ -14136,7 +14136,7 @@

    Arguments

    @@ -14151,7 +14151,7 @@

    Arguments

    @@ -14166,7 +14166,7 @@

    Arguments

    @@ -14181,7 +14181,7 @@

    Arguments

    @@ -14196,7 +14196,7 @@

    Arguments

    @@ -14211,7 +14211,7 @@

    Arguments

    @@ -14226,7 +14226,7 @@

    Arguments

    @@ -14241,7 +14241,7 @@

    Arguments

    @@ -14286,7 +14286,7 @@

    Arguments

    @@ -14301,7 +14301,7 @@

    Arguments

    @@ -14316,7 +14316,7 @@

    Arguments

    @@ -14331,7 +14331,7 @@

    Arguments

    @@ -14346,7 +14346,7 @@

    Arguments

    @@ -14361,7 +14361,7 @@

    Arguments

    @@ -14376,7 +14376,7 @@

    Arguments

    @@ -14391,7 +14391,7 @@

    Arguments

    @@ -14406,7 +14406,7 @@

    Arguments

    @@ -14421,7 +14421,7 @@

    Arguments

    @@ -14436,7 +14436,7 @@

    Arguments

    @@ -14451,7 +14451,7 @@

    Arguments

    @@ -14496,7 +14496,7 @@

    Arguments

    @@ -14511,7 +14511,7 @@

    Arguments

    @@ -14526,7 +14526,7 @@

    Arguments

    @@ -14541,7 +14541,7 @@

    Arguments

    @@ -14556,7 +14556,7 @@

    Arguments

    @@ -14571,7 +14571,7 @@

    Arguments

    @@ -14586,7 +14586,7 @@

    Arguments

    @@ -14601,7 +14601,7 @@

    Arguments

    @@ -14616,7 +14616,7 @@

    Arguments

    @@ -14631,7 +14631,7 @@

    Arguments

    @@ -14646,7 +14646,7 @@

    Arguments

    @@ -14661,7 +14661,7 @@

    Arguments

    @@ -14718,7 +14718,7 @@

    Arguments

    @@ -14733,7 +14733,7 @@

    Arguments

    @@ -14748,7 +14748,7 @@

    Arguments

    @@ -14763,7 +14763,7 @@

    Arguments

    @@ -14778,7 +14778,7 @@

    Arguments

    @@ -14793,7 +14793,7 @@

    Arguments

    @@ -14808,7 +14808,7 @@

    Arguments

    @@ -14823,7 +14823,7 @@

    Arguments

    @@ -14838,7 +14838,7 @@

    Arguments

    @@ -14853,7 +14853,7 @@

    Arguments

    @@ -14891,7 +14891,7 @@

    Arguments

    @@ -14906,7 +14906,7 @@

    Arguments

    @@ -14921,7 +14921,7 @@

    Arguments

    @@ -14936,7 +14936,7 @@

    Arguments

    @@ -14951,7 +14951,7 @@

    Arguments

    @@ -14966,7 +14966,7 @@

    Arguments

    @@ -14981,7 +14981,7 @@

    Arguments

    @@ -14996,7 +14996,7 @@

    Arguments

    @@ -15011,7 +15011,7 @@

    Arguments

    @@ -15026,7 +15026,7 @@

    Arguments

    @@ -15071,7 +15071,7 @@

    Arguments

    @@ -15086,7 +15086,7 @@

    Arguments

    @@ -15101,7 +15101,7 @@

    Arguments

    @@ -15116,7 +15116,7 @@

    Arguments

    @@ -15131,7 +15131,7 @@

    Arguments

    @@ -15146,7 +15146,7 @@

    Arguments

    @@ -15161,7 +15161,7 @@

    Arguments

    @@ -15176,7 +15176,7 @@

    Arguments

    @@ -15191,7 +15191,7 @@

    Arguments

    @@ -15206,7 +15206,7 @@

    Arguments

    @@ -15251,7 +15251,7 @@

    Arguments

    @@ -15266,7 +15266,7 @@

    Arguments

    @@ -15281,7 +15281,7 @@

    Arguments

    @@ -15296,7 +15296,7 @@

    Arguments

    @@ -15311,7 +15311,7 @@

    Arguments

    @@ -15326,7 +15326,7 @@

    Arguments

    @@ -15341,7 +15341,7 @@

    Arguments

    @@ -15356,7 +15356,7 @@

    Arguments

    @@ -15371,7 +15371,7 @@

    Arguments

    @@ -15386,7 +15386,7 @@

    Arguments

    @@ -15440,7 +15440,7 @@

    Arguments

    @@ -15455,7 +15455,7 @@

    Arguments

    @@ -15470,7 +15470,7 @@

    Arguments

    @@ -15485,7 +15485,7 @@

    Arguments

    @@ -15500,7 +15500,7 @@

    Arguments

    @@ -15515,7 +15515,7 @@

    Arguments

    @@ -15530,7 +15530,7 @@

    Arguments

    @@ -15545,7 +15545,7 @@

    Arguments

    @@ -15560,7 +15560,7 @@

    Arguments

    @@ -15598,7 +15598,7 @@

    Arguments

    @@ -15613,7 +15613,7 @@

    Arguments

    @@ -15628,7 +15628,7 @@

    Arguments

    @@ -15643,7 +15643,7 @@

    Arguments

    @@ -15658,7 +15658,7 @@

    Arguments

    @@ -15673,7 +15673,7 @@

    Arguments

    @@ -15688,7 +15688,7 @@

    Arguments

    @@ -15703,7 +15703,7 @@

    Arguments

    @@ -15718,7 +15718,7 @@

    Arguments

    @@ -15760,7 +15760,7 @@

    Arguments

    @@ -15775,7 +15775,7 @@

    Arguments

    @@ -15790,7 +15790,7 @@

    Arguments

    @@ -15805,7 +15805,7 @@

    Arguments

    @@ -15820,7 +15820,7 @@

    Arguments

    @@ -15835,7 +15835,7 @@

    Arguments

    @@ -15850,7 +15850,7 @@

    Arguments

    @@ -15865,7 +15865,7 @@

    Arguments

    @@ -15880,7 +15880,7 @@

    Arguments

    @@ -15922,7 +15922,7 @@

    Arguments

    @@ -15937,7 +15937,7 @@

    Arguments

    @@ -15952,7 +15952,7 @@

    Arguments

    @@ -15967,7 +15967,7 @@

    Arguments

    @@ -15982,7 +15982,7 @@

    Arguments

    @@ -15997,7 +15997,7 @@

    Arguments

    @@ -16012,7 +16012,7 @@

    Arguments

    @@ -16027,7 +16027,7 @@

    Arguments

    @@ -16042,7 +16042,7 @@

    Arguments

    @@ -16096,7 +16096,7 @@

    Arguments

    @@ -16111,7 +16111,7 @@

    Arguments

    @@ -16126,7 +16126,7 @@

    Arguments

    @@ -16141,7 +16141,7 @@

    Arguments

    @@ -16156,7 +16156,7 @@

    Arguments

    @@ -16171,7 +16171,7 @@

    Arguments

    @@ -16209,7 +16209,7 @@

    Arguments

    @@ -16224,7 +16224,7 @@

    Arguments

    @@ -16239,7 +16239,7 @@

    Arguments

    @@ -16254,7 +16254,7 @@

    Arguments

    @@ -16269,7 +16269,7 @@

    Arguments

    @@ -16284,7 +16284,7 @@

    Arguments

    @@ -16326,7 +16326,7 @@

    Arguments

    @@ -16341,7 +16341,7 @@

    Arguments

    @@ -16356,7 +16356,7 @@

    Arguments

    @@ -16371,7 +16371,7 @@

    Arguments

    @@ -16386,7 +16386,7 @@

    Arguments

    @@ -16401,7 +16401,7 @@

    Arguments

    @@ -16443,7 +16443,7 @@

    Arguments

    @@ -16458,7 +16458,7 @@

    Arguments

    @@ -16473,7 +16473,7 @@

    Arguments

    @@ -16488,7 +16488,7 @@

    Arguments

    @@ -16503,7 +16503,7 @@

    Arguments

    @@ -16518,7 +16518,7 @@

    Arguments

    @@ -16572,7 +16572,7 @@

    Arguments

    @@ -16587,7 +16587,7 @@

    Arguments

    @@ -16602,7 +16602,7 @@

    Arguments

    @@ -16617,7 +16617,7 @@

    Arguments

    @@ -16632,7 +16632,7 @@

    Arguments

    @@ -16647,7 +16647,7 @@

    Arguments

    @@ -16662,7 +16662,7 @@

    Arguments

    @@ -16677,7 +16677,7 @@

    Arguments

    @@ -16715,7 +16715,7 @@

    Arguments

    @@ -16730,7 +16730,7 @@

    Arguments

    @@ -16745,7 +16745,7 @@

    Arguments

    @@ -16760,7 +16760,7 @@

    Arguments

    @@ -16775,7 +16775,7 @@

    Arguments

    @@ -16790,7 +16790,7 @@

    Arguments

    @@ -16805,7 +16805,7 @@

    Arguments

    @@ -16820,7 +16820,7 @@

    Arguments

    @@ -16862,7 +16862,7 @@

    Arguments

    @@ -16877,7 +16877,7 @@

    Arguments

    @@ -16892,7 +16892,7 @@

    Arguments

    @@ -16907,7 +16907,7 @@

    Arguments

    @@ -16922,7 +16922,7 @@

    Arguments

    @@ -16937,7 +16937,7 @@

    Arguments

    @@ -16952,7 +16952,7 @@

    Arguments

    @@ -16967,7 +16967,7 @@

    Arguments

    @@ -17009,7 +17009,7 @@

    Arguments

    @@ -17024,7 +17024,7 @@

    Arguments

    @@ -17039,7 +17039,7 @@

    Arguments

    @@ -17054,7 +17054,7 @@

    Arguments

    @@ -17069,7 +17069,7 @@

    Arguments

    @@ -17084,7 +17084,7 @@

    Arguments

    @@ -17099,7 +17099,7 @@

    Arguments

    @@ -17114,7 +17114,7 @@

    Arguments

    @@ -17167,7 +17167,7 @@

    Arguments

    @@ -17182,7 +17182,7 @@

    Arguments

    @@ -17197,7 +17197,7 @@

    Arguments

    @@ -17240,7 +17240,7 @@

    Arguments

    @@ -17255,7 +17255,7 @@

    Arguments

    @@ -17270,7 +17270,7 @@

    Arguments

    @@ -17316,7 +17316,7 @@

    Arguments

    @@ -17331,7 +17331,7 @@

    Arguments

    @@ -17346,7 +17346,7 @@

    Arguments

    @@ -17392,7 +17392,7 @@

    Arguments

    @@ -17407,7 +17407,7 @@

    Arguments

    @@ -17422,7 +17422,7 @@

    Arguments

    @@ -17478,7 +17478,7 @@

    Arguments

    @@ -17493,7 +17493,7 @@

    Arguments

    @@ -17508,7 +17508,7 @@

    Arguments

    @@ -17523,7 +17523,7 @@

    Arguments

    @@ -17538,7 +17538,7 @@

    Arguments

    @@ -17553,7 +17553,7 @@

    Arguments

    @@ -17568,7 +17568,7 @@

    Arguments

    @@ -17606,7 +17606,7 @@

    Arguments

    @@ -17621,7 +17621,7 @@

    Arguments

    @@ -17636,7 +17636,7 @@

    Arguments

    @@ -17651,7 +17651,7 @@

    Arguments

    @@ -17666,7 +17666,7 @@

    Arguments

    @@ -17681,7 +17681,7 @@

    Arguments

    @@ -17696,7 +17696,7 @@

    Arguments

    @@ -17735,7 +17735,7 @@

    Arguments

    @@ -17750,7 +17750,7 @@

    Arguments

    @@ -17765,7 +17765,7 @@

    Arguments

    @@ -17780,7 +17780,7 @@

    Arguments

    @@ -17795,7 +17795,7 @@

    Arguments

    @@ -17810,7 +17810,7 @@

    Arguments

    @@ -17825,7 +17825,7 @@

    Arguments

    @@ -17864,7 +17864,7 @@

    Arguments

    @@ -17879,7 +17879,7 @@

    Arguments

    @@ -17894,7 +17894,7 @@

    Arguments

    @@ -17909,7 +17909,7 @@

    Arguments

    @@ -17924,7 +17924,7 @@

    Arguments

    @@ -17939,7 +17939,7 @@

    Arguments

    @@ -17954,7 +17954,7 @@

    Arguments

    @@ -18017,7 +18017,7 @@

    Arguments

    @@ -18032,7 +18032,7 @@

    Arguments

    @@ -18047,7 +18047,7 @@

    Arguments

    @@ -18062,7 +18062,7 @@

    Arguments

    @@ -18100,7 +18100,7 @@

    Arguments

    @@ -18115,7 +18115,7 @@

    Arguments

    @@ -18130,7 +18130,7 @@

    Arguments

    @@ -18145,7 +18145,7 @@

    Arguments

    @@ -18183,7 +18183,7 @@

    Arguments

    @@ -18198,7 +18198,7 @@

    Arguments

    @@ -18213,7 +18213,7 @@

    Arguments

    @@ -18228,7 +18228,7 @@

    Arguments

    @@ -18266,7 +18266,7 @@

    Arguments

    @@ -18281,7 +18281,7 @@

    Arguments

    @@ -18296,7 +18296,7 @@

    Arguments

    @@ -18311,7 +18311,7 @@

    Arguments

    @@ -18362,7 +18362,7 @@

    Arguments

    @@ -18377,7 +18377,7 @@

    Arguments

    @@ -18392,7 +18392,7 @@

    Arguments

    @@ -18407,7 +18407,7 @@

    Arguments

    @@ -18459,7 +18459,7 @@

    Arguments

    @@ -18474,7 +18474,7 @@

    Arguments

    @@ -18489,7 +18489,7 @@

    Arguments

    @@ -18504,7 +18504,7 @@

    Arguments

    @@ -18556,7 +18556,7 @@

    Arguments

    @@ -18571,7 +18571,7 @@

    Arguments

    @@ -18586,7 +18586,7 @@

    Arguments

    @@ -18601,7 +18601,7 @@

    Arguments

    @@ -18652,7 +18652,7 @@

    Arguments

    @@ -18667,7 +18667,7 @@

    Arguments

    @@ -18682,7 +18682,7 @@

    Arguments

    @@ -18697,7 +18697,7 @@

    Arguments

    @@ -18759,7 +18759,7 @@

    Arguments

    @@ -18774,7 +18774,7 @@

    Arguments

    @@ -18789,7 +18789,7 @@

    Arguments

    @@ -18804,7 +18804,7 @@

    Arguments

    @@ -18819,7 +18819,7 @@

    Arguments

    @@ -18834,7 +18834,7 @@

    Arguments

    @@ -18872,7 +18872,7 @@

    Arguments

    @@ -18887,7 +18887,7 @@

    Arguments

    @@ -18902,7 +18902,7 @@

    Arguments

    @@ -18917,7 +18917,7 @@

    Arguments

    @@ -18932,7 +18932,7 @@

    Arguments

    @@ -18947,7 +18947,7 @@

    Arguments

    @@ -18997,7 +18997,7 @@

    Arguments

    @@ -19012,7 +19012,7 @@

    Arguments

    @@ -19027,7 +19027,7 @@

    Arguments

    @@ -19042,7 +19042,7 @@

    Arguments

    @@ -19057,7 +19057,7 @@

    Arguments

    @@ -19072,7 +19072,7 @@

    Arguments

    @@ -19122,7 +19122,7 @@

    Arguments

    @@ -19137,7 +19137,7 @@

    Arguments

    @@ -19152,7 +19152,7 @@

    Arguments

    @@ -19167,7 +19167,7 @@

    Arguments

    @@ -19182,7 +19182,7 @@

    Arguments

    @@ -19197,7 +19197,7 @@

    Arguments

    @@ -19259,7 +19259,7 @@

    Arguments

    @@ -19274,7 +19274,7 @@

    Arguments

    @@ -19289,7 +19289,7 @@

    Arguments

    @@ -19304,7 +19304,7 @@

    Arguments

    @@ -19319,7 +19319,7 @@

    Arguments

    @@ -19357,7 +19357,7 @@

    Arguments

    @@ -19372,7 +19372,7 @@

    Arguments

    @@ -19387,7 +19387,7 @@

    Arguments

    @@ -19402,7 +19402,7 @@

    Arguments

    @@ -19417,7 +19417,7 @@

    Arguments

    @@ -19467,7 +19467,7 @@

    Arguments

    @@ -19482,7 +19482,7 @@

    Arguments

    @@ -19497,7 +19497,7 @@

    Arguments

    @@ -19512,7 +19512,7 @@

    Arguments

    @@ -19527,7 +19527,7 @@

    Arguments

    @@ -19577,7 +19577,7 @@

    Arguments

    @@ -19592,7 +19592,7 @@

    Arguments

    @@ -19607,7 +19607,7 @@

    Arguments

    @@ -19622,7 +19622,7 @@

    Arguments

    @@ -19637,7 +19637,7 @@

    Arguments

    @@ -19691,7 +19691,7 @@

    Arguments

    @@ -19706,7 +19706,7 @@

    Arguments

    @@ -19721,7 +19721,7 @@

    Arguments

    @@ -19736,7 +19736,7 @@

    Arguments

    @@ -19751,7 +19751,7 @@

    Arguments

    @@ -19766,7 +19766,7 @@

    Arguments

    @@ -19781,7 +19781,7 @@

    Arguments

    @@ -19796,7 +19796,7 @@

    Arguments

    @@ -19811,7 +19811,7 @@

    Arguments

    @@ -19826,7 +19826,7 @@

    Arguments

    @@ -19841,7 +19841,7 @@

    Arguments

    @@ -19879,7 +19879,7 @@

    Arguments

    @@ -19894,7 +19894,7 @@

    Arguments

    @@ -19909,7 +19909,7 @@

    Arguments

    @@ -19924,7 +19924,7 @@

    Arguments

    @@ -19939,7 +19939,7 @@

    Arguments

    @@ -19954,7 +19954,7 @@

    Arguments

    @@ -19969,7 +19969,7 @@

    Arguments

    @@ -19984,7 +19984,7 @@

    Arguments

    @@ -19999,7 +19999,7 @@

    Arguments

    @@ -20014,7 +20014,7 @@

    Arguments

    @@ -20029,7 +20029,7 @@

    Arguments

    @@ -20071,7 +20071,7 @@

    Arguments

    @@ -20086,7 +20086,7 @@

    Arguments

    @@ -20101,7 +20101,7 @@

    Arguments

    @@ -20116,7 +20116,7 @@

    Arguments

    @@ -20131,7 +20131,7 @@

    Arguments

    @@ -20146,7 +20146,7 @@

    Arguments

    @@ -20161,7 +20161,7 @@

    Arguments

    @@ -20176,7 +20176,7 @@

    Arguments

    @@ -20191,7 +20191,7 @@

    Arguments

    @@ -20206,7 +20206,7 @@

    Arguments

    @@ -20221,7 +20221,7 @@

    Arguments

    @@ -20263,7 +20263,7 @@

    Arguments

    @@ -20278,7 +20278,7 @@

    Arguments

    @@ -20293,7 +20293,7 @@

    Arguments

    @@ -20308,7 +20308,7 @@

    Arguments

    @@ -20323,7 +20323,7 @@

    Arguments

    @@ -20338,7 +20338,7 @@

    Arguments

    @@ -20353,7 +20353,7 @@

    Arguments

    @@ -20368,7 +20368,7 @@

    Arguments

    @@ -20383,7 +20383,7 @@

    Arguments

    @@ -20398,7 +20398,7 @@

    Arguments

    @@ -20413,7 +20413,7 @@

    Arguments

    @@ -20464,7 +20464,7 @@

    Arguments

    @@ -20479,7 +20479,7 @@

    Arguments

    @@ -20494,7 +20494,7 @@

    Arguments

    @@ -20509,7 +20509,7 @@

    Arguments

    @@ -20547,7 +20547,7 @@

    Arguments

    @@ -20562,7 +20562,7 @@

    Arguments

    @@ -20577,7 +20577,7 @@

    Arguments

    @@ -20592,7 +20592,7 @@

    Arguments

    @@ -20630,7 +20630,7 @@

    Arguments

    @@ -20645,7 +20645,7 @@

    Arguments

    @@ -20660,7 +20660,7 @@

    Arguments

    @@ -20675,7 +20675,7 @@

    Arguments

    @@ -20713,7 +20713,7 @@

    Arguments

    @@ -20728,7 +20728,7 @@

    Arguments

    @@ -20743,7 +20743,7 @@

    Arguments

    @@ -20758,7 +20758,7 @@

    Arguments

    @@ -20797,7 +20797,7 @@

    Arguments

    @@ -20812,7 +20812,7 @@

    Arguments

    @@ -20827,7 +20827,7 @@

    Arguments

    @@ -20842,7 +20842,7 @@

    Arguments

    @@ -20882,7 +20882,7 @@

    Arguments

    @@ -20897,7 +20897,7 @@

    Arguments

    @@ -20912,7 +20912,7 @@

    Arguments

    @@ -20927,7 +20927,7 @@

    Arguments

    @@ -20967,7 +20967,7 @@

    Arguments

    @@ -20982,7 +20982,7 @@

    Arguments

    @@ -20997,7 +20997,7 @@

    Arguments

    @@ -21012,7 +21012,7 @@

    Arguments

    @@ -21051,7 +21051,7 @@

    Arguments

    @@ -21066,7 +21066,7 @@

    Arguments

    @@ -21081,7 +21081,7 @@

    Arguments

    @@ -21096,7 +21096,7 @@

    Arguments

    @@ -21152,7 +21152,7 @@

    Arguments

    @@ -21167,7 +21167,7 @@

    Arguments

    @@ -21182,7 +21182,7 @@

    Arguments

    @@ -21197,7 +21197,7 @@

    Arguments

    @@ -21212,7 +21212,7 @@

    Arguments

    @@ -21261,7 +21261,7 @@

    Arguments

    @@ -21276,7 +21276,7 @@

    Arguments

    @@ -21291,7 +21291,7 @@

    Arguments

    @@ -21306,7 +21306,7 @@

    Arguments

    @@ -21321,7 +21321,7 @@

    Arguments

    @@ -21380,7 +21380,7 @@

    Arguments

    @@ -21395,7 +21395,7 @@

    Arguments

    @@ -21410,7 +21410,7 @@

    Arguments

    @@ -21425,7 +21425,7 @@

    Arguments

    @@ -21440,7 +21440,7 @@

    Arguments

    @@ -21455,7 +21455,7 @@

    Arguments

    @@ -21470,7 +21470,7 @@

    Arguments

    @@ -21485,7 +21485,7 @@

    Arguments

    @@ -21500,7 +21500,7 @@

    Arguments

    @@ -21538,7 +21538,7 @@

    Arguments

    @@ -21553,7 +21553,7 @@

    Arguments

    @@ -21568,7 +21568,7 @@

    Arguments

    @@ -21583,7 +21583,7 @@

    Arguments

    @@ -21598,7 +21598,7 @@

    Arguments

    @@ -21613,7 +21613,7 @@

    Arguments

    @@ -21628,7 +21628,7 @@

    Arguments

    @@ -21643,7 +21643,7 @@

    Arguments

    @@ -21658,7 +21658,7 @@

    Arguments

    @@ -21700,7 +21700,7 @@

    Arguments

    @@ -21715,7 +21715,7 @@

    Arguments

    @@ -21730,7 +21730,7 @@

    Arguments

    @@ -21745,7 +21745,7 @@

    Arguments

    @@ -21760,7 +21760,7 @@

    Arguments

    @@ -21775,7 +21775,7 @@

    Arguments

    @@ -21790,7 +21790,7 @@

    Arguments

    @@ -21805,7 +21805,7 @@

    Arguments

    @@ -21820,7 +21820,7 @@

    Arguments

    @@ -21862,7 +21862,7 @@

    Arguments

    @@ -21877,7 +21877,7 @@

    Arguments

    @@ -21892,7 +21892,7 @@

    Arguments

    @@ -21907,7 +21907,7 @@

    Arguments

    @@ -21922,7 +21922,7 @@

    Arguments

    @@ -21937,7 +21937,7 @@

    Arguments

    @@ -21952,7 +21952,7 @@

    Arguments

    @@ -21967,7 +21967,7 @@

    Arguments

    @@ -21982,7 +21982,7 @@

    Arguments

    @@ -22036,7 +22036,7 @@

    Arguments

    @@ -22051,7 +22051,7 @@

    Arguments

    @@ -22066,7 +22066,7 @@

    Arguments

    @@ -22081,7 +22081,7 @@

    Arguments

    @@ -22096,7 +22096,7 @@

    Arguments

    @@ -22111,7 +22111,7 @@

    Arguments

    @@ -22149,7 +22149,7 @@

    Arguments

    @@ -22164,7 +22164,7 @@

    Arguments

    @@ -22179,7 +22179,7 @@

    Arguments

    @@ -22194,7 +22194,7 @@

    Arguments

    @@ -22209,7 +22209,7 @@

    Arguments

    @@ -22224,7 +22224,7 @@

    Arguments

    @@ -22266,7 +22266,7 @@

    Arguments

    @@ -22281,7 +22281,7 @@

    Arguments

    @@ -22296,7 +22296,7 @@

    Arguments

    @@ -22311,7 +22311,7 @@

    Arguments

    @@ -22326,7 +22326,7 @@

    Arguments

    @@ -22341,7 +22341,7 @@

    Arguments

    @@ -22383,7 +22383,7 @@

    Arguments

    @@ -22398,7 +22398,7 @@

    Arguments

    @@ -22413,7 +22413,7 @@

    Arguments

    @@ -22428,7 +22428,7 @@

    Arguments

    @@ -22443,7 +22443,7 @@

    Arguments

    @@ -22458,7 +22458,7 @@

    Arguments

    @@ -22512,7 +22512,7 @@

    Arguments

    @@ -22527,7 +22527,7 @@

    Arguments

    @@ -22542,7 +22542,7 @@

    Arguments

    @@ -22557,7 +22557,7 @@

    Arguments

    @@ -22572,7 +22572,7 @@

    Arguments

    @@ -22587,7 +22587,7 @@

    Arguments

    @@ -22602,7 +22602,7 @@

    Arguments

    @@ -22617,7 +22617,7 @@

    Arguments

    @@ -22655,7 +22655,7 @@

    Arguments

    @@ -22670,7 +22670,7 @@

    Arguments

    @@ -22685,7 +22685,7 @@

    Arguments

    @@ -22700,7 +22700,7 @@

    Arguments

    @@ -22715,7 +22715,7 @@

    Arguments

    @@ -22730,7 +22730,7 @@

    Arguments

    @@ -22745,7 +22745,7 @@

    Arguments

    @@ -22760,7 +22760,7 @@

    Arguments

    @@ -22802,7 +22802,7 @@

    Arguments

    @@ -22817,7 +22817,7 @@

    Arguments

    @@ -22832,7 +22832,7 @@

    Arguments

    @@ -22847,7 +22847,7 @@

    Arguments

    @@ -22862,7 +22862,7 @@

    Arguments

    @@ -22877,7 +22877,7 @@

    Arguments

    @@ -22892,7 +22892,7 @@

    Arguments

    @@ -22907,7 +22907,7 @@

    Arguments

    @@ -22949,7 +22949,7 @@

    Arguments

    @@ -22964,7 +22964,7 @@

    Arguments

    @@ -22979,7 +22979,7 @@

    Arguments

    @@ -22994,7 +22994,7 @@

    Arguments

    @@ -23009,7 +23009,7 @@

    Arguments

    @@ -23024,7 +23024,7 @@

    Arguments

    @@ -23039,7 +23039,7 @@

    Arguments

    @@ -23054,7 +23054,7 @@

    Arguments

    @@ -23107,7 +23107,7 @@

    Arguments

    @@ -23122,7 +23122,7 @@

    Arguments

    @@ -23137,7 +23137,7 @@

    Arguments

    @@ -23152,7 +23152,7 @@

    Arguments

    @@ -23167,7 +23167,7 @@

    Arguments

    @@ -23182,7 +23182,7 @@

    Arguments

    @@ -23197,7 +23197,7 @@

    Arguments

    @@ -23238,7 +23238,7 @@

    Arguments

    @@ -23253,7 +23253,7 @@

    Arguments

    @@ -23268,7 +23268,7 @@

    Arguments

    @@ -23283,7 +23283,7 @@

    Arguments

    @@ -23298,7 +23298,7 @@

    Arguments

    @@ -23313,7 +23313,7 @@

    Arguments

    @@ -23328,7 +23328,7 @@

    Arguments

    @@ -23379,7 +23379,7 @@

    Arguments

    @@ -23394,7 +23394,7 @@

    Arguments

    @@ -23409,7 +23409,7 @@

    Arguments

    @@ -23424,7 +23424,7 @@

    Arguments

    @@ -23463,7 +23463,7 @@

    Arguments

    @@ -23478,7 +23478,7 @@

    Arguments

    @@ -23493,7 +23493,7 @@

    Arguments

    @@ -23508,7 +23508,7 @@

    Arguments

    @@ -23559,7 +23559,7 @@

    Arguments

    @@ -23574,7 +23574,7 @@

    Arguments

    @@ -23589,7 +23589,7 @@

    Arguments

    @@ -23604,7 +23604,7 @@

    Arguments

    @@ -23619,7 +23619,7 @@

    Arguments

    @@ -23657,7 +23657,7 @@

    Arguments

    @@ -23672,7 +23672,7 @@

    Arguments

    @@ -23687,7 +23687,7 @@

    Arguments

    @@ -23702,7 +23702,7 @@

    Arguments

    @@ -23717,7 +23717,7 @@

    Arguments

    @@ -23755,7 +23755,7 @@

    Arguments

    @@ -23770,7 +23770,7 @@

    Arguments

    @@ -23785,7 +23785,7 @@

    Arguments

    @@ -23800,7 +23800,7 @@

    Arguments

    @@ -23815,7 +23815,7 @@

    Arguments

    @@ -23853,7 +23853,7 @@

    Arguments

    @@ -23868,7 +23868,7 @@

    Arguments

    @@ -23883,7 +23883,7 @@

    Arguments

    @@ -23898,7 +23898,7 @@

    Arguments

    @@ -23913,7 +23913,7 @@

    Arguments

    @@ -23952,7 +23952,7 @@

    Arguments

    @@ -23967,7 +23967,7 @@

    Arguments

    @@ -23982,7 +23982,7 @@

    Arguments

    @@ -23997,7 +23997,7 @@

    Arguments

    @@ -24012,7 +24012,7 @@

    Arguments

    @@ -24052,7 +24052,7 @@

    Arguments

    @@ -24067,7 +24067,7 @@

    Arguments

    @@ -24082,7 +24082,7 @@

    Arguments

    @@ -24097,7 +24097,7 @@

    Arguments

    @@ -24112,7 +24112,7 @@

    Arguments

    @@ -24152,7 +24152,7 @@

    Arguments

    @@ -24167,7 +24167,7 @@

    Arguments

    @@ -24182,7 +24182,7 @@

    Arguments

    @@ -24197,7 +24197,7 @@

    Arguments

    @@ -24212,7 +24212,7 @@

    Arguments

    @@ -24251,7 +24251,7 @@

    Arguments

    @@ -24266,7 +24266,7 @@

    Arguments

    @@ -24281,7 +24281,7 @@

    Arguments

    @@ -24296,7 +24296,7 @@

    Arguments

    @@ -24311,7 +24311,7 @@

    Arguments

    @@ -24367,7 +24367,7 @@

    Arguments

    @@ -24382,7 +24382,7 @@

    Arguments

    @@ -24397,7 +24397,7 @@

    Arguments

    @@ -24412,7 +24412,7 @@

    Arguments

    @@ -24427,7 +24427,7 @@

    Arguments

    @@ -24442,7 +24442,7 @@

    Arguments

    @@ -24457,7 +24457,7 @@

    Arguments

    @@ -24472,7 +24472,7 @@

    Arguments

    @@ -24487,7 +24487,7 @@

    Arguments

    @@ -24502,7 +24502,7 @@

    Arguments

    @@ -24517,7 +24517,7 @@

    Arguments

    @@ -24532,7 +24532,7 @@

    Arguments

    @@ -24570,7 +24570,7 @@

    Arguments

    @@ -24585,7 +24585,7 @@

    Arguments

    @@ -24600,7 +24600,7 @@

    Arguments

    @@ -24615,7 +24615,7 @@

    Arguments

    @@ -24630,7 +24630,7 @@

    Arguments

    @@ -24645,7 +24645,7 @@

    Arguments

    @@ -24660,7 +24660,7 @@

    Arguments

    @@ -24675,7 +24675,7 @@

    Arguments

    @@ -24690,7 +24690,7 @@

    Arguments

    @@ -24705,7 +24705,7 @@

    Arguments

    @@ -24720,7 +24720,7 @@

    Arguments

    @@ -24735,7 +24735,7 @@

    Arguments

    @@ -24773,7 +24773,7 @@

    Arguments

    @@ -24788,7 +24788,7 @@

    Arguments

    @@ -24803,7 +24803,7 @@

    Arguments

    @@ -24818,7 +24818,7 @@

    Arguments

    @@ -24833,7 +24833,7 @@

    Arguments

    @@ -24848,7 +24848,7 @@

    Arguments

    @@ -24863,7 +24863,7 @@

    Arguments

    @@ -24878,7 +24878,7 @@

    Arguments

    @@ -24893,7 +24893,7 @@

    Arguments

    @@ -24908,7 +24908,7 @@

    Arguments

    @@ -24923,7 +24923,7 @@

    Arguments

    @@ -24938,7 +24938,7 @@

    Arguments

    @@ -24976,7 +24976,7 @@

    Arguments

    @@ -24991,7 +24991,7 @@

    Arguments

    @@ -25006,7 +25006,7 @@

    Arguments

    @@ -25021,7 +25021,7 @@

    Arguments

    @@ -25036,7 +25036,7 @@

    Arguments

    @@ -25051,7 +25051,7 @@

    Arguments

    @@ -25066,7 +25066,7 @@

    Arguments

    @@ -25081,7 +25081,7 @@

    Arguments

    @@ -25096,7 +25096,7 @@

    Arguments

    @@ -25111,7 +25111,7 @@

    Arguments

    @@ -25126,7 +25126,7 @@

    Arguments

    @@ -25141,7 +25141,7 @@

    Arguments

    @@ -25185,7 +25185,7 @@

    Arguments

    @@ -25200,7 +25200,7 @@

    Arguments

    @@ -25215,7 +25215,7 @@

    Arguments

    @@ -25230,7 +25230,7 @@

    Arguments

    @@ -25245,7 +25245,7 @@

    Arguments

    @@ -25260,7 +25260,7 @@

    Arguments

    @@ -25275,7 +25275,7 @@

    Arguments

    @@ -25290,7 +25290,7 @@

    Arguments

    @@ -25305,7 +25305,7 @@

    Arguments

    @@ -25320,7 +25320,7 @@

    Arguments

    @@ -25335,7 +25335,7 @@

    Arguments

    @@ -25350,7 +25350,7 @@

    Arguments

    @@ -25394,7 +25394,7 @@

    Arguments

    @@ -25409,7 +25409,7 @@

    Arguments

    @@ -25424,7 +25424,7 @@

    Arguments

    @@ -25439,7 +25439,7 @@

    Arguments

    @@ -25454,7 +25454,7 @@

    Arguments

    @@ -25469,7 +25469,7 @@

    Arguments

    @@ -25484,7 +25484,7 @@

    Arguments

    @@ -25499,7 +25499,7 @@

    Arguments

    @@ -25514,7 +25514,7 @@

    Arguments

    @@ -25529,7 +25529,7 @@

    Arguments

    @@ -25544,7 +25544,7 @@

    Arguments

    @@ -25559,7 +25559,7 @@

    Arguments

    @@ -25603,7 +25603,7 @@

    Arguments

    @@ -25618,7 +25618,7 @@

    Arguments

    @@ -25633,7 +25633,7 @@

    Arguments

    @@ -25648,7 +25648,7 @@

    Arguments

    @@ -25663,7 +25663,7 @@

    Arguments

    @@ -25678,7 +25678,7 @@

    Arguments

    @@ -25693,7 +25693,7 @@

    Arguments

    @@ -25708,7 +25708,7 @@

    Arguments

    @@ -25723,7 +25723,7 @@

    Arguments

    @@ -25738,7 +25738,7 @@

    Arguments

    @@ -25753,7 +25753,7 @@

    Arguments

    @@ -25768,7 +25768,7 @@

    Arguments

    @@ -25812,7 +25812,7 @@

    Arguments

    @@ -25827,7 +25827,7 @@

    Arguments

    @@ -25842,7 +25842,7 @@

    Arguments

    @@ -25857,7 +25857,7 @@

    Arguments

    @@ -25872,7 +25872,7 @@

    Arguments

    @@ -25887,7 +25887,7 @@

    Arguments

    @@ -25902,7 +25902,7 @@

    Arguments

    @@ -25917,7 +25917,7 @@

    Arguments

    @@ -25932,7 +25932,7 @@

    Arguments

    @@ -25947,7 +25947,7 @@

    Arguments

    @@ -25962,7 +25962,7 @@

    Arguments

    @@ -25977,7 +25977,7 @@

    Arguments

    @@ -26031,7 +26031,7 @@

    Arguments

    @@ -26046,7 +26046,7 @@

    Arguments

    @@ -26061,7 +26061,7 @@

    Arguments

    @@ -26076,7 +26076,7 @@

    Arguments

    @@ -26091,7 +26091,7 @@

    Arguments

    @@ -26106,7 +26106,7 @@

    Arguments

    @@ -26121,7 +26121,7 @@

    Arguments

    @@ -26136,7 +26136,7 @@

    Arguments

    @@ -26151,7 +26151,7 @@

    Arguments

    @@ -26166,7 +26166,7 @@

    Arguments

    @@ -26204,7 +26204,7 @@

    Arguments

    @@ -26219,7 +26219,7 @@

    Arguments

    @@ -26234,7 +26234,7 @@

    Arguments

    @@ -26249,7 +26249,7 @@

    Arguments

    @@ -26264,7 +26264,7 @@

    Arguments

    @@ -26279,7 +26279,7 @@

    Arguments

    @@ -26294,7 +26294,7 @@

    Arguments

    @@ -26309,7 +26309,7 @@

    Arguments

    @@ -26324,7 +26324,7 @@

    Arguments

    @@ -26339,7 +26339,7 @@

    Arguments

    @@ -26381,7 +26381,7 @@

    Arguments

    @@ -26396,7 +26396,7 @@

    Arguments

    @@ -26411,7 +26411,7 @@

    Arguments

    @@ -26426,7 +26426,7 @@

    Arguments

    @@ -26441,7 +26441,7 @@

    Arguments

    @@ -26456,7 +26456,7 @@

    Arguments

    @@ -26471,7 +26471,7 @@

    Arguments

    @@ -26486,7 +26486,7 @@

    Arguments

    @@ -26501,7 +26501,7 @@

    Arguments

    @@ -26516,7 +26516,7 @@

    Arguments

    @@ -26558,7 +26558,7 @@

    Arguments

    @@ -26573,7 +26573,7 @@

    Arguments

    @@ -26588,7 +26588,7 @@

    Arguments

    @@ -26603,7 +26603,7 @@

    Arguments

    @@ -26618,7 +26618,7 @@

    Arguments

    @@ -26633,7 +26633,7 @@

    Arguments

    @@ -26648,7 +26648,7 @@

    Arguments

    @@ -26663,7 +26663,7 @@

    Arguments

    @@ -26678,7 +26678,7 @@

    Arguments

    @@ -26693,7 +26693,7 @@

    Arguments

    @@ -26747,7 +26747,7 @@

    Arguments

    @@ -26762,7 +26762,7 @@

    Arguments

    @@ -26777,7 +26777,7 @@

    Arguments

    @@ -26792,7 +26792,7 @@

    Arguments

    @@ -26807,7 +26807,7 @@

    Arguments

    @@ -26822,7 +26822,7 @@

    Arguments

    @@ -26837,7 +26837,7 @@

    Arguments

    @@ -26875,7 +26875,7 @@

    Arguments

    @@ -26890,7 +26890,7 @@

    Arguments

    @@ -26905,7 +26905,7 @@

    Arguments

    @@ -26920,7 +26920,7 @@

    Arguments

    @@ -26935,7 +26935,7 @@

    Arguments

    @@ -26950,7 +26950,7 @@

    Arguments

    @@ -26965,7 +26965,7 @@

    Arguments

    @@ -27007,7 +27007,7 @@

    Arguments

    @@ -27022,7 +27022,7 @@

    Arguments

    @@ -27037,7 +27037,7 @@

    Arguments

    @@ -27052,7 +27052,7 @@

    Arguments

    @@ -27067,7 +27067,7 @@

    Arguments

    @@ -27082,7 +27082,7 @@

    Arguments

    @@ -27097,7 +27097,7 @@

    Arguments

    @@ -27139,7 +27139,7 @@

    Arguments

    @@ -27154,7 +27154,7 @@

    Arguments

    @@ -27169,7 +27169,7 @@

    Arguments

    @@ -27184,7 +27184,7 @@

    Arguments

    @@ -27199,7 +27199,7 @@

    Arguments

    @@ -27214,7 +27214,7 @@

    Arguments

    @@ -27229,7 +27229,7 @@

    Arguments

    @@ -27283,7 +27283,7 @@

    Arguments

    @@ -27298,7 +27298,7 @@

    Arguments

    @@ -27313,7 +27313,7 @@

    Arguments

    @@ -27328,7 +27328,7 @@

    Arguments

    @@ -27343,7 +27343,7 @@

    Arguments

    @@ -27358,7 +27358,7 @@

    Arguments

    @@ -27373,7 +27373,7 @@

    Arguments

    @@ -27388,7 +27388,7 @@

    Arguments

    @@ -27403,7 +27403,7 @@

    Arguments

    @@ -27441,7 +27441,7 @@

    Arguments

    @@ -27456,7 +27456,7 @@

    Arguments

    @@ -27471,7 +27471,7 @@

    Arguments

    @@ -27486,7 +27486,7 @@

    Arguments

    @@ -27501,7 +27501,7 @@

    Arguments

    @@ -27516,7 +27516,7 @@

    Arguments

    @@ -27531,7 +27531,7 @@

    Arguments

    @@ -27546,7 +27546,7 @@

    Arguments

    @@ -27561,7 +27561,7 @@

    Arguments

    @@ -27603,7 +27603,7 @@

    Arguments

    @@ -27618,7 +27618,7 @@

    Arguments

    @@ -27633,7 +27633,7 @@

    Arguments

    @@ -27648,7 +27648,7 @@

    Arguments

    @@ -27663,7 +27663,7 @@

    Arguments

    @@ -27678,7 +27678,7 @@

    Arguments

    @@ -27693,7 +27693,7 @@

    Arguments

    @@ -27708,7 +27708,7 @@

    Arguments

    @@ -27723,7 +27723,7 @@

    Arguments

    @@ -27765,7 +27765,7 @@

    Arguments

    @@ -27780,7 +27780,7 @@

    Arguments

    @@ -27795,7 +27795,7 @@

    Arguments

    @@ -27810,7 +27810,7 @@

    Arguments

    @@ -27825,7 +27825,7 @@

    Arguments

    @@ -27840,7 +27840,7 @@

    Arguments

    @@ -27855,7 +27855,7 @@

    Arguments

    @@ -27870,7 +27870,7 @@

    Arguments

    @@ -27885,7 +27885,7 @@

    Arguments

    @@ -27942,7 +27942,7 @@

    Arguments

    @@ -27957,7 +27957,7 @@

    Arguments

    @@ -27972,7 +27972,7 @@

    Arguments

    @@ -27987,7 +27987,7 @@

    Arguments

    @@ -28002,7 +28002,7 @@

    Arguments

    @@ -28017,7 +28017,7 @@

    Arguments

    @@ -28032,7 +28032,7 @@

    Arguments

    @@ -28047,7 +28047,7 @@

    Arguments

    @@ -28062,7 +28062,7 @@

    Arguments

    @@ -28077,7 +28077,7 @@

    Arguments

    @@ -28092,7 +28092,7 @@

    Arguments

    @@ -28107,7 +28107,7 @@

    Arguments

    @@ -28145,7 +28145,7 @@

    Arguments

    @@ -28160,7 +28160,7 @@

    Arguments

    @@ -28175,7 +28175,7 @@

    Arguments

    @@ -28190,7 +28190,7 @@

    Arguments

    @@ -28205,7 +28205,7 @@

    Arguments

    @@ -28220,7 +28220,7 @@

    Arguments

    @@ -28235,7 +28235,7 @@

    Arguments

    @@ -28250,7 +28250,7 @@

    Arguments

    @@ -28265,7 +28265,7 @@

    Arguments

    @@ -28280,7 +28280,7 @@

    Arguments

    @@ -28295,7 +28295,7 @@

    Arguments

    @@ -28310,7 +28310,7 @@

    Arguments

    @@ -28348,7 +28348,7 @@

    Arguments

    @@ -28363,7 +28363,7 @@

    Arguments

    @@ -28378,7 +28378,7 @@

    Arguments

    @@ -28393,7 +28393,7 @@

    Arguments

    @@ -28408,7 +28408,7 @@

    Arguments

    @@ -28423,7 +28423,7 @@

    Arguments

    @@ -28438,7 +28438,7 @@

    Arguments

    @@ -28453,7 +28453,7 @@

    Arguments

    @@ -28468,7 +28468,7 @@

    Arguments

    @@ -28483,7 +28483,7 @@

    Arguments

    @@ -28498,7 +28498,7 @@

    Arguments

    @@ -28513,7 +28513,7 @@

    Arguments

    @@ -28551,7 +28551,7 @@

    Arguments

    @@ -28566,7 +28566,7 @@

    Arguments

    @@ -28581,7 +28581,7 @@

    Arguments

    @@ -28596,7 +28596,7 @@

    Arguments

    @@ -28611,7 +28611,7 @@

    Arguments

    @@ -28626,7 +28626,7 @@

    Arguments

    @@ -28641,7 +28641,7 @@

    Arguments

    @@ -28656,7 +28656,7 @@

    Arguments

    @@ -28671,7 +28671,7 @@

    Arguments

    @@ -28686,7 +28686,7 @@

    Arguments

    @@ -28701,7 +28701,7 @@

    Arguments

    @@ -28716,7 +28716,7 @@

    Arguments

    @@ -28761,7 +28761,7 @@

    Arguments

    @@ -28776,7 +28776,7 @@

    Arguments

    @@ -28791,7 +28791,7 @@

    Arguments

    @@ -28806,7 +28806,7 @@

    Arguments

    @@ -28821,7 +28821,7 @@

    Arguments

    @@ -28836,7 +28836,7 @@

    Arguments

    @@ -28851,7 +28851,7 @@

    Arguments

    @@ -28866,7 +28866,7 @@

    Arguments

    @@ -28881,7 +28881,7 @@

    Arguments

    @@ -28896,7 +28896,7 @@

    Arguments

    @@ -28911,7 +28911,7 @@

    Arguments

    @@ -28926,7 +28926,7 @@

    Arguments

    @@ -28971,7 +28971,7 @@

    Arguments

    @@ -28986,7 +28986,7 @@

    Arguments

    @@ -29001,7 +29001,7 @@

    Arguments

    @@ -29016,7 +29016,7 @@

    Arguments

    @@ -29031,7 +29031,7 @@

    Arguments

    @@ -29046,7 +29046,7 @@

    Arguments

    @@ -29061,7 +29061,7 @@

    Arguments

    @@ -29076,7 +29076,7 @@

    Arguments

    @@ -29091,7 +29091,7 @@

    Arguments

    @@ -29106,7 +29106,7 @@

    Arguments

    @@ -29121,7 +29121,7 @@

    Arguments

    @@ -29136,7 +29136,7 @@

    Arguments

    @@ -29181,7 +29181,7 @@

    Arguments

    @@ -29196,7 +29196,7 @@

    Arguments

    @@ -29211,7 +29211,7 @@

    Arguments

    @@ -29226,7 +29226,7 @@

    Arguments

    @@ -29241,7 +29241,7 @@

    Arguments

    @@ -29256,7 +29256,7 @@

    Arguments

    @@ -29271,7 +29271,7 @@

    Arguments

    @@ -29286,7 +29286,7 @@

    Arguments

    @@ -29301,7 +29301,7 @@

    Arguments

    @@ -29316,7 +29316,7 @@

    Arguments

    @@ -29331,7 +29331,7 @@

    Arguments

    @@ -29346,7 +29346,7 @@

    Arguments

    @@ -29391,7 +29391,7 @@

    Arguments

    @@ -29406,7 +29406,7 @@

    Arguments

    @@ -29421,7 +29421,7 @@

    Arguments

    @@ -29436,7 +29436,7 @@

    Arguments

    @@ -29451,7 +29451,7 @@

    Arguments

    @@ -29466,7 +29466,7 @@

    Arguments

    @@ -29481,7 +29481,7 @@

    Arguments

    @@ -29496,7 +29496,7 @@

    Arguments

    @@ -29511,7 +29511,7 @@

    Arguments

    @@ -29526,7 +29526,7 @@

    Arguments

    @@ -29541,7 +29541,7 @@

    Arguments

    @@ -29556,7 +29556,7 @@

    Arguments

    @@ -29613,7 +29613,7 @@

    Arguments

    @@ -29628,7 +29628,7 @@

    Arguments

    @@ -29643,7 +29643,7 @@

    Arguments

    @@ -29658,7 +29658,7 @@

    Arguments

    @@ -29673,7 +29673,7 @@

    Arguments

    @@ -29688,7 +29688,7 @@

    Arguments

    @@ -29703,7 +29703,7 @@

    Arguments

    @@ -29718,7 +29718,7 @@

    Arguments

    @@ -29733,7 +29733,7 @@

    Arguments

    @@ -29748,7 +29748,7 @@

    Arguments

    @@ -29786,7 +29786,7 @@

    Arguments

    @@ -29801,7 +29801,7 @@

    Arguments

    @@ -29816,7 +29816,7 @@

    Arguments

    @@ -29831,7 +29831,7 @@

    Arguments

    @@ -29846,7 +29846,7 @@

    Arguments

    @@ -29861,7 +29861,7 @@

    Arguments

    @@ -29876,7 +29876,7 @@

    Arguments

    @@ -29891,7 +29891,7 @@

    Arguments

    @@ -29906,7 +29906,7 @@

    Arguments

    @@ -29921,7 +29921,7 @@

    Arguments

    @@ -29959,7 +29959,7 @@

    Arguments

    @@ -29974,7 +29974,7 @@

    Arguments

    @@ -29989,7 +29989,7 @@

    Arguments

    @@ -30004,7 +30004,7 @@

    Arguments

    @@ -30019,7 +30019,7 @@

    Arguments

    @@ -30034,7 +30034,7 @@

    Arguments

    @@ -30049,7 +30049,7 @@

    Arguments

    @@ -30064,7 +30064,7 @@

    Arguments

    @@ -30079,7 +30079,7 @@

    Arguments

    @@ -30094,7 +30094,7 @@

    Arguments

    @@ -30132,7 +30132,7 @@

    Arguments

    @@ -30147,7 +30147,7 @@

    Arguments

    @@ -30162,7 +30162,7 @@

    Arguments

    @@ -30177,7 +30177,7 @@

    Arguments

    @@ -30192,7 +30192,7 @@

    Arguments

    @@ -30207,7 +30207,7 @@

    Arguments

    @@ -30222,7 +30222,7 @@

    Arguments

    @@ -30237,7 +30237,7 @@

    Arguments

    @@ -30252,7 +30252,7 @@

    Arguments

    @@ -30267,7 +30267,7 @@

    Arguments

    @@ -30312,7 +30312,7 @@

    Arguments

    @@ -30327,7 +30327,7 @@

    Arguments

    @@ -30342,7 +30342,7 @@

    Arguments

    @@ -30357,7 +30357,7 @@

    Arguments

    @@ -30372,7 +30372,7 @@

    Arguments

    @@ -30387,7 +30387,7 @@

    Arguments

    @@ -30402,7 +30402,7 @@

    Arguments

    @@ -30417,7 +30417,7 @@

    Arguments

    @@ -30432,7 +30432,7 @@

    Arguments

    @@ -30447,7 +30447,7 @@

    Arguments

    @@ -30492,7 +30492,7 @@

    Arguments

    @@ -30507,7 +30507,7 @@

    Arguments

    @@ -30522,7 +30522,7 @@

    Arguments

    @@ -30537,7 +30537,7 @@

    Arguments

    @@ -30552,7 +30552,7 @@

    Arguments

    @@ -30567,7 +30567,7 @@

    Arguments

    @@ -30582,7 +30582,7 @@

    Arguments

    @@ -30597,7 +30597,7 @@

    Arguments

    @@ -30612,7 +30612,7 @@

    Arguments

    @@ -30627,7 +30627,7 @@

    Arguments

    @@ -30672,7 +30672,7 @@

    Arguments

    @@ -30687,7 +30687,7 @@

    Arguments

    @@ -30702,7 +30702,7 @@

    Arguments

    @@ -30717,7 +30717,7 @@

    Arguments

    @@ -30732,7 +30732,7 @@

    Arguments

    @@ -30747,7 +30747,7 @@

    Arguments

    @@ -30762,7 +30762,7 @@

    Arguments

    @@ -30777,7 +30777,7 @@

    Arguments

    @@ -30792,7 +30792,7 @@

    Arguments

    @@ -30807,7 +30807,7 @@

    Arguments

    @@ -30852,7 +30852,7 @@

    Arguments

    @@ -30867,7 +30867,7 @@

    Arguments

    @@ -30882,7 +30882,7 @@

    Arguments

    @@ -30897,7 +30897,7 @@

    Arguments

    @@ -30912,7 +30912,7 @@

    Arguments

    @@ -30927,7 +30927,7 @@

    Arguments

    @@ -30942,7 +30942,7 @@

    Arguments

    @@ -30957,7 +30957,7 @@

    Arguments

    @@ -30972,7 +30972,7 @@

    Arguments

    @@ -30987,7 +30987,7 @@

    Arguments

    @@ -31041,7 +31041,7 @@

    Arguments

    @@ -31056,7 +31056,7 @@

    Arguments

    @@ -31071,7 +31071,7 @@

    Arguments

    @@ -31086,7 +31086,7 @@

    Arguments

    @@ -31101,7 +31101,7 @@

    Arguments

    @@ -31116,7 +31116,7 @@

    Arguments

    @@ -31131,7 +31131,7 @@

    Arguments

    @@ -31146,7 +31146,7 @@

    Arguments

    @@ -31161,7 +31161,7 @@

    Arguments

    @@ -31199,7 +31199,7 @@

    Arguments

    @@ -31214,7 +31214,7 @@

    Arguments

    @@ -31229,7 +31229,7 @@

    Arguments

    @@ -31244,7 +31244,7 @@

    Arguments

    @@ -31259,7 +31259,7 @@

    Arguments

    @@ -31274,7 +31274,7 @@

    Arguments

    @@ -31289,7 +31289,7 @@

    Arguments

    @@ -31304,7 +31304,7 @@

    Arguments

    @@ -31319,7 +31319,7 @@

    Arguments

    @@ -31357,7 +31357,7 @@

    Arguments

    @@ -31372,7 +31372,7 @@

    Arguments

    @@ -31387,7 +31387,7 @@

    Arguments

    @@ -31402,7 +31402,7 @@

    Arguments

    @@ -31417,7 +31417,7 @@

    Arguments

    @@ -31432,7 +31432,7 @@

    Arguments

    @@ -31447,7 +31447,7 @@

    Arguments

    @@ -31462,7 +31462,7 @@

    Arguments

    @@ -31477,7 +31477,7 @@

    Arguments

    @@ -31515,7 +31515,7 @@

    Arguments

    @@ -31530,7 +31530,7 @@

    Arguments

    @@ -31545,7 +31545,7 @@

    Arguments

    @@ -31560,7 +31560,7 @@

    Arguments

    @@ -31575,7 +31575,7 @@

    Arguments

    @@ -31590,7 +31590,7 @@

    Arguments

    @@ -31605,7 +31605,7 @@

    Arguments

    @@ -31620,7 +31620,7 @@

    Arguments

    @@ -31635,7 +31635,7 @@

    Arguments

    @@ -31677,7 +31677,7 @@

    Arguments

    @@ -31692,7 +31692,7 @@

    Arguments

    @@ -31707,7 +31707,7 @@

    Arguments

    @@ -31722,7 +31722,7 @@

    Arguments

    @@ -31737,7 +31737,7 @@

    Arguments

    @@ -31752,7 +31752,7 @@

    Arguments

    @@ -31767,7 +31767,7 @@

    Arguments

    @@ -31782,7 +31782,7 @@

    Arguments

    @@ -31797,7 +31797,7 @@

    Arguments

    @@ -31839,7 +31839,7 @@

    Arguments

    @@ -31854,7 +31854,7 @@

    Arguments

    @@ -31869,7 +31869,7 @@

    Arguments

    @@ -31884,7 +31884,7 @@

    Arguments

    @@ -31899,7 +31899,7 @@

    Arguments

    @@ -31914,7 +31914,7 @@

    Arguments

    @@ -31929,7 +31929,7 @@

    Arguments

    @@ -31944,7 +31944,7 @@

    Arguments

    @@ -31959,7 +31959,7 @@

    Arguments

    @@ -32001,7 +32001,7 @@

    Arguments

    @@ -32016,7 +32016,7 @@

    Arguments

    @@ -32031,7 +32031,7 @@

    Arguments

    @@ -32046,7 +32046,7 @@

    Arguments

    @@ -32061,7 +32061,7 @@

    Arguments

    @@ -32076,7 +32076,7 @@

    Arguments

    @@ -32091,7 +32091,7 @@

    Arguments

    @@ -32106,7 +32106,7 @@

    Arguments

    @@ -32121,7 +32121,7 @@

    Arguments

    @@ -32163,7 +32163,7 @@

    Arguments

    @@ -32178,7 +32178,7 @@

    Arguments

    @@ -32193,7 +32193,7 @@

    Arguments

    @@ -32208,7 +32208,7 @@

    Arguments

    @@ -32223,7 +32223,7 @@

    Arguments

    @@ -32238,7 +32238,7 @@

    Arguments

    @@ -32253,7 +32253,7 @@

    Arguments

    @@ -32268,7 +32268,7 @@

    Arguments

    @@ -32283,7 +32283,7 @@

    Arguments

    @@ -32340,7 +32340,7 @@

    Arguments

    @@ -32355,7 +32355,7 @@

    Arguments

    @@ -32370,7 +32370,7 @@

    Arguments

    @@ -32385,7 +32385,7 @@

    Arguments

    @@ -32400,7 +32400,7 @@

    Arguments

    @@ -32415,7 +32415,7 @@

    Arguments

    @@ -32430,7 +32430,7 @@

    Arguments

    @@ -32445,7 +32445,7 @@

    Arguments

    @@ -32460,7 +32460,7 @@

    Arguments

    @@ -32498,7 +32498,7 @@

    Arguments

    @@ -32513,7 +32513,7 @@

    Arguments

    @@ -32528,7 +32528,7 @@

    Arguments

    @@ -32543,7 +32543,7 @@

    Arguments

    @@ -32558,7 +32558,7 @@

    Arguments

    @@ -32573,7 +32573,7 @@

    Arguments

    @@ -32588,7 +32588,7 @@

    Arguments

    @@ -32603,7 +32603,7 @@

    Arguments

    @@ -32618,7 +32618,7 @@

    Arguments

    @@ -32656,7 +32656,7 @@

    Arguments

    @@ -32671,7 +32671,7 @@

    Arguments

    @@ -32686,7 +32686,7 @@

    Arguments

    @@ -32701,7 +32701,7 @@

    Arguments

    @@ -32716,7 +32716,7 @@

    Arguments

    @@ -32731,7 +32731,7 @@

    Arguments

    @@ -32746,7 +32746,7 @@

    Arguments

    @@ -32761,7 +32761,7 @@

    Arguments

    @@ -32776,7 +32776,7 @@

    Arguments

    @@ -32814,7 +32814,7 @@

    Arguments

    @@ -32829,7 +32829,7 @@

    Arguments

    @@ -32844,7 +32844,7 @@

    Arguments

    @@ -32859,7 +32859,7 @@

    Arguments

    @@ -32874,7 +32874,7 @@

    Arguments

    @@ -32889,7 +32889,7 @@

    Arguments

    @@ -32904,7 +32904,7 @@

    Arguments

    @@ -32919,7 +32919,7 @@

    Arguments

    @@ -32934,7 +32934,7 @@

    Arguments

    @@ -32979,7 +32979,7 @@

    Arguments

    @@ -32994,7 +32994,7 @@

    Arguments

    @@ -33009,7 +33009,7 @@

    Arguments

    @@ -33024,7 +33024,7 @@

    Arguments

    @@ -33039,7 +33039,7 @@

    Arguments

    @@ -33054,7 +33054,7 @@

    Arguments

    @@ -33069,7 +33069,7 @@

    Arguments

    @@ -33084,7 +33084,7 @@

    Arguments

    @@ -33099,7 +33099,7 @@

    Arguments

    @@ -33144,7 +33144,7 @@

    Arguments

    @@ -33159,7 +33159,7 @@

    Arguments

    @@ -33174,7 +33174,7 @@

    Arguments

    @@ -33189,7 +33189,7 @@

    Arguments

    @@ -33204,7 +33204,7 @@

    Arguments

    @@ -33219,7 +33219,7 @@

    Arguments

    @@ -33234,7 +33234,7 @@

    Arguments

    @@ -33249,7 +33249,7 @@

    Arguments

    @@ -33264,7 +33264,7 @@

    Arguments

    @@ -33309,7 +33309,7 @@

    Arguments

    @@ -33324,7 +33324,7 @@

    Arguments

    @@ -33339,7 +33339,7 @@

    Arguments

    @@ -33354,7 +33354,7 @@

    Arguments

    @@ -33369,7 +33369,7 @@

    Arguments

    @@ -33384,7 +33384,7 @@

    Arguments

    @@ -33399,7 +33399,7 @@

    Arguments

    @@ -33414,7 +33414,7 @@

    Arguments

    @@ -33429,7 +33429,7 @@

    Arguments

    @@ -33474,7 +33474,7 @@

    Arguments

    @@ -33489,7 +33489,7 @@

    Arguments

    @@ -33504,7 +33504,7 @@

    Arguments

    @@ -33519,7 +33519,7 @@

    Arguments

    @@ -33534,7 +33534,7 @@

    Arguments

    @@ -33549,7 +33549,7 @@

    Arguments

    @@ -33564,7 +33564,7 @@

    Arguments

    @@ -33579,7 +33579,7 @@

    Arguments

    @@ -33594,7 +33594,7 @@

    Arguments

    @@ -33648,7 +33648,7 @@

    Arguments

    @@ -33663,7 +33663,7 @@

    Arguments

    @@ -33678,7 +33678,7 @@

    Arguments

    @@ -33693,7 +33693,7 @@

    Arguments

    @@ -33708,7 +33708,7 @@

    Arguments

    @@ -33723,7 +33723,7 @@

    Arguments

    @@ -33738,7 +33738,7 @@

    Arguments

    @@ -33776,7 +33776,7 @@

    Arguments

    @@ -33791,7 +33791,7 @@

    Arguments

    @@ -33806,7 +33806,7 @@

    Arguments

    @@ -33821,7 +33821,7 @@

    Arguments

    @@ -33836,7 +33836,7 @@

    Arguments

    @@ -33851,7 +33851,7 @@

    Arguments

    @@ -33866,7 +33866,7 @@

    Arguments

    @@ -33904,7 +33904,7 @@

    Arguments

    @@ -33919,7 +33919,7 @@

    Arguments

    @@ -33934,7 +33934,7 @@

    Arguments

    @@ -33949,7 +33949,7 @@

    Arguments

    @@ -33964,7 +33964,7 @@

    Arguments

    @@ -33979,7 +33979,7 @@

    Arguments

    @@ -33994,7 +33994,7 @@

    Arguments

    @@ -34032,7 +34032,7 @@

    Arguments

    @@ -34047,7 +34047,7 @@

    Arguments

    @@ -34062,7 +34062,7 @@

    Arguments

    @@ -34077,7 +34077,7 @@

    Arguments

    @@ -34092,7 +34092,7 @@

    Arguments

    @@ -34107,7 +34107,7 @@

    Arguments

    @@ -34122,7 +34122,7 @@

    Arguments

    @@ -34164,7 +34164,7 @@

    Arguments

    @@ -34179,7 +34179,7 @@

    Arguments

    @@ -34194,7 +34194,7 @@

    Arguments

    @@ -34209,7 +34209,7 @@

    Arguments

    @@ -34224,7 +34224,7 @@

    Arguments

    @@ -34239,7 +34239,7 @@

    Arguments

    @@ -34254,7 +34254,7 @@

    Arguments

    @@ -34296,7 +34296,7 @@

    Arguments

    @@ -34311,7 +34311,7 @@

    Arguments

    @@ -34326,7 +34326,7 @@

    Arguments

    @@ -34341,7 +34341,7 @@

    Arguments

    @@ -34356,7 +34356,7 @@

    Arguments

    @@ -34371,7 +34371,7 @@

    Arguments

    @@ -34386,7 +34386,7 @@

    Arguments

    @@ -34428,7 +34428,7 @@

    Arguments

    @@ -34443,7 +34443,7 @@

    Arguments

    @@ -34458,7 +34458,7 @@

    Arguments

    @@ -34473,7 +34473,7 @@

    Arguments

    @@ -34488,7 +34488,7 @@

    Arguments

    @@ -34503,7 +34503,7 @@

    Arguments

    @@ -34518,7 +34518,7 @@

    Arguments

    @@ -34560,7 +34560,7 @@

    Arguments

    @@ -34575,7 +34575,7 @@

    Arguments

    @@ -34590,7 +34590,7 @@

    Arguments

    @@ -34605,7 +34605,7 @@

    Arguments

    @@ -34620,7 +34620,7 @@

    Arguments

    @@ -34635,7 +34635,7 @@

    Arguments

    @@ -34650,7 +34650,7 @@

    Arguments

    @@ -34706,7 +34706,7 @@

    Arguments

    @@ -34721,7 +34721,7 @@

    Arguments

    @@ -34736,7 +34736,7 @@

    Arguments

    @@ -34751,7 +34751,7 @@

    Arguments

    @@ -34766,7 +34766,7 @@

    Arguments

    @@ -34781,7 +34781,7 @@

    Arguments

    @@ -34796,7 +34796,7 @@

    Arguments

    @@ -34834,7 +34834,7 @@

    Arguments

    @@ -34849,7 +34849,7 @@

    Arguments

    @@ -34864,7 +34864,7 @@

    Arguments

    @@ -34879,7 +34879,7 @@

    Arguments

    @@ -34894,7 +34894,7 @@

    Arguments

    @@ -34909,7 +34909,7 @@

    Arguments

    @@ -34924,7 +34924,7 @@

    Arguments

    @@ -34962,7 +34962,7 @@

    Arguments

    @@ -34977,7 +34977,7 @@

    Arguments

    @@ -34992,7 +34992,7 @@

    Arguments

    @@ -35007,7 +35007,7 @@

    Arguments

    @@ -35022,7 +35022,7 @@

    Arguments

    @@ -35037,7 +35037,7 @@

    Arguments

    @@ -35052,7 +35052,7 @@

    Arguments

    @@ -35090,7 +35090,7 @@

    Arguments

    @@ -35105,7 +35105,7 @@

    Arguments

    @@ -35120,7 +35120,7 @@

    Arguments

    @@ -35135,7 +35135,7 @@

    Arguments

    @@ -35150,7 +35150,7 @@

    Arguments

    @@ -35165,7 +35165,7 @@

    Arguments

    @@ -35180,7 +35180,7 @@

    Arguments

    @@ -35224,7 +35224,7 @@

    Arguments

    @@ -35239,7 +35239,7 @@

    Arguments

    @@ -35254,7 +35254,7 @@

    Arguments

    @@ -35269,7 +35269,7 @@

    Arguments

    @@ -35284,7 +35284,7 @@

    Arguments

    @@ -35299,7 +35299,7 @@

    Arguments

    @@ -35314,7 +35314,7 @@

    Arguments

    @@ -35358,7 +35358,7 @@

    Arguments

    @@ -35373,7 +35373,7 @@

    Arguments

    @@ -35388,7 +35388,7 @@

    Arguments

    @@ -35403,7 +35403,7 @@

    Arguments

    @@ -35418,7 +35418,7 @@

    Arguments

    @@ -35433,7 +35433,7 @@

    Arguments

    @@ -35448,7 +35448,7 @@

    Arguments

    @@ -35492,7 +35492,7 @@

    Arguments

    @@ -35507,7 +35507,7 @@

    Arguments

    @@ -35522,7 +35522,7 @@

    Arguments

    @@ -35537,7 +35537,7 @@

    Arguments

    @@ -35552,7 +35552,7 @@

    Arguments

    @@ -35567,7 +35567,7 @@

    Arguments

    @@ -35582,7 +35582,7 @@

    Arguments

    @@ -35626,7 +35626,7 @@

    Arguments

    @@ -35641,7 +35641,7 @@

    Arguments

    @@ -35656,7 +35656,7 @@

    Arguments

    @@ -35671,7 +35671,7 @@

    Arguments

    @@ -35686,7 +35686,7 @@

    Arguments

    @@ -35701,7 +35701,7 @@

    Arguments

    @@ -35716,7 +35716,7 @@

    Arguments

    @@ -35771,7 +35771,7 @@

    Arguments

    @@ -35786,7 +35786,7 @@

    Arguments

    @@ -35801,7 +35801,7 @@

    Arguments

    @@ -35816,7 +35816,7 @@

    Arguments

    @@ -35831,7 +35831,7 @@

    Arguments

    @@ -35846,7 +35846,7 @@

    Arguments

    @@ -35861,7 +35861,7 @@

    Arguments

    @@ -35876,7 +35876,7 @@

    Arguments

    @@ -35891,7 +35891,7 @@

    Arguments

    @@ -35906,7 +35906,7 @@

    Arguments

    @@ -35921,7 +35921,7 @@

    Arguments

    @@ -35959,7 +35959,7 @@

    Arguments

    @@ -35974,7 +35974,7 @@

    Arguments

    @@ -35989,7 +35989,7 @@

    Arguments

    @@ -36004,7 +36004,7 @@

    Arguments

    @@ -36019,7 +36019,7 @@

    Arguments

    @@ -36034,7 +36034,7 @@

    Arguments

    @@ -36049,7 +36049,7 @@

    Arguments

    @@ -36064,7 +36064,7 @@

    Arguments

    @@ -36079,7 +36079,7 @@

    Arguments

    @@ -36094,7 +36094,7 @@

    Arguments

    @@ -36109,7 +36109,7 @@

    Arguments

    @@ -36147,7 +36147,7 @@

    Arguments

    @@ -36162,7 +36162,7 @@

    Arguments

    @@ -36177,7 +36177,7 @@

    Arguments

    @@ -36192,7 +36192,7 @@

    Arguments

    @@ -36207,7 +36207,7 @@

    Arguments

    @@ -36222,7 +36222,7 @@

    Arguments

    @@ -36237,7 +36237,7 @@

    Arguments

    @@ -36252,7 +36252,7 @@

    Arguments

    @@ -36267,7 +36267,7 @@

    Arguments

    @@ -36282,7 +36282,7 @@

    Arguments

    @@ -36297,7 +36297,7 @@

    Arguments

    @@ -36335,7 +36335,7 @@

    Arguments

    @@ -36350,7 +36350,7 @@

    Arguments

    @@ -36365,7 +36365,7 @@

    Arguments

    @@ -36380,7 +36380,7 @@

    Arguments

    @@ -36395,7 +36395,7 @@

    Arguments

    @@ -36410,7 +36410,7 @@

    Arguments

    @@ -36425,7 +36425,7 @@

    Arguments

    @@ -36440,7 +36440,7 @@

    Arguments

    @@ -36455,7 +36455,7 @@

    Arguments

    @@ -36470,7 +36470,7 @@

    Arguments

    @@ -36485,7 +36485,7 @@

    Arguments

    @@ -36528,7 +36528,7 @@

    Arguments

    @@ -36543,7 +36543,7 @@

    Arguments

    @@ -36558,7 +36558,7 @@

    Arguments

    @@ -36573,7 +36573,7 @@

    Arguments

    @@ -36588,7 +36588,7 @@

    Arguments

    @@ -36603,7 +36603,7 @@

    Arguments

    @@ -36618,7 +36618,7 @@

    Arguments

    @@ -36633,7 +36633,7 @@

    Arguments

    @@ -36648,7 +36648,7 @@

    Arguments

    @@ -36663,7 +36663,7 @@

    Arguments

    @@ -36678,7 +36678,7 @@

    Arguments

    @@ -36721,7 +36721,7 @@

    Arguments

    @@ -36736,7 +36736,7 @@

    Arguments

    @@ -36751,7 +36751,7 @@

    Arguments

    @@ -36766,7 +36766,7 @@

    Arguments

    @@ -36781,7 +36781,7 @@

    Arguments

    @@ -36796,7 +36796,7 @@

    Arguments

    @@ -36811,7 +36811,7 @@

    Arguments

    @@ -36826,7 +36826,7 @@

    Arguments

    @@ -36841,7 +36841,7 @@

    Arguments

    @@ -36856,7 +36856,7 @@

    Arguments

    @@ -36871,7 +36871,7 @@

    Arguments

    @@ -36914,7 +36914,7 @@

    Arguments

    @@ -36929,7 +36929,7 @@

    Arguments

    @@ -36944,7 +36944,7 @@

    Arguments

    @@ -36959,7 +36959,7 @@

    Arguments

    @@ -36974,7 +36974,7 @@

    Arguments

    @@ -36989,7 +36989,7 @@

    Arguments

    @@ -37004,7 +37004,7 @@

    Arguments

    @@ -37019,7 +37019,7 @@

    Arguments

    @@ -37034,7 +37034,7 @@

    Arguments

    @@ -37049,7 +37049,7 @@

    Arguments

    @@ -37064,7 +37064,7 @@

    Arguments

    @@ -37107,7 +37107,7 @@

    Arguments

    @@ -37122,7 +37122,7 @@

    Arguments

    @@ -37137,7 +37137,7 @@

    Arguments

    @@ -37152,7 +37152,7 @@

    Arguments

    @@ -37167,7 +37167,7 @@

    Arguments

    @@ -37182,7 +37182,7 @@

    Arguments

    @@ -37197,7 +37197,7 @@

    Arguments

    @@ -37212,7 +37212,7 @@

    Arguments

    @@ -37227,7 +37227,7 @@

    Arguments

    @@ -37242,7 +37242,7 @@

    Arguments

    @@ -37257,7 +37257,7 @@

    Arguments

    @@ -37311,7 +37311,7 @@

    Arguments

    @@ -37326,7 +37326,7 @@

    Arguments

    @@ -37341,7 +37341,7 @@

    Arguments

    @@ -37356,7 +37356,7 @@

    Arguments

    @@ -37371,7 +37371,7 @@

    Arguments

    @@ -37386,7 +37386,7 @@

    Arguments

    @@ -37401,7 +37401,7 @@

    Arguments

    @@ -37416,7 +37416,7 @@

    Arguments

    @@ -37454,7 +37454,7 @@

    Arguments

    @@ -37469,7 +37469,7 @@

    Arguments

    @@ -37484,7 +37484,7 @@

    Arguments

    @@ -37499,7 +37499,7 @@

    Arguments

    @@ -37514,7 +37514,7 @@

    Arguments

    @@ -37529,7 +37529,7 @@

    Arguments

    @@ -37544,7 +37544,7 @@

    Arguments

    @@ -37559,7 +37559,7 @@

    Arguments

    @@ -37597,7 +37597,7 @@

    Arguments

    @@ -37612,7 +37612,7 @@

    Arguments

    @@ -37627,7 +37627,7 @@

    Arguments

    @@ -37642,7 +37642,7 @@

    Arguments

    @@ -37657,7 +37657,7 @@

    Arguments

    @@ -37672,7 +37672,7 @@

    Arguments

    @@ -37687,7 +37687,7 @@

    Arguments

    @@ -37702,7 +37702,7 @@

    Arguments

    @@ -37740,7 +37740,7 @@

    Arguments

    @@ -37755,7 +37755,7 @@

    Arguments

    @@ -37770,7 +37770,7 @@

    Arguments

    @@ -37785,7 +37785,7 @@

    Arguments

    @@ -37800,7 +37800,7 @@

    Arguments

    @@ -37815,7 +37815,7 @@

    Arguments

    @@ -37830,7 +37830,7 @@

    Arguments

    @@ -37845,7 +37845,7 @@

    Arguments

    @@ -37887,7 +37887,7 @@

    Arguments

    @@ -37902,7 +37902,7 @@

    Arguments

    @@ -37917,7 +37917,7 @@

    Arguments

    @@ -37932,7 +37932,7 @@

    Arguments

    @@ -37947,7 +37947,7 @@

    Arguments

    @@ -37962,7 +37962,7 @@

    Arguments

    @@ -37977,7 +37977,7 @@

    Arguments

    @@ -37992,7 +37992,7 @@

    Arguments

    @@ -38034,7 +38034,7 @@

    Arguments

    @@ -38049,7 +38049,7 @@

    Arguments

    @@ -38064,7 +38064,7 @@

    Arguments

    @@ -38079,7 +38079,7 @@

    Arguments

    @@ -38094,7 +38094,7 @@

    Arguments

    @@ -38109,7 +38109,7 @@

    Arguments

    @@ -38124,7 +38124,7 @@

    Arguments

    @@ -38139,7 +38139,7 @@

    Arguments

    @@ -38181,7 +38181,7 @@

    Arguments

    @@ -38196,7 +38196,7 @@

    Arguments

    @@ -38211,7 +38211,7 @@

    Arguments

    @@ -38226,7 +38226,7 @@

    Arguments

    @@ -38241,7 +38241,7 @@

    Arguments

    @@ -38256,7 +38256,7 @@

    Arguments

    @@ -38271,7 +38271,7 @@

    Arguments

    @@ -38286,7 +38286,7 @@

    Arguments

    @@ -38328,7 +38328,7 @@

    Arguments

    @@ -38343,7 +38343,7 @@

    Arguments

    @@ -38358,7 +38358,7 @@

    Arguments

    @@ -38373,7 +38373,7 @@

    Arguments

    @@ -38388,7 +38388,7 @@

    Arguments

    @@ -38403,7 +38403,7 @@

    Arguments

    @@ -38418,7 +38418,7 @@

    Arguments

    @@ -38433,7 +38433,7 @@

    Arguments

    @@ -38489,7 +38489,7 @@

    Arguments

    @@ -38504,7 +38504,7 @@

    Arguments

    @@ -38519,7 +38519,7 @@

    Arguments

    @@ -38534,7 +38534,7 @@

    Arguments

    @@ -38549,7 +38549,7 @@

    Arguments

    @@ -38564,7 +38564,7 @@

    Arguments

    @@ -38579,7 +38579,7 @@

    Arguments

    @@ -38594,7 +38594,7 @@

    Arguments

    @@ -38609,7 +38609,7 @@

    Arguments

    @@ -38624,7 +38624,7 @@

    Arguments

    @@ -38639,7 +38639,7 @@

    Arguments

    @@ -38677,7 +38677,7 @@

    Arguments

    @@ -38692,7 +38692,7 @@

    Arguments

    @@ -38707,7 +38707,7 @@

    Arguments

    @@ -38722,7 +38722,7 @@

    Arguments

    @@ -38737,7 +38737,7 @@

    Arguments

    @@ -38752,7 +38752,7 @@

    Arguments

    @@ -38767,7 +38767,7 @@

    Arguments

    @@ -38782,7 +38782,7 @@

    Arguments

    @@ -38797,7 +38797,7 @@

    Arguments

    @@ -38812,7 +38812,7 @@

    Arguments

    @@ -38827,7 +38827,7 @@

    Arguments

    @@ -38865,7 +38865,7 @@

    Arguments

    @@ -38880,7 +38880,7 @@

    Arguments

    @@ -38895,7 +38895,7 @@

    Arguments

    @@ -38910,7 +38910,7 @@

    Arguments

    @@ -38925,7 +38925,7 @@

    Arguments

    @@ -38940,7 +38940,7 @@

    Arguments

    @@ -38955,7 +38955,7 @@

    Arguments

    @@ -38970,7 +38970,7 @@

    Arguments

    @@ -38985,7 +38985,7 @@

    Arguments

    @@ -39000,7 +39000,7 @@

    Arguments

    @@ -39015,7 +39015,7 @@

    Arguments

    @@ -39053,7 +39053,7 @@

    Arguments

    @@ -39068,7 +39068,7 @@

    Arguments

    @@ -39083,7 +39083,7 @@

    Arguments

    @@ -39098,7 +39098,7 @@

    Arguments

    @@ -39113,7 +39113,7 @@

    Arguments

    @@ -39128,7 +39128,7 @@

    Arguments

    @@ -39143,7 +39143,7 @@

    Arguments

    @@ -39158,7 +39158,7 @@

    Arguments

    @@ -39173,7 +39173,7 @@

    Arguments

    @@ -39188,7 +39188,7 @@

    Arguments

    @@ -39203,7 +39203,7 @@

    Arguments

    @@ -39247,7 +39247,7 @@

    Arguments

    @@ -39262,7 +39262,7 @@

    Arguments

    @@ -39277,7 +39277,7 @@

    Arguments

    @@ -39292,7 +39292,7 @@

    Arguments

    @@ -39307,7 +39307,7 @@

    Arguments

    @@ -39322,7 +39322,7 @@

    Arguments

    @@ -39337,7 +39337,7 @@

    Arguments

    @@ -39352,7 +39352,7 @@

    Arguments

    @@ -39367,7 +39367,7 @@

    Arguments

    @@ -39382,7 +39382,7 @@

    Arguments

    @@ -39397,7 +39397,7 @@

    Arguments

    @@ -39441,7 +39441,7 @@

    Arguments

    @@ -39456,7 +39456,7 @@

    Arguments

    @@ -39471,7 +39471,7 @@

    Arguments

    @@ -39486,7 +39486,7 @@

    Arguments

    @@ -39501,7 +39501,7 @@

    Arguments

    @@ -39516,7 +39516,7 @@

    Arguments

    @@ -39531,7 +39531,7 @@

    Arguments

    @@ -39546,7 +39546,7 @@

    Arguments

    @@ -39561,7 +39561,7 @@

    Arguments

    @@ -39576,7 +39576,7 @@

    Arguments

    @@ -39591,7 +39591,7 @@

    Arguments

    @@ -39635,7 +39635,7 @@

    Arguments

    @@ -39650,7 +39650,7 @@

    Arguments

    @@ -39665,7 +39665,7 @@

    Arguments

    @@ -39680,7 +39680,7 @@

    Arguments

    @@ -39695,7 +39695,7 @@

    Arguments

    @@ -39710,7 +39710,7 @@

    Arguments

    @@ -39725,7 +39725,7 @@

    Arguments

    @@ -39740,7 +39740,7 @@

    Arguments

    @@ -39755,7 +39755,7 @@

    Arguments

    @@ -39770,7 +39770,7 @@

    Arguments

    @@ -39785,7 +39785,7 @@

    Arguments

    @@ -39829,7 +39829,7 @@

    Arguments

    @@ -39844,7 +39844,7 @@

    Arguments

    @@ -39859,7 +39859,7 @@

    Arguments

    @@ -39874,7 +39874,7 @@

    Arguments

    @@ -39889,7 +39889,7 @@

    Arguments

    @@ -39904,7 +39904,7 @@

    Arguments

    @@ -39919,7 +39919,7 @@

    Arguments

    @@ -39934,7 +39934,7 @@

    Arguments

    @@ -39949,7 +39949,7 @@

    Arguments

    @@ -39964,7 +39964,7 @@

    Arguments

    @@ -39979,7 +39979,7 @@

    Arguments

    @@ -40035,7 +40035,7 @@

    Arguments

    @@ -40050,7 +40050,7 @@

    Arguments

    @@ -40065,7 +40065,7 @@

    Arguments

    @@ -40080,7 +40080,7 @@

    Arguments

    @@ -40095,7 +40095,7 @@

    Arguments

    @@ -40110,7 +40110,7 @@

    Arguments

    @@ -40125,7 +40125,7 @@

    Arguments

    @@ -40140,7 +40140,7 @@

    Arguments

    @@ -40178,7 +40178,7 @@

    Arguments

    @@ -40193,7 +40193,7 @@

    Arguments

    @@ -40208,7 +40208,7 @@

    Arguments

    @@ -40223,7 +40223,7 @@

    Arguments

    @@ -40238,7 +40238,7 @@

    Arguments

    @@ -40253,7 +40253,7 @@

    Arguments

    @@ -40268,7 +40268,7 @@

    Arguments

    @@ -40283,7 +40283,7 @@

    Arguments

    @@ -40321,7 +40321,7 @@

    Arguments

    @@ -40336,7 +40336,7 @@

    Arguments

    @@ -40351,7 +40351,7 @@

    Arguments

    @@ -40366,7 +40366,7 @@

    Arguments

    @@ -40381,7 +40381,7 @@

    Arguments

    @@ -40396,7 +40396,7 @@

    Arguments

    @@ -40411,7 +40411,7 @@

    Arguments

    @@ -40426,7 +40426,7 @@

    Arguments

    @@ -40464,7 +40464,7 @@

    Arguments

    @@ -40479,7 +40479,7 @@

    Arguments

    @@ -40494,7 +40494,7 @@

    Arguments

    @@ -40509,7 +40509,7 @@

    Arguments

    @@ -40524,7 +40524,7 @@

    Arguments

    @@ -40539,7 +40539,7 @@

    Arguments

    @@ -40554,7 +40554,7 @@

    Arguments

    @@ -40569,7 +40569,7 @@

    Arguments

    @@ -40613,7 +40613,7 @@

    Arguments

    @@ -40628,7 +40628,7 @@

    Arguments

    @@ -40643,7 +40643,7 @@

    Arguments

    @@ -40658,7 +40658,7 @@

    Arguments

    @@ -40673,7 +40673,7 @@

    Arguments

    @@ -40688,7 +40688,7 @@

    Arguments

    @@ -40703,7 +40703,7 @@

    Arguments

    @@ -40718,7 +40718,7 @@

    Arguments

    @@ -40762,7 +40762,7 @@

    Arguments

    @@ -40777,7 +40777,7 @@

    Arguments

    @@ -40792,7 +40792,7 @@

    Arguments

    @@ -40807,7 +40807,7 @@

    Arguments

    @@ -40822,7 +40822,7 @@

    Arguments

    @@ -40837,7 +40837,7 @@

    Arguments

    @@ -40852,7 +40852,7 @@

    Arguments

    @@ -40867,7 +40867,7 @@

    Arguments

    @@ -40911,7 +40911,7 @@

    Arguments

    @@ -40926,7 +40926,7 @@

    Arguments

    @@ -40941,7 +40941,7 @@

    Arguments

    @@ -40956,7 +40956,7 @@

    Arguments

    @@ -40971,7 +40971,7 @@

    Arguments

    @@ -40986,7 +40986,7 @@

    Arguments

    @@ -41001,7 +41001,7 @@

    Arguments

    @@ -41016,7 +41016,7 @@

    Arguments

    @@ -41060,7 +41060,7 @@

    Arguments

    @@ -41075,7 +41075,7 @@

    Arguments

    @@ -41090,7 +41090,7 @@

    Arguments

    @@ -41105,7 +41105,7 @@

    Arguments

    @@ -41120,7 +41120,7 @@

    Arguments

    @@ -41135,7 +41135,7 @@

    Arguments

    @@ -41150,7 +41150,7 @@

    Arguments

    @@ -41165,7 +41165,7 @@

    Arguments

    @@ -41204,13 +41204,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_blas_aux.html b/module/stdlib_linalg_blas_aux.html index bd049f5a4..22d856a31 100644 --- a/module/stdlib_linalg_blas_aux.html +++ b/module/stdlib_linalg_blas_aux.html @@ -211,7 +211,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -271,7 +271,7 @@

    Arguments

    @@ -286,7 +286,7 @@

    Arguments

    @@ -331,7 +331,7 @@

    Arguments

    @@ -346,7 +346,7 @@

    Arguments

    @@ -361,7 +361,7 @@

    Arguments

    @@ -406,7 +406,7 @@

    Arguments

    @@ -421,7 +421,7 @@

    Arguments

    @@ -436,7 +436,7 @@

    Arguments

    @@ -481,7 +481,7 @@

    Arguments

    @@ -496,7 +496,7 @@

    Arguments

    @@ -511,7 +511,7 @@

    Arguments

    @@ -557,7 +557,7 @@

    Arguments

    @@ -617,7 +617,7 @@

    Arguments

    @@ -686,7 +686,7 @@

    Arguments

    @@ -771,7 +771,7 @@

    Arguments

    @@ -805,13 +805,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_blas_c.html b/module/stdlib_linalg_blas_c.html index dbaf722a8..b5a450611 100644 --- a/module/stdlib_linalg_blas_c.html +++ b/module/stdlib_linalg_blas_c.html @@ -199,8 +199,8 @@

    Uses

    @@ -255,7 +255,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -346,7 +346,7 @@

    Arguments

    @@ -361,7 +361,7 @@

    Arguments

    @@ -376,7 +376,7 @@

    Arguments

    @@ -391,7 +391,7 @@

    Arguments

    @@ -406,7 +406,7 @@

    Arguments

    @@ -456,7 +456,7 @@

    Arguments

    @@ -471,7 +471,7 @@

    Arguments

    @@ -486,7 +486,7 @@

    Arguments

    @@ -501,7 +501,7 @@

    Arguments

    @@ -516,7 +516,7 @@

    Arguments

    @@ -531,7 +531,7 @@

    Arguments

    @@ -571,7 +571,7 @@

    Arguments

    @@ -586,7 +586,7 @@

    Arguments

    @@ -601,7 +601,7 @@

    Arguments

    @@ -616,7 +616,7 @@

    Arguments

    @@ -631,7 +631,7 @@

    Arguments

    @@ -675,7 +675,7 @@

    Arguments

    @@ -690,7 +690,7 @@

    Arguments

    @@ -705,7 +705,7 @@

    Arguments

    @@ -720,7 +720,7 @@

    Arguments

    @@ -735,7 +735,7 @@

    Arguments

    @@ -750,7 +750,7 @@

    Arguments

    @@ -765,7 +765,7 @@

    Arguments

    @@ -780,7 +780,7 @@

    Arguments

    @@ -795,7 +795,7 @@

    Arguments

    @@ -810,7 +810,7 @@

    Arguments

    @@ -825,7 +825,7 @@

    Arguments

    @@ -840,7 +840,7 @@

    Arguments

    @@ -855,7 +855,7 @@

    Arguments

    @@ -900,7 +900,7 @@

    Arguments

    @@ -915,7 +915,7 @@

    Arguments

    @@ -930,7 +930,7 @@

    Arguments

    @@ -945,7 +945,7 @@

    Arguments

    @@ -960,7 +960,7 @@

    Arguments

    @@ -975,7 +975,7 @@

    Arguments

    @@ -990,7 +990,7 @@

    Arguments

    @@ -1005,7 +1005,7 @@

    Arguments

    @@ -1020,7 +1020,7 @@

    Arguments

    @@ -1035,7 +1035,7 @@

    Arguments

    @@ -1050,7 +1050,7 @@

    Arguments

    @@ -1065,7 +1065,7 @@

    Arguments

    @@ -1080,7 +1080,7 @@

    Arguments

    @@ -1124,7 +1124,7 @@

    Arguments

    @@ -1139,7 +1139,7 @@

    Arguments

    @@ -1154,7 +1154,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1199,7 +1199,7 @@

    Arguments

    @@ -1214,7 +1214,7 @@

    Arguments

    @@ -1229,7 +1229,7 @@

    Arguments

    @@ -1244,7 +1244,7 @@

    Arguments

    @@ -1259,7 +1259,7 @@

    Arguments

    @@ -1274,7 +1274,7 @@

    Arguments

    @@ -1317,7 +1317,7 @@

    Arguments

    @@ -1332,7 +1332,7 @@

    Arguments

    @@ -1347,7 +1347,7 @@

    Arguments

    @@ -1362,7 +1362,7 @@

    Arguments

    @@ -1377,7 +1377,7 @@

    Arguments

    @@ -1392,7 +1392,7 @@

    Arguments

    @@ -1407,7 +1407,7 @@

    Arguments

    @@ -1422,7 +1422,7 @@

    Arguments

    @@ -1437,7 +1437,7 @@

    Arguments

    @@ -1480,7 +1480,7 @@

    Arguments

    @@ -1495,7 +1495,7 @@

    Arguments

    @@ -1510,7 +1510,7 @@

    Arguments

    @@ -1525,7 +1525,7 @@

    Arguments

    @@ -1540,7 +1540,7 @@

    Arguments

    @@ -1555,7 +1555,7 @@

    Arguments

    @@ -1570,7 +1570,7 @@

    Arguments

    @@ -1585,7 +1585,7 @@

    Arguments

    @@ -1600,7 +1600,7 @@

    Arguments

    @@ -1643,7 +1643,7 @@

    Arguments

    @@ -1658,7 +1658,7 @@

    Arguments

    @@ -1673,7 +1673,7 @@

    Arguments

    @@ -1688,7 +1688,7 @@

    Arguments

    @@ -1703,7 +1703,7 @@

    Arguments

    @@ -1718,7 +1718,7 @@

    Arguments

    @@ -1733,7 +1733,7 @@

    Arguments

    @@ -1748,7 +1748,7 @@

    Arguments

    @@ -1763,7 +1763,7 @@

    Arguments

    @@ -1778,7 +1778,7 @@

    Arguments

    @@ -1793,7 +1793,7 @@

    Arguments

    @@ -1838,7 +1838,7 @@

    Arguments

    @@ -1853,7 +1853,7 @@

    Arguments

    @@ -1868,7 +1868,7 @@

    Arguments

    @@ -1883,7 +1883,7 @@

    Arguments

    @@ -1898,7 +1898,7 @@

    Arguments

    @@ -1913,7 +1913,7 @@

    Arguments

    @@ -1928,7 +1928,7 @@

    Arguments

    @@ -1943,7 +1943,7 @@

    Arguments

    @@ -1958,7 +1958,7 @@

    Arguments

    @@ -1973,7 +1973,7 @@

    Arguments

    @@ -1988,7 +1988,7 @@

    Arguments

    @@ -2003,7 +2003,7 @@

    Arguments

    @@ -2046,7 +2046,7 @@

    Arguments

    @@ -2061,7 +2061,7 @@

    Arguments

    @@ -2076,7 +2076,7 @@

    Arguments

    @@ -2091,7 +2091,7 @@

    Arguments

    @@ -2106,7 +2106,7 @@

    Arguments

    @@ -2121,7 +2121,7 @@

    Arguments

    @@ -2136,7 +2136,7 @@

    Arguments

    @@ -2151,7 +2151,7 @@

    Arguments

    @@ -2166,7 +2166,7 @@

    Arguments

    @@ -2181,7 +2181,7 @@

    Arguments

    @@ -2224,7 +2224,7 @@

    Arguments

    @@ -2239,7 +2239,7 @@

    Arguments

    @@ -2254,7 +2254,7 @@

    Arguments

    @@ -2269,7 +2269,7 @@

    Arguments

    @@ -2284,7 +2284,7 @@

    Arguments

    @@ -2299,7 +2299,7 @@

    Arguments

    @@ -2314,7 +2314,7 @@

    Arguments

    @@ -2357,7 +2357,7 @@

    Arguments

    @@ -2372,7 +2372,7 @@

    Arguments

    @@ -2387,7 +2387,7 @@

    Arguments

    @@ -2402,7 +2402,7 @@

    Arguments

    @@ -2417,7 +2417,7 @@

    Arguments

    @@ -2432,7 +2432,7 @@

    Arguments

    @@ -2447,7 +2447,7 @@

    Arguments

    @@ -2462,7 +2462,7 @@

    Arguments

    @@ -2477,7 +2477,7 @@

    Arguments

    @@ -2523,7 +2523,7 @@

    Arguments

    @@ -2538,7 +2538,7 @@

    Arguments

    @@ -2553,7 +2553,7 @@

    Arguments

    @@ -2568,7 +2568,7 @@

    Arguments

    @@ -2583,7 +2583,7 @@

    Arguments

    @@ -2598,7 +2598,7 @@

    Arguments

    @@ -2613,7 +2613,7 @@

    Arguments

    @@ -2628,7 +2628,7 @@

    Arguments

    @@ -2643,7 +2643,7 @@

    Arguments

    @@ -2658,7 +2658,7 @@

    Arguments

    @@ -2673,7 +2673,7 @@

    Arguments

    @@ -2688,7 +2688,7 @@

    Arguments

    @@ -2734,7 +2734,7 @@

    Arguments

    @@ -2749,7 +2749,7 @@

    Arguments

    @@ -2764,7 +2764,7 @@

    Arguments

    @@ -2779,7 +2779,7 @@

    Arguments

    @@ -2794,7 +2794,7 @@

    Arguments

    @@ -2809,7 +2809,7 @@

    Arguments

    @@ -2824,7 +2824,7 @@

    Arguments

    @@ -2839,7 +2839,7 @@

    Arguments

    @@ -2854,7 +2854,7 @@

    Arguments

    @@ -2869,7 +2869,7 @@

    Arguments

    @@ -2912,7 +2912,7 @@

    Arguments

    @@ -2927,7 +2927,7 @@

    Arguments

    @@ -2942,7 +2942,7 @@

    Arguments

    @@ -2957,7 +2957,7 @@

    Arguments

    @@ -2972,7 +2972,7 @@

    Arguments

    @@ -2987,7 +2987,7 @@

    Arguments

    @@ -3002,7 +3002,7 @@

    Arguments

    @@ -3017,7 +3017,7 @@

    Arguments

    @@ -3032,7 +3032,7 @@

    Arguments

    @@ -3075,7 +3075,7 @@

    Arguments

    @@ -3090,7 +3090,7 @@

    Arguments

    @@ -3105,7 +3105,7 @@

    Arguments

    @@ -3120,7 +3120,7 @@

    Arguments

    @@ -3135,7 +3135,7 @@

    Arguments

    @@ -3150,7 +3150,7 @@

    Arguments

    @@ -3193,7 +3193,7 @@

    Arguments

    @@ -3208,7 +3208,7 @@

    Arguments

    @@ -3223,7 +3223,7 @@

    Arguments

    @@ -3238,7 +3238,7 @@

    Arguments

    @@ -3253,7 +3253,7 @@

    Arguments

    @@ -3268,7 +3268,7 @@

    Arguments

    @@ -3283,7 +3283,7 @@

    Arguments

    @@ -3298,7 +3298,7 @@

    Arguments

    @@ -3350,7 +3350,7 @@

    Arguments

    @@ -3365,7 +3365,7 @@

    Arguments

    @@ -3380,7 +3380,7 @@

    Arguments

    @@ -3395,7 +3395,7 @@

    Arguments

    @@ -3435,7 +3435,7 @@

    Arguments

    @@ -3450,7 +3450,7 @@

    Arguments

    @@ -3465,7 +3465,7 @@

    Arguments

    @@ -3480,7 +3480,7 @@

    Arguments

    @@ -3522,7 +3522,7 @@

    Arguments

    @@ -3537,7 +3537,7 @@

    Arguments

    @@ -3552,7 +3552,7 @@

    Arguments

    @@ -3567,7 +3567,7 @@

    Arguments

    @@ -3582,7 +3582,7 @@

    Arguments

    @@ -3597,7 +3597,7 @@

    Arguments

    @@ -3612,7 +3612,7 @@

    Arguments

    @@ -3652,7 +3652,7 @@

    Arguments

    @@ -3667,7 +3667,7 @@

    Arguments

    @@ -3682,7 +3682,7 @@

    Arguments

    @@ -3697,7 +3697,7 @@

    Arguments

    @@ -3737,7 +3737,7 @@

    Arguments

    @@ -3752,7 +3752,7 @@

    Arguments

    @@ -3767,7 +3767,7 @@

    Arguments

    @@ -3782,7 +3782,7 @@

    Arguments

    @@ -3797,7 +3797,7 @@

    Arguments

    @@ -3842,7 +3842,7 @@

    Arguments

    @@ -3857,7 +3857,7 @@

    Arguments

    @@ -3872,7 +3872,7 @@

    Arguments

    @@ -3887,7 +3887,7 @@

    Arguments

    @@ -3902,7 +3902,7 @@

    Arguments

    @@ -3917,7 +3917,7 @@

    Arguments

    @@ -3932,7 +3932,7 @@

    Arguments

    @@ -3947,7 +3947,7 @@

    Arguments

    @@ -3962,7 +3962,7 @@

    Arguments

    @@ -3977,7 +3977,7 @@

    Arguments

    @@ -3992,7 +3992,7 @@

    Arguments

    @@ -4007,7 +4007,7 @@

    Arguments

    @@ -4053,7 +4053,7 @@

    Arguments

    @@ -4068,7 +4068,7 @@

    Arguments

    @@ -4083,7 +4083,7 @@

    Arguments

    @@ -4098,7 +4098,7 @@

    Arguments

    @@ -4113,7 +4113,7 @@

    Arguments

    @@ -4128,7 +4128,7 @@

    Arguments

    @@ -4143,7 +4143,7 @@

    Arguments

    @@ -4158,7 +4158,7 @@

    Arguments

    @@ -4173,7 +4173,7 @@

    Arguments

    @@ -4188,7 +4188,7 @@

    Arguments

    @@ -4203,7 +4203,7 @@

    Arguments

    @@ -4218,7 +4218,7 @@

    Arguments

    @@ -4264,7 +4264,7 @@

    Arguments

    @@ -4279,7 +4279,7 @@

    Arguments

    @@ -4294,7 +4294,7 @@

    Arguments

    @@ -4309,7 +4309,7 @@

    Arguments

    @@ -4324,7 +4324,7 @@

    Arguments

    @@ -4339,7 +4339,7 @@

    Arguments

    @@ -4354,7 +4354,7 @@

    Arguments

    @@ -4369,7 +4369,7 @@

    Arguments

    @@ -4384,7 +4384,7 @@

    Arguments

    @@ -4399,7 +4399,7 @@

    Arguments

    @@ -4442,7 +4442,7 @@

    Arguments

    @@ -4457,7 +4457,7 @@

    Arguments

    @@ -4472,7 +4472,7 @@

    Arguments

    @@ -4487,7 +4487,7 @@

    Arguments

    @@ -4502,7 +4502,7 @@

    Arguments

    @@ -4517,7 +4517,7 @@

    Arguments

    @@ -4532,7 +4532,7 @@

    Arguments

    @@ -4547,7 +4547,7 @@

    Arguments

    @@ -4562,7 +4562,7 @@

    Arguments

    @@ -4608,7 +4608,7 @@

    Arguments

    @@ -4623,7 +4623,7 @@

    Arguments

    @@ -4638,7 +4638,7 @@

    Arguments

    @@ -4653,7 +4653,7 @@

    Arguments

    @@ -4668,7 +4668,7 @@

    Arguments

    @@ -4683,7 +4683,7 @@

    Arguments

    @@ -4698,7 +4698,7 @@

    Arguments

    @@ -4713,7 +4713,7 @@

    Arguments

    @@ -4728,7 +4728,7 @@

    Arguments

    @@ -4771,7 +4771,7 @@

    Arguments

    @@ -4786,7 +4786,7 @@

    Arguments

    @@ -4801,7 +4801,7 @@

    Arguments

    @@ -4816,7 +4816,7 @@

    Arguments

    @@ -4831,7 +4831,7 @@

    Arguments

    @@ -4846,7 +4846,7 @@

    Arguments

    @@ -4861,7 +4861,7 @@

    Arguments

    @@ -4906,7 +4906,7 @@

    Arguments

    @@ -4921,7 +4921,7 @@

    Arguments

    @@ -4936,7 +4936,7 @@

    Arguments

    @@ -4951,7 +4951,7 @@

    Arguments

    @@ -4966,7 +4966,7 @@

    Arguments

    @@ -4981,7 +4981,7 @@

    Arguments

    @@ -4996,7 +4996,7 @@

    Arguments

    @@ -5040,7 +5040,7 @@

    Arguments

    @@ -5055,7 +5055,7 @@

    Arguments

    @@ -5070,7 +5070,7 @@

    Arguments

    @@ -5085,7 +5085,7 @@

    Arguments

    @@ -5100,7 +5100,7 @@

    Arguments

    @@ -5115,7 +5115,7 @@

    Arguments

    @@ -5130,7 +5130,7 @@

    Arguments

    @@ -5145,7 +5145,7 @@

    Arguments

    @@ -5160,7 +5160,7 @@

    Arguments

    @@ -5175,7 +5175,7 @@

    Arguments

    @@ -5190,7 +5190,7 @@

    Arguments

    @@ -5233,7 +5233,7 @@

    Arguments

    @@ -5248,7 +5248,7 @@

    Arguments

    @@ -5263,7 +5263,7 @@

    Arguments

    @@ -5278,7 +5278,7 @@

    Arguments

    @@ -5293,7 +5293,7 @@

    Arguments

    @@ -5308,7 +5308,7 @@

    Arguments

    @@ -5323,7 +5323,7 @@

    Arguments

    @@ -5338,7 +5338,7 @@

    Arguments

    @@ -5383,7 +5383,7 @@

    Arguments

    @@ -5398,7 +5398,7 @@

    Arguments

    @@ -5413,7 +5413,7 @@

    Arguments

    @@ -5428,7 +5428,7 @@

    Arguments

    @@ -5443,7 +5443,7 @@

    Arguments

    @@ -5458,7 +5458,7 @@

    Arguments

    @@ -5473,7 +5473,7 @@

    Arguments

    @@ -5488,7 +5488,7 @@

    Arguments

    @@ -5503,7 +5503,7 @@

    Arguments

    @@ -5518,7 +5518,7 @@

    Arguments

    @@ -5533,7 +5533,7 @@

    Arguments

    @@ -5578,7 +5578,7 @@

    Arguments

    @@ -5593,7 +5593,7 @@

    Arguments

    @@ -5608,7 +5608,7 @@

    Arguments

    @@ -5623,7 +5623,7 @@

    Arguments

    @@ -5638,7 +5638,7 @@

    Arguments

    @@ -5653,7 +5653,7 @@

    Arguments

    @@ -5668,7 +5668,7 @@

    Arguments

    @@ -5683,7 +5683,7 @@

    Arguments

    @@ -5717,13 +5717,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_blas_d.html b/module/stdlib_linalg_blas_d.html index 794a8b94e..cc438c131 100644 --- a/module/stdlib_linalg_blas_d.html +++ b/module/stdlib_linalg_blas_d.html @@ -200,9 +200,9 @@

    Uses

    @@ -256,7 +256,7 @@

    Arguments

    @@ -271,7 +271,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -332,7 +332,7 @@

    Arguments

    @@ -347,7 +347,7 @@

    Arguments

    @@ -362,7 +362,7 @@

    Arguments

    @@ -377,7 +377,7 @@

    Arguments

    @@ -424,7 +424,7 @@

    Arguments

    @@ -439,7 +439,7 @@

    Arguments

    @@ -454,7 +454,7 @@

    Arguments

    @@ -504,7 +504,7 @@

    Arguments

    @@ -519,7 +519,7 @@

    Arguments

    @@ -534,7 +534,7 @@

    Arguments

    @@ -549,7 +549,7 @@

    Arguments

    @@ -564,7 +564,7 @@

    Arguments

    @@ -610,7 +610,7 @@

    Arguments

    @@ -625,7 +625,7 @@

    Arguments

    @@ -640,7 +640,7 @@

    Arguments

    @@ -687,7 +687,7 @@

    Arguments

    @@ -702,7 +702,7 @@

    Arguments

    @@ -717,7 +717,7 @@

    Arguments

    @@ -768,7 +768,7 @@

    Arguments

    @@ -783,7 +783,7 @@

    Arguments

    @@ -798,7 +798,7 @@

    Arguments

    @@ -813,7 +813,7 @@

    Arguments

    @@ -828,7 +828,7 @@

    Arguments

    @@ -843,7 +843,7 @@

    Arguments

    @@ -884,7 +884,7 @@

    Arguments

    @@ -899,7 +899,7 @@

    Arguments

    @@ -914,7 +914,7 @@

    Arguments

    @@ -929,7 +929,7 @@

    Arguments

    @@ -944,7 +944,7 @@

    Arguments

    @@ -987,7 +987,7 @@

    Arguments

    @@ -1002,7 +1002,7 @@

    Arguments

    @@ -1017,7 +1017,7 @@

    Arguments

    @@ -1032,7 +1032,7 @@

    Arguments

    @@ -1047,7 +1047,7 @@

    Arguments

    @@ -1062,7 +1062,7 @@

    Arguments

    @@ -1077,7 +1077,7 @@

    Arguments

    @@ -1092,7 +1092,7 @@

    Arguments

    @@ -1107,7 +1107,7 @@

    Arguments

    @@ -1122,7 +1122,7 @@

    Arguments

    @@ -1137,7 +1137,7 @@

    Arguments

    @@ -1152,7 +1152,7 @@

    Arguments

    @@ -1167,7 +1167,7 @@

    Arguments

    @@ -1212,7 +1212,7 @@

    Arguments

    @@ -1227,7 +1227,7 @@

    Arguments

    @@ -1242,7 +1242,7 @@

    Arguments

    @@ -1257,7 +1257,7 @@

    Arguments

    @@ -1272,7 +1272,7 @@

    Arguments

    @@ -1287,7 +1287,7 @@

    Arguments

    @@ -1302,7 +1302,7 @@

    Arguments

    @@ -1317,7 +1317,7 @@

    Arguments

    @@ -1332,7 +1332,7 @@

    Arguments

    @@ -1347,7 +1347,7 @@

    Arguments

    @@ -1362,7 +1362,7 @@

    Arguments

    @@ -1377,7 +1377,7 @@

    Arguments

    @@ -1392,7 +1392,7 @@

    Arguments

    @@ -1435,7 +1435,7 @@

    Arguments

    @@ -1450,7 +1450,7 @@

    Arguments

    @@ -1465,7 +1465,7 @@

    Arguments

    @@ -1480,7 +1480,7 @@

    Arguments

    @@ -1495,7 +1495,7 @@

    Arguments

    @@ -1510,7 +1510,7 @@

    Arguments

    @@ -1525,7 +1525,7 @@

    Arguments

    @@ -1540,7 +1540,7 @@

    Arguments

    @@ -1555,7 +1555,7 @@

    Arguments

    @@ -1570,7 +1570,7 @@

    Arguments

    @@ -1585,7 +1585,7 @@

    Arguments

    @@ -1628,7 +1628,7 @@

    Arguments

    @@ -1643,7 +1643,7 @@

    Arguments

    @@ -1658,7 +1658,7 @@

    Arguments

    @@ -1673,7 +1673,7 @@

    Arguments

    @@ -1688,7 +1688,7 @@

    Arguments

    @@ -1703,7 +1703,7 @@

    Arguments

    @@ -1718,7 +1718,7 @@

    Arguments

    @@ -1733,7 +1733,7 @@

    Arguments

    @@ -1748,7 +1748,7 @@

    Arguments

    @@ -1788,7 +1788,7 @@

    Arguments

    @@ -1803,7 +1803,7 @@

    Arguments

    @@ -1818,7 +1818,7 @@

    Arguments

    @@ -1833,7 +1833,7 @@

    Arguments

    @@ -1848,7 +1848,7 @@

    Arguments

    @@ -1863,7 +1863,7 @@

    Arguments

    @@ -1878,7 +1878,7 @@

    Arguments

    @@ -1931,7 +1931,7 @@

    Arguments

    @@ -1946,7 +1946,7 @@

    Arguments

    @@ -1961,7 +1961,7 @@

    Arguments

    @@ -1976,7 +1976,7 @@

    Arguments

    @@ -2027,7 +2027,7 @@

    Arguments

    @@ -2042,7 +2042,7 @@

    Arguments

    @@ -2057,7 +2057,7 @@

    Arguments

    @@ -2072,7 +2072,7 @@

    Arguments

    @@ -2087,7 +2087,7 @@

    Arguments

    @@ -2102,7 +2102,7 @@

    Arguments

    @@ -2153,7 +2153,7 @@

    Arguments

    @@ -2168,7 +2168,7 @@

    Arguments

    @@ -2183,7 +2183,7 @@

    Arguments

    @@ -2198,7 +2198,7 @@

    Arguments

    @@ -2213,7 +2213,7 @@

    Arguments

    @@ -2256,7 +2256,7 @@

    Arguments

    @@ -2271,7 +2271,7 @@

    Arguments

    @@ -2286,7 +2286,7 @@

    Arguments

    @@ -2301,7 +2301,7 @@

    Arguments

    @@ -2316,7 +2316,7 @@

    Arguments

    @@ -2331,7 +2331,7 @@

    Arguments

    @@ -2346,7 +2346,7 @@

    Arguments

    @@ -2361,7 +2361,7 @@

    Arguments

    @@ -2376,7 +2376,7 @@

    Arguments

    @@ -2391,7 +2391,7 @@

    Arguments

    @@ -2406,7 +2406,7 @@

    Arguments

    @@ -2447,7 +2447,7 @@

    Arguments

    @@ -2462,7 +2462,7 @@

    Arguments

    @@ -2477,7 +2477,7 @@

    Arguments

    @@ -2492,7 +2492,7 @@

    Arguments

    @@ -2535,7 +2535,7 @@

    Arguments

    @@ -2550,7 +2550,7 @@

    Arguments

    @@ -2565,7 +2565,7 @@

    Arguments

    @@ -2580,7 +2580,7 @@

    Arguments

    @@ -2595,7 +2595,7 @@

    Arguments

    @@ -2610,7 +2610,7 @@

    Arguments

    @@ -2625,7 +2625,7 @@

    Arguments

    @@ -2640,7 +2640,7 @@

    Arguments

    @@ -2655,7 +2655,7 @@

    Arguments

    @@ -2698,7 +2698,7 @@

    Arguments

    @@ -2713,7 +2713,7 @@

    Arguments

    @@ -2728,7 +2728,7 @@

    Arguments

    @@ -2743,7 +2743,7 @@

    Arguments

    @@ -2758,7 +2758,7 @@

    Arguments

    @@ -2773,7 +2773,7 @@

    Arguments

    @@ -2816,7 +2816,7 @@

    Arguments

    @@ -2831,7 +2831,7 @@

    Arguments

    @@ -2846,7 +2846,7 @@

    Arguments

    @@ -2861,7 +2861,7 @@

    Arguments

    @@ -2876,7 +2876,7 @@

    Arguments

    @@ -2891,7 +2891,7 @@

    Arguments

    @@ -2906,7 +2906,7 @@

    Arguments

    @@ -2921,7 +2921,7 @@

    Arguments

    @@ -2962,7 +2962,7 @@

    Arguments

    @@ -2977,7 +2977,7 @@

    Arguments

    @@ -2992,7 +2992,7 @@

    Arguments

    @@ -3007,7 +3007,7 @@

    Arguments

    @@ -3022,7 +3022,7 @@

    Arguments

    @@ -3067,7 +3067,7 @@

    Arguments

    @@ -3082,7 +3082,7 @@

    Arguments

    @@ -3097,7 +3097,7 @@

    Arguments

    @@ -3112,7 +3112,7 @@

    Arguments

    @@ -3127,7 +3127,7 @@

    Arguments

    @@ -3142,7 +3142,7 @@

    Arguments

    @@ -3157,7 +3157,7 @@

    Arguments

    @@ -3172,7 +3172,7 @@

    Arguments

    @@ -3187,7 +3187,7 @@

    Arguments

    @@ -3202,7 +3202,7 @@

    Arguments

    @@ -3217,7 +3217,7 @@

    Arguments

    @@ -3232,7 +3232,7 @@

    Arguments

    @@ -3275,7 +3275,7 @@

    Arguments

    @@ -3290,7 +3290,7 @@

    Arguments

    @@ -3305,7 +3305,7 @@

    Arguments

    @@ -3320,7 +3320,7 @@

    Arguments

    @@ -3335,7 +3335,7 @@

    Arguments

    @@ -3350,7 +3350,7 @@

    Arguments

    @@ -3365,7 +3365,7 @@

    Arguments

    @@ -3380,7 +3380,7 @@

    Arguments

    @@ -3395,7 +3395,7 @@

    Arguments

    @@ -3410,7 +3410,7 @@

    Arguments

    @@ -3453,7 +3453,7 @@

    Arguments

    @@ -3468,7 +3468,7 @@

    Arguments

    @@ -3483,7 +3483,7 @@

    Arguments

    @@ -3498,7 +3498,7 @@

    Arguments

    @@ -3513,7 +3513,7 @@

    Arguments

    @@ -3528,7 +3528,7 @@

    Arguments

    @@ -3543,7 +3543,7 @@

    Arguments

    @@ -3586,7 +3586,7 @@

    Arguments

    @@ -3601,7 +3601,7 @@

    Arguments

    @@ -3616,7 +3616,7 @@

    Arguments

    @@ -3631,7 +3631,7 @@

    Arguments

    @@ -3646,7 +3646,7 @@

    Arguments

    @@ -3661,7 +3661,7 @@

    Arguments

    @@ -3676,7 +3676,7 @@

    Arguments

    @@ -3691,7 +3691,7 @@

    Arguments

    @@ -3706,7 +3706,7 @@

    Arguments

    @@ -3752,7 +3752,7 @@

    Arguments

    @@ -3767,7 +3767,7 @@

    Arguments

    @@ -3782,7 +3782,7 @@

    Arguments

    @@ -3797,7 +3797,7 @@

    Arguments

    @@ -3812,7 +3812,7 @@

    Arguments

    @@ -3827,7 +3827,7 @@

    Arguments

    @@ -3842,7 +3842,7 @@

    Arguments

    @@ -3857,7 +3857,7 @@

    Arguments

    @@ -3872,7 +3872,7 @@

    Arguments

    @@ -3887,7 +3887,7 @@

    Arguments

    @@ -3902,7 +3902,7 @@

    Arguments

    @@ -3917,7 +3917,7 @@

    Arguments

    @@ -3963,7 +3963,7 @@

    Arguments

    @@ -3978,7 +3978,7 @@

    Arguments

    @@ -3993,7 +3993,7 @@

    Arguments

    @@ -4008,7 +4008,7 @@

    Arguments

    @@ -4023,7 +4023,7 @@

    Arguments

    @@ -4038,7 +4038,7 @@

    Arguments

    @@ -4053,7 +4053,7 @@

    Arguments

    @@ -4068,7 +4068,7 @@

    Arguments

    @@ -4083,7 +4083,7 @@

    Arguments

    @@ -4098,7 +4098,7 @@

    Arguments

    @@ -4141,7 +4141,7 @@

    Arguments

    @@ -4156,7 +4156,7 @@

    Arguments

    @@ -4171,7 +4171,7 @@

    Arguments

    @@ -4186,7 +4186,7 @@

    Arguments

    @@ -4201,7 +4201,7 @@

    Arguments

    @@ -4216,7 +4216,7 @@

    Arguments

    @@ -4231,7 +4231,7 @@

    Arguments

    @@ -4246,7 +4246,7 @@

    Arguments

    @@ -4261,7 +4261,7 @@

    Arguments

    @@ -4307,7 +4307,7 @@

    Arguments

    @@ -4322,7 +4322,7 @@

    Arguments

    @@ -4337,7 +4337,7 @@

    Arguments

    @@ -4352,7 +4352,7 @@

    Arguments

    @@ -4367,7 +4367,7 @@

    Arguments

    @@ -4382,7 +4382,7 @@

    Arguments

    @@ -4397,7 +4397,7 @@

    Arguments

    @@ -4412,7 +4412,7 @@

    Arguments

    @@ -4427,7 +4427,7 @@

    Arguments

    @@ -4470,7 +4470,7 @@

    Arguments

    @@ -4485,7 +4485,7 @@

    Arguments

    @@ -4500,7 +4500,7 @@

    Arguments

    @@ -4515,7 +4515,7 @@

    Arguments

    @@ -4530,7 +4530,7 @@

    Arguments

    @@ -4545,7 +4545,7 @@

    Arguments

    @@ -4560,7 +4560,7 @@

    Arguments

    @@ -4605,7 +4605,7 @@

    Arguments

    @@ -4620,7 +4620,7 @@

    Arguments

    @@ -4635,7 +4635,7 @@

    Arguments

    @@ -4650,7 +4650,7 @@

    Arguments

    @@ -4665,7 +4665,7 @@

    Arguments

    @@ -4680,7 +4680,7 @@

    Arguments

    @@ -4695,7 +4695,7 @@

    Arguments

    @@ -4739,7 +4739,7 @@

    Arguments

    @@ -4754,7 +4754,7 @@

    Arguments

    @@ -4769,7 +4769,7 @@

    Arguments

    @@ -4784,7 +4784,7 @@

    Arguments

    @@ -4799,7 +4799,7 @@

    Arguments

    @@ -4814,7 +4814,7 @@

    Arguments

    @@ -4829,7 +4829,7 @@

    Arguments

    @@ -4844,7 +4844,7 @@

    Arguments

    @@ -4859,7 +4859,7 @@

    Arguments

    @@ -4874,7 +4874,7 @@

    Arguments

    @@ -4889,7 +4889,7 @@

    Arguments

    @@ -4932,7 +4932,7 @@

    Arguments

    @@ -4947,7 +4947,7 @@

    Arguments

    @@ -4962,7 +4962,7 @@

    Arguments

    @@ -4977,7 +4977,7 @@

    Arguments

    @@ -4992,7 +4992,7 @@

    Arguments

    @@ -5007,7 +5007,7 @@

    Arguments

    @@ -5022,7 +5022,7 @@

    Arguments

    @@ -5037,7 +5037,7 @@

    Arguments

    @@ -5082,7 +5082,7 @@

    Arguments

    @@ -5097,7 +5097,7 @@

    Arguments

    @@ -5112,7 +5112,7 @@

    Arguments

    @@ -5127,7 +5127,7 @@

    Arguments

    @@ -5142,7 +5142,7 @@

    Arguments

    @@ -5157,7 +5157,7 @@

    Arguments

    @@ -5172,7 +5172,7 @@

    Arguments

    @@ -5187,7 +5187,7 @@

    Arguments

    @@ -5202,7 +5202,7 @@

    Arguments

    @@ -5217,7 +5217,7 @@

    Arguments

    @@ -5232,7 +5232,7 @@

    Arguments

    @@ -5277,7 +5277,7 @@

    Arguments

    @@ -5292,7 +5292,7 @@

    Arguments

    @@ -5307,7 +5307,7 @@

    Arguments

    @@ -5322,7 +5322,7 @@

    Arguments

    @@ -5337,7 +5337,7 @@

    Arguments

    @@ -5352,7 +5352,7 @@

    Arguments

    @@ -5367,7 +5367,7 @@

    Arguments

    @@ -5382,7 +5382,7 @@

    Arguments

    @@ -5416,13 +5416,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_blas_s.html b/module/stdlib_linalg_blas_s.html index 9902af225..6e57390d9 100644 --- a/module/stdlib_linalg_blas_s.html +++ b/module/stdlib_linalg_blas_s.html @@ -200,8 +200,8 @@

    Uses

    @@ -240,7 +240,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -331,7 +331,7 @@

    Arguments

    @@ -346,7 +346,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -469,7 +469,7 @@

    Arguments

    @@ -484,7 +484,7 @@

    Arguments

    @@ -499,7 +499,7 @@

    Arguments

    @@ -514,7 +514,7 @@

    Arguments

    @@ -529,7 +529,7 @@

    Arguments

    @@ -579,7 +579,7 @@

    Arguments

    @@ -609,7 +609,7 @@

    Arguments

    @@ -624,7 +624,7 @@

    Arguments

    @@ -639,7 +639,7 @@

    Arguments

    @@ -654,7 +654,7 @@

    Arguments

    @@ -701,7 +701,7 @@

    Arguments

    @@ -716,7 +716,7 @@

    Arguments

    @@ -731,7 +731,7 @@

    Arguments

    @@ -782,7 +782,7 @@

    Arguments

    @@ -797,7 +797,7 @@

    Arguments

    @@ -812,7 +812,7 @@

    Arguments

    @@ -827,7 +827,7 @@

    Arguments

    @@ -842,7 +842,7 @@

    Arguments

    @@ -857,7 +857,7 @@

    Arguments

    @@ -898,7 +898,7 @@

    Arguments

    @@ -913,7 +913,7 @@

    Arguments

    @@ -928,7 +928,7 @@

    Arguments

    @@ -943,7 +943,7 @@

    Arguments

    @@ -958,7 +958,7 @@

    Arguments

    @@ -1001,7 +1001,7 @@

    Arguments

    @@ -1016,7 +1016,7 @@

    Arguments

    @@ -1031,7 +1031,7 @@

    Arguments

    @@ -1046,7 +1046,7 @@

    Arguments

    @@ -1061,7 +1061,7 @@

    Arguments

    @@ -1076,7 +1076,7 @@

    Arguments

    @@ -1091,7 +1091,7 @@

    Arguments

    @@ -1106,7 +1106,7 @@

    Arguments

    @@ -1121,7 +1121,7 @@

    Arguments

    @@ -1136,7 +1136,7 @@

    Arguments

    @@ -1151,7 +1151,7 @@

    Arguments

    @@ -1166,7 +1166,7 @@

    Arguments

    @@ -1181,7 +1181,7 @@

    Arguments

    @@ -1226,7 +1226,7 @@

    Arguments

    @@ -1241,7 +1241,7 @@

    Arguments

    @@ -1256,7 +1256,7 @@

    Arguments

    @@ -1271,7 +1271,7 @@

    Arguments

    @@ -1286,7 +1286,7 @@

    Arguments

    @@ -1301,7 +1301,7 @@

    Arguments

    @@ -1316,7 +1316,7 @@

    Arguments

    @@ -1331,7 +1331,7 @@

    Arguments

    @@ -1346,7 +1346,7 @@

    Arguments

    @@ -1361,7 +1361,7 @@

    Arguments

    @@ -1376,7 +1376,7 @@

    Arguments

    @@ -1391,7 +1391,7 @@

    Arguments

    @@ -1406,7 +1406,7 @@

    Arguments

    @@ -1449,7 +1449,7 @@

    Arguments

    @@ -1464,7 +1464,7 @@

    Arguments

    @@ -1479,7 +1479,7 @@

    Arguments

    @@ -1494,7 +1494,7 @@

    Arguments

    @@ -1509,7 +1509,7 @@

    Arguments

    @@ -1524,7 +1524,7 @@

    Arguments

    @@ -1539,7 +1539,7 @@

    Arguments

    @@ -1554,7 +1554,7 @@

    Arguments

    @@ -1569,7 +1569,7 @@

    Arguments

    @@ -1584,7 +1584,7 @@

    Arguments

    @@ -1599,7 +1599,7 @@

    Arguments

    @@ -1642,7 +1642,7 @@

    Arguments

    @@ -1657,7 +1657,7 @@

    Arguments

    @@ -1672,7 +1672,7 @@

    Arguments

    @@ -1687,7 +1687,7 @@

    Arguments

    @@ -1702,7 +1702,7 @@

    Arguments

    @@ -1717,7 +1717,7 @@

    Arguments

    @@ -1732,7 +1732,7 @@

    Arguments

    @@ -1747,7 +1747,7 @@

    Arguments

    @@ -1762,7 +1762,7 @@

    Arguments

    @@ -1802,7 +1802,7 @@

    Arguments

    @@ -1817,7 +1817,7 @@

    Arguments

    @@ -1832,7 +1832,7 @@

    Arguments

    @@ -1847,7 +1847,7 @@

    Arguments

    @@ -1862,7 +1862,7 @@

    Arguments

    @@ -1877,7 +1877,7 @@

    Arguments

    @@ -1892,7 +1892,7 @@

    Arguments

    @@ -1945,7 +1945,7 @@

    Arguments

    @@ -1960,7 +1960,7 @@

    Arguments

    @@ -1975,7 +1975,7 @@

    Arguments

    @@ -1990,7 +1990,7 @@

    Arguments

    @@ -2041,7 +2041,7 @@

    Arguments

    @@ -2056,7 +2056,7 @@

    Arguments

    @@ -2071,7 +2071,7 @@

    Arguments

    @@ -2086,7 +2086,7 @@

    Arguments

    @@ -2101,7 +2101,7 @@

    Arguments

    @@ -2116,7 +2116,7 @@

    Arguments

    @@ -2167,7 +2167,7 @@

    Arguments

    @@ -2182,7 +2182,7 @@

    Arguments

    @@ -2197,7 +2197,7 @@

    Arguments

    @@ -2212,7 +2212,7 @@

    Arguments

    @@ -2227,7 +2227,7 @@

    Arguments

    @@ -2270,7 +2270,7 @@

    Arguments

    @@ -2285,7 +2285,7 @@

    Arguments

    @@ -2300,7 +2300,7 @@

    Arguments

    @@ -2315,7 +2315,7 @@

    Arguments

    @@ -2330,7 +2330,7 @@

    Arguments

    @@ -2345,7 +2345,7 @@

    Arguments

    @@ -2360,7 +2360,7 @@

    Arguments

    @@ -2375,7 +2375,7 @@

    Arguments

    @@ -2390,7 +2390,7 @@

    Arguments

    @@ -2405,7 +2405,7 @@

    Arguments

    @@ -2420,7 +2420,7 @@

    Arguments

    @@ -2461,7 +2461,7 @@

    Arguments

    @@ -2476,7 +2476,7 @@

    Arguments

    @@ -2491,7 +2491,7 @@

    Arguments

    @@ -2506,7 +2506,7 @@

    Arguments

    @@ -2549,7 +2549,7 @@

    Arguments

    @@ -2564,7 +2564,7 @@

    Arguments

    @@ -2579,7 +2579,7 @@

    Arguments

    @@ -2594,7 +2594,7 @@

    Arguments

    @@ -2609,7 +2609,7 @@

    Arguments

    @@ -2624,7 +2624,7 @@

    Arguments

    @@ -2639,7 +2639,7 @@

    Arguments

    @@ -2654,7 +2654,7 @@

    Arguments

    @@ -2669,7 +2669,7 @@

    Arguments

    @@ -2712,7 +2712,7 @@

    Arguments

    @@ -2727,7 +2727,7 @@

    Arguments

    @@ -2742,7 +2742,7 @@

    Arguments

    @@ -2757,7 +2757,7 @@

    Arguments

    @@ -2772,7 +2772,7 @@

    Arguments

    @@ -2787,7 +2787,7 @@

    Arguments

    @@ -2830,7 +2830,7 @@

    Arguments

    @@ -2845,7 +2845,7 @@

    Arguments

    @@ -2860,7 +2860,7 @@

    Arguments

    @@ -2875,7 +2875,7 @@

    Arguments

    @@ -2890,7 +2890,7 @@

    Arguments

    @@ -2905,7 +2905,7 @@

    Arguments

    @@ -2920,7 +2920,7 @@

    Arguments

    @@ -2935,7 +2935,7 @@

    Arguments

    @@ -2976,7 +2976,7 @@

    Arguments

    @@ -2991,7 +2991,7 @@

    Arguments

    @@ -3006,7 +3006,7 @@

    Arguments

    @@ -3021,7 +3021,7 @@

    Arguments

    @@ -3036,7 +3036,7 @@

    Arguments

    @@ -3081,7 +3081,7 @@

    Arguments

    @@ -3096,7 +3096,7 @@

    Arguments

    @@ -3111,7 +3111,7 @@

    Arguments

    @@ -3126,7 +3126,7 @@

    Arguments

    @@ -3141,7 +3141,7 @@

    Arguments

    @@ -3156,7 +3156,7 @@

    Arguments

    @@ -3171,7 +3171,7 @@

    Arguments

    @@ -3186,7 +3186,7 @@

    Arguments

    @@ -3201,7 +3201,7 @@

    Arguments

    @@ -3216,7 +3216,7 @@

    Arguments

    @@ -3231,7 +3231,7 @@

    Arguments

    @@ -3246,7 +3246,7 @@

    Arguments

    @@ -3289,7 +3289,7 @@

    Arguments

    @@ -3304,7 +3304,7 @@

    Arguments

    @@ -3319,7 +3319,7 @@

    Arguments

    @@ -3334,7 +3334,7 @@

    Arguments

    @@ -3349,7 +3349,7 @@

    Arguments

    @@ -3364,7 +3364,7 @@

    Arguments

    @@ -3379,7 +3379,7 @@

    Arguments

    @@ -3394,7 +3394,7 @@

    Arguments

    @@ -3409,7 +3409,7 @@

    Arguments

    @@ -3424,7 +3424,7 @@

    Arguments

    @@ -3467,7 +3467,7 @@

    Arguments

    @@ -3482,7 +3482,7 @@

    Arguments

    @@ -3497,7 +3497,7 @@

    Arguments

    @@ -3512,7 +3512,7 @@

    Arguments

    @@ -3527,7 +3527,7 @@

    Arguments

    @@ -3542,7 +3542,7 @@

    Arguments

    @@ -3557,7 +3557,7 @@

    Arguments

    @@ -3600,7 +3600,7 @@

    Arguments

    @@ -3615,7 +3615,7 @@

    Arguments

    @@ -3630,7 +3630,7 @@

    Arguments

    @@ -3645,7 +3645,7 @@

    Arguments

    @@ -3660,7 +3660,7 @@

    Arguments

    @@ -3675,7 +3675,7 @@

    Arguments

    @@ -3690,7 +3690,7 @@

    Arguments

    @@ -3705,7 +3705,7 @@

    Arguments

    @@ -3720,7 +3720,7 @@

    Arguments

    @@ -3766,7 +3766,7 @@

    Arguments

    @@ -3781,7 +3781,7 @@

    Arguments

    @@ -3796,7 +3796,7 @@

    Arguments

    @@ -3811,7 +3811,7 @@

    Arguments

    @@ -3826,7 +3826,7 @@

    Arguments

    @@ -3841,7 +3841,7 @@

    Arguments

    @@ -3856,7 +3856,7 @@

    Arguments

    @@ -3871,7 +3871,7 @@

    Arguments

    @@ -3886,7 +3886,7 @@

    Arguments

    @@ -3901,7 +3901,7 @@

    Arguments

    @@ -3916,7 +3916,7 @@

    Arguments

    @@ -3931,7 +3931,7 @@

    Arguments

    @@ -3977,7 +3977,7 @@

    Arguments

    @@ -3992,7 +3992,7 @@

    Arguments

    @@ -4007,7 +4007,7 @@

    Arguments

    @@ -4022,7 +4022,7 @@

    Arguments

    @@ -4037,7 +4037,7 @@

    Arguments

    @@ -4052,7 +4052,7 @@

    Arguments

    @@ -4067,7 +4067,7 @@

    Arguments

    @@ -4082,7 +4082,7 @@

    Arguments

    @@ -4097,7 +4097,7 @@

    Arguments

    @@ -4112,7 +4112,7 @@

    Arguments

    @@ -4155,7 +4155,7 @@

    Arguments

    @@ -4170,7 +4170,7 @@

    Arguments

    @@ -4185,7 +4185,7 @@

    Arguments

    @@ -4200,7 +4200,7 @@

    Arguments

    @@ -4215,7 +4215,7 @@

    Arguments

    @@ -4230,7 +4230,7 @@

    Arguments

    @@ -4245,7 +4245,7 @@

    Arguments

    @@ -4260,7 +4260,7 @@

    Arguments

    @@ -4275,7 +4275,7 @@

    Arguments

    @@ -4321,7 +4321,7 @@

    Arguments

    @@ -4336,7 +4336,7 @@

    Arguments

    @@ -4351,7 +4351,7 @@

    Arguments

    @@ -4366,7 +4366,7 @@

    Arguments

    @@ -4381,7 +4381,7 @@

    Arguments

    @@ -4396,7 +4396,7 @@

    Arguments

    @@ -4411,7 +4411,7 @@

    Arguments

    @@ -4426,7 +4426,7 @@

    Arguments

    @@ -4441,7 +4441,7 @@

    Arguments

    @@ -4484,7 +4484,7 @@

    Arguments

    @@ -4499,7 +4499,7 @@

    Arguments

    @@ -4514,7 +4514,7 @@

    Arguments

    @@ -4529,7 +4529,7 @@

    Arguments

    @@ -4544,7 +4544,7 @@

    Arguments

    @@ -4559,7 +4559,7 @@

    Arguments

    @@ -4574,7 +4574,7 @@

    Arguments

    @@ -4619,7 +4619,7 @@

    Arguments

    @@ -4634,7 +4634,7 @@

    Arguments

    @@ -4649,7 +4649,7 @@

    Arguments

    @@ -4664,7 +4664,7 @@

    Arguments

    @@ -4679,7 +4679,7 @@

    Arguments

    @@ -4694,7 +4694,7 @@

    Arguments

    @@ -4709,7 +4709,7 @@

    Arguments

    @@ -4753,7 +4753,7 @@

    Arguments

    @@ -4768,7 +4768,7 @@

    Arguments

    @@ -4783,7 +4783,7 @@

    Arguments

    @@ -4798,7 +4798,7 @@

    Arguments

    @@ -4813,7 +4813,7 @@

    Arguments

    @@ -4828,7 +4828,7 @@

    Arguments

    @@ -4843,7 +4843,7 @@

    Arguments

    @@ -4858,7 +4858,7 @@

    Arguments

    @@ -4873,7 +4873,7 @@

    Arguments

    @@ -4888,7 +4888,7 @@

    Arguments

    @@ -4903,7 +4903,7 @@

    Arguments

    @@ -4946,7 +4946,7 @@

    Arguments

    @@ -4961,7 +4961,7 @@

    Arguments

    @@ -4976,7 +4976,7 @@

    Arguments

    @@ -4991,7 +4991,7 @@

    Arguments

    @@ -5006,7 +5006,7 @@

    Arguments

    @@ -5021,7 +5021,7 @@

    Arguments

    @@ -5036,7 +5036,7 @@

    Arguments

    @@ -5051,7 +5051,7 @@

    Arguments

    @@ -5096,7 +5096,7 @@

    Arguments

    @@ -5111,7 +5111,7 @@

    Arguments

    @@ -5126,7 +5126,7 @@

    Arguments

    @@ -5141,7 +5141,7 @@

    Arguments

    @@ -5156,7 +5156,7 @@

    Arguments

    @@ -5171,7 +5171,7 @@

    Arguments

    @@ -5186,7 +5186,7 @@

    Arguments

    @@ -5201,7 +5201,7 @@

    Arguments

    @@ -5216,7 +5216,7 @@

    Arguments

    @@ -5231,7 +5231,7 @@

    Arguments

    @@ -5246,7 +5246,7 @@

    Arguments

    @@ -5291,7 +5291,7 @@

    Arguments

    @@ -5306,7 +5306,7 @@

    Arguments

    @@ -5321,7 +5321,7 @@

    Arguments

    @@ -5336,7 +5336,7 @@

    Arguments

    @@ -5351,7 +5351,7 @@

    Arguments

    @@ -5366,7 +5366,7 @@

    Arguments

    @@ -5381,7 +5381,7 @@

    Arguments

    @@ -5396,7 +5396,7 @@

    Arguments

    @@ -5430,13 +5430,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_blas_z.html b/module/stdlib_linalg_blas_z.html index 3e11c3a38..cb3dd0c99 100644 --- a/module/stdlib_linalg_blas_z.html +++ b/module/stdlib_linalg_blas_z.html @@ -199,11 +199,11 @@

    Uses

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -458,7 +458,7 @@

    Arguments

    @@ -473,7 +473,7 @@

    Arguments

    @@ -488,7 +488,7 @@

    Arguments

    @@ -503,7 +503,7 @@

    Arguments

    @@ -518,7 +518,7 @@

    Arguments

    @@ -533,7 +533,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -675,7 +675,7 @@

    Arguments

    @@ -690,7 +690,7 @@

    Arguments

    @@ -705,7 +705,7 @@

    Arguments

    @@ -720,7 +720,7 @@

    Arguments

    @@ -735,7 +735,7 @@

    Arguments

    @@ -750,7 +750,7 @@

    Arguments

    @@ -765,7 +765,7 @@

    Arguments

    @@ -805,7 +805,7 @@

    Arguments

    @@ -820,7 +820,7 @@

    Arguments

    @@ -835,7 +835,7 @@

    Arguments

    @@ -850,7 +850,7 @@

    Arguments

    @@ -894,7 +894,7 @@

    Arguments

    @@ -909,7 +909,7 @@

    Arguments

    @@ -924,7 +924,7 @@

    Arguments

    @@ -939,7 +939,7 @@

    Arguments

    @@ -954,7 +954,7 @@

    Arguments

    @@ -969,7 +969,7 @@

    Arguments

    @@ -984,7 +984,7 @@

    Arguments

    @@ -999,7 +999,7 @@

    Arguments

    @@ -1014,7 +1014,7 @@

    Arguments

    @@ -1029,7 +1029,7 @@

    Arguments

    @@ -1044,7 +1044,7 @@

    Arguments

    @@ -1059,7 +1059,7 @@

    Arguments

    @@ -1074,7 +1074,7 @@

    Arguments

    @@ -1119,7 +1119,7 @@

    Arguments

    @@ -1134,7 +1134,7 @@

    Arguments

    @@ -1149,7 +1149,7 @@

    Arguments

    @@ -1164,7 +1164,7 @@

    Arguments

    @@ -1179,7 +1179,7 @@

    Arguments

    @@ -1194,7 +1194,7 @@

    Arguments

    @@ -1209,7 +1209,7 @@

    Arguments

    @@ -1224,7 +1224,7 @@

    Arguments

    @@ -1239,7 +1239,7 @@

    Arguments

    @@ -1254,7 +1254,7 @@

    Arguments

    @@ -1269,7 +1269,7 @@

    Arguments

    @@ -1284,7 +1284,7 @@

    Arguments

    @@ -1299,7 +1299,7 @@

    Arguments

    @@ -1343,7 +1343,7 @@

    Arguments

    @@ -1358,7 +1358,7 @@

    Arguments

    @@ -1373,7 +1373,7 @@

    Arguments

    @@ -1388,7 +1388,7 @@

    Arguments

    @@ -1403,7 +1403,7 @@

    Arguments

    @@ -1418,7 +1418,7 @@

    Arguments

    @@ -1433,7 +1433,7 @@

    Arguments

    @@ -1448,7 +1448,7 @@

    Arguments

    @@ -1463,7 +1463,7 @@

    Arguments

    @@ -1478,7 +1478,7 @@

    Arguments

    @@ -1493,7 +1493,7 @@

    Arguments

    @@ -1536,7 +1536,7 @@

    Arguments

    @@ -1551,7 +1551,7 @@

    Arguments

    @@ -1566,7 +1566,7 @@

    Arguments

    @@ -1581,7 +1581,7 @@

    Arguments

    @@ -1596,7 +1596,7 @@

    Arguments

    @@ -1611,7 +1611,7 @@

    Arguments

    @@ -1626,7 +1626,7 @@

    Arguments

    @@ -1641,7 +1641,7 @@

    Arguments

    @@ -1656,7 +1656,7 @@

    Arguments

    @@ -1699,7 +1699,7 @@

    Arguments

    @@ -1714,7 +1714,7 @@

    Arguments

    @@ -1729,7 +1729,7 @@

    Arguments

    @@ -1744,7 +1744,7 @@

    Arguments

    @@ -1759,7 +1759,7 @@

    Arguments

    @@ -1774,7 +1774,7 @@

    Arguments

    @@ -1789,7 +1789,7 @@

    Arguments

    @@ -1804,7 +1804,7 @@

    Arguments

    @@ -1819,7 +1819,7 @@

    Arguments

    @@ -1862,7 +1862,7 @@

    Arguments

    @@ -1877,7 +1877,7 @@

    Arguments

    @@ -1892,7 +1892,7 @@

    Arguments

    @@ -1907,7 +1907,7 @@

    Arguments

    @@ -1922,7 +1922,7 @@

    Arguments

    @@ -1937,7 +1937,7 @@

    Arguments

    @@ -1952,7 +1952,7 @@

    Arguments

    @@ -1967,7 +1967,7 @@

    Arguments

    @@ -1982,7 +1982,7 @@

    Arguments

    @@ -1997,7 +1997,7 @@

    Arguments

    @@ -2012,7 +2012,7 @@

    Arguments

    @@ -2057,7 +2057,7 @@

    Arguments

    @@ -2072,7 +2072,7 @@

    Arguments

    @@ -2087,7 +2087,7 @@

    Arguments

    @@ -2102,7 +2102,7 @@

    Arguments

    @@ -2117,7 +2117,7 @@

    Arguments

    @@ -2132,7 +2132,7 @@

    Arguments

    @@ -2147,7 +2147,7 @@

    Arguments

    @@ -2162,7 +2162,7 @@

    Arguments

    @@ -2177,7 +2177,7 @@

    Arguments

    @@ -2192,7 +2192,7 @@

    Arguments

    @@ -2207,7 +2207,7 @@

    Arguments

    @@ -2222,7 +2222,7 @@

    Arguments

    @@ -2265,7 +2265,7 @@

    Arguments

    @@ -2280,7 +2280,7 @@

    Arguments

    @@ -2295,7 +2295,7 @@

    Arguments

    @@ -2310,7 +2310,7 @@

    Arguments

    @@ -2325,7 +2325,7 @@

    Arguments

    @@ -2340,7 +2340,7 @@

    Arguments

    @@ -2355,7 +2355,7 @@

    Arguments

    @@ -2370,7 +2370,7 @@

    Arguments

    @@ -2385,7 +2385,7 @@

    Arguments

    @@ -2400,7 +2400,7 @@

    Arguments

    @@ -2443,7 +2443,7 @@

    Arguments

    @@ -2458,7 +2458,7 @@

    Arguments

    @@ -2473,7 +2473,7 @@

    Arguments

    @@ -2488,7 +2488,7 @@

    Arguments

    @@ -2503,7 +2503,7 @@

    Arguments

    @@ -2518,7 +2518,7 @@

    Arguments

    @@ -2533,7 +2533,7 @@

    Arguments

    @@ -2576,7 +2576,7 @@

    Arguments

    @@ -2591,7 +2591,7 @@

    Arguments

    @@ -2606,7 +2606,7 @@

    Arguments

    @@ -2621,7 +2621,7 @@

    Arguments

    @@ -2636,7 +2636,7 @@

    Arguments

    @@ -2651,7 +2651,7 @@

    Arguments

    @@ -2666,7 +2666,7 @@

    Arguments

    @@ -2681,7 +2681,7 @@

    Arguments

    @@ -2696,7 +2696,7 @@

    Arguments

    @@ -2742,7 +2742,7 @@

    Arguments

    @@ -2757,7 +2757,7 @@

    Arguments

    @@ -2772,7 +2772,7 @@

    Arguments

    @@ -2787,7 +2787,7 @@

    Arguments

    @@ -2802,7 +2802,7 @@

    Arguments

    @@ -2817,7 +2817,7 @@

    Arguments

    @@ -2832,7 +2832,7 @@

    Arguments

    @@ -2847,7 +2847,7 @@

    Arguments

    @@ -2862,7 +2862,7 @@

    Arguments

    @@ -2877,7 +2877,7 @@

    Arguments

    @@ -2892,7 +2892,7 @@

    Arguments

    @@ -2907,7 +2907,7 @@

    Arguments

    @@ -2953,7 +2953,7 @@

    Arguments

    @@ -2968,7 +2968,7 @@

    Arguments

    @@ -2983,7 +2983,7 @@

    Arguments

    @@ -2998,7 +2998,7 @@

    Arguments

    @@ -3013,7 +3013,7 @@

    Arguments

    @@ -3028,7 +3028,7 @@

    Arguments

    @@ -3043,7 +3043,7 @@

    Arguments

    @@ -3058,7 +3058,7 @@

    Arguments

    @@ -3073,7 +3073,7 @@

    Arguments

    @@ -3088,7 +3088,7 @@

    Arguments

    @@ -3131,7 +3131,7 @@

    Arguments

    @@ -3146,7 +3146,7 @@

    Arguments

    @@ -3161,7 +3161,7 @@

    Arguments

    @@ -3176,7 +3176,7 @@

    Arguments

    @@ -3191,7 +3191,7 @@

    Arguments

    @@ -3206,7 +3206,7 @@

    Arguments

    @@ -3221,7 +3221,7 @@

    Arguments

    @@ -3236,7 +3236,7 @@

    Arguments

    @@ -3251,7 +3251,7 @@

    Arguments

    @@ -3294,7 +3294,7 @@

    Arguments

    @@ -3309,7 +3309,7 @@

    Arguments

    @@ -3324,7 +3324,7 @@

    Arguments

    @@ -3339,7 +3339,7 @@

    Arguments

    @@ -3354,7 +3354,7 @@

    Arguments

    @@ -3369,7 +3369,7 @@

    Arguments

    @@ -3412,7 +3412,7 @@

    Arguments

    @@ -3427,7 +3427,7 @@

    Arguments

    @@ -3442,7 +3442,7 @@

    Arguments

    @@ -3457,7 +3457,7 @@

    Arguments

    @@ -3472,7 +3472,7 @@

    Arguments

    @@ -3487,7 +3487,7 @@

    Arguments

    @@ -3502,7 +3502,7 @@

    Arguments

    @@ -3517,7 +3517,7 @@

    Arguments

    @@ -3569,7 +3569,7 @@

    Arguments

    @@ -3584,7 +3584,7 @@

    Arguments

    @@ -3599,7 +3599,7 @@

    Arguments

    @@ -3614,7 +3614,7 @@

    Arguments

    @@ -3654,7 +3654,7 @@

    Arguments

    @@ -3669,7 +3669,7 @@

    Arguments

    @@ -3684,7 +3684,7 @@

    Arguments

    @@ -3699,7 +3699,7 @@

    Arguments

    @@ -3739,7 +3739,7 @@

    Arguments

    @@ -3754,7 +3754,7 @@

    Arguments

    @@ -3769,7 +3769,7 @@

    Arguments

    @@ -3784,7 +3784,7 @@

    Arguments

    @@ -3799,7 +3799,7 @@

    Arguments

    @@ -3844,7 +3844,7 @@

    Arguments

    @@ -3859,7 +3859,7 @@

    Arguments

    @@ -3874,7 +3874,7 @@

    Arguments

    @@ -3889,7 +3889,7 @@

    Arguments

    @@ -3904,7 +3904,7 @@

    Arguments

    @@ -3919,7 +3919,7 @@

    Arguments

    @@ -3934,7 +3934,7 @@

    Arguments

    @@ -3949,7 +3949,7 @@

    Arguments

    @@ -3964,7 +3964,7 @@

    Arguments

    @@ -3979,7 +3979,7 @@

    Arguments

    @@ -3994,7 +3994,7 @@

    Arguments

    @@ -4009,7 +4009,7 @@

    Arguments

    @@ -4055,7 +4055,7 @@

    Arguments

    @@ -4070,7 +4070,7 @@

    Arguments

    @@ -4085,7 +4085,7 @@

    Arguments

    @@ -4100,7 +4100,7 @@

    Arguments

    @@ -4115,7 +4115,7 @@

    Arguments

    @@ -4130,7 +4130,7 @@

    Arguments

    @@ -4145,7 +4145,7 @@

    Arguments

    @@ -4160,7 +4160,7 @@

    Arguments

    @@ -4175,7 +4175,7 @@

    Arguments

    @@ -4190,7 +4190,7 @@

    Arguments

    @@ -4205,7 +4205,7 @@

    Arguments

    @@ -4220,7 +4220,7 @@

    Arguments

    @@ -4266,7 +4266,7 @@

    Arguments

    @@ -4281,7 +4281,7 @@

    Arguments

    @@ -4296,7 +4296,7 @@

    Arguments

    @@ -4311,7 +4311,7 @@

    Arguments

    @@ -4326,7 +4326,7 @@

    Arguments

    @@ -4341,7 +4341,7 @@

    Arguments

    @@ -4356,7 +4356,7 @@

    Arguments

    @@ -4371,7 +4371,7 @@

    Arguments

    @@ -4386,7 +4386,7 @@

    Arguments

    @@ -4401,7 +4401,7 @@

    Arguments

    @@ -4444,7 +4444,7 @@

    Arguments

    @@ -4459,7 +4459,7 @@

    Arguments

    @@ -4474,7 +4474,7 @@

    Arguments

    @@ -4489,7 +4489,7 @@

    Arguments

    @@ -4504,7 +4504,7 @@

    Arguments

    @@ -4519,7 +4519,7 @@

    Arguments

    @@ -4534,7 +4534,7 @@

    Arguments

    @@ -4549,7 +4549,7 @@

    Arguments

    @@ -4564,7 +4564,7 @@

    Arguments

    @@ -4610,7 +4610,7 @@

    Arguments

    @@ -4625,7 +4625,7 @@

    Arguments

    @@ -4640,7 +4640,7 @@

    Arguments

    @@ -4655,7 +4655,7 @@

    Arguments

    @@ -4670,7 +4670,7 @@

    Arguments

    @@ -4685,7 +4685,7 @@

    Arguments

    @@ -4700,7 +4700,7 @@

    Arguments

    @@ -4715,7 +4715,7 @@

    Arguments

    @@ -4730,7 +4730,7 @@

    Arguments

    @@ -4773,7 +4773,7 @@

    Arguments

    @@ -4788,7 +4788,7 @@

    Arguments

    @@ -4803,7 +4803,7 @@

    Arguments

    @@ -4818,7 +4818,7 @@

    Arguments

    @@ -4833,7 +4833,7 @@

    Arguments

    @@ -4848,7 +4848,7 @@

    Arguments

    @@ -4863,7 +4863,7 @@

    Arguments

    @@ -4908,7 +4908,7 @@

    Arguments

    @@ -4923,7 +4923,7 @@

    Arguments

    @@ -4938,7 +4938,7 @@

    Arguments

    @@ -4953,7 +4953,7 @@

    Arguments

    @@ -4968,7 +4968,7 @@

    Arguments

    @@ -4983,7 +4983,7 @@

    Arguments

    @@ -4998,7 +4998,7 @@

    Arguments

    @@ -5042,7 +5042,7 @@

    Arguments

    @@ -5057,7 +5057,7 @@

    Arguments

    @@ -5072,7 +5072,7 @@

    Arguments

    @@ -5087,7 +5087,7 @@

    Arguments

    @@ -5102,7 +5102,7 @@

    Arguments

    @@ -5117,7 +5117,7 @@

    Arguments

    @@ -5132,7 +5132,7 @@

    Arguments

    @@ -5147,7 +5147,7 @@

    Arguments

    @@ -5162,7 +5162,7 @@

    Arguments

    @@ -5177,7 +5177,7 @@

    Arguments

    @@ -5192,7 +5192,7 @@

    Arguments

    @@ -5235,7 +5235,7 @@

    Arguments

    @@ -5250,7 +5250,7 @@

    Arguments

    @@ -5265,7 +5265,7 @@

    Arguments

    @@ -5280,7 +5280,7 @@

    Arguments

    @@ -5295,7 +5295,7 @@

    Arguments

    @@ -5310,7 +5310,7 @@

    Arguments

    @@ -5325,7 +5325,7 @@

    Arguments

    @@ -5340,7 +5340,7 @@

    Arguments

    @@ -5385,7 +5385,7 @@

    Arguments

    @@ -5400,7 +5400,7 @@

    Arguments

    @@ -5415,7 +5415,7 @@

    Arguments

    @@ -5430,7 +5430,7 @@

    Arguments

    @@ -5445,7 +5445,7 @@

    Arguments

    @@ -5460,7 +5460,7 @@

    Arguments

    @@ -5475,7 +5475,7 @@

    Arguments

    @@ -5490,7 +5490,7 @@

    Arguments

    @@ -5505,7 +5505,7 @@

    Arguments

    @@ -5520,7 +5520,7 @@

    Arguments

    @@ -5535,7 +5535,7 @@

    Arguments

    @@ -5580,7 +5580,7 @@

    Arguments

    @@ -5595,7 +5595,7 @@

    Arguments

    @@ -5610,7 +5610,7 @@

    Arguments

    @@ -5625,7 +5625,7 @@

    Arguments

    @@ -5640,7 +5640,7 @@

    Arguments

    @@ -5655,7 +5655,7 @@

    Arguments

    @@ -5670,7 +5670,7 @@

    Arguments

    @@ -5685,7 +5685,7 @@

    Arguments

    @@ -5719,13 +5719,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_constants.html b/module/stdlib_linalg_constants.html index 15469b3f9..010236fed 100644 --- a/module/stdlib_linalg_constants.html +++ b/module/stdlib_linalg_constants.html @@ -155,8 +155,8 @@

    Uses

    @@ -219,13 +219,13 @@

    Variables

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_cross_product.html b/module/stdlib_linalg_cross_product.html index 399f9b95c..136c82d20 100644 --- a/module/stdlib_linalg_cross_product.html +++ b/module/stdlib_linalg_cross_product.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_determinant.html b/module/stdlib_linalg_determinant.html index c2dd51909..6c9166e6d 100644 --- a/module/stdlib_linalg_determinant.html +++ b/module/stdlib_linalg_determinant.html @@ -145,9 +145,9 @@

    Uses

    • @@ -182,13 +182,13 @@

      Uses

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/module/stdlib_linalg_diag.html b/module/stdlib_linalg_diag.html index 92ebfe8b3..eef9d5af6 100644 --- a/module/stdlib_linalg_diag.html +++ b/module/stdlib_linalg_diag.html @@ -175,13 +175,13 @@

      Uses

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/module/stdlib_linalg_kronecker.html b/module/stdlib_linalg_kronecker.html index 058582d9c..8e34fc51b 100644 --- a/module/stdlib_linalg_kronecker.html +++ b/module/stdlib_linalg_kronecker.html @@ -175,13 +175,13 @@

      Uses

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/module/stdlib_linalg_least_squares.html b/module/stdlib_linalg_least_squares.html index f85a37aa6..dec90d7f7 100644 --- a/module/stdlib_linalg_least_squares.html +++ b/module/stdlib_linalg_least_squares.html @@ -145,9 +145,9 @@

      Uses

    @@ -1124,7 +1124,7 @@

    Arguments

    @@ -1152,8 +1152,8 @@

    - -

    public interface operator(<) + +

    public interface operator(<)

      @@ -1177,7 +1177,7 @@

      Arguments

    @@ -1250,7 +1250,7 @@

    Arguments

    @@ -1278,8 +1278,8 @@

    - -

    public interface operator(<=) + +

    public interface operator(<=)

      @@ -1303,7 +1303,7 @@

      Arguments

    @@ -1376,7 +1376,7 @@

    Arguments

    @@ -1404,8 +1404,8 @@

    - -

    public interface operator(==) + +

    public interface operator(==)

    @@ -1432,7 +1432,7 @@

    Arguments

    @@ -1505,7 +1505,7 @@

    Arguments

    @@ -1533,8 +1533,8 @@

    - -

    public interface operator(>) + +

    public interface operator(>)

      @@ -1558,7 +1558,7 @@

      Arguments

    @@ -1631,7 +1631,7 @@

    Arguments

    @@ -1659,8 +1659,8 @@

    - -

    public interface operator(>=) + +

    public interface operator(>=)

      @@ -1684,7 +1684,7 @@

      Arguments

    @@ -1757,7 +1757,7 @@

    Arguments

    @@ -1816,7 +1816,7 @@

    Components

    @@ -1833,7 +1833,7 @@

    Components

    @@ -1962,7 +1962,7 @@

    Arguments

    @@ -2011,13 +2011,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_linalg_svd.html b/module/stdlib_linalg_svd.html index c56237b86..0a3b28268 100644 --- a/module/stdlib_linalg_svd.html +++ b/module/stdlib_linalg_svd.html @@ -145,9 +145,9 @@

    Uses

    @@ -221,8 +221,8 @@

    Uses

    @@ -452,7 +452,7 @@

    Variables

    @@ -537,7 +537,7 @@

    Variables

    @@ -676,13 +676,13 @@

    Type-Bound Procedures

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math.html b/module/stdlib_math.html index 2c363139d..290efa836 100644 --- a/module/stdlib_math.html +++ b/module/stdlib_math.html @@ -385,7 +385,7 @@

    Arguments

    @@ -400,7 +400,7 @@

    Arguments

    @@ -415,7 +415,7 @@

    Arguments

    @@ -430,7 +430,7 @@

    Arguments

    @@ -445,7 +445,7 @@

    Arguments

    @@ -488,7 +488,7 @@

    Arguments

    @@ -503,7 +503,7 @@

    Arguments

    @@ -518,7 +518,7 @@

    Arguments

    @@ -533,7 +533,7 @@

    Arguments

    @@ -548,7 +548,7 @@

    Arguments

    @@ -591,7 +591,7 @@

    Arguments

    @@ -606,7 +606,7 @@

    Arguments

    @@ -621,7 +621,7 @@

    Arguments

    @@ -636,7 +636,7 @@

    Arguments

    @@ -651,7 +651,7 @@

    Arguments

    @@ -694,7 +694,7 @@

    Arguments

    @@ -709,7 +709,7 @@

    Arguments

    @@ -724,7 +724,7 @@

    Arguments

    @@ -739,7 +739,7 @@

    Arguments

    @@ -754,7 +754,7 @@

    Arguments

    @@ -797,7 +797,7 @@

    Arguments

    @@ -812,7 +812,7 @@

    Arguments

    @@ -827,7 +827,7 @@

    Arguments

    @@ -842,7 +842,7 @@

    Arguments

    @@ -857,7 +857,7 @@

    Arguments

    @@ -900,7 +900,7 @@

    Arguments

    @@ -915,7 +915,7 @@

    Arguments

    @@ -930,7 +930,7 @@

    Arguments

    @@ -945,7 +945,7 @@

    Arguments

    @@ -960,7 +960,7 @@

    Arguments

    @@ -1003,7 +1003,7 @@

    Arguments

    @@ -1018,7 +1018,7 @@

    Arguments

    @@ -1033,7 +1033,7 @@

    Arguments

    @@ -1048,7 +1048,7 @@

    Arguments

    @@ -1063,7 +1063,7 @@

    Arguments

    @@ -1106,7 +1106,7 @@

    Arguments

    @@ -1121,7 +1121,7 @@

    Arguments

    @@ -1136,7 +1136,7 @@

    Arguments

    @@ -1151,7 +1151,7 @@

    Arguments

    @@ -1166,7 +1166,7 @@

    Arguments

    @@ -1209,7 +1209,7 @@

    Arguments

    @@ -1224,7 +1224,7 @@

    Arguments

    @@ -1239,7 +1239,7 @@

    Arguments

    @@ -1254,7 +1254,7 @@

    Arguments

    @@ -1269,7 +1269,7 @@

    Arguments

    @@ -1312,7 +1312,7 @@

    Arguments

    @@ -1327,7 +1327,7 @@

    Arguments

    @@ -1342,7 +1342,7 @@

    Arguments

    @@ -1357,7 +1357,7 @@

    Arguments

    @@ -1372,7 +1372,7 @@

    Arguments

    @@ -1415,7 +1415,7 @@

    Arguments

    @@ -1430,7 +1430,7 @@

    Arguments

    @@ -1445,7 +1445,7 @@

    Arguments

    @@ -1460,7 +1460,7 @@

    Arguments

    @@ -1475,7 +1475,7 @@

    Arguments

    @@ -1518,7 +1518,7 @@

    Arguments

    @@ -1533,7 +1533,7 @@

    Arguments

    @@ -1548,7 +1548,7 @@

    Arguments

    @@ -1563,7 +1563,7 @@

    Arguments

    @@ -1578,7 +1578,7 @@

    Arguments

    @@ -1636,7 +1636,7 @@

    Arguments

    @@ -1651,7 +1651,7 @@

    Arguments

    @@ -1709,7 +1709,7 @@

    Arguments

    @@ -1724,7 +1724,7 @@

    Arguments

    @@ -1782,7 +1782,7 @@

    Arguments

    @@ -1797,7 +1797,7 @@

    Arguments

    @@ -1855,7 +1855,7 @@

    Arguments

    @@ -1870,7 +1870,7 @@

    Arguments

    @@ -1928,7 +1928,7 @@

    Arguments

    @@ -1943,7 +1943,7 @@

    Arguments

    @@ -2001,7 +2001,7 @@

    Arguments

    @@ -2016,7 +2016,7 @@

    Arguments

    @@ -2384,7 +2384,7 @@

    Arguments

    @@ -2457,7 +2457,7 @@

    Arguments

    @@ -2530,7 +2530,7 @@

    Arguments

    @@ -2603,7 +2603,7 @@

    Arguments

    @@ -2676,7 +2676,7 @@

    Arguments

    @@ -2749,7 +2749,7 @@

    Arguments

    @@ -2836,7 +2836,7 @@

    Arguments

    @@ -2851,7 +2851,7 @@

    Arguments

    @@ -2866,7 +2866,7 @@

    Arguments

    @@ -2881,7 +2881,7 @@

    Arguments

    @@ -2924,7 +2924,7 @@

    Arguments

    @@ -2939,7 +2939,7 @@

    Arguments

    @@ -2954,7 +2954,7 @@

    Arguments

    @@ -2969,7 +2969,7 @@

    Arguments

    @@ -3012,7 +3012,7 @@

    Arguments

    @@ -3027,7 +3027,7 @@

    Arguments

    @@ -3042,7 +3042,7 @@

    Arguments

    @@ -3057,7 +3057,7 @@

    Arguments

    @@ -3100,7 +3100,7 @@

    Arguments

    @@ -3115,7 +3115,7 @@

    Arguments

    @@ -3130,7 +3130,7 @@

    Arguments

    @@ -3145,7 +3145,7 @@

    Arguments

    @@ -3188,7 +3188,7 @@

    Arguments

    @@ -3203,7 +3203,7 @@

    Arguments

    @@ -3218,7 +3218,7 @@

    Arguments

    @@ -3233,7 +3233,7 @@

    Arguments

    @@ -3276,7 +3276,7 @@

    Arguments

    @@ -3291,7 +3291,7 @@

    Arguments

    @@ -3306,7 +3306,7 @@

    Arguments

    @@ -3321,7 +3321,7 @@

    Arguments

    @@ -3364,7 +3364,7 @@

    Arguments

    @@ -3379,7 +3379,7 @@

    Arguments

    @@ -3394,7 +3394,7 @@

    Arguments

    @@ -3409,7 +3409,7 @@

    Arguments

    @@ -3424,7 +3424,7 @@

    Arguments

    @@ -3467,7 +3467,7 @@

    Arguments

    @@ -3482,7 +3482,7 @@

    Arguments

    @@ -3497,7 +3497,7 @@

    Arguments

    @@ -3512,7 +3512,7 @@

    Arguments

    @@ -3527,7 +3527,7 @@

    Arguments

    @@ -3570,7 +3570,7 @@

    Arguments

    @@ -3585,7 +3585,7 @@

    Arguments

    @@ -3600,7 +3600,7 @@

    Arguments

    @@ -3615,7 +3615,7 @@

    Arguments

    @@ -3630,7 +3630,7 @@

    Arguments

    @@ -3673,7 +3673,7 @@

    Arguments

    @@ -3688,7 +3688,7 @@

    Arguments

    @@ -3703,7 +3703,7 @@

    Arguments

    @@ -3718,7 +3718,7 @@

    Arguments

    @@ -3733,7 +3733,7 @@

    Arguments

    @@ -3776,7 +3776,7 @@

    Arguments

    @@ -3791,7 +3791,7 @@

    Arguments

    @@ -3806,7 +3806,7 @@

    Arguments

    @@ -3821,7 +3821,7 @@

    Arguments

    @@ -3836,7 +3836,7 @@

    Arguments

    @@ -3879,7 +3879,7 @@

    Arguments

    @@ -3894,7 +3894,7 @@

    Arguments

    @@ -3909,7 +3909,7 @@

    Arguments

    @@ -3924,7 +3924,7 @@

    Arguments

    @@ -3939,7 +3939,7 @@

    Arguments

    @@ -3998,7 +3998,7 @@

    Arguments

    @@ -4013,7 +4013,7 @@

    Arguments

    @@ -4057,7 +4057,7 @@

    Arguments

    @@ -4072,7 +4072,7 @@

    Arguments

    @@ -4116,7 +4116,7 @@

    Arguments

    @@ -4131,7 +4131,7 @@

    Arguments

    @@ -4175,7 +4175,7 @@

    Arguments

    @@ -4190,7 +4190,7 @@

    Arguments

    @@ -4247,7 +4247,7 @@

    Arguments

    @@ -4262,7 +4262,7 @@

    Arguments

    @@ -4277,7 +4277,7 @@

    Arguments

    @@ -4292,7 +4292,7 @@

    Arguments

    @@ -4307,7 +4307,7 @@

    Arguments

    @@ -4350,7 +4350,7 @@

    Arguments

    @@ -4365,7 +4365,7 @@

    Arguments

    @@ -4380,7 +4380,7 @@

    Arguments

    @@ -4395,7 +4395,7 @@

    Arguments

    @@ -4410,7 +4410,7 @@

    Arguments

    @@ -4453,7 +4453,7 @@

    Arguments

    @@ -4468,7 +4468,7 @@

    Arguments

    @@ -4483,7 +4483,7 @@

    Arguments

    @@ -4498,7 +4498,7 @@

    Arguments

    @@ -4513,7 +4513,7 @@

    Arguments

    @@ -4556,7 +4556,7 @@

    Arguments

    @@ -4571,7 +4571,7 @@

    Arguments

    @@ -4586,7 +4586,7 @@

    Arguments

    @@ -4601,7 +4601,7 @@

    Arguments

    @@ -4616,7 +4616,7 @@

    Arguments

    @@ -4676,7 +4676,7 @@

    Arguments

    @@ -4691,7 +4691,7 @@

    Arguments

    @@ -4734,7 +4734,7 @@

    Arguments

    @@ -4749,7 +4749,7 @@

    Arguments

    @@ -4792,7 +4792,7 @@

    Arguments

    @@ -4807,7 +4807,7 @@

    Arguments

    @@ -4850,7 +4850,7 @@

    Arguments

    @@ -4865,7 +4865,7 @@

    Arguments

    @@ -4908,7 +4908,7 @@

    Arguments

    @@ -4923,7 +4923,7 @@

    Arguments

    @@ -4966,7 +4966,7 @@

    Arguments

    @@ -4981,7 +4981,7 @@

    Arguments

    @@ -5024,7 +5024,7 @@

    Arguments

    @@ -5039,7 +5039,7 @@

    Arguments

    @@ -5082,7 +5082,7 @@

    Arguments

    @@ -5097,7 +5097,7 @@

    Arguments

    @@ -5140,7 +5140,7 @@

    Arguments

    @@ -5155,7 +5155,7 @@

    Arguments

    @@ -5170,7 +5170,7 @@

    Arguments

    @@ -5213,7 +5213,7 @@

    Arguments

    @@ -5228,7 +5228,7 @@

    Arguments

    @@ -5243,7 +5243,7 @@

    Arguments

    @@ -5286,7 +5286,7 @@

    Arguments

    @@ -5301,7 +5301,7 @@

    Arguments

    @@ -5316,7 +5316,7 @@

    Arguments

    @@ -5359,7 +5359,7 @@

    Arguments

    @@ -5374,7 +5374,7 @@

    Arguments

    @@ -5389,7 +5389,7 @@

    Arguments

    @@ -5432,7 +5432,7 @@

    Arguments

    @@ -5447,7 +5447,7 @@

    Arguments

    @@ -5462,7 +5462,7 @@

    Arguments

    @@ -5505,7 +5505,7 @@

    Arguments

    @@ -5520,7 +5520,7 @@

    Arguments

    @@ -5535,7 +5535,7 @@

    Arguments

    @@ -5578,7 +5578,7 @@

    Arguments

    @@ -5593,7 +5593,7 @@

    Arguments

    @@ -5608,7 +5608,7 @@

    Arguments

    @@ -5651,7 +5651,7 @@

    Arguments

    @@ -5666,7 +5666,7 @@

    Arguments

    @@ -5681,7 +5681,7 @@

    Arguments

    @@ -5741,7 +5741,7 @@

    Arguments

    @@ -5756,7 +5756,7 @@

    Arguments

    @@ -5799,7 +5799,7 @@

    Arguments

    @@ -5814,7 +5814,7 @@

    Arguments

    @@ -5829,7 +5829,7 @@

    Arguments

    @@ -5872,7 +5872,7 @@

    Arguments

    @@ -5887,7 +5887,7 @@

    Arguments

    @@ -5902,7 +5902,7 @@

    Arguments

    @@ -5960,7 +5960,7 @@

    Arguments

    @@ -5975,7 +5975,7 @@

    Arguments

    @@ -5990,7 +5990,7 @@

    Arguments

    @@ -6048,7 +6048,7 @@

    Arguments

    @@ -6063,7 +6063,7 @@

    Arguments

    @@ -6078,7 +6078,7 @@

    Arguments

    @@ -6136,7 +6136,7 @@

    Arguments

    @@ -6151,7 +6151,7 @@

    Arguments

    @@ -6194,7 +6194,7 @@

    Arguments

    @@ -6209,7 +6209,7 @@

    Arguments

    @@ -6224,7 +6224,7 @@

    Arguments

    @@ -6267,7 +6267,7 @@

    Arguments

    @@ -6282,7 +6282,7 @@

    Arguments

    @@ -6297,7 +6297,7 @@

    Arguments

    @@ -6355,7 +6355,7 @@

    Arguments

    @@ -6370,7 +6370,7 @@

    Arguments

    @@ -6385,7 +6385,7 @@

    Arguments

    @@ -6443,7 +6443,7 @@

    Arguments

    @@ -6458,7 +6458,7 @@

    Arguments

    @@ -6473,7 +6473,7 @@

    Arguments

    @@ -6531,7 +6531,7 @@

    Arguments

    @@ -6546,7 +6546,7 @@

    Arguments

    @@ -6589,7 +6589,7 @@

    Arguments

    @@ -6604,7 +6604,7 @@

    Arguments

    @@ -6619,7 +6619,7 @@

    Arguments

    @@ -6662,7 +6662,7 @@

    Arguments

    @@ -6677,7 +6677,7 @@

    Arguments

    @@ -6692,7 +6692,7 @@

    Arguments

    @@ -6750,7 +6750,7 @@

    Arguments

    @@ -6765,7 +6765,7 @@

    Arguments

    @@ -6780,7 +6780,7 @@

    Arguments

    @@ -6838,7 +6838,7 @@

    Arguments

    @@ -6853,7 +6853,7 @@

    Arguments

    @@ -6868,7 +6868,7 @@

    Arguments

    @@ -6926,7 +6926,7 @@

    Arguments

    @@ -6941,7 +6941,7 @@

    Arguments

    @@ -6956,7 +6956,7 @@

    Arguments

    @@ -7014,7 +7014,7 @@

    Arguments

    @@ -7029,7 +7029,7 @@

    Arguments

    @@ -7044,7 +7044,7 @@

    Arguments

    @@ -7102,7 +7102,7 @@

    Arguments

    @@ -7117,7 +7117,7 @@

    Arguments

    @@ -7160,7 +7160,7 @@

    Arguments

    @@ -7175,7 +7175,7 @@

    Arguments

    @@ -7190,7 +7190,7 @@

    Arguments

    @@ -7233,7 +7233,7 @@

    Arguments

    @@ -7248,7 +7248,7 @@

    Arguments

    @@ -7263,7 +7263,7 @@

    Arguments

    @@ -7321,7 +7321,7 @@

    Arguments

    @@ -7336,7 +7336,7 @@

    Arguments

    @@ -7351,7 +7351,7 @@

    Arguments

    @@ -7409,7 +7409,7 @@

    Arguments

    @@ -7424,7 +7424,7 @@

    Arguments

    @@ -7439,7 +7439,7 @@

    Arguments

    @@ -7497,7 +7497,7 @@

    Arguments

    @@ -7512,7 +7512,7 @@

    Arguments

    @@ -7555,7 +7555,7 @@

    Arguments

    @@ -7570,7 +7570,7 @@

    Arguments

    @@ -7585,7 +7585,7 @@

    Arguments

    @@ -7628,7 +7628,7 @@

    Arguments

    @@ -7643,7 +7643,7 @@

    Arguments

    @@ -7658,7 +7658,7 @@

    Arguments

    @@ -7716,7 +7716,7 @@

    Arguments

    @@ -7731,7 +7731,7 @@

    Arguments

    @@ -7746,7 +7746,7 @@

    Arguments

    @@ -7804,7 +7804,7 @@

    Arguments

    @@ -7819,7 +7819,7 @@

    Arguments

    @@ -7834,7 +7834,7 @@

    Arguments

    @@ -9671,13 +9671,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math_all_close.html b/module/stdlib_math_all_close.html index 1d2cc3718..37f072e50 100644 --- a/module/stdlib_math_all_close.html +++ b/module/stdlib_math_all_close.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math_arange.html b/module/stdlib_math_arange.html index a09ec95fa..f552ba81f 100644 --- a/module/stdlib_math_arange.html +++ b/module/stdlib_math_arange.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math_diff.html b/module/stdlib_math_diff.html index ab2dd7f54..33830eebb 100644 --- a/module/stdlib_math_diff.html +++ b/module/stdlib_math_diff.html @@ -176,13 +176,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math_is_close.html b/module/stdlib_math_is_close.html index 762a7aa79..56eb0dd2d 100644 --- a/module/stdlib_math_is_close.html +++ b/module/stdlib_math_is_close.html @@ -180,13 +180,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math_linspace.html b/module/stdlib_math_linspace.html index 0ddb7cd26..8de119686 100644 --- a/module/stdlib_math_linspace.html +++ b/module/stdlib_math_linspace.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math_logspace.html b/module/stdlib_math_logspace.html index df37f8917..d66bb0c79 100644 --- a/module/stdlib_math_logspace.html +++ b/module/stdlib_math_logspace.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_math_meshgrid.html b/module/stdlib_math_meshgrid.html index a745245b6..8d9b3d9bc 100644 --- a/module/stdlib_math_meshgrid.html +++ b/module/stdlib_math_meshgrid.html @@ -180,13 +180,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_optval.html b/module/stdlib_optval.html index e01a14693..8226fdc9d 100644 --- a/module/stdlib_optval.html +++ b/module/stdlib_optval.html @@ -208,7 +208,7 @@

    Arguments

    @@ -266,7 +266,7 @@

    Arguments

    @@ -324,7 +324,7 @@

    Arguments

    @@ -382,7 +382,7 @@

    Arguments

    @@ -440,7 +440,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -556,7 +556,7 @@

    Arguments

    @@ -614,7 +614,7 @@

    Arguments

    @@ -672,7 +672,7 @@

    Arguments

    @@ -730,7 +730,7 @@

    Arguments

    @@ -789,13 +789,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_quadrature.html b/module/stdlib_quadrature.html index 9c4ada270..13f24437a 100644 --- a/module/stdlib_quadrature.html +++ b/module/stdlib_quadrature.html @@ -220,7 +220,7 @@

    Arguments

    @@ -235,7 +235,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -383,7 +383,7 @@

    Arguments

    @@ -398,7 +398,7 @@

    Arguments

    @@ -413,7 +413,7 @@

    Arguments

    @@ -456,7 +456,7 @@

    Arguments

    @@ -471,7 +471,7 @@

    Arguments

    @@ -486,7 +486,7 @@

    Arguments

    @@ -529,7 +529,7 @@

    Arguments

    @@ -544,7 +544,7 @@

    Arguments

    @@ -559,7 +559,7 @@

    Arguments

    @@ -602,7 +602,7 @@

    Arguments

    @@ -617,7 +617,7 @@

    Arguments

    @@ -632,7 +632,7 @@

    Arguments

    @@ -689,7 +689,7 @@

    Arguments

    @@ -704,7 +704,7 @@

    Arguments

    @@ -747,7 +747,7 @@

    Arguments

    @@ -762,7 +762,7 @@

    Arguments

    @@ -819,7 +819,7 @@

    Arguments

    @@ -834,7 +834,7 @@

    Arguments

    @@ -877,7 +877,7 @@

    Arguments

    @@ -892,7 +892,7 @@

    Arguments

    @@ -935,7 +935,7 @@

    Arguments

    @@ -950,7 +950,7 @@

    Arguments

    @@ -993,7 +993,7 @@

    Arguments

    @@ -1008,7 +1008,7 @@

    Arguments

    @@ -1065,7 +1065,7 @@

    Arguments

    @@ -1108,7 +1108,7 @@

    Arguments

    @@ -1152,13 +1152,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_quadrature_gauss.html b/module/stdlib_quadrature_gauss.html index 90acab4e9..5bdaed093 100644 --- a/module/stdlib_quadrature_gauss.html +++ b/module/stdlib_quadrature_gauss.html @@ -180,13 +180,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_quadrature_simps.html b/module/stdlib_quadrature_simps.html index 88fc582a4..c999de305 100644 --- a/module/stdlib_quadrature_simps.html +++ b/module/stdlib_quadrature_simps.html @@ -180,13 +180,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_quadrature_trapz.html b/module/stdlib_quadrature_trapz.html index 7afaf4649..365b2dd11 100644 --- a/module/stdlib_quadrature_trapz.html +++ b/module/stdlib_quadrature_trapz.html @@ -180,13 +180,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_random.html b/module/stdlib_random.html index 5db386679..176e3bc9c 100644 --- a/module/stdlib_random.html +++ b/module/stdlib_random.html @@ -209,7 +209,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -347,7 +347,7 @@

    Arguments

    @@ -421,7 +421,7 @@

    Arguments

    @@ -474,7 +474,7 @@

    Arguments

    @@ -527,7 +527,7 @@

    Arguments

    @@ -580,7 +580,7 @@

    Arguments

    @@ -619,13 +619,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_selection.html b/module/stdlib_selection.html index 81065a282..16a5dcdd2 100644 --- a/module/stdlib_selection.html +++ b/module/stdlib_selection.html @@ -204,7 +204,7 @@

    Arguments

    @@ -238,7 +238,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -343,7 +343,7 @@

    Arguments

    @@ -377,7 +377,7 @@

    Arguments

    @@ -409,7 +409,7 @@

    Arguments

    @@ -433,7 +433,7 @@

    Arguments

    @@ -482,7 +482,7 @@

    Arguments

    @@ -516,7 +516,7 @@

    Arguments

    @@ -548,7 +548,7 @@

    Arguments

    @@ -572,7 +572,7 @@

    Arguments

    @@ -621,7 +621,7 @@

    Arguments

    @@ -655,7 +655,7 @@

    Arguments

    @@ -687,7 +687,7 @@

    Arguments

    @@ -711,7 +711,7 @@

    Arguments

    @@ -760,7 +760,7 @@

    Arguments

    @@ -794,7 +794,7 @@

    Arguments

    @@ -826,7 +826,7 @@

    Arguments

    @@ -850,7 +850,7 @@

    Arguments

    @@ -899,7 +899,7 @@

    Arguments

    @@ -933,7 +933,7 @@

    Arguments

    @@ -965,7 +965,7 @@

    Arguments

    @@ -989,7 +989,7 @@

    Arguments

    @@ -1038,7 +1038,7 @@

    Arguments

    @@ -1072,7 +1072,7 @@

    Arguments

    @@ -1104,7 +1104,7 @@

    Arguments

    @@ -1128,7 +1128,7 @@

    Arguments

    @@ -1177,7 +1177,7 @@

    Arguments

    @@ -1211,7 +1211,7 @@

    Arguments

    @@ -1243,7 +1243,7 @@

    Arguments

    @@ -1267,7 +1267,7 @@

    Arguments

    @@ -1316,7 +1316,7 @@

    Arguments

    @@ -1350,7 +1350,7 @@

    Arguments

    @@ -1382,7 +1382,7 @@

    Arguments

    @@ -1406,7 +1406,7 @@

    Arguments

    @@ -1455,7 +1455,7 @@

    Arguments

    @@ -1489,7 +1489,7 @@

    Arguments

    @@ -1521,7 +1521,7 @@

    Arguments

    @@ -1545,7 +1545,7 @@

    Arguments

    @@ -1594,7 +1594,7 @@

    Arguments

    @@ -1628,7 +1628,7 @@

    Arguments

    @@ -1660,7 +1660,7 @@

    Arguments

    @@ -1684,7 +1684,7 @@

    Arguments

    @@ -1733,7 +1733,7 @@

    Arguments

    @@ -1767,7 +1767,7 @@

    Arguments

    @@ -1799,7 +1799,7 @@

    Arguments

    @@ -1823,7 +1823,7 @@

    Arguments

    @@ -1872,7 +1872,7 @@

    Arguments

    @@ -1906,7 +1906,7 @@

    Arguments

    @@ -1938,7 +1938,7 @@

    Arguments

    @@ -1962,7 +1962,7 @@

    Arguments

    @@ -2011,7 +2011,7 @@

    Arguments

    @@ -2045,7 +2045,7 @@

    Arguments

    @@ -2077,7 +2077,7 @@

    Arguments

    @@ -2101,7 +2101,7 @@

    Arguments

    @@ -2150,7 +2150,7 @@

    Arguments

    @@ -2184,7 +2184,7 @@

    Arguments

    @@ -2216,7 +2216,7 @@

    Arguments

    @@ -2240,7 +2240,7 @@

    Arguments

    @@ -2289,7 +2289,7 @@

    Arguments

    @@ -2323,7 +2323,7 @@

    Arguments

    @@ -2355,7 +2355,7 @@

    Arguments

    @@ -2379,7 +2379,7 @@

    Arguments

    @@ -2428,7 +2428,7 @@

    Arguments

    @@ -2462,7 +2462,7 @@

    Arguments

    @@ -2494,7 +2494,7 @@

    Arguments

    @@ -2518,7 +2518,7 @@

    Arguments

    @@ -2567,7 +2567,7 @@

    Arguments

    @@ -2601,7 +2601,7 @@

    Arguments

    @@ -2633,7 +2633,7 @@

    Arguments

    @@ -2657,7 +2657,7 @@

    Arguments

    @@ -2706,7 +2706,7 @@

    Arguments

    @@ -2740,7 +2740,7 @@

    Arguments

    @@ -2772,7 +2772,7 @@

    Arguments

    @@ -2796,7 +2796,7 @@

    Arguments

    @@ -2845,7 +2845,7 @@

    Arguments

    @@ -2879,7 +2879,7 @@

    Arguments

    @@ -2911,7 +2911,7 @@

    Arguments

    @@ -2935,7 +2935,7 @@

    Arguments

    @@ -2984,7 +2984,7 @@

    Arguments

    @@ -3018,7 +3018,7 @@

    Arguments

    @@ -3050,7 +3050,7 @@

    Arguments

    @@ -3074,7 +3074,7 @@

    Arguments

    @@ -3123,7 +3123,7 @@

    Arguments

    @@ -3157,7 +3157,7 @@

    Arguments

    @@ -3189,7 +3189,7 @@

    Arguments

    @@ -3213,7 +3213,7 @@

    Arguments

    @@ -3262,7 +3262,7 @@

    Arguments

    @@ -3296,7 +3296,7 @@

    Arguments

    @@ -3328,7 +3328,7 @@

    Arguments

    @@ -3352,7 +3352,7 @@

    Arguments

    @@ -3401,7 +3401,7 @@

    Arguments

    @@ -3435,7 +3435,7 @@

    Arguments

    @@ -3467,7 +3467,7 @@

    Arguments

    @@ -3491,7 +3491,7 @@

    Arguments

    @@ -3553,7 +3553,7 @@

    Arguments

    @@ -3571,7 +3571,7 @@

    Arguments

    @@ -3603,7 +3603,7 @@

    Arguments

    @@ -3627,7 +3627,7 @@

    Arguments

    @@ -3676,7 +3676,7 @@

    Arguments

    @@ -3694,7 +3694,7 @@

    Arguments

    @@ -3726,7 +3726,7 @@

    Arguments

    @@ -3750,7 +3750,7 @@

    Arguments

    @@ -3799,7 +3799,7 @@

    Arguments

    @@ -3817,7 +3817,7 @@

    Arguments

    @@ -3849,7 +3849,7 @@

    Arguments

    @@ -3873,7 +3873,7 @@

    Arguments

    @@ -3922,7 +3922,7 @@

    Arguments

    @@ -3940,7 +3940,7 @@

    Arguments

    @@ -3972,7 +3972,7 @@

    Arguments

    @@ -3996,7 +3996,7 @@

    Arguments

    @@ -4045,7 +4045,7 @@

    Arguments

    @@ -4063,7 +4063,7 @@

    Arguments

    @@ -4095,7 +4095,7 @@

    Arguments

    @@ -4119,7 +4119,7 @@

    Arguments

    @@ -4168,7 +4168,7 @@

    Arguments

    @@ -4186,7 +4186,7 @@

    Arguments

    @@ -4218,7 +4218,7 @@

    Arguments

    @@ -4242,7 +4242,7 @@

    Arguments

    @@ -4291,7 +4291,7 @@

    Arguments

    @@ -4309,7 +4309,7 @@

    Arguments

    @@ -4341,7 +4341,7 @@

    Arguments

    @@ -4365,7 +4365,7 @@

    Arguments

    @@ -4414,7 +4414,7 @@

    Arguments

    @@ -4432,7 +4432,7 @@

    Arguments

    @@ -4464,7 +4464,7 @@

    Arguments

    @@ -4488,7 +4488,7 @@

    Arguments

    @@ -4537,7 +4537,7 @@

    Arguments

    @@ -4555,7 +4555,7 @@

    Arguments

    @@ -4587,7 +4587,7 @@

    Arguments

    @@ -4611,7 +4611,7 @@

    Arguments

    @@ -4660,7 +4660,7 @@

    Arguments

    @@ -4678,7 +4678,7 @@

    Arguments

    @@ -4710,7 +4710,7 @@

    Arguments

    @@ -4734,7 +4734,7 @@

    Arguments

    @@ -4783,7 +4783,7 @@

    Arguments

    @@ -4801,7 +4801,7 @@

    Arguments

    @@ -4833,7 +4833,7 @@

    Arguments

    @@ -4857,7 +4857,7 @@

    Arguments

    @@ -4906,7 +4906,7 @@

    Arguments

    @@ -4924,7 +4924,7 @@

    Arguments

    @@ -4956,7 +4956,7 @@

    Arguments

    @@ -4980,7 +4980,7 @@

    Arguments

    @@ -5029,7 +5029,7 @@

    Arguments

    @@ -5047,7 +5047,7 @@

    Arguments

    @@ -5079,7 +5079,7 @@

    Arguments

    @@ -5103,7 +5103,7 @@

    Arguments

    @@ -5152,7 +5152,7 @@

    Arguments

    @@ -5170,7 +5170,7 @@

    Arguments

    @@ -5202,7 +5202,7 @@

    Arguments

    @@ -5226,7 +5226,7 @@

    Arguments

    @@ -5275,7 +5275,7 @@

    Arguments

    @@ -5293,7 +5293,7 @@

    Arguments

    @@ -5325,7 +5325,7 @@

    Arguments

    @@ -5349,7 +5349,7 @@

    Arguments

    @@ -5398,7 +5398,7 @@

    Arguments

    @@ -5416,7 +5416,7 @@

    Arguments

    @@ -5448,7 +5448,7 @@

    Arguments

    @@ -5472,7 +5472,7 @@

    Arguments

    @@ -5521,7 +5521,7 @@

    Arguments

    @@ -5539,7 +5539,7 @@

    Arguments

    @@ -5571,7 +5571,7 @@

    Arguments

    @@ -5595,7 +5595,7 @@

    Arguments

    @@ -5644,7 +5644,7 @@

    Arguments

    @@ -5662,7 +5662,7 @@

    Arguments

    @@ -5694,7 +5694,7 @@

    Arguments

    @@ -5718,7 +5718,7 @@

    Arguments

    @@ -5767,7 +5767,7 @@

    Arguments

    @@ -5785,7 +5785,7 @@

    Arguments

    @@ -5817,7 +5817,7 @@

    Arguments

    @@ -5841,7 +5841,7 @@

    Arguments

    @@ -5890,7 +5890,7 @@

    Arguments

    @@ -5908,7 +5908,7 @@

    Arguments

    @@ -5940,7 +5940,7 @@

    Arguments

    @@ -5964,7 +5964,7 @@

    Arguments

    @@ -6013,7 +6013,7 @@

    Arguments

    @@ -6031,7 +6031,7 @@

    Arguments

    @@ -6063,7 +6063,7 @@

    Arguments

    @@ -6087,7 +6087,7 @@

    Arguments

    @@ -6136,7 +6136,7 @@

    Arguments

    @@ -6154,7 +6154,7 @@

    Arguments

    @@ -6186,7 +6186,7 @@

    Arguments

    @@ -6210,7 +6210,7 @@

    Arguments

    @@ -6259,7 +6259,7 @@

    Arguments

    @@ -6277,7 +6277,7 @@

    Arguments

    @@ -6309,7 +6309,7 @@

    Arguments

    @@ -6333,7 +6333,7 @@

    Arguments

    @@ -6382,7 +6382,7 @@

    Arguments

    @@ -6400,7 +6400,7 @@

    Arguments

    @@ -6432,7 +6432,7 @@

    Arguments

    @@ -6456,7 +6456,7 @@

    Arguments

    @@ -6504,13 +6504,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_sorting.html b/module/stdlib_sorting.html index b8bcebda7..93096da3d 100644 --- a/module/stdlib_sorting.html +++ b/module/stdlib_sorting.html @@ -444,9 +444,9 @@

    Uses

    @@ -2396,7 +2396,7 @@

    Arguments

    @@ -2498,7 +2498,7 @@

    Arguments

    @@ -2600,7 +2600,7 @@

    Arguments

    @@ -2702,7 +2702,7 @@

    Arguments

    @@ -2804,7 +2804,7 @@

    Arguments

    @@ -2906,7 +2906,7 @@

    Arguments

    @@ -3008,7 +3008,7 @@

    Arguments

    @@ -3110,7 +3110,7 @@

    Arguments

    @@ -3212,7 +3212,7 @@

    Arguments

    @@ -3314,7 +3314,7 @@

    Arguments

    @@ -3416,7 +3416,7 @@

    Arguments

    @@ -3518,7 +3518,7 @@

    Arguments

    @@ -3620,7 +3620,7 @@

    Arguments

    @@ -3722,7 +3722,7 @@

    Arguments

    @@ -3824,7 +3824,7 @@

    Arguments

    @@ -3926,7 +3926,7 @@

    Arguments

    @@ -4028,7 +4028,7 @@

    Arguments

    @@ -4130,7 +4130,7 @@

    Arguments

    @@ -4232,7 +4232,7 @@

    Arguments

    @@ -4316,13 +4316,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_sorting_ord_sort.html b/module/stdlib_sorting_ord_sort.html index ad03f0e5b..a26d81836 100644 --- a/module/stdlib_sorting_ord_sort.html +++ b/module/stdlib_sorting_ord_sort.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_sorting_radix_sort.html b/module/stdlib_sorting_radix_sort.html index d62498888..76295576c 100644 --- a/module/stdlib_sorting_radix_sort.html +++ b/module/stdlib_sorting_radix_sort.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_sorting_sort.html b/module/stdlib_sorting_sort.html index 75041c1dc..a303ceb85 100644 --- a/module/stdlib_sorting_sort.html +++ b/module/stdlib_sorting_sort.html @@ -185,13 +185,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_sorting_sort_index.html b/module/stdlib_sorting_sort_index.html index c9d1e2df0..8fe5f2695 100644 --- a/module/stdlib_sorting_sort_index.html +++ b/module/stdlib_sorting_sort_index.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_specialfunctions.html b/module/stdlib_specialfunctions.html index 56639560d..d7f39cefe 100644 --- a/module/stdlib_specialfunctions.html +++ b/module/stdlib_specialfunctions.html @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -344,13 +344,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_specialfunctions_gamma.html b/module/stdlib_specialfunctions_gamma.html index 7dbbc8b03..904b7a862 100644 --- a/module/stdlib_specialfunctions_gamma.html +++ b/module/stdlib_specialfunctions_gamma.html @@ -164,8 +164,8 @@

    Uses

  • @@ -210,7 +210,7 @@

    Arguments

    @@ -253,7 +253,7 @@

    Arguments

    @@ -296,7 +296,7 @@

    Arguments

    @@ -339,7 +339,7 @@

    Arguments

    @@ -382,7 +382,7 @@

    Arguments

    @@ -425,7 +425,7 @@

    Arguments

    @@ -481,7 +481,7 @@

    Arguments

    @@ -524,7 +524,7 @@

    Arguments

    @@ -567,7 +567,7 @@

    Arguments

    @@ -610,7 +610,7 @@

    Arguments

    @@ -666,7 +666,7 @@

    Arguments

    @@ -709,7 +709,7 @@

    Arguments

    @@ -752,7 +752,7 @@

    Arguments

    @@ -795,7 +795,7 @@

    Arguments

    @@ -838,7 +838,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -937,7 +937,7 @@

    Arguments

    @@ -952,7 +952,7 @@

    Arguments

    @@ -995,7 +995,7 @@

    Arguments

    @@ -1010,7 +1010,7 @@

    Arguments

    @@ -1053,7 +1053,7 @@

    Arguments

    @@ -1068,7 +1068,7 @@

    Arguments

    @@ -1111,7 +1111,7 @@

    Arguments

    @@ -1126,7 +1126,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1227,7 +1227,7 @@

    Arguments

    @@ -1242,7 +1242,7 @@

    Arguments

    @@ -1285,7 +1285,7 @@

    Arguments

    @@ -1300,7 +1300,7 @@

    Arguments

    @@ -1343,7 +1343,7 @@

    Arguments

    @@ -1358,7 +1358,7 @@

    Arguments

    @@ -1401,7 +1401,7 @@

    Arguments

    @@ -1416,7 +1416,7 @@

    Arguments

    @@ -1459,7 +1459,7 @@

    Arguments

    @@ -1474,7 +1474,7 @@

    Arguments

    @@ -1530,7 +1530,7 @@

    Arguments

    @@ -1545,7 +1545,7 @@

    Arguments

    @@ -1588,7 +1588,7 @@

    Arguments

    @@ -1603,7 +1603,7 @@

    Arguments

    @@ -1646,7 +1646,7 @@

    Arguments

    @@ -1661,7 +1661,7 @@

    Arguments

    @@ -1704,7 +1704,7 @@

    Arguments

    @@ -1719,7 +1719,7 @@

    Arguments

    @@ -1762,7 +1762,7 @@

    Arguments

    @@ -1777,7 +1777,7 @@

    Arguments

    @@ -1820,7 +1820,7 @@

    Arguments

    @@ -1835,7 +1835,7 @@

    Arguments

    @@ -1878,7 +1878,7 @@

    Arguments

    @@ -1893,7 +1893,7 @@

    Arguments

    @@ -1936,7 +1936,7 @@

    Arguments

    @@ -1951,7 +1951,7 @@

    Arguments

    @@ -1994,7 +1994,7 @@

    Arguments

    @@ -2009,7 +2009,7 @@

    Arguments

    @@ -2052,7 +2052,7 @@

    Arguments

    @@ -2067,7 +2067,7 @@

    Arguments

    @@ -2123,7 +2123,7 @@

    Arguments

    @@ -2138,7 +2138,7 @@

    Arguments

    @@ -2181,7 +2181,7 @@

    Arguments

    @@ -2196,7 +2196,7 @@

    Arguments

    @@ -2239,7 +2239,7 @@

    Arguments

    @@ -2254,7 +2254,7 @@

    Arguments

    @@ -2297,7 +2297,7 @@

    Arguments

    @@ -2312,7 +2312,7 @@

    Arguments

    @@ -2355,7 +2355,7 @@

    Arguments

    @@ -2370,7 +2370,7 @@

    Arguments

    @@ -2413,7 +2413,7 @@

    Arguments

    @@ -2428,7 +2428,7 @@

    Arguments

    @@ -2471,7 +2471,7 @@

    Arguments

    @@ -2486,7 +2486,7 @@

    Arguments

    @@ -2529,7 +2529,7 @@

    Arguments

    @@ -2544,7 +2544,7 @@

    Arguments

    @@ -2587,7 +2587,7 @@

    Arguments

    @@ -2602,7 +2602,7 @@

    Arguments

    @@ -2645,7 +2645,7 @@

    Arguments

    @@ -2660,7 +2660,7 @@

    Arguments

    @@ -2716,7 +2716,7 @@

    Arguments

    @@ -2731,7 +2731,7 @@

    Arguments

    @@ -2774,7 +2774,7 @@

    Arguments

    @@ -2789,7 +2789,7 @@

    Arguments

    @@ -2832,7 +2832,7 @@

    Arguments

    @@ -2847,7 +2847,7 @@

    Arguments

    @@ -2890,7 +2890,7 @@

    Arguments

    @@ -2905,7 +2905,7 @@

    Arguments

    @@ -2948,7 +2948,7 @@

    Arguments

    @@ -2963,7 +2963,7 @@

    Arguments

    @@ -3006,7 +3006,7 @@

    Arguments

    @@ -3021,7 +3021,7 @@

    Arguments

    @@ -3064,7 +3064,7 @@

    Arguments

    @@ -3079,7 +3079,7 @@

    Arguments

    @@ -3122,7 +3122,7 @@

    Arguments

    @@ -3137,7 +3137,7 @@

    Arguments

    @@ -3180,7 +3180,7 @@

    Arguments

    @@ -3195,7 +3195,7 @@

    Arguments

    @@ -3238,7 +3238,7 @@

    Arguments

    @@ -3253,7 +3253,7 @@

    Arguments

    @@ -3309,7 +3309,7 @@

    Arguments

    @@ -3324,7 +3324,7 @@

    Arguments

    @@ -3367,7 +3367,7 @@

    Arguments

    @@ -3382,7 +3382,7 @@

    Arguments

    @@ -3425,7 +3425,7 @@

    Arguments

    @@ -3440,7 +3440,7 @@

    Arguments

    @@ -3483,7 +3483,7 @@

    Arguments

    @@ -3498,7 +3498,7 @@

    Arguments

    @@ -3541,7 +3541,7 @@

    Arguments

    @@ -3556,7 +3556,7 @@

    Arguments

    @@ -3599,7 +3599,7 @@

    Arguments

    @@ -3614,7 +3614,7 @@

    Arguments

    @@ -3657,7 +3657,7 @@

    Arguments

    @@ -3672,7 +3672,7 @@

    Arguments

    @@ -3715,7 +3715,7 @@

    Arguments

    @@ -3730,7 +3730,7 @@

    Arguments

    @@ -3773,7 +3773,7 @@

    Arguments

    @@ -3788,7 +3788,7 @@

    Arguments

    @@ -3831,7 +3831,7 @@

    Arguments

    @@ -3846,7 +3846,7 @@

    Arguments

    @@ -3902,7 +3902,7 @@

    Arguments

    @@ -3917,7 +3917,7 @@

    Arguments

    @@ -3960,7 +3960,7 @@

    Arguments

    @@ -3975,7 +3975,7 @@

    Arguments

    @@ -4018,7 +4018,7 @@

    Arguments

    @@ -4033,7 +4033,7 @@

    Arguments

    @@ -4076,7 +4076,7 @@

    Arguments

    @@ -4091,7 +4091,7 @@

    Arguments

    @@ -4134,7 +4134,7 @@

    Arguments

    @@ -4149,7 +4149,7 @@

    Arguments

    @@ -4192,7 +4192,7 @@

    Arguments

    @@ -4207,7 +4207,7 @@

    Arguments

    @@ -4250,7 +4250,7 @@

    Arguments

    @@ -4265,7 +4265,7 @@

    Arguments

    @@ -4308,7 +4308,7 @@

    Arguments

    @@ -4323,7 +4323,7 @@

    Arguments

    @@ -4366,7 +4366,7 @@

    Arguments

    @@ -4381,7 +4381,7 @@

    Arguments

    @@ -4424,7 +4424,7 @@

    Arguments

    @@ -4439,7 +4439,7 @@

    Arguments

    @@ -4483,13 +4483,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_specialfunctions_legendre.html b/module/stdlib_specialfunctions_legendre.html index ca0198ba3..8fc2fa7b0 100644 --- a/module/stdlib_specialfunctions_legendre.html +++ b/module/stdlib_specialfunctions_legendre.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_stats.html b/module/stdlib_stats.html index ab53875c6..362d773e2 100644 --- a/module/stdlib_stats.html +++ b/module/stdlib_stats.html @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -332,7 +332,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -390,7 +390,7 @@

    Arguments

    @@ -405,7 +405,7 @@

    Arguments

    @@ -448,7 +448,7 @@

    Arguments

    @@ -463,7 +463,7 @@

    Arguments

    @@ -478,7 +478,7 @@

    Arguments

    @@ -521,7 +521,7 @@

    Arguments

    @@ -536,7 +536,7 @@

    Arguments

    @@ -551,7 +551,7 @@

    Arguments

    @@ -594,7 +594,7 @@

    Arguments

    @@ -609,7 +609,7 @@

    Arguments

    @@ -624,7 +624,7 @@

    Arguments

    @@ -667,7 +667,7 @@

    Arguments

    @@ -682,7 +682,7 @@

    Arguments

    @@ -697,7 +697,7 @@

    Arguments

    @@ -740,7 +740,7 @@

    Arguments

    @@ -755,7 +755,7 @@

    Arguments

    @@ -770,7 +770,7 @@

    Arguments

    @@ -813,7 +813,7 @@

    Arguments

    @@ -828,7 +828,7 @@

    Arguments

    @@ -843,7 +843,7 @@

    Arguments

    @@ -886,7 +886,7 @@

    Arguments

    @@ -901,7 +901,7 @@

    Arguments

    @@ -916,7 +916,7 @@

    Arguments

    @@ -959,7 +959,7 @@

    Arguments

    @@ -974,7 +974,7 @@

    Arguments

    @@ -989,7 +989,7 @@

    Arguments

    @@ -1032,7 +1032,7 @@

    Arguments

    @@ -1047,7 +1047,7 @@

    Arguments

    @@ -1062,7 +1062,7 @@

    Arguments

    @@ -1105,7 +1105,7 @@

    Arguments

    @@ -1120,7 +1120,7 @@

    Arguments

    @@ -1135,7 +1135,7 @@

    Arguments

    @@ -1178,7 +1178,7 @@

    Arguments

    @@ -1193,7 +1193,7 @@

    Arguments

    @@ -1208,7 +1208,7 @@

    Arguments

    @@ -1251,7 +1251,7 @@

    Arguments

    @@ -1266,7 +1266,7 @@

    Arguments

    @@ -1281,7 +1281,7 @@

    Arguments

    @@ -1324,7 +1324,7 @@

    Arguments

    @@ -1339,7 +1339,7 @@

    Arguments

    @@ -1354,7 +1354,7 @@

    Arguments

    @@ -1397,7 +1397,7 @@

    Arguments

    @@ -1412,7 +1412,7 @@

    Arguments

    @@ -1427,7 +1427,7 @@

    Arguments

    @@ -1470,7 +1470,7 @@

    Arguments

    @@ -1485,7 +1485,7 @@

    Arguments

    @@ -1500,7 +1500,7 @@

    Arguments

    @@ -1543,7 +1543,7 @@

    Arguments

    @@ -1558,7 +1558,7 @@

    Arguments

    @@ -1573,7 +1573,7 @@

    Arguments

    @@ -1616,7 +1616,7 @@

    Arguments

    @@ -1631,7 +1631,7 @@

    Arguments

    @@ -1646,7 +1646,7 @@

    Arguments

    @@ -1689,7 +1689,7 @@

    Arguments

    @@ -1704,7 +1704,7 @@

    Arguments

    @@ -1719,7 +1719,7 @@

    Arguments

    @@ -1762,7 +1762,7 @@

    Arguments

    @@ -1777,7 +1777,7 @@

    Arguments

    @@ -1792,7 +1792,7 @@

    Arguments

    @@ -1835,7 +1835,7 @@

    Arguments

    @@ -1850,7 +1850,7 @@

    Arguments

    @@ -1865,7 +1865,7 @@

    Arguments

    @@ -1908,7 +1908,7 @@

    Arguments

    @@ -1923,7 +1923,7 @@

    Arguments

    @@ -1938,7 +1938,7 @@

    Arguments

    @@ -1981,7 +1981,7 @@

    Arguments

    @@ -1996,7 +1996,7 @@

    Arguments

    @@ -2011,7 +2011,7 @@

    Arguments

    @@ -2054,7 +2054,7 @@

    Arguments

    @@ -2069,7 +2069,7 @@

    Arguments

    @@ -2084,7 +2084,7 @@

    Arguments

    @@ -2127,7 +2127,7 @@

    Arguments

    @@ -2142,7 +2142,7 @@

    Arguments

    @@ -2157,7 +2157,7 @@

    Arguments

    @@ -2200,7 +2200,7 @@

    Arguments

    @@ -2215,7 +2215,7 @@

    Arguments

    @@ -2230,7 +2230,7 @@

    Arguments

    @@ -2273,7 +2273,7 @@

    Arguments

    @@ -2288,7 +2288,7 @@

    Arguments

    @@ -2303,7 +2303,7 @@

    Arguments

    @@ -2346,7 +2346,7 @@

    Arguments

    @@ -2361,7 +2361,7 @@

    Arguments

    @@ -2376,7 +2376,7 @@

    Arguments

    @@ -2419,7 +2419,7 @@

    Arguments

    @@ -2434,7 +2434,7 @@

    Arguments

    @@ -2449,7 +2449,7 @@

    Arguments

    @@ -2492,7 +2492,7 @@

    Arguments

    @@ -2507,7 +2507,7 @@

    Arguments

    @@ -2522,7 +2522,7 @@

    Arguments

    @@ -2579,7 +2579,7 @@

    Arguments

    @@ -2594,7 +2594,7 @@

    Arguments

    @@ -2609,7 +2609,7 @@

    Arguments

    @@ -2624,7 +2624,7 @@

    Arguments

    @@ -2667,7 +2667,7 @@

    Arguments

    @@ -2682,7 +2682,7 @@

    Arguments

    @@ -2697,7 +2697,7 @@

    Arguments

    @@ -2712,7 +2712,7 @@

    Arguments

    @@ -2755,7 +2755,7 @@

    Arguments

    @@ -2770,7 +2770,7 @@

    Arguments

    @@ -2785,7 +2785,7 @@

    Arguments

    @@ -2800,7 +2800,7 @@

    Arguments

    @@ -2843,7 +2843,7 @@

    Arguments

    @@ -2858,7 +2858,7 @@

    Arguments

    @@ -2873,7 +2873,7 @@

    Arguments

    @@ -2888,7 +2888,7 @@

    Arguments

    @@ -2931,7 +2931,7 @@

    Arguments

    @@ -2946,7 +2946,7 @@

    Arguments

    @@ -2961,7 +2961,7 @@

    Arguments

    @@ -2976,7 +2976,7 @@

    Arguments

    @@ -3019,7 +3019,7 @@

    Arguments

    @@ -3034,7 +3034,7 @@

    Arguments

    @@ -3049,7 +3049,7 @@

    Arguments

    @@ -3064,7 +3064,7 @@

    Arguments

    @@ -3107,7 +3107,7 @@

    Arguments

    @@ -3122,7 +3122,7 @@

    Arguments

    @@ -3137,7 +3137,7 @@

    Arguments

    @@ -3152,7 +3152,7 @@

    Arguments

    @@ -3195,7 +3195,7 @@

    Arguments

    @@ -3210,7 +3210,7 @@

    Arguments

    @@ -3225,7 +3225,7 @@

    Arguments

    @@ -3240,7 +3240,7 @@

    Arguments

    @@ -3283,7 +3283,7 @@

    Arguments

    @@ -3298,7 +3298,7 @@

    Arguments

    @@ -3313,7 +3313,7 @@

    Arguments

    @@ -3328,7 +3328,7 @@

    Arguments

    @@ -3371,7 +3371,7 @@

    Arguments

    @@ -3386,7 +3386,7 @@

    Arguments

    @@ -3401,7 +3401,7 @@

    Arguments

    @@ -3416,7 +3416,7 @@

    Arguments

    @@ -3459,7 +3459,7 @@

    Arguments

    @@ -3474,7 +3474,7 @@

    Arguments

    @@ -3489,7 +3489,7 @@

    Arguments

    @@ -3504,7 +3504,7 @@

    Arguments

    @@ -3547,7 +3547,7 @@

    Arguments

    @@ -3562,7 +3562,7 @@

    Arguments

    @@ -3577,7 +3577,7 @@

    Arguments

    @@ -3592,7 +3592,7 @@

    Arguments

    @@ -3635,7 +3635,7 @@

    Arguments

    @@ -3650,7 +3650,7 @@

    Arguments

    @@ -3665,7 +3665,7 @@

    Arguments

    @@ -3680,7 +3680,7 @@

    Arguments

    @@ -3723,7 +3723,7 @@

    Arguments

    @@ -3738,7 +3738,7 @@

    Arguments

    @@ -3753,7 +3753,7 @@

    Arguments

    @@ -3768,7 +3768,7 @@

    Arguments

    @@ -3811,7 +3811,7 @@

    Arguments

    @@ -3826,7 +3826,7 @@

    Arguments

    @@ -3841,7 +3841,7 @@

    Arguments

    @@ -3856,7 +3856,7 @@

    Arguments

    @@ -3899,7 +3899,7 @@

    Arguments

    @@ -3914,7 +3914,7 @@

    Arguments

    @@ -3929,7 +3929,7 @@

    Arguments

    @@ -3944,7 +3944,7 @@

    Arguments

    @@ -3987,7 +3987,7 @@

    Arguments

    @@ -4002,7 +4002,7 @@

    Arguments

    @@ -4017,7 +4017,7 @@

    Arguments

    @@ -4032,7 +4032,7 @@

    Arguments

    @@ -4075,7 +4075,7 @@

    Arguments

    @@ -4090,7 +4090,7 @@

    Arguments

    @@ -4105,7 +4105,7 @@

    Arguments

    @@ -4120,7 +4120,7 @@

    Arguments

    @@ -4163,7 +4163,7 @@

    Arguments

    @@ -4178,7 +4178,7 @@

    Arguments

    @@ -4193,7 +4193,7 @@

    Arguments

    @@ -4208,7 +4208,7 @@

    Arguments

    @@ -4251,7 +4251,7 @@

    Arguments

    @@ -4266,7 +4266,7 @@

    Arguments

    @@ -4281,7 +4281,7 @@

    Arguments

    @@ -4296,7 +4296,7 @@

    Arguments

    @@ -4339,7 +4339,7 @@

    Arguments

    @@ -4354,7 +4354,7 @@

    Arguments

    @@ -4369,7 +4369,7 @@

    Arguments

    @@ -4384,7 +4384,7 @@

    Arguments

    @@ -4427,7 +4427,7 @@

    Arguments

    @@ -4442,7 +4442,7 @@

    Arguments

    @@ -4457,7 +4457,7 @@

    Arguments

    @@ -4472,7 +4472,7 @@

    Arguments

    @@ -4515,7 +4515,7 @@

    Arguments

    @@ -4530,7 +4530,7 @@

    Arguments

    @@ -4545,7 +4545,7 @@

    Arguments

    @@ -4560,7 +4560,7 @@

    Arguments

    @@ -4603,7 +4603,7 @@

    Arguments

    @@ -4618,7 +4618,7 @@

    Arguments

    @@ -4633,7 +4633,7 @@

    Arguments

    @@ -4648,7 +4648,7 @@

    Arguments

    @@ -4691,7 +4691,7 @@

    Arguments

    @@ -4706,7 +4706,7 @@

    Arguments

    @@ -4721,7 +4721,7 @@

    Arguments

    @@ -4736,7 +4736,7 @@

    Arguments

    @@ -4779,7 +4779,7 @@

    Arguments

    @@ -4794,7 +4794,7 @@

    Arguments

    @@ -4809,7 +4809,7 @@

    Arguments

    @@ -4824,7 +4824,7 @@

    Arguments

    @@ -4867,7 +4867,7 @@

    Arguments

    @@ -4882,7 +4882,7 @@

    Arguments

    @@ -4897,7 +4897,7 @@

    Arguments

    @@ -4912,7 +4912,7 @@

    Arguments

    @@ -4955,7 +4955,7 @@

    Arguments

    @@ -4970,7 +4970,7 @@

    Arguments

    @@ -4985,7 +4985,7 @@

    Arguments

    @@ -5000,7 +5000,7 @@

    Arguments

    @@ -5043,7 +5043,7 @@

    Arguments

    @@ -5058,7 +5058,7 @@

    Arguments

    @@ -5073,7 +5073,7 @@

    Arguments

    @@ -5088,7 +5088,7 @@

    Arguments

    @@ -5131,7 +5131,7 @@

    Arguments

    @@ -5146,7 +5146,7 @@

    Arguments

    @@ -5161,7 +5161,7 @@

    Arguments

    @@ -5176,7 +5176,7 @@

    Arguments

    @@ -5219,7 +5219,7 @@

    Arguments

    @@ -5234,7 +5234,7 @@

    Arguments

    @@ -5249,7 +5249,7 @@

    Arguments

    @@ -5264,7 +5264,7 @@

    Arguments

    @@ -5307,7 +5307,7 @@

    Arguments

    @@ -5322,7 +5322,7 @@

    Arguments

    @@ -5337,7 +5337,7 @@

    Arguments

    @@ -5352,7 +5352,7 @@

    Arguments

    @@ -5409,7 +5409,7 @@

    Arguments

    @@ -5424,7 +5424,7 @@

    Arguments

    @@ -5439,7 +5439,7 @@

    Arguments

    @@ -5482,7 +5482,7 @@

    Arguments

    @@ -5497,7 +5497,7 @@

    Arguments

    @@ -5512,7 +5512,7 @@

    Arguments

    @@ -5555,7 +5555,7 @@

    Arguments

    @@ -5570,7 +5570,7 @@

    Arguments

    @@ -5585,7 +5585,7 @@

    Arguments

    @@ -5628,7 +5628,7 @@

    Arguments

    @@ -5643,7 +5643,7 @@

    Arguments

    @@ -5658,7 +5658,7 @@

    Arguments

    @@ -5701,7 +5701,7 @@

    Arguments

    @@ -5716,7 +5716,7 @@

    Arguments

    @@ -5731,7 +5731,7 @@

    Arguments

    @@ -5774,7 +5774,7 @@

    Arguments

    @@ -5789,7 +5789,7 @@

    Arguments

    @@ -5804,7 +5804,7 @@

    Arguments

    @@ -5847,7 +5847,7 @@

    Arguments

    @@ -5862,7 +5862,7 @@

    Arguments

    @@ -5877,7 +5877,7 @@

    Arguments

    @@ -5920,7 +5920,7 @@

    Arguments

    @@ -5935,7 +5935,7 @@

    Arguments

    @@ -5950,7 +5950,7 @@

    Arguments

    @@ -5993,7 +5993,7 @@

    Arguments

    @@ -6008,7 +6008,7 @@

    Arguments

    @@ -6023,7 +6023,7 @@

    Arguments

    @@ -6066,7 +6066,7 @@

    Arguments

    @@ -6081,7 +6081,7 @@

    Arguments

    @@ -6096,7 +6096,7 @@

    Arguments

    @@ -6139,7 +6139,7 @@

    Arguments

    @@ -6154,7 +6154,7 @@

    Arguments

    @@ -6169,7 +6169,7 @@

    Arguments

    @@ -6212,7 +6212,7 @@

    Arguments

    @@ -6227,7 +6227,7 @@

    Arguments

    @@ -6242,7 +6242,7 @@

    Arguments

    @@ -6285,7 +6285,7 @@

    Arguments

    @@ -6300,7 +6300,7 @@

    Arguments

    @@ -6315,7 +6315,7 @@

    Arguments

    @@ -6358,7 +6358,7 @@

    Arguments

    @@ -6373,7 +6373,7 @@

    Arguments

    @@ -6388,7 +6388,7 @@

    Arguments

    @@ -6431,7 +6431,7 @@

    Arguments

    @@ -6446,7 +6446,7 @@

    Arguments

    @@ -6461,7 +6461,7 @@

    Arguments

    @@ -6504,7 +6504,7 @@

    Arguments

    @@ -6519,7 +6519,7 @@

    Arguments

    @@ -6534,7 +6534,7 @@

    Arguments

    @@ -6577,7 +6577,7 @@

    Arguments

    @@ -6592,7 +6592,7 @@

    Arguments

    @@ -6607,7 +6607,7 @@

    Arguments

    @@ -6650,7 +6650,7 @@

    Arguments

    @@ -6665,7 +6665,7 @@

    Arguments

    @@ -6680,7 +6680,7 @@

    Arguments

    @@ -6723,7 +6723,7 @@

    Arguments

    @@ -6738,7 +6738,7 @@

    Arguments

    @@ -6753,7 +6753,7 @@

    Arguments

    @@ -6796,7 +6796,7 @@

    Arguments

    @@ -6811,7 +6811,7 @@

    Arguments

    @@ -6826,7 +6826,7 @@

    Arguments

    @@ -6869,7 +6869,7 @@

    Arguments

    @@ -6884,7 +6884,7 @@

    Arguments

    @@ -6899,7 +6899,7 @@

    Arguments

    @@ -6942,7 +6942,7 @@

    Arguments

    @@ -6957,7 +6957,7 @@

    Arguments

    @@ -6972,7 +6972,7 @@

    Arguments

    @@ -7015,7 +7015,7 @@

    Arguments

    @@ -7030,7 +7030,7 @@

    Arguments

    @@ -7045,7 +7045,7 @@

    Arguments

    @@ -7088,7 +7088,7 @@

    Arguments

    @@ -7103,7 +7103,7 @@

    Arguments

    @@ -7118,7 +7118,7 @@

    Arguments

    @@ -7161,7 +7161,7 @@

    Arguments

    @@ -7176,7 +7176,7 @@

    Arguments

    @@ -7219,7 +7219,7 @@

    Arguments

    @@ -7234,7 +7234,7 @@

    Arguments

    @@ -7277,7 +7277,7 @@

    Arguments

    @@ -7292,7 +7292,7 @@

    Arguments

    @@ -7335,7 +7335,7 @@

    Arguments

    @@ -7350,7 +7350,7 @@

    Arguments

    @@ -7393,7 +7393,7 @@

    Arguments

    @@ -7408,7 +7408,7 @@

    Arguments

    @@ -7451,7 +7451,7 @@

    Arguments

    @@ -7466,7 +7466,7 @@

    Arguments

    @@ -7509,7 +7509,7 @@

    Arguments

    @@ -7524,7 +7524,7 @@

    Arguments

    @@ -7567,7 +7567,7 @@

    Arguments

    @@ -7582,7 +7582,7 @@

    Arguments

    @@ -7625,7 +7625,7 @@

    Arguments

    @@ -7640,7 +7640,7 @@

    Arguments

    @@ -7683,7 +7683,7 @@

    Arguments

    @@ -7698,7 +7698,7 @@

    Arguments

    @@ -7741,7 +7741,7 @@

    Arguments

    @@ -7756,7 +7756,7 @@

    Arguments

    @@ -7799,7 +7799,7 @@

    Arguments

    @@ -7814,7 +7814,7 @@

    Arguments

    @@ -7857,7 +7857,7 @@

    Arguments

    @@ -7872,7 +7872,7 @@

    Arguments

    @@ -7915,7 +7915,7 @@

    Arguments

    @@ -7930,7 +7930,7 @@

    Arguments

    @@ -7973,7 +7973,7 @@

    Arguments

    @@ -7988,7 +7988,7 @@

    Arguments

    @@ -8031,7 +8031,7 @@

    Arguments

    @@ -8046,7 +8046,7 @@

    Arguments

    @@ -8089,7 +8089,7 @@

    Arguments

    @@ -8104,7 +8104,7 @@

    Arguments

    @@ -8147,7 +8147,7 @@

    Arguments

    @@ -8162,7 +8162,7 @@

    Arguments

    @@ -8205,7 +8205,7 @@

    Arguments

    @@ -8220,7 +8220,7 @@

    Arguments

    @@ -8263,7 +8263,7 @@

    Arguments

    @@ -8278,7 +8278,7 @@

    Arguments

    @@ -8321,7 +8321,7 @@

    Arguments

    @@ -8336,7 +8336,7 @@

    Arguments

    @@ -8379,7 +8379,7 @@

    Arguments

    @@ -8394,7 +8394,7 @@

    Arguments

    @@ -8437,7 +8437,7 @@

    Arguments

    @@ -8452,7 +8452,7 @@

    Arguments

    @@ -8495,7 +8495,7 @@

    Arguments

    @@ -8510,7 +8510,7 @@

    Arguments

    @@ -8553,7 +8553,7 @@

    Arguments

    @@ -8568,7 +8568,7 @@

    Arguments

    @@ -8583,7 +8583,7 @@

    Arguments

    @@ -8626,7 +8626,7 @@

    Arguments

    @@ -8641,7 +8641,7 @@

    Arguments

    @@ -8656,7 +8656,7 @@

    Arguments

    @@ -8699,7 +8699,7 @@

    Arguments

    @@ -8714,7 +8714,7 @@

    Arguments

    @@ -8729,7 +8729,7 @@

    Arguments

    @@ -8772,7 +8772,7 @@

    Arguments

    @@ -8787,7 +8787,7 @@

    Arguments

    @@ -8802,7 +8802,7 @@

    Arguments

    @@ -8845,7 +8845,7 @@

    Arguments

    @@ -8860,7 +8860,7 @@

    Arguments

    @@ -8875,7 +8875,7 @@

    Arguments

    @@ -8918,7 +8918,7 @@

    Arguments

    @@ -8933,7 +8933,7 @@

    Arguments

    @@ -8948,7 +8948,7 @@

    Arguments

    @@ -8991,7 +8991,7 @@

    Arguments

    @@ -9006,7 +9006,7 @@

    Arguments

    @@ -9021,7 +9021,7 @@

    Arguments

    @@ -9064,7 +9064,7 @@

    Arguments

    @@ -9079,7 +9079,7 @@

    Arguments

    @@ -9094,7 +9094,7 @@

    Arguments

    @@ -9137,7 +9137,7 @@

    Arguments

    @@ -9152,7 +9152,7 @@

    Arguments

    @@ -9167,7 +9167,7 @@

    Arguments

    @@ -9210,7 +9210,7 @@

    Arguments

    @@ -9225,7 +9225,7 @@

    Arguments

    @@ -9240,7 +9240,7 @@

    Arguments

    @@ -9283,7 +9283,7 @@

    Arguments

    @@ -9298,7 +9298,7 @@

    Arguments

    @@ -9313,7 +9313,7 @@

    Arguments

    @@ -9356,7 +9356,7 @@

    Arguments

    @@ -9371,7 +9371,7 @@

    Arguments

    @@ -9386,7 +9386,7 @@

    Arguments

    @@ -9429,7 +9429,7 @@

    Arguments

    @@ -9444,7 +9444,7 @@

    Arguments

    @@ -9459,7 +9459,7 @@

    Arguments

    @@ -9502,7 +9502,7 @@

    Arguments

    @@ -9517,7 +9517,7 @@

    Arguments

    @@ -9532,7 +9532,7 @@

    Arguments

    @@ -9575,7 +9575,7 @@

    Arguments

    @@ -9590,7 +9590,7 @@

    Arguments

    @@ -9605,7 +9605,7 @@

    Arguments

    @@ -9648,7 +9648,7 @@

    Arguments

    @@ -9663,7 +9663,7 @@

    Arguments

    @@ -9678,7 +9678,7 @@

    Arguments

    @@ -9721,7 +9721,7 @@

    Arguments

    @@ -9736,7 +9736,7 @@

    Arguments

    @@ -9751,7 +9751,7 @@

    Arguments

    @@ -9794,7 +9794,7 @@

    Arguments

    @@ -9809,7 +9809,7 @@

    Arguments

    @@ -9824,7 +9824,7 @@

    Arguments

    @@ -9867,7 +9867,7 @@

    Arguments

    @@ -9882,7 +9882,7 @@

    Arguments

    @@ -9897,7 +9897,7 @@

    Arguments

    @@ -9940,7 +9940,7 @@

    Arguments

    @@ -9955,7 +9955,7 @@

    Arguments

    @@ -9970,7 +9970,7 @@

    Arguments

    @@ -10013,7 +10013,7 @@

    Arguments

    @@ -10028,7 +10028,7 @@

    Arguments

    @@ -10043,7 +10043,7 @@

    Arguments

    @@ -10086,7 +10086,7 @@

    Arguments

    @@ -10101,7 +10101,7 @@

    Arguments

    @@ -10116,7 +10116,7 @@

    Arguments

    @@ -10159,7 +10159,7 @@

    Arguments

    @@ -10174,7 +10174,7 @@

    Arguments

    @@ -10189,7 +10189,7 @@

    Arguments

    @@ -10232,7 +10232,7 @@

    Arguments

    @@ -10247,7 +10247,7 @@

    Arguments

    @@ -10262,7 +10262,7 @@

    Arguments

    @@ -10305,7 +10305,7 @@

    Arguments

    @@ -10320,7 +10320,7 @@

    Arguments

    @@ -10363,7 +10363,7 @@

    Arguments

    @@ -10378,7 +10378,7 @@

    Arguments

    @@ -10421,7 +10421,7 @@

    Arguments

    @@ -10436,7 +10436,7 @@

    Arguments

    @@ -10479,7 +10479,7 @@

    Arguments

    @@ -10494,7 +10494,7 @@

    Arguments

    @@ -10537,7 +10537,7 @@

    Arguments

    @@ -10552,7 +10552,7 @@

    Arguments

    @@ -10595,7 +10595,7 @@

    Arguments

    @@ -10610,7 +10610,7 @@

    Arguments

    @@ -10653,7 +10653,7 @@

    Arguments

    @@ -10668,7 +10668,7 @@

    Arguments

    @@ -10711,7 +10711,7 @@

    Arguments

    @@ -10726,7 +10726,7 @@

    Arguments

    @@ -10769,7 +10769,7 @@

    Arguments

    @@ -10784,7 +10784,7 @@

    Arguments

    @@ -10827,7 +10827,7 @@

    Arguments

    @@ -10842,7 +10842,7 @@

    Arguments

    @@ -10885,7 +10885,7 @@

    Arguments

    @@ -10900,7 +10900,7 @@

    Arguments

    @@ -10943,7 +10943,7 @@

    Arguments

    @@ -10958,7 +10958,7 @@

    Arguments

    @@ -11001,7 +11001,7 @@

    Arguments

    @@ -11016,7 +11016,7 @@

    Arguments

    @@ -11059,7 +11059,7 @@

    Arguments

    @@ -11074,7 +11074,7 @@

    Arguments

    @@ -11117,7 +11117,7 @@

    Arguments

    @@ -11132,7 +11132,7 @@

    Arguments

    @@ -11175,7 +11175,7 @@

    Arguments

    @@ -11190,7 +11190,7 @@

    Arguments

    @@ -11233,7 +11233,7 @@

    Arguments

    @@ -11248,7 +11248,7 @@

    Arguments

    @@ -11291,7 +11291,7 @@

    Arguments

    @@ -11306,7 +11306,7 @@

    Arguments

    @@ -11349,7 +11349,7 @@

    Arguments

    @@ -11364,7 +11364,7 @@

    Arguments

    @@ -11407,7 +11407,7 @@

    Arguments

    @@ -11422,7 +11422,7 @@

    Arguments

    @@ -11465,7 +11465,7 @@

    Arguments

    @@ -11480,7 +11480,7 @@

    Arguments

    @@ -11523,7 +11523,7 @@

    Arguments

    @@ -11538,7 +11538,7 @@

    Arguments

    @@ -11581,7 +11581,7 @@

    Arguments

    @@ -11596,7 +11596,7 @@

    Arguments

    @@ -11639,7 +11639,7 @@

    Arguments

    @@ -11654,7 +11654,7 @@

    Arguments

    @@ -11711,7 +11711,7 @@

    Arguments

    @@ -11726,7 +11726,7 @@

    Arguments

    @@ -11741,7 +11741,7 @@

    Arguments

    @@ -11784,7 +11784,7 @@

    Arguments

    @@ -11799,7 +11799,7 @@

    Arguments

    @@ -11814,7 +11814,7 @@

    Arguments

    @@ -11857,7 +11857,7 @@

    Arguments

    @@ -11872,7 +11872,7 @@

    Arguments

    @@ -11887,7 +11887,7 @@

    Arguments

    @@ -11930,7 +11930,7 @@

    Arguments

    @@ -11945,7 +11945,7 @@

    Arguments

    @@ -11960,7 +11960,7 @@

    Arguments

    @@ -12003,7 +12003,7 @@

    Arguments

    @@ -12018,7 +12018,7 @@

    Arguments

    @@ -12033,7 +12033,7 @@

    Arguments

    @@ -12076,7 +12076,7 @@

    Arguments

    @@ -12091,7 +12091,7 @@

    Arguments

    @@ -12106,7 +12106,7 @@

    Arguments

    @@ -12149,7 +12149,7 @@

    Arguments

    @@ -12164,7 +12164,7 @@

    Arguments

    @@ -12179,7 +12179,7 @@

    Arguments

    @@ -12222,7 +12222,7 @@

    Arguments

    @@ -12237,7 +12237,7 @@

    Arguments

    @@ -12252,7 +12252,7 @@

    Arguments

    @@ -12295,7 +12295,7 @@

    Arguments

    @@ -12310,7 +12310,7 @@

    Arguments

    @@ -12325,7 +12325,7 @@

    Arguments

    @@ -12368,7 +12368,7 @@

    Arguments

    @@ -12383,7 +12383,7 @@

    Arguments

    @@ -12398,7 +12398,7 @@

    Arguments

    @@ -12441,7 +12441,7 @@

    Arguments

    @@ -12456,7 +12456,7 @@

    Arguments

    @@ -12471,7 +12471,7 @@

    Arguments

    @@ -12514,7 +12514,7 @@

    Arguments

    @@ -12529,7 +12529,7 @@

    Arguments

    @@ -12544,7 +12544,7 @@

    Arguments

    @@ -12587,7 +12587,7 @@

    Arguments

    @@ -12602,7 +12602,7 @@

    Arguments

    @@ -12617,7 +12617,7 @@

    Arguments

    @@ -12660,7 +12660,7 @@

    Arguments

    @@ -12675,7 +12675,7 @@

    Arguments

    @@ -12690,7 +12690,7 @@

    Arguments

    @@ -12733,7 +12733,7 @@

    Arguments

    @@ -12748,7 +12748,7 @@

    Arguments

    @@ -12763,7 +12763,7 @@

    Arguments

    @@ -12806,7 +12806,7 @@

    Arguments

    @@ -12821,7 +12821,7 @@

    Arguments

    @@ -12836,7 +12836,7 @@

    Arguments

    @@ -12879,7 +12879,7 @@

    Arguments

    @@ -12894,7 +12894,7 @@

    Arguments

    @@ -12909,7 +12909,7 @@

    Arguments

    @@ -12952,7 +12952,7 @@

    Arguments

    @@ -12967,7 +12967,7 @@

    Arguments

    @@ -12982,7 +12982,7 @@

    Arguments

    @@ -13025,7 +13025,7 @@

    Arguments

    @@ -13040,7 +13040,7 @@

    Arguments

    @@ -13083,7 +13083,7 @@

    Arguments

    @@ -13098,7 +13098,7 @@

    Arguments

    @@ -13141,7 +13141,7 @@

    Arguments

    @@ -13156,7 +13156,7 @@

    Arguments

    @@ -13199,7 +13199,7 @@

    Arguments

    @@ -13214,7 +13214,7 @@

    Arguments

    @@ -13257,7 +13257,7 @@

    Arguments

    @@ -13272,7 +13272,7 @@

    Arguments

    @@ -13315,7 +13315,7 @@

    Arguments

    @@ -13330,7 +13330,7 @@

    Arguments

    @@ -13373,7 +13373,7 @@

    Arguments

    @@ -13388,7 +13388,7 @@

    Arguments

    @@ -13431,7 +13431,7 @@

    Arguments

    @@ -13446,7 +13446,7 @@

    Arguments

    @@ -13489,7 +13489,7 @@

    Arguments

    @@ -13504,7 +13504,7 @@

    Arguments

    @@ -13547,7 +13547,7 @@

    Arguments

    @@ -13562,7 +13562,7 @@

    Arguments

    @@ -13605,7 +13605,7 @@

    Arguments

    @@ -13620,7 +13620,7 @@

    Arguments

    @@ -13663,7 +13663,7 @@

    Arguments

    @@ -13678,7 +13678,7 @@

    Arguments

    @@ -13721,7 +13721,7 @@

    Arguments

    @@ -13736,7 +13736,7 @@

    Arguments

    @@ -13779,7 +13779,7 @@

    Arguments

    @@ -13794,7 +13794,7 @@

    Arguments

    @@ -13837,7 +13837,7 @@

    Arguments

    @@ -13852,7 +13852,7 @@

    Arguments

    @@ -13895,7 +13895,7 @@

    Arguments

    @@ -13910,7 +13910,7 @@

    Arguments

    @@ -13953,7 +13953,7 @@

    Arguments

    @@ -13968,7 +13968,7 @@

    Arguments

    @@ -14011,7 +14011,7 @@

    Arguments

    @@ -14026,7 +14026,7 @@

    Arguments

    @@ -14069,7 +14069,7 @@

    Arguments

    @@ -14084,7 +14084,7 @@

    Arguments

    @@ -14127,7 +14127,7 @@

    Arguments

    @@ -14142,7 +14142,7 @@

    Arguments

    @@ -14185,7 +14185,7 @@

    Arguments

    @@ -14200,7 +14200,7 @@

    Arguments

    @@ -14243,7 +14243,7 @@

    Arguments

    @@ -14258,7 +14258,7 @@

    Arguments

    @@ -14301,7 +14301,7 @@

    Arguments

    @@ -14316,7 +14316,7 @@

    Arguments

    @@ -14359,7 +14359,7 @@

    Arguments

    @@ -14374,7 +14374,7 @@

    Arguments

    @@ -14417,7 +14417,7 @@

    Arguments

    @@ -14432,7 +14432,7 @@

    Arguments

    @@ -14475,7 +14475,7 @@

    Arguments

    @@ -14490,7 +14490,7 @@

    Arguments

    @@ -14533,7 +14533,7 @@

    Arguments

    @@ -14548,7 +14548,7 @@

    Arguments

    @@ -14591,7 +14591,7 @@

    Arguments

    @@ -14606,7 +14606,7 @@

    Arguments

    @@ -14649,7 +14649,7 @@

    Arguments

    @@ -14664,7 +14664,7 @@

    Arguments

    @@ -14707,7 +14707,7 @@

    Arguments

    @@ -14722,7 +14722,7 @@

    Arguments

    @@ -14765,7 +14765,7 @@

    Arguments

    @@ -14780,7 +14780,7 @@

    Arguments

    @@ -14823,7 +14823,7 @@

    Arguments

    @@ -14838,7 +14838,7 @@

    Arguments

    @@ -14881,7 +14881,7 @@

    Arguments

    @@ -14896,7 +14896,7 @@

    Arguments

    @@ -14939,7 +14939,7 @@

    Arguments

    @@ -14954,7 +14954,7 @@

    Arguments

    @@ -14997,7 +14997,7 @@

    Arguments

    @@ -15012,7 +15012,7 @@

    Arguments

    @@ -15055,7 +15055,7 @@

    Arguments

    @@ -15070,7 +15070,7 @@

    Arguments

    @@ -15113,7 +15113,7 @@

    Arguments

    @@ -15128,7 +15128,7 @@

    Arguments

    @@ -15143,7 +15143,7 @@

    Arguments

    @@ -15186,7 +15186,7 @@

    Arguments

    @@ -15201,7 +15201,7 @@

    Arguments

    @@ -15216,7 +15216,7 @@

    Arguments

    @@ -15259,7 +15259,7 @@

    Arguments

    @@ -15274,7 +15274,7 @@

    Arguments

    @@ -15289,7 +15289,7 @@

    Arguments

    @@ -15332,7 +15332,7 @@

    Arguments

    @@ -15347,7 +15347,7 @@

    Arguments

    @@ -15362,7 +15362,7 @@

    Arguments

    @@ -15405,7 +15405,7 @@

    Arguments

    @@ -15420,7 +15420,7 @@

    Arguments

    @@ -15435,7 +15435,7 @@

    Arguments

    @@ -15478,7 +15478,7 @@

    Arguments

    @@ -15493,7 +15493,7 @@

    Arguments

    @@ -15508,7 +15508,7 @@

    Arguments

    @@ -15551,7 +15551,7 @@

    Arguments

    @@ -15566,7 +15566,7 @@

    Arguments

    @@ -15581,7 +15581,7 @@

    Arguments

    @@ -15624,7 +15624,7 @@

    Arguments

    @@ -15639,7 +15639,7 @@

    Arguments

    @@ -15654,7 +15654,7 @@

    Arguments

    @@ -15697,7 +15697,7 @@

    Arguments

    @@ -15712,7 +15712,7 @@

    Arguments

    @@ -15727,7 +15727,7 @@

    Arguments

    @@ -15770,7 +15770,7 @@

    Arguments

    @@ -15785,7 +15785,7 @@

    Arguments

    @@ -15800,7 +15800,7 @@

    Arguments

    @@ -15843,7 +15843,7 @@

    Arguments

    @@ -15858,7 +15858,7 @@

    Arguments

    @@ -15873,7 +15873,7 @@

    Arguments

    @@ -15916,7 +15916,7 @@

    Arguments

    @@ -15931,7 +15931,7 @@

    Arguments

    @@ -15946,7 +15946,7 @@

    Arguments

    @@ -15989,7 +15989,7 @@

    Arguments

    @@ -16004,7 +16004,7 @@

    Arguments

    @@ -16019,7 +16019,7 @@

    Arguments

    @@ -16062,7 +16062,7 @@

    Arguments

    @@ -16077,7 +16077,7 @@

    Arguments

    @@ -16092,7 +16092,7 @@

    Arguments

    @@ -16135,7 +16135,7 @@

    Arguments

    @@ -16150,7 +16150,7 @@

    Arguments

    @@ -16165,7 +16165,7 @@

    Arguments

    @@ -16208,7 +16208,7 @@

    Arguments

    @@ -16223,7 +16223,7 @@

    Arguments

    @@ -16238,7 +16238,7 @@

    Arguments

    @@ -16281,7 +16281,7 @@

    Arguments

    @@ -16296,7 +16296,7 @@

    Arguments

    @@ -16311,7 +16311,7 @@

    Arguments

    @@ -16354,7 +16354,7 @@

    Arguments

    @@ -16369,7 +16369,7 @@

    Arguments

    @@ -16384,7 +16384,7 @@

    Arguments

    @@ -16441,7 +16441,7 @@

    Arguments

    @@ -16456,7 +16456,7 @@

    Arguments

    @@ -16471,7 +16471,7 @@

    Arguments

    @@ -16486,7 +16486,7 @@

    Arguments

    @@ -16501,7 +16501,7 @@

    Arguments

    @@ -16544,7 +16544,7 @@

    Arguments

    @@ -16559,7 +16559,7 @@

    Arguments

    @@ -16574,7 +16574,7 @@

    Arguments

    @@ -16589,7 +16589,7 @@

    Arguments

    @@ -16604,7 +16604,7 @@

    Arguments

    @@ -16647,7 +16647,7 @@

    Arguments

    @@ -16662,7 +16662,7 @@

    Arguments

    @@ -16677,7 +16677,7 @@

    Arguments

    @@ -16692,7 +16692,7 @@

    Arguments

    @@ -16707,7 +16707,7 @@

    Arguments

    @@ -16750,7 +16750,7 @@

    Arguments

    @@ -16765,7 +16765,7 @@

    Arguments

    @@ -16780,7 +16780,7 @@

    Arguments

    @@ -16795,7 +16795,7 @@

    Arguments

    @@ -16810,7 +16810,7 @@

    Arguments

    @@ -16853,7 +16853,7 @@

    Arguments

    @@ -16868,7 +16868,7 @@

    Arguments

    @@ -16883,7 +16883,7 @@

    Arguments

    @@ -16898,7 +16898,7 @@

    Arguments

    @@ -16913,7 +16913,7 @@

    Arguments

    @@ -16956,7 +16956,7 @@

    Arguments

    @@ -16971,7 +16971,7 @@

    Arguments

    @@ -16986,7 +16986,7 @@

    Arguments

    @@ -17001,7 +17001,7 @@

    Arguments

    @@ -17016,7 +17016,7 @@

    Arguments

    @@ -17059,7 +17059,7 @@

    Arguments

    @@ -17074,7 +17074,7 @@

    Arguments

    @@ -17089,7 +17089,7 @@

    Arguments

    @@ -17104,7 +17104,7 @@

    Arguments

    @@ -17119,7 +17119,7 @@

    Arguments

    @@ -17162,7 +17162,7 @@

    Arguments

    @@ -17177,7 +17177,7 @@

    Arguments

    @@ -17192,7 +17192,7 @@

    Arguments

    @@ -17207,7 +17207,7 @@

    Arguments

    @@ -17222,7 +17222,7 @@

    Arguments

    @@ -17265,7 +17265,7 @@

    Arguments

    @@ -17280,7 +17280,7 @@

    Arguments

    @@ -17295,7 +17295,7 @@

    Arguments

    @@ -17310,7 +17310,7 @@

    Arguments

    @@ -17325,7 +17325,7 @@

    Arguments

    @@ -17368,7 +17368,7 @@

    Arguments

    @@ -17383,7 +17383,7 @@

    Arguments

    @@ -17398,7 +17398,7 @@

    Arguments

    @@ -17413,7 +17413,7 @@

    Arguments

    @@ -17428,7 +17428,7 @@

    Arguments

    @@ -17471,7 +17471,7 @@

    Arguments

    @@ -17486,7 +17486,7 @@

    Arguments

    @@ -17501,7 +17501,7 @@

    Arguments

    @@ -17516,7 +17516,7 @@

    Arguments

    @@ -17531,7 +17531,7 @@

    Arguments

    @@ -17574,7 +17574,7 @@

    Arguments

    @@ -17589,7 +17589,7 @@

    Arguments

    @@ -17604,7 +17604,7 @@

    Arguments

    @@ -17619,7 +17619,7 @@

    Arguments

    @@ -17634,7 +17634,7 @@

    Arguments

    @@ -17677,7 +17677,7 @@

    Arguments

    @@ -17692,7 +17692,7 @@

    Arguments

    @@ -17707,7 +17707,7 @@

    Arguments

    @@ -17722,7 +17722,7 @@

    Arguments

    @@ -17737,7 +17737,7 @@

    Arguments

    @@ -17780,7 +17780,7 @@

    Arguments

    @@ -17795,7 +17795,7 @@

    Arguments

    @@ -17810,7 +17810,7 @@

    Arguments

    @@ -17825,7 +17825,7 @@

    Arguments

    @@ -17840,7 +17840,7 @@

    Arguments

    @@ -17883,7 +17883,7 @@

    Arguments

    @@ -17898,7 +17898,7 @@

    Arguments

    @@ -17913,7 +17913,7 @@

    Arguments

    @@ -17928,7 +17928,7 @@

    Arguments

    @@ -17943,7 +17943,7 @@

    Arguments

    @@ -17986,7 +17986,7 @@

    Arguments

    @@ -18001,7 +18001,7 @@

    Arguments

    @@ -18016,7 +18016,7 @@

    Arguments

    @@ -18031,7 +18031,7 @@

    Arguments

    @@ -18046,7 +18046,7 @@

    Arguments

    @@ -18089,7 +18089,7 @@

    Arguments

    @@ -18104,7 +18104,7 @@

    Arguments

    @@ -18119,7 +18119,7 @@

    Arguments

    @@ -18134,7 +18134,7 @@

    Arguments

    @@ -18149,7 +18149,7 @@

    Arguments

    @@ -18192,7 +18192,7 @@

    Arguments

    @@ -18207,7 +18207,7 @@

    Arguments

    @@ -18222,7 +18222,7 @@

    Arguments

    @@ -18237,7 +18237,7 @@

    Arguments

    @@ -18252,7 +18252,7 @@

    Arguments

    @@ -18295,7 +18295,7 @@

    Arguments

    @@ -18310,7 +18310,7 @@

    Arguments

    @@ -18325,7 +18325,7 @@

    Arguments

    @@ -18340,7 +18340,7 @@

    Arguments

    @@ -18355,7 +18355,7 @@

    Arguments

    @@ -18398,7 +18398,7 @@

    Arguments

    @@ -18413,7 +18413,7 @@

    Arguments

    @@ -18428,7 +18428,7 @@

    Arguments

    @@ -18443,7 +18443,7 @@

    Arguments

    @@ -18458,7 +18458,7 @@

    Arguments

    @@ -18501,7 +18501,7 @@

    Arguments

    @@ -18516,7 +18516,7 @@

    Arguments

    @@ -18531,7 +18531,7 @@

    Arguments

    @@ -18546,7 +18546,7 @@

    Arguments

    @@ -18561,7 +18561,7 @@

    Arguments

    @@ -18604,7 +18604,7 @@

    Arguments

    @@ -18619,7 +18619,7 @@

    Arguments

    @@ -18634,7 +18634,7 @@

    Arguments

    @@ -18649,7 +18649,7 @@

    Arguments

    @@ -18664,7 +18664,7 @@

    Arguments

    @@ -18707,7 +18707,7 @@

    Arguments

    @@ -18722,7 +18722,7 @@

    Arguments

    @@ -18737,7 +18737,7 @@

    Arguments

    @@ -18752,7 +18752,7 @@

    Arguments

    @@ -18767,7 +18767,7 @@

    Arguments

    @@ -18810,7 +18810,7 @@

    Arguments

    @@ -18825,7 +18825,7 @@

    Arguments

    @@ -18840,7 +18840,7 @@

    Arguments

    @@ -18855,7 +18855,7 @@

    Arguments

    @@ -18870,7 +18870,7 @@

    Arguments

    @@ -18913,7 +18913,7 @@

    Arguments

    @@ -18928,7 +18928,7 @@

    Arguments

    @@ -18943,7 +18943,7 @@

    Arguments

    @@ -18958,7 +18958,7 @@

    Arguments

    @@ -19001,7 +19001,7 @@

    Arguments

    @@ -19016,7 +19016,7 @@

    Arguments

    @@ -19031,7 +19031,7 @@

    Arguments

    @@ -19046,7 +19046,7 @@

    Arguments

    @@ -19089,7 +19089,7 @@

    Arguments

    @@ -19104,7 +19104,7 @@

    Arguments

    @@ -19119,7 +19119,7 @@

    Arguments

    @@ -19134,7 +19134,7 @@

    Arguments

    @@ -19177,7 +19177,7 @@

    Arguments

    @@ -19192,7 +19192,7 @@

    Arguments

    @@ -19207,7 +19207,7 @@

    Arguments

    @@ -19222,7 +19222,7 @@

    Arguments

    @@ -19265,7 +19265,7 @@

    Arguments

    @@ -19280,7 +19280,7 @@

    Arguments

    @@ -19295,7 +19295,7 @@

    Arguments

    @@ -19310,7 +19310,7 @@

    Arguments

    @@ -19353,7 +19353,7 @@

    Arguments

    @@ -19368,7 +19368,7 @@

    Arguments

    @@ -19383,7 +19383,7 @@

    Arguments

    @@ -19398,7 +19398,7 @@

    Arguments

    @@ -19441,7 +19441,7 @@

    Arguments

    @@ -19456,7 +19456,7 @@

    Arguments

    @@ -19471,7 +19471,7 @@

    Arguments

    @@ -19486,7 +19486,7 @@

    Arguments

    @@ -19529,7 +19529,7 @@

    Arguments

    @@ -19544,7 +19544,7 @@

    Arguments

    @@ -19559,7 +19559,7 @@

    Arguments

    @@ -19574,7 +19574,7 @@

    Arguments

    @@ -19617,7 +19617,7 @@

    Arguments

    @@ -19632,7 +19632,7 @@

    Arguments

    @@ -19647,7 +19647,7 @@

    Arguments

    @@ -19662,7 +19662,7 @@

    Arguments

    @@ -19705,7 +19705,7 @@

    Arguments

    @@ -19720,7 +19720,7 @@

    Arguments

    @@ -19735,7 +19735,7 @@

    Arguments

    @@ -19750,7 +19750,7 @@

    Arguments

    @@ -19793,7 +19793,7 @@

    Arguments

    @@ -19808,7 +19808,7 @@

    Arguments

    @@ -19823,7 +19823,7 @@

    Arguments

    @@ -19838,7 +19838,7 @@

    Arguments

    @@ -19881,7 +19881,7 @@

    Arguments

    @@ -19896,7 +19896,7 @@

    Arguments

    @@ -19911,7 +19911,7 @@

    Arguments

    @@ -19926,7 +19926,7 @@

    Arguments

    @@ -19969,7 +19969,7 @@

    Arguments

    @@ -19984,7 +19984,7 @@

    Arguments

    @@ -19999,7 +19999,7 @@

    Arguments

    @@ -20014,7 +20014,7 @@

    Arguments

    @@ -20057,7 +20057,7 @@

    Arguments

    @@ -20072,7 +20072,7 @@

    Arguments

    @@ -20087,7 +20087,7 @@

    Arguments

    @@ -20102,7 +20102,7 @@

    Arguments

    @@ -20145,7 +20145,7 @@

    Arguments

    @@ -20160,7 +20160,7 @@

    Arguments

    @@ -20175,7 +20175,7 @@

    Arguments

    @@ -20190,7 +20190,7 @@

    Arguments

    @@ -20233,7 +20233,7 @@

    Arguments

    @@ -20248,7 +20248,7 @@

    Arguments

    @@ -20263,7 +20263,7 @@

    Arguments

    @@ -20278,7 +20278,7 @@

    Arguments

    @@ -20321,7 +20321,7 @@

    Arguments

    @@ -20336,7 +20336,7 @@

    Arguments

    @@ -20351,7 +20351,7 @@

    Arguments

    @@ -20366,7 +20366,7 @@

    Arguments

    @@ -20409,7 +20409,7 @@

    Arguments

    @@ -20424,7 +20424,7 @@

    Arguments

    @@ -20439,7 +20439,7 @@

    Arguments

    @@ -20454,7 +20454,7 @@

    Arguments

    @@ -20497,7 +20497,7 @@

    Arguments

    @@ -20512,7 +20512,7 @@

    Arguments

    @@ -20527,7 +20527,7 @@

    Arguments

    @@ -20542,7 +20542,7 @@

    Arguments

    @@ -20585,7 +20585,7 @@

    Arguments

    @@ -20600,7 +20600,7 @@

    Arguments

    @@ -20615,7 +20615,7 @@

    Arguments

    @@ -20630,7 +20630,7 @@

    Arguments

    @@ -20673,7 +20673,7 @@

    Arguments

    @@ -20688,7 +20688,7 @@

    Arguments

    @@ -20703,7 +20703,7 @@

    Arguments

    @@ -20718,7 +20718,7 @@

    Arguments

    @@ -20761,7 +20761,7 @@

    Arguments

    @@ -20776,7 +20776,7 @@

    Arguments

    @@ -20791,7 +20791,7 @@

    Arguments

    @@ -20806,7 +20806,7 @@

    Arguments

    @@ -20849,7 +20849,7 @@

    Arguments

    @@ -20864,7 +20864,7 @@

    Arguments

    @@ -20879,7 +20879,7 @@

    Arguments

    @@ -20894,7 +20894,7 @@

    Arguments

    @@ -20937,7 +20937,7 @@

    Arguments

    @@ -20952,7 +20952,7 @@

    Arguments

    @@ -20967,7 +20967,7 @@

    Arguments

    @@ -20982,7 +20982,7 @@

    Arguments

    @@ -21025,7 +21025,7 @@

    Arguments

    @@ -21040,7 +21040,7 @@

    Arguments

    @@ -21055,7 +21055,7 @@

    Arguments

    @@ -21070,7 +21070,7 @@

    Arguments

    @@ -21085,7 +21085,7 @@

    Arguments

    @@ -21128,7 +21128,7 @@

    Arguments

    @@ -21143,7 +21143,7 @@

    Arguments

    @@ -21158,7 +21158,7 @@

    Arguments

    @@ -21173,7 +21173,7 @@

    Arguments

    @@ -21188,7 +21188,7 @@

    Arguments

    @@ -21231,7 +21231,7 @@

    Arguments

    @@ -21246,7 +21246,7 @@

    Arguments

    @@ -21261,7 +21261,7 @@

    Arguments

    @@ -21276,7 +21276,7 @@

    Arguments

    @@ -21291,7 +21291,7 @@

    Arguments

    @@ -21334,7 +21334,7 @@

    Arguments

    @@ -21349,7 +21349,7 @@

    Arguments

    @@ -21364,7 +21364,7 @@

    Arguments

    @@ -21379,7 +21379,7 @@

    Arguments

    @@ -21394,7 +21394,7 @@

    Arguments

    @@ -21437,7 +21437,7 @@

    Arguments

    @@ -21452,7 +21452,7 @@

    Arguments

    @@ -21467,7 +21467,7 @@

    Arguments

    @@ -21482,7 +21482,7 @@

    Arguments

    @@ -21497,7 +21497,7 @@

    Arguments

    @@ -21540,7 +21540,7 @@

    Arguments

    @@ -21555,7 +21555,7 @@

    Arguments

    @@ -21570,7 +21570,7 @@

    Arguments

    @@ -21585,7 +21585,7 @@

    Arguments

    @@ -21600,7 +21600,7 @@

    Arguments

    @@ -21643,7 +21643,7 @@

    Arguments

    @@ -21658,7 +21658,7 @@

    Arguments

    @@ -21673,7 +21673,7 @@

    Arguments

    @@ -21688,7 +21688,7 @@

    Arguments

    @@ -21703,7 +21703,7 @@

    Arguments

    @@ -21746,7 +21746,7 @@

    Arguments

    @@ -21761,7 +21761,7 @@

    Arguments

    @@ -21776,7 +21776,7 @@

    Arguments

    @@ -21791,7 +21791,7 @@

    Arguments

    @@ -21806,7 +21806,7 @@

    Arguments

    @@ -21849,7 +21849,7 @@

    Arguments

    @@ -21864,7 +21864,7 @@

    Arguments

    @@ -21879,7 +21879,7 @@

    Arguments

    @@ -21894,7 +21894,7 @@

    Arguments

    @@ -21909,7 +21909,7 @@

    Arguments

    @@ -21952,7 +21952,7 @@

    Arguments

    @@ -21967,7 +21967,7 @@

    Arguments

    @@ -21982,7 +21982,7 @@

    Arguments

    @@ -21997,7 +21997,7 @@

    Arguments

    @@ -22012,7 +22012,7 @@

    Arguments

    @@ -22055,7 +22055,7 @@

    Arguments

    @@ -22070,7 +22070,7 @@

    Arguments

    @@ -22085,7 +22085,7 @@

    Arguments

    @@ -22100,7 +22100,7 @@

    Arguments

    @@ -22115,7 +22115,7 @@

    Arguments

    @@ -22158,7 +22158,7 @@

    Arguments

    @@ -22173,7 +22173,7 @@

    Arguments

    @@ -22188,7 +22188,7 @@

    Arguments

    @@ -22203,7 +22203,7 @@

    Arguments

    @@ -22218,7 +22218,7 @@

    Arguments

    @@ -22261,7 +22261,7 @@

    Arguments

    @@ -22276,7 +22276,7 @@

    Arguments

    @@ -22291,7 +22291,7 @@

    Arguments

    @@ -22306,7 +22306,7 @@

    Arguments

    @@ -22321,7 +22321,7 @@

    Arguments

    @@ -22364,7 +22364,7 @@

    Arguments

    @@ -22379,7 +22379,7 @@

    Arguments

    @@ -22394,7 +22394,7 @@

    Arguments

    @@ -22409,7 +22409,7 @@

    Arguments

    @@ -22424,7 +22424,7 @@

    Arguments

    @@ -22467,7 +22467,7 @@

    Arguments

    @@ -22482,7 +22482,7 @@

    Arguments

    @@ -22497,7 +22497,7 @@

    Arguments

    @@ -22512,7 +22512,7 @@

    Arguments

    @@ -22527,7 +22527,7 @@

    Arguments

    @@ -22570,7 +22570,7 @@

    Arguments

    @@ -22585,7 +22585,7 @@

    Arguments

    @@ -22600,7 +22600,7 @@

    Arguments

    @@ -22615,7 +22615,7 @@

    Arguments

    @@ -22630,7 +22630,7 @@

    Arguments

    @@ -22673,7 +22673,7 @@

    Arguments

    @@ -22688,7 +22688,7 @@

    Arguments

    @@ -22703,7 +22703,7 @@

    Arguments

    @@ -22718,7 +22718,7 @@

    Arguments

    @@ -22733,7 +22733,7 @@

    Arguments

    @@ -22776,7 +22776,7 @@

    Arguments

    @@ -22791,7 +22791,7 @@

    Arguments

    @@ -22806,7 +22806,7 @@

    Arguments

    @@ -22821,7 +22821,7 @@

    Arguments

    @@ -22836,7 +22836,7 @@

    Arguments

    @@ -22879,7 +22879,7 @@

    Arguments

    @@ -22894,7 +22894,7 @@

    Arguments

    @@ -22909,7 +22909,7 @@

    Arguments

    @@ -22924,7 +22924,7 @@

    Arguments

    @@ -22939,7 +22939,7 @@

    Arguments

    @@ -22982,7 +22982,7 @@

    Arguments

    @@ -22997,7 +22997,7 @@

    Arguments

    @@ -23012,7 +23012,7 @@

    Arguments

    @@ -23027,7 +23027,7 @@

    Arguments

    @@ -23042,7 +23042,7 @@

    Arguments

    @@ -23085,7 +23085,7 @@

    Arguments

    @@ -23100,7 +23100,7 @@

    Arguments

    @@ -23115,7 +23115,7 @@

    Arguments

    @@ -23130,7 +23130,7 @@

    Arguments

    @@ -23145,7 +23145,7 @@

    Arguments

    @@ -23188,7 +23188,7 @@

    Arguments

    @@ -23203,7 +23203,7 @@

    Arguments

    @@ -23218,7 +23218,7 @@

    Arguments

    @@ -23233,7 +23233,7 @@

    Arguments

    @@ -23248,7 +23248,7 @@

    Arguments

    @@ -23291,7 +23291,7 @@

    Arguments

    @@ -23306,7 +23306,7 @@

    Arguments

    @@ -23321,7 +23321,7 @@

    Arguments

    @@ -23336,7 +23336,7 @@

    Arguments

    @@ -23351,7 +23351,7 @@

    Arguments

    @@ -23394,7 +23394,7 @@

    Arguments

    @@ -23409,7 +23409,7 @@

    Arguments

    @@ -23424,7 +23424,7 @@

    Arguments

    @@ -23439,7 +23439,7 @@

    Arguments

    @@ -23454,7 +23454,7 @@

    Arguments

    @@ -23497,7 +23497,7 @@

    Arguments

    @@ -23512,7 +23512,7 @@

    Arguments

    @@ -23527,7 +23527,7 @@

    Arguments

    @@ -23542,7 +23542,7 @@

    Arguments

    @@ -23585,7 +23585,7 @@

    Arguments

    @@ -23600,7 +23600,7 @@

    Arguments

    @@ -23615,7 +23615,7 @@

    Arguments

    @@ -23630,7 +23630,7 @@

    Arguments

    @@ -23673,7 +23673,7 @@

    Arguments

    @@ -23688,7 +23688,7 @@

    Arguments

    @@ -23703,7 +23703,7 @@

    Arguments

    @@ -23718,7 +23718,7 @@

    Arguments

    @@ -23761,7 +23761,7 @@

    Arguments

    @@ -23776,7 +23776,7 @@

    Arguments

    @@ -23791,7 +23791,7 @@

    Arguments

    @@ -23806,7 +23806,7 @@

    Arguments

    @@ -23849,7 +23849,7 @@

    Arguments

    @@ -23864,7 +23864,7 @@

    Arguments

    @@ -23879,7 +23879,7 @@

    Arguments

    @@ -23894,7 +23894,7 @@

    Arguments

    @@ -23937,7 +23937,7 @@

    Arguments

    @@ -23952,7 +23952,7 @@

    Arguments

    @@ -23967,7 +23967,7 @@

    Arguments

    @@ -23982,7 +23982,7 @@

    Arguments

    @@ -24025,7 +24025,7 @@

    Arguments

    @@ -24040,7 +24040,7 @@

    Arguments

    @@ -24055,7 +24055,7 @@

    Arguments

    @@ -24070,7 +24070,7 @@

    Arguments

    @@ -24113,7 +24113,7 @@

    Arguments

    @@ -24128,7 +24128,7 @@

    Arguments

    @@ -24143,7 +24143,7 @@

    Arguments

    @@ -24158,7 +24158,7 @@

    Arguments

    @@ -24201,7 +24201,7 @@

    Arguments

    @@ -24216,7 +24216,7 @@

    Arguments

    @@ -24231,7 +24231,7 @@

    Arguments

    @@ -24246,7 +24246,7 @@

    Arguments

    @@ -24289,7 +24289,7 @@

    Arguments

    @@ -24304,7 +24304,7 @@

    Arguments

    @@ -24319,7 +24319,7 @@

    Arguments

    @@ -24334,7 +24334,7 @@

    Arguments

    @@ -24377,7 +24377,7 @@

    Arguments

    @@ -24392,7 +24392,7 @@

    Arguments

    @@ -24407,7 +24407,7 @@

    Arguments

    @@ -24422,7 +24422,7 @@

    Arguments

    @@ -24465,7 +24465,7 @@

    Arguments

    @@ -24480,7 +24480,7 @@

    Arguments

    @@ -24495,7 +24495,7 @@

    Arguments

    @@ -24510,7 +24510,7 @@

    Arguments

    @@ -24553,7 +24553,7 @@

    Arguments

    @@ -24568,7 +24568,7 @@

    Arguments

    @@ -24583,7 +24583,7 @@

    Arguments

    @@ -24598,7 +24598,7 @@

    Arguments

    @@ -24641,7 +24641,7 @@

    Arguments

    @@ -24656,7 +24656,7 @@

    Arguments

    @@ -24671,7 +24671,7 @@

    Arguments

    @@ -24686,7 +24686,7 @@

    Arguments

    @@ -24729,7 +24729,7 @@

    Arguments

    @@ -24744,7 +24744,7 @@

    Arguments

    @@ -24759,7 +24759,7 @@

    Arguments

    @@ -24774,7 +24774,7 @@

    Arguments

    @@ -24817,7 +24817,7 @@

    Arguments

    @@ -24832,7 +24832,7 @@

    Arguments

    @@ -24847,7 +24847,7 @@

    Arguments

    @@ -24862,7 +24862,7 @@

    Arguments

    @@ -24905,7 +24905,7 @@

    Arguments

    @@ -24920,7 +24920,7 @@

    Arguments

    @@ -24935,7 +24935,7 @@

    Arguments

    @@ -24950,7 +24950,7 @@

    Arguments

    @@ -24993,7 +24993,7 @@

    Arguments

    @@ -25008,7 +25008,7 @@

    Arguments

    @@ -25023,7 +25023,7 @@

    Arguments

    @@ -25038,7 +25038,7 @@

    Arguments

    @@ -25081,7 +25081,7 @@

    Arguments

    @@ -25096,7 +25096,7 @@

    Arguments

    @@ -25111,7 +25111,7 @@

    Arguments

    @@ -25126,7 +25126,7 @@

    Arguments

    @@ -25169,7 +25169,7 @@

    Arguments

    @@ -25184,7 +25184,7 @@

    Arguments

    @@ -25199,7 +25199,7 @@

    Arguments

    @@ -25214,7 +25214,7 @@

    Arguments

    @@ -25257,7 +25257,7 @@

    Arguments

    @@ -25272,7 +25272,7 @@

    Arguments

    @@ -25287,7 +25287,7 @@

    Arguments

    @@ -25302,7 +25302,7 @@

    Arguments

    @@ -25345,7 +25345,7 @@

    Arguments

    @@ -25360,7 +25360,7 @@

    Arguments

    @@ -25375,7 +25375,7 @@

    Arguments

    @@ -25390,7 +25390,7 @@

    Arguments

    @@ -25433,7 +25433,7 @@

    Arguments

    @@ -25448,7 +25448,7 @@

    Arguments

    @@ -25463,7 +25463,7 @@

    Arguments

    @@ -25478,7 +25478,7 @@

    Arguments

    @@ -25521,7 +25521,7 @@

    Arguments

    @@ -25536,7 +25536,7 @@

    Arguments

    @@ -25551,7 +25551,7 @@

    Arguments

    @@ -25566,7 +25566,7 @@

    Arguments

    @@ -25609,7 +25609,7 @@

    Arguments

    @@ -25624,7 +25624,7 @@

    Arguments

    @@ -25639,7 +25639,7 @@

    Arguments

    @@ -25654,7 +25654,7 @@

    Arguments

    @@ -25669,7 +25669,7 @@

    Arguments

    @@ -25712,7 +25712,7 @@

    Arguments

    @@ -25727,7 +25727,7 @@

    Arguments

    @@ -25742,7 +25742,7 @@

    Arguments

    @@ -25757,7 +25757,7 @@

    Arguments

    @@ -25772,7 +25772,7 @@

    Arguments

    @@ -25815,7 +25815,7 @@

    Arguments

    @@ -25830,7 +25830,7 @@

    Arguments

    @@ -25845,7 +25845,7 @@

    Arguments

    @@ -25860,7 +25860,7 @@

    Arguments

    @@ -25875,7 +25875,7 @@

    Arguments

    @@ -25918,7 +25918,7 @@

    Arguments

    @@ -25933,7 +25933,7 @@

    Arguments

    @@ -25948,7 +25948,7 @@

    Arguments

    @@ -25963,7 +25963,7 @@

    Arguments

    @@ -25978,7 +25978,7 @@

    Arguments

    @@ -26021,7 +26021,7 @@

    Arguments

    @@ -26036,7 +26036,7 @@

    Arguments

    @@ -26051,7 +26051,7 @@

    Arguments

    @@ -26066,7 +26066,7 @@

    Arguments

    @@ -26081,7 +26081,7 @@

    Arguments

    @@ -26124,7 +26124,7 @@

    Arguments

    @@ -26139,7 +26139,7 @@

    Arguments

    @@ -26154,7 +26154,7 @@

    Arguments

    @@ -26169,7 +26169,7 @@

    Arguments

    @@ -26184,7 +26184,7 @@

    Arguments

    @@ -26227,7 +26227,7 @@

    Arguments

    @@ -26242,7 +26242,7 @@

    Arguments

    @@ -26257,7 +26257,7 @@

    Arguments

    @@ -26272,7 +26272,7 @@

    Arguments

    @@ -26287,7 +26287,7 @@

    Arguments

    @@ -26330,7 +26330,7 @@

    Arguments

    @@ -26345,7 +26345,7 @@

    Arguments

    @@ -26360,7 +26360,7 @@

    Arguments

    @@ -26375,7 +26375,7 @@

    Arguments

    @@ -26390,7 +26390,7 @@

    Arguments

    @@ -26433,7 +26433,7 @@

    Arguments

    @@ -26448,7 +26448,7 @@

    Arguments

    @@ -26463,7 +26463,7 @@

    Arguments

    @@ -26478,7 +26478,7 @@

    Arguments

    @@ -26493,7 +26493,7 @@

    Arguments

    @@ -26536,7 +26536,7 @@

    Arguments

    @@ -26551,7 +26551,7 @@

    Arguments

    @@ -26566,7 +26566,7 @@

    Arguments

    @@ -26581,7 +26581,7 @@

    Arguments

    @@ -26596,7 +26596,7 @@

    Arguments

    @@ -26639,7 +26639,7 @@

    Arguments

    @@ -26654,7 +26654,7 @@

    Arguments

    @@ -26669,7 +26669,7 @@

    Arguments

    @@ -26684,7 +26684,7 @@

    Arguments

    @@ -26699,7 +26699,7 @@

    Arguments

    @@ -26742,7 +26742,7 @@

    Arguments

    @@ -26757,7 +26757,7 @@

    Arguments

    @@ -26772,7 +26772,7 @@

    Arguments

    @@ -26787,7 +26787,7 @@

    Arguments

    @@ -26802,7 +26802,7 @@

    Arguments

    @@ -26845,7 +26845,7 @@

    Arguments

    @@ -26860,7 +26860,7 @@

    Arguments

    @@ -26875,7 +26875,7 @@

    Arguments

    @@ -26890,7 +26890,7 @@

    Arguments

    @@ -26905,7 +26905,7 @@

    Arguments

    @@ -26948,7 +26948,7 @@

    Arguments

    @@ -26963,7 +26963,7 @@

    Arguments

    @@ -26978,7 +26978,7 @@

    Arguments

    @@ -26993,7 +26993,7 @@

    Arguments

    @@ -27008,7 +27008,7 @@

    Arguments

    @@ -27051,7 +27051,7 @@

    Arguments

    @@ -27066,7 +27066,7 @@

    Arguments

    @@ -27081,7 +27081,7 @@

    Arguments

    @@ -27096,7 +27096,7 @@

    Arguments

    @@ -27111,7 +27111,7 @@

    Arguments

    @@ -27154,7 +27154,7 @@

    Arguments

    @@ -27169,7 +27169,7 @@

    Arguments

    @@ -27184,7 +27184,7 @@

    Arguments

    @@ -27199,7 +27199,7 @@

    Arguments

    @@ -27214,7 +27214,7 @@

    Arguments

    @@ -27257,7 +27257,7 @@

    Arguments

    @@ -27272,7 +27272,7 @@

    Arguments

    @@ -27287,7 +27287,7 @@

    Arguments

    @@ -27302,7 +27302,7 @@

    Arguments

    @@ -27317,7 +27317,7 @@

    Arguments

    @@ -27360,7 +27360,7 @@

    Arguments

    @@ -27375,7 +27375,7 @@

    Arguments

    @@ -27390,7 +27390,7 @@

    Arguments

    @@ -27405,7 +27405,7 @@

    Arguments

    @@ -27420,7 +27420,7 @@

    Arguments

    @@ -27463,7 +27463,7 @@

    Arguments

    @@ -27478,7 +27478,7 @@

    Arguments

    @@ -27493,7 +27493,7 @@

    Arguments

    @@ -27508,7 +27508,7 @@

    Arguments

    @@ -27523,7 +27523,7 @@

    Arguments

    @@ -27566,7 +27566,7 @@

    Arguments

    @@ -27581,7 +27581,7 @@

    Arguments

    @@ -27596,7 +27596,7 @@

    Arguments

    @@ -27611,7 +27611,7 @@

    Arguments

    @@ -27626,7 +27626,7 @@

    Arguments

    @@ -27669,7 +27669,7 @@

    Arguments

    @@ -27684,7 +27684,7 @@

    Arguments

    @@ -27699,7 +27699,7 @@

    Arguments

    @@ -27714,7 +27714,7 @@

    Arguments

    @@ -27729,7 +27729,7 @@

    Arguments

    @@ -27772,7 +27772,7 @@

    Arguments

    @@ -27787,7 +27787,7 @@

    Arguments

    @@ -27802,7 +27802,7 @@

    Arguments

    @@ -27817,7 +27817,7 @@

    Arguments

    @@ -27832,7 +27832,7 @@

    Arguments

    @@ -27875,7 +27875,7 @@

    Arguments

    @@ -27890,7 +27890,7 @@

    Arguments

    @@ -27905,7 +27905,7 @@

    Arguments

    @@ -27920,7 +27920,7 @@

    Arguments

    @@ -27935,7 +27935,7 @@

    Arguments

    @@ -27978,7 +27978,7 @@

    Arguments

    @@ -27993,7 +27993,7 @@

    Arguments

    @@ -28008,7 +28008,7 @@

    Arguments

    @@ -28023,7 +28023,7 @@

    Arguments

    @@ -28038,7 +28038,7 @@

    Arguments

    @@ -28081,7 +28081,7 @@

    Arguments

    @@ -28096,7 +28096,7 @@

    Arguments

    @@ -28111,7 +28111,7 @@

    Arguments

    @@ -28126,7 +28126,7 @@

    Arguments

    @@ -28141,7 +28141,7 @@

    Arguments

    @@ -28184,7 +28184,7 @@

    Arguments

    @@ -28199,7 +28199,7 @@

    Arguments

    @@ -28214,7 +28214,7 @@

    Arguments

    @@ -28229,7 +28229,7 @@

    Arguments

    @@ -28244,7 +28244,7 @@

    Arguments

    @@ -28287,7 +28287,7 @@

    Arguments

    @@ -28302,7 +28302,7 @@

    Arguments

    @@ -28317,7 +28317,7 @@

    Arguments

    @@ -28332,7 +28332,7 @@

    Arguments

    @@ -28347,7 +28347,7 @@

    Arguments

    @@ -28390,7 +28390,7 @@

    Arguments

    @@ -28405,7 +28405,7 @@

    Arguments

    @@ -28420,7 +28420,7 @@

    Arguments

    @@ -28435,7 +28435,7 @@

    Arguments

    @@ -28450,7 +28450,7 @@

    Arguments

    @@ -28493,7 +28493,7 @@

    Arguments

    @@ -28508,7 +28508,7 @@

    Arguments

    @@ -28523,7 +28523,7 @@

    Arguments

    @@ -28538,7 +28538,7 @@

    Arguments

    @@ -28553,7 +28553,7 @@

    Arguments

    @@ -28596,7 +28596,7 @@

    Arguments

    @@ -28611,7 +28611,7 @@

    Arguments

    @@ -28626,7 +28626,7 @@

    Arguments

    @@ -28641,7 +28641,7 @@

    Arguments

    @@ -28656,7 +28656,7 @@

    Arguments

    @@ -28699,7 +28699,7 @@

    Arguments

    @@ -28714,7 +28714,7 @@

    Arguments

    @@ -28729,7 +28729,7 @@

    Arguments

    @@ -28744,7 +28744,7 @@

    Arguments

    @@ -28759,7 +28759,7 @@

    Arguments

    @@ -28802,7 +28802,7 @@

    Arguments

    @@ -28817,7 +28817,7 @@

    Arguments

    @@ -28832,7 +28832,7 @@

    Arguments

    @@ -28847,7 +28847,7 @@

    Arguments

    @@ -28862,7 +28862,7 @@

    Arguments

    @@ -28919,7 +28919,7 @@

    Arguments

    @@ -28934,7 +28934,7 @@

    Arguments

    @@ -28949,7 +28949,7 @@

    Arguments

    @@ -28964,7 +28964,7 @@

    Arguments

    @@ -29007,7 +29007,7 @@

    Arguments

    @@ -29022,7 +29022,7 @@

    Arguments

    @@ -29037,7 +29037,7 @@

    Arguments

    @@ -29052,7 +29052,7 @@

    Arguments

    @@ -29095,7 +29095,7 @@

    Arguments

    @@ -29110,7 +29110,7 @@

    Arguments

    @@ -29125,7 +29125,7 @@

    Arguments

    @@ -29140,7 +29140,7 @@

    Arguments

    @@ -29183,7 +29183,7 @@

    Arguments

    @@ -29198,7 +29198,7 @@

    Arguments

    @@ -29213,7 +29213,7 @@

    Arguments

    @@ -29228,7 +29228,7 @@

    Arguments

    @@ -29271,7 +29271,7 @@

    Arguments

    @@ -29286,7 +29286,7 @@

    Arguments

    @@ -29301,7 +29301,7 @@

    Arguments

    @@ -29316,7 +29316,7 @@

    Arguments

    @@ -29359,7 +29359,7 @@

    Arguments

    @@ -29374,7 +29374,7 @@

    Arguments

    @@ -29389,7 +29389,7 @@

    Arguments

    @@ -29404,7 +29404,7 @@

    Arguments

    @@ -29447,7 +29447,7 @@

    Arguments

    @@ -29462,7 +29462,7 @@

    Arguments

    @@ -29477,7 +29477,7 @@

    Arguments

    @@ -29492,7 +29492,7 @@

    Arguments

    @@ -29535,7 +29535,7 @@

    Arguments

    @@ -29550,7 +29550,7 @@

    Arguments

    @@ -29565,7 +29565,7 @@

    Arguments

    @@ -29580,7 +29580,7 @@

    Arguments

    @@ -29623,7 +29623,7 @@

    Arguments

    @@ -29638,7 +29638,7 @@

    Arguments

    @@ -29653,7 +29653,7 @@

    Arguments

    @@ -29668,7 +29668,7 @@

    Arguments

    @@ -29711,7 +29711,7 @@

    Arguments

    @@ -29726,7 +29726,7 @@

    Arguments

    @@ -29741,7 +29741,7 @@

    Arguments

    @@ -29756,7 +29756,7 @@

    Arguments

    @@ -29799,7 +29799,7 @@

    Arguments

    @@ -29814,7 +29814,7 @@

    Arguments

    @@ -29829,7 +29829,7 @@

    Arguments

    @@ -29844,7 +29844,7 @@

    Arguments

    @@ -29887,7 +29887,7 @@

    Arguments

    @@ -29902,7 +29902,7 @@

    Arguments

    @@ -29917,7 +29917,7 @@

    Arguments

    @@ -29932,7 +29932,7 @@

    Arguments

    @@ -29975,7 +29975,7 @@

    Arguments

    @@ -29990,7 +29990,7 @@

    Arguments

    @@ -30005,7 +30005,7 @@

    Arguments

    @@ -30020,7 +30020,7 @@

    Arguments

    @@ -30063,7 +30063,7 @@

    Arguments

    @@ -30078,7 +30078,7 @@

    Arguments

    @@ -30093,7 +30093,7 @@

    Arguments

    @@ -30108,7 +30108,7 @@

    Arguments

    @@ -30151,7 +30151,7 @@

    Arguments

    @@ -30166,7 +30166,7 @@

    Arguments

    @@ -30181,7 +30181,7 @@

    Arguments

    @@ -30196,7 +30196,7 @@

    Arguments

    @@ -30239,7 +30239,7 @@

    Arguments

    @@ -30254,7 +30254,7 @@

    Arguments

    @@ -30269,7 +30269,7 @@

    Arguments

    @@ -30284,7 +30284,7 @@

    Arguments

    @@ -30327,7 +30327,7 @@

    Arguments

    @@ -30342,7 +30342,7 @@

    Arguments

    @@ -30357,7 +30357,7 @@

    Arguments

    @@ -30372,7 +30372,7 @@

    Arguments

    @@ -30415,7 +30415,7 @@

    Arguments

    @@ -30430,7 +30430,7 @@

    Arguments

    @@ -30445,7 +30445,7 @@

    Arguments

    @@ -30460,7 +30460,7 @@

    Arguments

    @@ -30503,7 +30503,7 @@

    Arguments

    @@ -30518,7 +30518,7 @@

    Arguments

    @@ -30533,7 +30533,7 @@

    Arguments

    @@ -30548,7 +30548,7 @@

    Arguments

    @@ -30591,7 +30591,7 @@

    Arguments

    @@ -30606,7 +30606,7 @@

    Arguments

    @@ -30621,7 +30621,7 @@

    Arguments

    @@ -30636,7 +30636,7 @@

    Arguments

    @@ -30679,7 +30679,7 @@

    Arguments

    @@ -30694,7 +30694,7 @@

    Arguments

    @@ -30709,7 +30709,7 @@

    Arguments

    @@ -30724,7 +30724,7 @@

    Arguments

    @@ -30767,7 +30767,7 @@

    Arguments

    @@ -30782,7 +30782,7 @@

    Arguments

    @@ -30797,7 +30797,7 @@

    Arguments

    @@ -30812,7 +30812,7 @@

    Arguments

    @@ -30855,7 +30855,7 @@

    Arguments

    @@ -30870,7 +30870,7 @@

    Arguments

    @@ -30885,7 +30885,7 @@

    Arguments

    @@ -30900,7 +30900,7 @@

    Arguments

    @@ -30943,7 +30943,7 @@

    Arguments

    @@ -30958,7 +30958,7 @@

    Arguments

    @@ -30973,7 +30973,7 @@

    Arguments

    @@ -30988,7 +30988,7 @@

    Arguments

    @@ -31031,7 +31031,7 @@

    Arguments

    @@ -31046,7 +31046,7 @@

    Arguments

    @@ -31061,7 +31061,7 @@

    Arguments

    @@ -31104,7 +31104,7 @@

    Arguments

    @@ -31119,7 +31119,7 @@

    Arguments

    @@ -31134,7 +31134,7 @@

    Arguments

    @@ -31177,7 +31177,7 @@

    Arguments

    @@ -31192,7 +31192,7 @@

    Arguments

    @@ -31207,7 +31207,7 @@

    Arguments

    @@ -31250,7 +31250,7 @@

    Arguments

    @@ -31265,7 +31265,7 @@

    Arguments

    @@ -31280,7 +31280,7 @@

    Arguments

    @@ -31323,7 +31323,7 @@

    Arguments

    @@ -31338,7 +31338,7 @@

    Arguments

    @@ -31353,7 +31353,7 @@

    Arguments

    @@ -31396,7 +31396,7 @@

    Arguments

    @@ -31411,7 +31411,7 @@

    Arguments

    @@ -31426,7 +31426,7 @@

    Arguments

    @@ -31469,7 +31469,7 @@

    Arguments

    @@ -31484,7 +31484,7 @@

    Arguments

    @@ -31499,7 +31499,7 @@

    Arguments

    @@ -31542,7 +31542,7 @@

    Arguments

    @@ -31557,7 +31557,7 @@

    Arguments

    @@ -31572,7 +31572,7 @@

    Arguments

    @@ -31615,7 +31615,7 @@

    Arguments

    @@ -31630,7 +31630,7 @@

    Arguments

    @@ -31645,7 +31645,7 @@

    Arguments

    @@ -31688,7 +31688,7 @@

    Arguments

    @@ -31703,7 +31703,7 @@

    Arguments

    @@ -31718,7 +31718,7 @@

    Arguments

    @@ -31761,7 +31761,7 @@

    Arguments

    @@ -31776,7 +31776,7 @@

    Arguments

    @@ -31791,7 +31791,7 @@

    Arguments

    @@ -31834,7 +31834,7 @@

    Arguments

    @@ -31849,7 +31849,7 @@

    Arguments

    @@ -31864,7 +31864,7 @@

    Arguments

    @@ -31907,7 +31907,7 @@

    Arguments

    @@ -31922,7 +31922,7 @@

    Arguments

    @@ -31937,7 +31937,7 @@

    Arguments

    @@ -31980,7 +31980,7 @@

    Arguments

    @@ -31995,7 +31995,7 @@

    Arguments

    @@ -32010,7 +32010,7 @@

    Arguments

    @@ -32053,7 +32053,7 @@

    Arguments

    @@ -32068,7 +32068,7 @@

    Arguments

    @@ -32083,7 +32083,7 @@

    Arguments

    @@ -32126,7 +32126,7 @@

    Arguments

    @@ -32141,7 +32141,7 @@

    Arguments

    @@ -32156,7 +32156,7 @@

    Arguments

    @@ -32199,7 +32199,7 @@

    Arguments

    @@ -32214,7 +32214,7 @@

    Arguments

    @@ -32229,7 +32229,7 @@

    Arguments

    @@ -32272,7 +32272,7 @@

    Arguments

    @@ -32287,7 +32287,7 @@

    Arguments

    @@ -32302,7 +32302,7 @@

    Arguments

    @@ -32345,7 +32345,7 @@

    Arguments

    @@ -32360,7 +32360,7 @@

    Arguments

    @@ -32375,7 +32375,7 @@

    Arguments

    @@ -32418,7 +32418,7 @@

    Arguments

    @@ -32433,7 +32433,7 @@

    Arguments

    @@ -32448,7 +32448,7 @@

    Arguments

    @@ -32491,7 +32491,7 @@

    Arguments

    @@ -32506,7 +32506,7 @@

    Arguments

    @@ -32521,7 +32521,7 @@

    Arguments

    @@ -32564,7 +32564,7 @@

    Arguments

    @@ -32579,7 +32579,7 @@

    Arguments

    @@ -32594,7 +32594,7 @@

    Arguments

    @@ -32637,7 +32637,7 @@

    Arguments

    @@ -32652,7 +32652,7 @@

    Arguments

    @@ -32667,7 +32667,7 @@

    Arguments

    @@ -32710,7 +32710,7 @@

    Arguments

    @@ -32725,7 +32725,7 @@

    Arguments

    @@ -32740,7 +32740,7 @@

    Arguments

    @@ -32783,7 +32783,7 @@

    Arguments

    @@ -32798,7 +32798,7 @@

    Arguments

    @@ -32813,7 +32813,7 @@

    Arguments

    @@ -32828,7 +32828,7 @@

    Arguments

    @@ -32871,7 +32871,7 @@

    Arguments

    @@ -32886,7 +32886,7 @@

    Arguments

    @@ -32901,7 +32901,7 @@

    Arguments

    @@ -32916,7 +32916,7 @@

    Arguments

    @@ -32959,7 +32959,7 @@

    Arguments

    @@ -32974,7 +32974,7 @@

    Arguments

    @@ -32989,7 +32989,7 @@

    Arguments

    @@ -33004,7 +33004,7 @@

    Arguments

    @@ -33047,7 +33047,7 @@

    Arguments

    @@ -33062,7 +33062,7 @@

    Arguments

    @@ -33077,7 +33077,7 @@

    Arguments

    @@ -33092,7 +33092,7 @@

    Arguments

    @@ -33135,7 +33135,7 @@

    Arguments

    @@ -33150,7 +33150,7 @@

    Arguments

    @@ -33165,7 +33165,7 @@

    Arguments

    @@ -33180,7 +33180,7 @@

    Arguments

    @@ -33223,7 +33223,7 @@

    Arguments

    @@ -33238,7 +33238,7 @@

    Arguments

    @@ -33253,7 +33253,7 @@

    Arguments

    @@ -33268,7 +33268,7 @@

    Arguments

    @@ -33311,7 +33311,7 @@

    Arguments

    @@ -33326,7 +33326,7 @@

    Arguments

    @@ -33341,7 +33341,7 @@

    Arguments

    @@ -33356,7 +33356,7 @@

    Arguments

    @@ -33399,7 +33399,7 @@

    Arguments

    @@ -33414,7 +33414,7 @@

    Arguments

    @@ -33429,7 +33429,7 @@

    Arguments

    @@ -33444,7 +33444,7 @@

    Arguments

    @@ -33487,7 +33487,7 @@

    Arguments

    @@ -33502,7 +33502,7 @@

    Arguments

    @@ -33517,7 +33517,7 @@

    Arguments

    @@ -33532,7 +33532,7 @@

    Arguments

    @@ -33575,7 +33575,7 @@

    Arguments

    @@ -33590,7 +33590,7 @@

    Arguments

    @@ -33605,7 +33605,7 @@

    Arguments

    @@ -33620,7 +33620,7 @@

    Arguments

    @@ -33663,7 +33663,7 @@

    Arguments

    @@ -33678,7 +33678,7 @@

    Arguments

    @@ -33693,7 +33693,7 @@

    Arguments

    @@ -33708,7 +33708,7 @@

    Arguments

    @@ -33751,7 +33751,7 @@

    Arguments

    @@ -33766,7 +33766,7 @@

    Arguments

    @@ -33781,7 +33781,7 @@

    Arguments

    @@ -33796,7 +33796,7 @@

    Arguments

    @@ -33839,7 +33839,7 @@

    Arguments

    @@ -33854,7 +33854,7 @@

    Arguments

    @@ -33869,7 +33869,7 @@

    Arguments

    @@ -33884,7 +33884,7 @@

    Arguments

    @@ -33927,7 +33927,7 @@

    Arguments

    @@ -33942,7 +33942,7 @@

    Arguments

    @@ -33957,7 +33957,7 @@

    Arguments

    @@ -33972,7 +33972,7 @@

    Arguments

    @@ -34015,7 +34015,7 @@

    Arguments

    @@ -34030,7 +34030,7 @@

    Arguments

    @@ -34045,7 +34045,7 @@

    Arguments

    @@ -34060,7 +34060,7 @@

    Arguments

    @@ -34103,7 +34103,7 @@

    Arguments

    @@ -34118,7 +34118,7 @@

    Arguments

    @@ -34133,7 +34133,7 @@

    Arguments

    @@ -34148,7 +34148,7 @@

    Arguments

    @@ -34191,7 +34191,7 @@

    Arguments

    @@ -34206,7 +34206,7 @@

    Arguments

    @@ -34221,7 +34221,7 @@

    Arguments

    @@ -34236,7 +34236,7 @@

    Arguments

    @@ -34279,7 +34279,7 @@

    Arguments

    @@ -34294,7 +34294,7 @@

    Arguments

    @@ -34309,7 +34309,7 @@

    Arguments

    @@ -34324,7 +34324,7 @@

    Arguments

    @@ -34367,7 +34367,7 @@

    Arguments

    @@ -34382,7 +34382,7 @@

    Arguments

    @@ -34397,7 +34397,7 @@

    Arguments

    @@ -34412,7 +34412,7 @@

    Arguments

    @@ -34455,7 +34455,7 @@

    Arguments

    @@ -34470,7 +34470,7 @@

    Arguments

    @@ -34485,7 +34485,7 @@

    Arguments

    @@ -34500,7 +34500,7 @@

    Arguments

    @@ -34543,7 +34543,7 @@

    Arguments

    @@ -34558,7 +34558,7 @@

    Arguments

    @@ -34573,7 +34573,7 @@

    Arguments

    @@ -34588,7 +34588,7 @@

    Arguments

    @@ -34631,7 +34631,7 @@

    Arguments

    @@ -34646,7 +34646,7 @@

    Arguments

    @@ -34661,7 +34661,7 @@

    Arguments

    @@ -34676,7 +34676,7 @@

    Arguments

    @@ -34719,7 +34719,7 @@

    Arguments

    @@ -34734,7 +34734,7 @@

    Arguments

    @@ -34749,7 +34749,7 @@

    Arguments

    @@ -34764,7 +34764,7 @@

    Arguments

    @@ -34807,7 +34807,7 @@

    Arguments

    @@ -34822,7 +34822,7 @@

    Arguments

    @@ -34837,7 +34837,7 @@

    Arguments

    @@ -34852,7 +34852,7 @@

    Arguments

    @@ -34895,7 +34895,7 @@

    Arguments

    @@ -34910,7 +34910,7 @@

    Arguments

    @@ -34925,7 +34925,7 @@

    Arguments

    @@ -34968,7 +34968,7 @@

    Arguments

    @@ -34983,7 +34983,7 @@

    Arguments

    @@ -34998,7 +34998,7 @@

    Arguments

    @@ -35041,7 +35041,7 @@

    Arguments

    @@ -35056,7 +35056,7 @@

    Arguments

    @@ -35071,7 +35071,7 @@

    Arguments

    @@ -35114,7 +35114,7 @@

    Arguments

    @@ -35129,7 +35129,7 @@

    Arguments

    @@ -35144,7 +35144,7 @@

    Arguments

    @@ -35187,7 +35187,7 @@

    Arguments

    @@ -35202,7 +35202,7 @@

    Arguments

    @@ -35217,7 +35217,7 @@

    Arguments

    @@ -35260,7 +35260,7 @@

    Arguments

    @@ -35275,7 +35275,7 @@

    Arguments

    @@ -35290,7 +35290,7 @@

    Arguments

    @@ -35333,7 +35333,7 @@

    Arguments

    @@ -35348,7 +35348,7 @@

    Arguments

    @@ -35363,7 +35363,7 @@

    Arguments

    @@ -35406,7 +35406,7 @@

    Arguments

    @@ -35421,7 +35421,7 @@

    Arguments

    @@ -35436,7 +35436,7 @@

    Arguments

    @@ -35479,7 +35479,7 @@

    Arguments

    @@ -35494,7 +35494,7 @@

    Arguments

    @@ -35509,7 +35509,7 @@

    Arguments

    @@ -35552,7 +35552,7 @@

    Arguments

    @@ -35567,7 +35567,7 @@

    Arguments

    @@ -35582,7 +35582,7 @@

    Arguments

    @@ -35625,7 +35625,7 @@

    Arguments

    @@ -35640,7 +35640,7 @@

    Arguments

    @@ -35655,7 +35655,7 @@

    Arguments

    @@ -35698,7 +35698,7 @@

    Arguments

    @@ -35713,7 +35713,7 @@

    Arguments

    @@ -35728,7 +35728,7 @@

    Arguments

    @@ -35771,7 +35771,7 @@

    Arguments

    @@ -35786,7 +35786,7 @@

    Arguments

    @@ -35801,7 +35801,7 @@

    Arguments

    @@ -35844,7 +35844,7 @@

    Arguments

    @@ -35859,7 +35859,7 @@

    Arguments

    @@ -35874,7 +35874,7 @@

    Arguments

    @@ -35917,7 +35917,7 @@

    Arguments

    @@ -35932,7 +35932,7 @@

    Arguments

    @@ -35947,7 +35947,7 @@

    Arguments

    @@ -35990,7 +35990,7 @@

    Arguments

    @@ -36005,7 +36005,7 @@

    Arguments

    @@ -36020,7 +36020,7 @@

    Arguments

    @@ -36063,7 +36063,7 @@

    Arguments

    @@ -36078,7 +36078,7 @@

    Arguments

    @@ -36093,7 +36093,7 @@

    Arguments

    @@ -36136,7 +36136,7 @@

    Arguments

    @@ -36151,7 +36151,7 @@

    Arguments

    @@ -36166,7 +36166,7 @@

    Arguments

    @@ -36209,7 +36209,7 @@

    Arguments

    @@ -36224,7 +36224,7 @@

    Arguments

    @@ -36239,7 +36239,7 @@

    Arguments

    @@ -36282,7 +36282,7 @@

    Arguments

    @@ -36297,7 +36297,7 @@

    Arguments

    @@ -36312,7 +36312,7 @@

    Arguments

    @@ -36355,7 +36355,7 @@

    Arguments

    @@ -36370,7 +36370,7 @@

    Arguments

    @@ -36385,7 +36385,7 @@

    Arguments

    @@ -36428,7 +36428,7 @@

    Arguments

    @@ -36443,7 +36443,7 @@

    Arguments

    @@ -36458,7 +36458,7 @@

    Arguments

    @@ -36501,7 +36501,7 @@

    Arguments

    @@ -36516,7 +36516,7 @@

    Arguments

    @@ -36531,7 +36531,7 @@

    Arguments

    @@ -36574,7 +36574,7 @@

    Arguments

    @@ -36589,7 +36589,7 @@

    Arguments

    @@ -36604,7 +36604,7 @@

    Arguments

    @@ -36648,13 +36648,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_stats_corr.html b/module/stdlib_stats_corr.html index 841026633..9e8a02872 100644 --- a/module/stdlib_stats_corr.html +++ b/module/stdlib_stats_corr.html @@ -145,10 +145,10 @@

    Uses

    @@ -266,7 +266,7 @@

    Arguments

    @@ -324,7 +324,7 @@

    Arguments

    @@ -382,7 +382,7 @@

    Arguments

    @@ -456,7 +456,7 @@

    Arguments

    @@ -514,7 +514,7 @@

    Arguments

    @@ -572,7 +572,7 @@

    Arguments

    @@ -630,7 +630,7 @@

    Arguments

    @@ -907,7 +907,7 @@

    Arguments

    @@ -965,7 +965,7 @@

    Arguments

    @@ -1023,7 +1023,7 @@

    Arguments

    @@ -1081,7 +1081,7 @@

    Arguments

    @@ -1125,13 +1125,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_stats_distribution_normal.html b/module/stdlib_stats_distribution_normal.html index 6179414db..a8d549b53 100644 --- a/module/stdlib_stats_distribution_normal.html +++ b/module/stdlib_stats_distribution_normal.html @@ -157,10 +157,10 @@

    Uses

    @@ -207,7 +207,7 @@

    Arguments

    @@ -222,7 +222,7 @@

    Arguments

    @@ -237,7 +237,7 @@

    Arguments

    @@ -280,7 +280,7 @@

    Arguments

    @@ -295,7 +295,7 @@

    Arguments

    @@ -310,7 +310,7 @@

    Arguments

    @@ -353,7 +353,7 @@

    Arguments

    @@ -368,7 +368,7 @@

    Arguments

    @@ -383,7 +383,7 @@

    Arguments

    @@ -426,7 +426,7 @@

    Arguments

    @@ -441,7 +441,7 @@

    Arguments

    @@ -456,7 +456,7 @@

    Arguments

    @@ -514,7 +514,7 @@

    Arguments

    @@ -529,7 +529,7 @@

    Arguments

    @@ -544,7 +544,7 @@

    Arguments

    @@ -587,7 +587,7 @@

    Arguments

    @@ -602,7 +602,7 @@

    Arguments

    @@ -617,7 +617,7 @@

    Arguments

    @@ -660,7 +660,7 @@

    Arguments

    @@ -675,7 +675,7 @@

    Arguments

    @@ -690,7 +690,7 @@

    Arguments

    @@ -733,7 +733,7 @@

    Arguments

    @@ -748,7 +748,7 @@

    Arguments

    @@ -763,7 +763,7 @@

    Arguments

    @@ -837,7 +837,7 @@

    Arguments

    @@ -852,7 +852,7 @@

    Arguments

    @@ -895,7 +895,7 @@

    Arguments

    @@ -910,7 +910,7 @@

    Arguments

    @@ -953,7 +953,7 @@

    Arguments

    @@ -968,7 +968,7 @@

    Arguments

    @@ -1011,7 +1011,7 @@

    Arguments

    @@ -1026,7 +1026,7 @@

    Arguments

    @@ -1069,7 +1069,7 @@

    Arguments

    @@ -1084,7 +1084,7 @@

    Arguments

    @@ -1099,7 +1099,7 @@

    Arguments

    @@ -1142,7 +1142,7 @@

    Arguments

    @@ -1157,7 +1157,7 @@

    Arguments

    @@ -1172,7 +1172,7 @@

    Arguments

    @@ -1215,7 +1215,7 @@

    Arguments

    @@ -1230,7 +1230,7 @@

    Arguments

    @@ -1245,7 +1245,7 @@

    Arguments

    @@ -1288,7 +1288,7 @@

    Arguments

    @@ -1303,7 +1303,7 @@

    Arguments

    @@ -1318,7 +1318,7 @@

    Arguments

    @@ -1362,13 +1362,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_stats_distribution_uniform.html b/module/stdlib_stats_distribution_uniform.html index 2ee0f3bfd..da156871d 100644 --- a/module/stdlib_stats_distribution_uniform.html +++ b/module/stdlib_stats_distribution_uniform.html @@ -159,8 +159,8 @@

    Uses

  • @@ -208,7 +208,7 @@

    Arguments

    @@ -223,7 +223,7 @@

    Arguments

    @@ -238,7 +238,7 @@

    Arguments

    @@ -281,7 +281,7 @@

    Arguments

    @@ -296,7 +296,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -354,7 +354,7 @@

    Arguments

    @@ -369,7 +369,7 @@

    Arguments

    @@ -384,7 +384,7 @@

    Arguments

    @@ -427,7 +427,7 @@

    Arguments

    @@ -442,7 +442,7 @@

    Arguments

    @@ -457,7 +457,7 @@

    Arguments

    @@ -500,7 +500,7 @@

    Arguments

    @@ -515,7 +515,7 @@

    Arguments

    @@ -530,7 +530,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -646,7 +646,7 @@

    Arguments

    @@ -661,7 +661,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -719,7 +719,7 @@

    Arguments

    @@ -734,7 +734,7 @@

    Arguments

    @@ -749,7 +749,7 @@

    Arguments

    @@ -808,7 +808,7 @@

    Arguments

    @@ -823,7 +823,7 @@

    Arguments

    @@ -838,7 +838,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -896,7 +896,7 @@

    Arguments

    @@ -911,7 +911,7 @@

    Arguments

    @@ -954,7 +954,7 @@

    Arguments

    @@ -969,7 +969,7 @@

    Arguments

    @@ -984,7 +984,7 @@

    Arguments

    @@ -1027,7 +1027,7 @@

    Arguments

    @@ -1042,7 +1042,7 @@

    Arguments

    @@ -1057,7 +1057,7 @@

    Arguments

    @@ -1100,7 +1100,7 @@

    Arguments

    @@ -1115,7 +1115,7 @@

    Arguments

    @@ -1130,7 +1130,7 @@

    Arguments

    @@ -1173,7 +1173,7 @@

    Arguments

    @@ -1188,7 +1188,7 @@

    Arguments

    @@ -1203,7 +1203,7 @@

    Arguments

    @@ -1246,7 +1246,7 @@

    Arguments

    @@ -1261,7 +1261,7 @@

    Arguments

    @@ -1276,7 +1276,7 @@

    Arguments

    @@ -1319,7 +1319,7 @@

    Arguments

    @@ -1334,7 +1334,7 @@

    Arguments

    @@ -1349,7 +1349,7 @@

    Arguments

    @@ -1424,7 +1424,7 @@

    Arguments

    @@ -1467,7 +1467,7 @@

    Arguments

    @@ -1510,7 +1510,7 @@

    Arguments

    @@ -1553,7 +1553,7 @@

    Arguments

    @@ -1596,7 +1596,7 @@

    Arguments

    @@ -1639,7 +1639,7 @@

    Arguments

    @@ -1682,7 +1682,7 @@

    Arguments

    @@ -1725,7 +1725,7 @@

    Arguments

    @@ -1768,7 +1768,7 @@

    Arguments

    @@ -1783,7 +1783,7 @@

    Arguments

    @@ -1826,7 +1826,7 @@

    Arguments

    @@ -1841,7 +1841,7 @@

    Arguments

    @@ -1884,7 +1884,7 @@

    Arguments

    @@ -1899,7 +1899,7 @@

    Arguments

    @@ -1942,7 +1942,7 @@

    Arguments

    @@ -1957,7 +1957,7 @@

    Arguments

    @@ -2000,7 +2000,7 @@

    Arguments

    @@ -2015,7 +2015,7 @@

    Arguments

    @@ -2058,7 +2058,7 @@

    Arguments

    @@ -2073,7 +2073,7 @@

    Arguments

    @@ -2116,7 +2116,7 @@

    Arguments

    @@ -2131,7 +2131,7 @@

    Arguments

    @@ -2174,7 +2174,7 @@

    Arguments

    @@ -2189,7 +2189,7 @@

    Arguments

    @@ -2232,7 +2232,7 @@

    Arguments

    @@ -2247,7 +2247,7 @@

    Arguments

    @@ -2262,7 +2262,7 @@

    Arguments

    @@ -2305,7 +2305,7 @@

    Arguments

    @@ -2320,7 +2320,7 @@

    Arguments

    @@ -2335,7 +2335,7 @@

    Arguments

    @@ -2378,7 +2378,7 @@

    Arguments

    @@ -2393,7 +2393,7 @@

    Arguments

    @@ -2408,7 +2408,7 @@

    Arguments

    @@ -2451,7 +2451,7 @@

    Arguments

    @@ -2466,7 +2466,7 @@

    Arguments

    @@ -2481,7 +2481,7 @@

    Arguments

    @@ -2524,7 +2524,7 @@

    Arguments

    @@ -2539,7 +2539,7 @@

    Arguments

    @@ -2554,7 +2554,7 @@

    Arguments

    @@ -2597,7 +2597,7 @@

    Arguments

    @@ -2612,7 +2612,7 @@

    Arguments

    @@ -2627,7 +2627,7 @@

    Arguments

    @@ -2670,7 +2670,7 @@

    Arguments

    @@ -2685,7 +2685,7 @@

    Arguments

    @@ -2700,7 +2700,7 @@

    Arguments

    @@ -2743,7 +2743,7 @@

    Arguments

    @@ -2758,7 +2758,7 @@

    Arguments

    @@ -2773,7 +2773,7 @@

    Arguments

    @@ -3177,13 +3177,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_stats_mean.html b/module/stdlib_stats_mean.html index 1fffbd871..30489a54c 100644 --- a/module/stdlib_stats_mean.html +++ b/module/stdlib_stats_mean.html @@ -145,9 +145,9 @@

    Uses

    • @@ -182,13 +182,13 @@

      Uses

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/module/stdlib_stats_median.html b/module/stdlib_stats_median.html index 516ac8328..3b3375a9c 100644 --- a/module/stdlib_stats_median.html +++ b/module/stdlib_stats_median.html @@ -145,10 +145,10 @@

      Uses

      • @@ -183,13 +183,13 @@

        Uses

        Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
        © 2024 Creative Commons License -
        ad42828

        +
        d996e43

        Documentation generated by FORD - on 2024-06-19 12:31

        + on 2024-06-19 12:42


        diff --git a/module/stdlib_stats_moment.html b/module/stdlib_stats_moment.html index 1eb130120..93b72b167 100644 --- a/module/stdlib_stats_moment.html +++ b/module/stdlib_stats_moment.html @@ -145,9 +145,9 @@

        Uses

        • @@ -182,13 +182,13 @@

          Uses

          Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
          © 2024 Creative Commons License -
          ad42828

          +
          d996e43

          Documentation generated by FORD - on 2024-06-19 12:31

          + on 2024-06-19 12:42


          diff --git a/module/stdlib_stats_moment_all.html b/module/stdlib_stats_moment_all.html index 94f02acfa..9acf99be8 100644 --- a/module/stdlib_stats_moment_all.html +++ b/module/stdlib_stats_moment_all.html @@ -145,9 +145,9 @@

          Uses

          • @@ -182,13 +182,13 @@

            Uses

            Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
            © 2024 Creative Commons License -
            ad42828

            +
            d996e43

            Documentation generated by FORD - on 2024-06-19 12:31

            + on 2024-06-19 12:42


            diff --git a/module/stdlib_stats_moment_mask.html b/module/stdlib_stats_moment_mask.html index d15641699..f6369eafb 100644 --- a/module/stdlib_stats_moment_mask.html +++ b/module/stdlib_stats_moment_mask.html @@ -145,9 +145,9 @@

            Uses

            • @@ -182,13 +182,13 @@

              Uses

              Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
              © 2024 Creative Commons License -
              ad42828

              +
              d996e43

              Documentation generated by FORD - on 2024-06-19 12:31

              + on 2024-06-19 12:42


              diff --git a/module/stdlib_stats_moment_scalar.html b/module/stdlib_stats_moment_scalar.html index 1bd90a7f5..e5ef9bc61 100644 --- a/module/stdlib_stats_moment_scalar.html +++ b/module/stdlib_stats_moment_scalar.html @@ -145,9 +145,9 @@

              Uses

              • @@ -182,13 +182,13 @@

                Uses

                Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
                © 2024 Creative Commons License -
                ad42828

                +
                d996e43

                Documentation generated by FORD - on 2024-06-19 12:31

                + on 2024-06-19 12:42


                diff --git a/module/stdlib_stats_var.html b/module/stdlib_stats_var.html index a6f69d531..e7e4a285d 100644 --- a/module/stdlib_stats_var.html +++ b/module/stdlib_stats_var.html @@ -145,9 +145,9 @@

                Uses

                • @@ -182,13 +182,13 @@

                  Uses

                  Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
                  © 2024 Creative Commons License -
                  ad42828

                  +
                  d996e43

                  Documentation generated by FORD - on 2024-06-19 12:31

                  + on 2024-06-19 12:42


                  diff --git a/module/stdlib_str2num.html b/module/stdlib_str2num.html index 1faa67e60..0a96dc485 100644 --- a/module/stdlib_str2num.html +++ b/module/stdlib_str2num.html @@ -175,8 +175,8 @@

                  Uses

                  @@ -222,7 +222,7 @@

                  Arguments

    @@ -280,7 +280,7 @@

    Arguments

    @@ -338,7 +338,7 @@

    Arguments

    @@ -396,7 +396,7 @@

    Arguments

    @@ -454,7 +454,7 @@

    Arguments

    @@ -512,7 +512,7 @@

    Arguments

    @@ -584,7 +584,7 @@

    Arguments

    @@ -614,7 +614,7 @@

    Arguments

    @@ -657,7 +657,7 @@

    Arguments

    @@ -687,7 +687,7 @@

    Arguments

    @@ -730,7 +730,7 @@

    Arguments

    @@ -760,7 +760,7 @@

    Arguments

    @@ -803,7 +803,7 @@

    Arguments

    @@ -833,7 +833,7 @@

    Arguments

    @@ -876,7 +876,7 @@

    Arguments

    @@ -906,7 +906,7 @@

    Arguments

    @@ -949,7 +949,7 @@

    Arguments

    @@ -979,7 +979,7 @@

    Arguments

    @@ -1023,13 +1023,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_string_type.html b/module/stdlib_string_type.html index eb7bd3f7d..9fb45a3ba 100644 --- a/module/stdlib_string_type.html +++ b/module/stdlib_string_type.html @@ -127,7 +127,7 @@

    Interfaces

    @@ -329,7 +329,7 @@

    Arguments

    @@ -357,8 +357,8 @@

    - -

    public interface assignment(=) + +

    public interface assignment(=)

    @@ -385,7 +385,7 @@

    Arguments

    @@ -400,7 +400,7 @@

    Arguments

    @@ -452,7 +452,7 @@

    Arguments

    @@ -495,7 +495,7 @@

    Arguments

    @@ -510,7 +510,7 @@

    Arguments

    @@ -553,7 +553,7 @@

    Arguments

    @@ -568,7 +568,7 @@

    Arguments

    @@ -583,7 +583,7 @@

    Arguments

    @@ -640,7 +640,7 @@

    Arguments

    @@ -697,7 +697,7 @@

    Arguments

    @@ -758,7 +758,7 @@

    Arguments

    @@ -773,7 +773,7 @@

    Arguments

    @@ -832,7 +832,7 @@

    Arguments

    @@ -847,7 +847,7 @@

    Arguments

    @@ -906,7 +906,7 @@

    Arguments

    @@ -921,7 +921,7 @@

    Arguments

    @@ -993,7 +993,7 @@

    Arguments

    @@ -1052,7 +1052,7 @@

    Arguments

    @@ -1112,7 +1112,7 @@

    Arguments

    @@ -1127,7 +1127,7 @@

    Arguments

    @@ -1171,7 +1171,7 @@

    Arguments

    @@ -1186,7 +1186,7 @@

    Arguments

    @@ -1230,7 +1230,7 @@

    Arguments

    @@ -1245,7 +1245,7 @@

    Arguments

    @@ -1305,7 +1305,7 @@

    Arguments

    @@ -1320,7 +1320,7 @@

    Arguments

    @@ -1364,7 +1364,7 @@

    Arguments

    @@ -1379,7 +1379,7 @@

    Arguments

    @@ -1423,7 +1423,7 @@

    Arguments

    @@ -1438,7 +1438,7 @@

    Arguments

    @@ -1498,7 +1498,7 @@

    Arguments

    @@ -1513,7 +1513,7 @@

    Arguments

    @@ -1557,7 +1557,7 @@

    Arguments

    @@ -1572,7 +1572,7 @@

    Arguments

    @@ -1616,7 +1616,7 @@

    Arguments

    @@ -1631,7 +1631,7 @@

    Arguments

    @@ -1691,7 +1691,7 @@

    Arguments

    @@ -1706,7 +1706,7 @@

    Arguments

    @@ -1750,7 +1750,7 @@

    Arguments

    @@ -1765,7 +1765,7 @@

    Arguments

    @@ -1809,7 +1809,7 @@

    Arguments

    @@ -1824,7 +1824,7 @@

    Arguments

    @@ -2082,8 +2082,8 @@

    Arguments

    - -

    public interface operator(//) + +

    public interface operator(//)

    @@ -2113,7 +2113,7 @@

    Arguments

    @@ -2128,7 +2128,7 @@

    Arguments

    @@ -2172,7 +2172,7 @@

    Arguments

    @@ -2187,7 +2187,7 @@

    Arguments

    @@ -2231,7 +2231,7 @@

    Arguments

    @@ -2246,7 +2246,7 @@

    Arguments

    @@ -2274,8 +2274,8 @@

    - -

    public interface operator(/=) + +

    public interface operator(/=)

    @@ -2306,7 +2306,7 @@

    Arguments

    @@ -2321,7 +2321,7 @@

    Arguments

    @@ -2365,7 +2365,7 @@

    Arguments

    @@ -2380,7 +2380,7 @@

    Arguments

    @@ -2424,7 +2424,7 @@

    Arguments

    @@ -2439,7 +2439,7 @@

    Arguments

    @@ -2467,8 +2467,8 @@

    - -

    public interface operator(<) + +

    public interface operator(<)

    @@ -2499,7 +2499,7 @@

    Arguments

    @@ -2514,7 +2514,7 @@

    Arguments

    @@ -2558,7 +2558,7 @@

    Arguments

    @@ -2573,7 +2573,7 @@

    Arguments

    @@ -2617,7 +2617,7 @@

    Arguments

    @@ -2632,7 +2632,7 @@

    Arguments

    @@ -2660,8 +2660,8 @@

    - -

    public interface operator(<=) + +

    public interface operator(<=)

    @@ -2692,7 +2692,7 @@

    Arguments

    @@ -2707,7 +2707,7 @@

    Arguments

    @@ -2751,7 +2751,7 @@

    Arguments

    @@ -2766,7 +2766,7 @@

    Arguments

    @@ -2810,7 +2810,7 @@

    Arguments

    @@ -2825,7 +2825,7 @@

    Arguments

    @@ -2853,8 +2853,8 @@

    - -

    public interface operator(==) + +

    public interface operator(==)

    @@ -2885,7 +2885,7 @@

    Arguments

    @@ -2900,7 +2900,7 @@

    Arguments

    @@ -2944,7 +2944,7 @@

    Arguments

    @@ -2959,7 +2959,7 @@

    Arguments

    @@ -3003,7 +3003,7 @@

    Arguments

    @@ -3018,7 +3018,7 @@

    Arguments

    @@ -3046,8 +3046,8 @@

    - -

    public interface operator(>) + +

    public interface operator(>)

    @@ -3078,7 +3078,7 @@

    Arguments

    @@ -3093,7 +3093,7 @@

    Arguments

    @@ -3137,7 +3137,7 @@

    Arguments

    @@ -3152,7 +3152,7 @@

    Arguments

    @@ -3196,7 +3196,7 @@

    Arguments

    @@ -3211,7 +3211,7 @@

    Arguments

    @@ -3239,8 +3239,8 @@

    - -

    public interface operator(>=) + +

    public interface operator(>=)

    @@ -3271,7 +3271,7 @@

    Arguments

    @@ -3286,7 +3286,7 @@

    Arguments

    @@ -3330,7 +3330,7 @@

    Arguments

    @@ -3345,7 +3345,7 @@

    Arguments

    @@ -3389,7 +3389,7 @@

    Arguments

    @@ -3404,7 +3404,7 @@

    Arguments

    @@ -3460,7 +3460,7 @@

    Arguments

    @@ -3475,7 +3475,7 @@

    Arguments

    @@ -3520,7 +3520,7 @@

    Arguments

    @@ -3535,7 +3535,7 @@

    Arguments

    @@ -3586,7 +3586,7 @@

    Arguments

    @@ -3601,7 +3601,7 @@

    Arguments

    @@ -3616,7 +3616,7 @@

    Arguments

    @@ -3631,7 +3631,7 @@

    Arguments

    @@ -3685,7 +3685,7 @@

    Arguments

    @@ -3728,8 +3728,8 @@

    - -

    public interface reverse + +

    public interface reverse

    @@ -3758,7 +3758,7 @@

    Arguments

    @@ -3822,7 +3822,7 @@

    Arguments

    @@ -3837,7 +3837,7 @@

    Arguments

    @@ -3896,7 +3896,7 @@

    Arguments

    @@ -3911,7 +3911,7 @@

    Arguments

    @@ -3970,7 +3970,7 @@

    Arguments

    @@ -3985,7 +3985,7 @@

    Arguments

    @@ -4056,7 +4056,7 @@

    Arguments

    @@ -4099,7 +4099,7 @@

    Arguments

    @@ -4142,7 +4142,7 @@

    Arguments

    @@ -4185,7 +4185,7 @@

    Arguments

    @@ -4228,7 +4228,7 @@

    Arguments

    @@ -4271,7 +4271,7 @@

    Arguments

    @@ -4299,8 +4299,8 @@

    - -

    public interface to_lower + +

    public interface to_lower

    @@ -4329,7 +4329,7 @@

    Arguments

    @@ -4357,8 +4357,8 @@

    - -

    public interface to_sentence + +

    public interface to_sentence

    @@ -4387,7 +4387,7 @@

    Arguments

    @@ -4415,8 +4415,8 @@

    - -

    public interface to_title + +

    public interface to_title

    @@ -4445,7 +4445,7 @@

    Arguments

    @@ -4473,8 +4473,8 @@

    - -

    public interface to_upper + +

    public interface to_upper

    @@ -4503,7 +4503,7 @@

    Arguments

    @@ -4560,7 +4560,7 @@

    Arguments

    @@ -4624,7 +4624,7 @@

    Arguments

    @@ -4639,7 +4639,7 @@

    Arguments

    @@ -4699,7 +4699,7 @@

    Arguments

    @@ -4714,7 +4714,7 @@

    Arguments

    @@ -4774,7 +4774,7 @@

    Arguments

    @@ -4789,7 +4789,7 @@

    Arguments

    @@ -4862,7 +4862,7 @@

    Arguments

    @@ -4877,7 +4877,7 @@

    Arguments

    @@ -4922,7 +4922,7 @@

    Arguments

    @@ -4937,7 +4937,7 @@

    Arguments

    @@ -4990,7 +4990,7 @@

    Arguments

    @@ -5005,7 +5005,7 @@

    Arguments

    @@ -5020,7 +5020,7 @@

    Arguments

    @@ -5035,7 +5035,7 @@

    Arguments

    @@ -5168,13 +5168,13 @@

    Constructor

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_string_type_constructor.html b/module/stdlib_string_type_constructor.html index dc6e8616e..8396162ff 100644 --- a/module/stdlib_string_type_constructor.html +++ b/module/stdlib_string_type_constructor.html @@ -180,13 +180,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_stringlist_type.html b/module/stdlib_stringlist_type.html index e71567c43..e8ed7510b 100644 --- a/module/stdlib_stringlist_type.html +++ b/module/stdlib_stringlist_type.html @@ -140,8 +140,8 @@

    Interfaces

    bidx fidx operator(//) - operator(/=) - operator(==) + operator(/=) + operator(==) stringlist_type
    @@ -184,8 +184,8 @@

    Uses

    @@ -398,7 +398,7 @@

    Arguments

    @@ -413,7 +413,7 @@

    Arguments

    @@ -457,7 +457,7 @@

    Arguments

    @@ -472,7 +472,7 @@

    Arguments

    @@ -516,7 +516,7 @@

    Arguments

    @@ -531,7 +531,7 @@

    Arguments

    @@ -575,7 +575,7 @@

    Arguments

    @@ -590,7 +590,7 @@

    Arguments

    @@ -634,7 +634,7 @@

    Arguments

    @@ -649,7 +649,7 @@

    Arguments

    @@ -693,7 +693,7 @@

    Arguments

    @@ -708,7 +708,7 @@

    Arguments

    @@ -752,7 +752,7 @@

    Arguments

    @@ -767,7 +767,7 @@

    Arguments

    @@ -811,7 +811,7 @@

    Arguments

    @@ -826,7 +826,7 @@

    Arguments

    @@ -870,7 +870,7 @@

    Arguments

    @@ -885,7 +885,7 @@

    Arguments

    @@ -913,8 +913,8 @@

    - -

    public interface operator(/=) + +

    public interface operator(/=)

    @@ -944,7 +944,7 @@

    Arguments

    @@ -959,7 +959,7 @@

    Arguments

    @@ -1003,7 +1003,7 @@

    Arguments

    @@ -1018,7 +1018,7 @@

    Arguments

    @@ -1062,7 +1062,7 @@

    Arguments

    @@ -1077,7 +1077,7 @@

    Arguments

    @@ -1121,7 +1121,7 @@

    Arguments

    @@ -1136,7 +1136,7 @@

    Arguments

    @@ -1180,7 +1180,7 @@

    Arguments

    @@ -1195,7 +1195,7 @@

    Arguments

    @@ -1223,8 +1223,8 @@

    - -

    public interface operator(==) + +

    public interface operator(==)

    @@ -1254,7 +1254,7 @@

    Arguments

    @@ -1269,7 +1269,7 @@

    Arguments

    @@ -1313,7 +1313,7 @@

    Arguments

    @@ -1328,7 +1328,7 @@

    Arguments

    @@ -1372,7 +1372,7 @@

    Arguments

    @@ -1387,7 +1387,7 @@

    Arguments

    @@ -1431,7 +1431,7 @@

    Arguments

    @@ -1446,7 +1446,7 @@

    Arguments

    @@ -1490,7 +1490,7 @@

    Arguments

    @@ -1505,7 +1505,7 @@

    Arguments

    @@ -1581,7 +1581,7 @@

    Arguments

    @@ -1625,7 +1625,7 @@

    Arguments

    @@ -1744,7 +1744,7 @@

    Type-Bound Procedures

    + get => get_string_idx @@ -1754,7 +1754,7 @@

    Type-Bound Procedures

    + len => length_list @@ -1778,13 +1778,13 @@

    Type-Bound Procedures

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_strings.html b/module/stdlib_strings.html index d8db126e0..fe8505634 100644 --- a/module/stdlib_strings.html +++ b/module/stdlib_strings.html @@ -167,10 +167,10 @@

    Uses

    @@ -231,7 +231,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -333,7 +333,7 @@

    Arguments

    @@ -376,7 +376,7 @@

    Arguments

    @@ -391,7 +391,7 @@

    Arguments

    @@ -434,7 +434,7 @@

    Arguments

    @@ -449,7 +449,7 @@

    Arguments

    @@ -492,7 +492,7 @@

    Arguments

    @@ -507,7 +507,7 @@

    Arguments

    @@ -550,7 +550,7 @@

    Arguments

    @@ -565,7 +565,7 @@

    Arguments

    @@ -608,7 +608,7 @@

    Arguments

    @@ -623,7 +623,7 @@

    Arguments

    @@ -683,7 +683,7 @@

    Arguments

    @@ -758,7 +758,7 @@

    Arguments

    @@ -833,7 +833,7 @@

    Arguments

    @@ -908,7 +908,7 @@

    Arguments

    @@ -995,7 +995,7 @@

    Arguments

    @@ -1010,7 +1010,7 @@

    Arguments

    @@ -1053,7 +1053,7 @@

    Arguments

    @@ -1068,7 +1068,7 @@

    Arguments

    @@ -1111,7 +1111,7 @@

    Arguments

    @@ -1126,7 +1126,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1244,7 +1244,7 @@

    Arguments

    @@ -1334,7 +1334,7 @@

    Arguments

    @@ -1424,7 +1424,7 @@

    Arguments

    @@ -1514,7 +1514,7 @@

    Arguments

    @@ -1617,7 +1617,7 @@

    Arguments

    @@ -1676,7 +1676,7 @@

    Arguments

    @@ -1750,7 +1750,7 @@

    Arguments

    @@ -1809,7 +1809,7 @@

    Arguments

    @@ -1897,7 +1897,7 @@

    Arguments

    @@ -1956,7 +1956,7 @@

    Arguments

    @@ -2030,7 +2030,7 @@

    Arguments

    @@ -2089,7 +2089,7 @@

    Arguments

    @@ -2179,7 +2179,7 @@

    Arguments

    @@ -2254,7 +2254,7 @@

    Arguments

    @@ -2329,7 +2329,7 @@

    Arguments

    @@ -2404,7 +2404,7 @@

    Arguments

    @@ -2479,7 +2479,7 @@

    Arguments

    @@ -2554,7 +2554,7 @@

    Arguments

    @@ -2629,7 +2629,7 @@

    Arguments

    @@ -2704,7 +2704,7 @@

    Arguments

    @@ -2793,7 +2793,7 @@

    Arguments

    @@ -2823,7 +2823,7 @@

    Arguments

    @@ -2883,7 +2883,7 @@

    Arguments

    @@ -2913,7 +2913,7 @@

    Arguments

    @@ -2985,7 +2985,7 @@

    Arguments

    @@ -3000,7 +3000,7 @@

    Arguments

    @@ -3043,7 +3043,7 @@

    Arguments

    @@ -3058,7 +3058,7 @@

    Arguments

    @@ -3101,7 +3101,7 @@

    Arguments

    @@ -3116,7 +3116,7 @@

    Arguments

    @@ -3159,7 +3159,7 @@

    Arguments

    @@ -3174,7 +3174,7 @@

    Arguments

    @@ -3231,7 +3231,7 @@

    Arguments

    @@ -3274,7 +3274,7 @@

    Arguments

    @@ -3331,7 +3331,7 @@

    Arguments

    @@ -3374,7 +3374,7 @@

    Arguments

    @@ -3417,7 +3417,7 @@

    Arguments

    @@ -3460,7 +3460,7 @@

    Arguments

    @@ -3503,7 +3503,7 @@

    Arguments

    @@ -3546,7 +3546,7 @@

    Arguments

    @@ -3561,7 +3561,7 @@

    Arguments

    @@ -3604,7 +3604,7 @@

    Arguments

    @@ -3619,7 +3619,7 @@

    Arguments

    @@ -3662,7 +3662,7 @@

    Arguments

    @@ -3677,7 +3677,7 @@

    Arguments

    @@ -3720,7 +3720,7 @@

    Arguments

    @@ -3735,7 +3735,7 @@

    Arguments

    @@ -3778,7 +3778,7 @@

    Arguments

    @@ -3793,7 +3793,7 @@

    Arguments

    @@ -3836,7 +3836,7 @@

    Arguments

    @@ -3851,7 +3851,7 @@

    Arguments

    @@ -3894,7 +3894,7 @@

    Arguments

    @@ -3909,7 +3909,7 @@

    Arguments

    @@ -3952,7 +3952,7 @@

    Arguments

    @@ -3967,7 +3967,7 @@

    Arguments

    @@ -4010,7 +4010,7 @@

    Arguments

    @@ -4025,7 +4025,7 @@

    Arguments

    @@ -4083,7 +4083,7 @@

    Arguments

    @@ -4142,7 +4142,7 @@

    Arguments

    @@ -4201,13 +4201,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_strings_to_string.html b/module/stdlib_strings_to_string.html index 6a462e446..9366e95b7 100644 --- a/module/stdlib_strings_to_string.html +++ b/module/stdlib_strings_to_string.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_version.html b/module/stdlib_version.html index d02d0989f..92b3631f4 100644 --- a/module/stdlib_version.html +++ b/module/stdlib_version.html @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -324,13 +324,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/License.html b/page/License.html index b5d6c7f91..9b8dd222d 100644 --- a/page/License.html +++ b/page/License.html @@ -168,13 +168,13 @@

    Fortran stdlib License (MIT)

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/changelog.html b/page/changelog.html index 4e1324bce..15f1a62ff 100644 --- a/page/changelog.html +++ b/page/changelog.html @@ -510,13 +510,13 @@

    Version 0.1.0

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/contributing/CodeOfConduct.html b/page/contributing/CodeOfConduct.html index ca0a65651..69105da2f 100644 --- a/page/contributing/CodeOfConduct.html +++ b/page/contributing/CodeOfConduct.html @@ -211,13 +211,13 @@

    Attribution

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/contributing/StyleGuide.html b/page/contributing/StyleGuide.html index f6b063afb..eecb4b17d 100644 --- a/page/contributing/StyleGuide.html +++ b/page/contributing/StyleGuide.html @@ -247,13 +247,13 @@

    Document public API code with FORD

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/contributing/Workflow.html b/page/contributing/Workflow.html index eaca63e39..b9688a677 100644 --- a/page/contributing/Workflow.html +++ b/page/contributing/Workflow.html @@ -260,13 +260,13 @@

    CMake build files

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/contributing/index.html b/page/contributing/index.html index acf273ddc..0fcfd8feb 100644 --- a/page/contributing/index.html +++ b/page/contributing/index.html @@ -153,13 +153,13 @@

    Contributing

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/index.html b/page/index.html index c7af2aded..765e04035 100644 --- a/page/index.html +++ b/page/index.html @@ -160,13 +160,13 @@

    Contributing and specs

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/index.html b/page/specs/index.html index 78c023da3..4abd257cb 100644 --- a/page/specs/index.html +++ b/page/specs/index.html @@ -197,13 +197,13 @@

    Released/Stable Features & Modules<

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_ansi.html b/page/specs/stdlib_ansi.html index c8825d3a6..c9d152863 100644 --- a/page/specs/stdlib_ansi.html +++ b/page/specs/stdlib_ansi.html @@ -383,13 +383,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_array.html b/page/specs/stdlib_array.html index 639d45cee..c3cfb66aa 100644 --- a/page/specs/stdlib_array.html +++ b/page/specs/stdlib_array.html @@ -240,13 +240,13 @@

    Examples

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_ascii.html b/page/specs/stdlib_ascii.html index ac67ec2d5..7abe23075 100644 --- a/page/specs/stdlib_ascii.html +++ b/page/specs/stdlib_ascii.html @@ -344,13 +344,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_bitsets.html b/page/specs/stdlib_bitsets.html index 13e5bc5da..457bb425a 100644 --- a/page/specs/stdlib_bitsets.html +++ b/page/specs/stdlib_bitsets.html @@ -830,7 +830,7 @@

    Status

    Description

    Determines whether all bits are set to 1 in self.

    Syntax

    -

    result = self % all ()

    +

    result = self % all ()

    Class

    Elemental function.

    Argument

    @@ -946,7 +946,7 @@

    Status

    Description

    Determines whether any bits are set in self.

    Syntax

    -

    result = self % any ()

    +

    result = self % any ()

    Class

    Elemental function.

    Argument

    @@ -980,7 +980,7 @@

    Status

    Description

    Returns the number of bits that are set to one in self.

    Syntax

    -

    result = self % bit_count ()

    +

    result = self % bit_count ()

    Class

    Elemental function.

    Argument

    @@ -1024,7 +1024,7 @@

    Status

    Description

    Reports the number of bits in self.

    Syntax

    -

    result = self % bits ()

    +

    result = self % bits ()

    Class

    Elemental function.

    Argument

    @@ -1374,7 +1374,7 @@

    Status

    Description

    Determines whether no bits are set in self.

    Syntax

    -

    result = self % none ()

    +

    result = self % none ()

    Class

    Elemental function.

    Argument

    @@ -1664,9 +1664,9 @@

    Description

    Syntax

    -

    call self % set (POS)

    +

    call self % set (POS)

    or

    -

    call self % set (START_POS, END_POS)

    +

    call self % set (START_POS, END_POS)

    Class

    Elemental subroutine

    Arguments

    @@ -1698,7 +1698,7 @@

    Status

    Descriptions

    Determine whether the bit at position pos is set to 1 in self.

    Syntax

    -

    result = self % test (pos)

    +

    result = self % test (pos)

    Class

    Elemental function.

    Arguments

    @@ -1772,7 +1772,7 @@

    Status

    Description

    Determines the value of the bit at position, pos, in self.

    Syntax

    -

    result = self % value (pos)

    +

    result = self % value (pos)

    Class

    Elemental function.

    Arguments

    @@ -2205,13 +2205,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_constants.html b/page/specs/stdlib_constants.html index 69f04e5b1..5b0b3dcc9 100644 --- a/page/specs/stdlib_constants.html +++ b/page/specs/stdlib_constants.html @@ -245,13 +245,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_error.html b/page/specs/stdlib_error.html index 0a3228d88..e9a4f25c2 100644 --- a/page/specs/stdlib_error.html +++ b/page/specs/stdlib_error.html @@ -278,13 +278,13 @@

    Examples

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_hash_procedures.html b/page/specs/stdlib_hash_procedures.html index 79294bdfd..39d0539b8 100644 --- a/page/specs/stdlib_hash_procedures.html +++ b/page/specs/stdlib_hash_procedures.html @@ -952,7 +952,7 @@
    Description

    Calculates an nbits hash code from a 32-bit integer. This is useful in mapping hash codes into small arrays.

    Syntax
    -

    code = fibonacci_hash ( key, nbits )

    +

    code = fibonacci_hash ( key, nbits )

    Class

    Elemental function

    Arguments
    @@ -991,7 +991,7 @@
    Description

    Calculates a 32-bit hash code from a rank-1 integer array or a default character string.

    Syntax
    -

    code = fnv_1_hash ( key )

    +

    code = fnv_1_hash ( key )

    Class

    Pure/elemental function

    Argument
    @@ -1034,7 +1034,7 @@
    Description

    Calculates a 32-bit hash code from a rank-1 integer array or a default character string.

    Syntax
    -

    code = fnv_1a_hash ( key )

    +

    code = fnv_1a_hash ( key )

    Class

    Pure/elemental function

    Argument
    @@ -1228,7 +1228,7 @@
    Status
    Description

    Returns a random 32-bit integer distributed uniformly over the odd values.

    Syntax
    -

    call odd_random_integer ( harvest )

    +

    call odd_random_integer ( harvest )

    Class

    Subroutine

    Argument
    @@ -1248,7 +1248,7 @@
    Description

    Calculates an nbits hash code from a 32-bit integer. This is useful in mapping a hash value to a range 0 to 2**nbits-1.

    Syntax
    -

    code = universal_mult_hash ( key, seed, nbits )

    +

    code = universal_mult_hash ( key, seed, nbits )

    Class

    Elemental function

    Arguments
    @@ -1381,7 +1381,7 @@
    Description

    Calculates an nbits hash code from a 64-bit integer. This is useful in mapping hash codes into small arrays.

    Syntax
    -

    code = fibonacci_hash ( key, nbits )

    +

    code = fibonacci_hash ( key, nbits )

    Class

    Elemental function

    Arguments
    @@ -1420,7 +1420,7 @@
    Description

    Calculates a 64-bit hash code from a rank-1 integer array or a default character string.

    Syntax
    -

    code = fnv_1_hash ( key )

    +

    code = fnv_1_hash ( key )

    Class

    Pure/elemental function

    Argument
    @@ -1465,7 +1465,7 @@
    Description

    Calculates a 64-bit hash code from a rank-1 integer array or a default character string.

    Syntax
    -

    code = fnv_1a_hash ( key )

    +

    code = fnv_1a_hash ( key )

    Class

    Pure/elemental function

    Argument
    @@ -1554,7 +1554,7 @@
    Status
    Description

    Returns a random 64-bit integer distributed uniformly over the odd values.

    Syntax
    -

    call odd_random_integer ( harvest )

    +

    call odd_random_integer ( harvest )

    Class

    Subroutine

    Argument
    @@ -1658,7 +1658,7 @@
    Description

    Calculates an nbits hash code from a 64-bit integer. This is useful in mapping a hash value to a range 0 to 2**nbits-1.

    Syntax
    -

    code = universal_mult_hash ( key, seed, nbits )

    +

    code = universal_mult_hash ( key, seed, nbits )

    Class

    Elemental function

    Arguments
    @@ -2201,13 +2201,13 @@

    Test Codes

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_hashmaps.html b/page/specs/stdlib_hashmaps.html index 11f3efb69..8c0c40485 100644 --- a/page/specs/stdlib_hashmaps.html +++ b/page/specs/stdlib_hashmaps.html @@ -606,7 +606,7 @@

    Table of stdlib_hashm
  • get( key, value ) - extracts the contents of key into value, - an int8 array, 'int32' array, or character string.

    + an int8 array, int32 array, or character string.

  • free_key( key ) - frees the memory in key.

    @@ -902,9 +902,9 @@
    Argument
    is an intent(in) argument.

    other: shall be a scalar expression of type other_type. It is an intent(in) argument.

    -

    value: if the the first argument is of key_type value shall be -an allocatable default character string variable, or -an allocatable vector variable of type integer and kind int8 or +

    value: if the the first argument is of key_type, value shall be +an allocatable default character string variable, or +an allocatable vector variable of type integer and kind int8 or int32, otherwise the first argument is of other_type and value shall be an allocatable of class(*). It is an intent(out) argument.

    Example
    @@ -1140,8 +1140,8 @@
    Argument
    is an intent(out) argument.

    other: shall be a scalar variable of type other_type. It is an intent(out) argument.

    -

    value: if the first argument is key value shall be a default -character string scalar expression, or a vector expression of type integer +

    value: if the first argument is key, value shall be a default +character string scalar expression, or a vector expression of type integer and kind int8 or int32, while for a first argument of type other value shall be of type class(*). It is an intent(in) argument.

    @@ -1186,6 +1186,13 @@

    The stdlib_hashmaps module

    probe_factor, load_factor, map_probe_factor, default_bits, max_bits, int_calls, int_depth, int_index, int_probes, success, alloc_fault, and array_size_error.

    +

    Generic key interfaces for key_test, map_entry, get_other_data, +remove, and set_other_data are povided so that the supported types +of int8 arrays, int32 arrays and character scalars can be used in the +key field as well as the base key type. So for key_test, +key_key_test specifies key type for the key field, int8_key_test is int8 +for the key field and so on. Procedures other than key_key_test will call +the set function to generate a key type and pass to key_key_test.

    The stdlib_hashmaps module's public constants

    The module defines several categories of public constants. Some are used to parameterize the empirical slot expansion code. Others @@ -1333,6 +1340,7 @@

    The hashmap_type abstract t

    The type's definition is below:

        type, abstract :: hashmap_type
    +
             private
             integer(int_calls) :: call_count = 0
             integer(int_calls) :: probe_count = 0
    @@ -1341,22 +1349,52 @@ 

    The hashmap_type abstract t integer(int_index) :: num_free = 0 integer(int32) :: nbits = default_bits procedure(hasher_fun), pointer, nopass :: hasher => fnv_1_hasher + contains + procedure, non_overridable, pass(map) :: calls procedure, non_overridable, pass(map) :: entries procedure, non_overridable, pass(map) :: map_probes - procedure, non_overridable, pass(map) :: slots_bits procedure, non_overridable, pass(map) :: num_slots - procedure(get_all_keys), deferred, pass(map) :: get_all_keys - procedure(get_other), deferred, pass(map) :: get_other_data - procedure(init_map), deferred, pass(map) :: init - procedure(key_test), deferred, pass(map) :: key_test - procedure(loading), deferred, pass(map) :: loading - procedure(map_entry), deferred, pass(map) :: map_entry - procedure(rehash_map), deferred, pass(map) :: rehash - procedure(remove_entry), deferred, pass(map) :: remove - procedure(set_other), deferred, pass(map) :: set_other_data - procedure(total_depth), deferred, pass(map) :: total_depth + procedure, non_overridable, pass(map) :: slots_bits + procedure(get_all_keys), deferred, pass(map) :: get_all_keys + procedure(init_map), deferred, pass(map) :: init + procedure(loading), deferred, pass(map) :: loading + procedure(rehash_map), deferred, pass(map) :: rehash + procedure(total_depth), deferred, pass(map) :: total_depth + + !! Generic interfaces for key types. + procedure(key_key_test), deferred, pass(map) :: key_key_test + procedure, non_overridable, pass(map) :: int8_key_test + procedure, non_overridable, pass(map) :: int32_key_test + procedure, non_overridable, pass(map) :: char_key_test + + procedure(key_map_entry), deferred, pass(map) :: key_map_entry + procedure, non_overridable, pass(map) :: int8_map_entry + procedure, non_overridable, pass(map) :: int32_map_entry + procedure, non_overridable, pass(map) :: char_map_entry + + procedure(key_get_other_data), deferred, pass(map) :: key_get_other_data + procedure, non_overridable, pass(map) :: int8_get_other_data + procedure, non_overridable, pass(map) :: int32_get_other_data + procedure, non_overridable, pass(map) :: char_get_other_data + + procedure(key_remove_entry), deferred, pass(map) :: key_remove_entry + procedure, non_overridable, pass(map) :: int8_remove_entry + procedure, non_overridable, pass(map) :: int32_remove_entry + procedure, non_overridable, pass(map) :: char_remove_entry + + procedure(key_set_other_data), deferred, pass(map) :: key_set_other_data + procedure, non_overridable, pass(map) :: int8_set_other_data + procedure, non_overridable, pass(map) :: int32_set_other_data + procedure, non_overridable, pass(map) :: char_set_other_data + + generic, public :: key_test => key_key_test, int8_key_test, int32_key_test, char_key_test + generic, public :: map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry + generic, public :: get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data + generic, public :: remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry + generic, public :: set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data + end type hashmap_type

    @@ -1428,21 +1466,21 @@

    The chaining_hashmap_type< as follows:

        type, extends(hashmap_type) :: chaining_hashmap_type
             private
    -        type(chaining_map_entry_pool), pointer    :: cache => null() 
    -        type(chaining_map_entry_type), pointer    :: free_list => null() 
    -        type(chaining_map_entry_ptr), allocatable :: inverse(:) 
    +        type(chaining_map_entry_pool), pointer    :: cache => null()
    +        type(chaining_map_entry_type), pointer    :: free_list => null()
    +        type(chaining_map_entry_ptr), allocatable :: inverse(:)
             type(chaining_map_entry_ptr), allocatable :: slots(:)
         contains
             procedure :: get_all_keys => get_all_chaining_keys
    -        procedure :: get_other_data => get_other_chaining_data
    +        procedure :: key_get_other_data => get_other_chaining_data
             procedure :: init => init_chaining_map
    -        procedure :: key => chaining_key_test 
             procedure :: loading => chaining_loading
    -        procedure :: map_entry => map_chain_entry
    +        procedure :: key_map_entry => map_chain_entry
             procedure :: rehash => rehash_chaining_map
    -        procedure :: remove => remove_chaining_entry
    -        procedure :: set_other_data => set_other_chaining_data
    +        procedure :: key_remove_entry => remove_chaining_entry
    +        procedure :: key_set_other_data => set_other_chaining_data
             procedure :: total_depth => total_chaining_depth
    +        procedure :: key_key_test => chaining_key_test
             final     :: free_chaining_map
         end type chaining_hashmap_type
     
    @@ -1499,24 +1537,24 @@

    The open_hashmap_type d

    It also implements all of the deferred procedures of the hashmap_type and a finalizer for its maps. The type's definition is as follows:

    -
        type, extends(hashmap_type) :: open_hashmap_type 
    -        private 
    +
        type, extends(hashmap_type) :: open_hashmap_type
    +        private
             integer(int_index) :: index_mask = 2_int_index**default_bits-1
             type(open_map_entry_pool), pointer    :: cache => null()
    -        type(open_map_entry_list), pointer    :: free_list => null() 
    -        type(open_map_entry_ptr), allocatable :: inverse(:)
    -        integer(int_index), allocatable       :: slots(:) 
    +        type(open_map_entry_list), pointer    :: free_list => null()
    +        type(open_map_entry_ptr), allocatable  :: inverse(:)
    +        integer(int_index), allocatable        :: slots(:)
         contains
             procedure :: get_all_keys => get_all_open_keys
    -        procedure :: get_other_data => get_other_open_data
    +        procedure :: key_get_other_data => get_other_open_data
             procedure :: init => init_open_map
    -        procedure :: key_test => open_key_test 
             procedure :: loading => open_loading
    -        procedure :: map_entry => map_open_entry
    +        procedure :: key_map_entry => map_open_entry
             procedure :: rehash => rehash_open_map
    -        procedure :: remove => remove_open_entry
    -        procedure :: set_other_data => set_other_open_data
    +        procedure :: key_remove_entry => remove_open_entry
    +        procedure :: key_set_other_data => set_other_open_data
             procedure :: total_depth => total_open_depth
    +        procedure :: key_key_test => open_key_test
             final     :: free_open_map
         end type open_hashmap_type
     
    @@ -1672,7 +1710,7 @@
    Example
    program example_hashmaps_get_all_keys
       use stdlib_kinds, only: int32
       use stdlib_hashmaps, only: chaining_hashmap_type
    -  use stdlib_hashmap_wrappers, only: fnv_1_hasher, &
    +  use stdlib_hashmap_wrappers, only: fnv_1_hasher, get, &
                                          key_type, other_type, set
       implicit none
       type(chaining_hashmap_type) :: map
    @@ -1682,6 +1720,8 @@ 
    Example
    type(key_type), allocatable :: keys(:) integer(int32) :: i + character(:), allocatable :: str + call map%init(fnv_1_hasher) ! adding key-value pairs to the map @@ -1704,22 +1744,13 @@
    Example
    !Number of keys in the hashmap = 3 do i = 1, size(keys) - print '("Value of key ", I0, " = ", A)', i, key_to_char(keys(i)) + call get( keys(i), str ) + print '("Value of key ", I0, " = ", A)', i, str end do !Value of key 1 = initial key !Value of key 2 = second key !Value of key 3 = last key -contains - !Converts key type to character type - pure function key_to_char(key) result(str) - type(key_type), intent(in) :: key - character(:), allocatable :: str - character(:), allocatable :: str_mold - - allocate( character(len=size(key%value)) :: str_mold ) - str = transfer(key%value, str_mold) - end function key_to_char end program example_hashmaps_get_all_keys
    @@ -1737,8 +1768,8 @@
    Arguments
    chaining_hashmap_type or open_hashmap_type. It is an intent(inout) argument. It will be the hash map used to store and access the other data.

    -

    key: shall be a scalar expression of type key_type. It - is an intent(in) argument.

    +

    key: shall be a of type key_type scalar, character scalar, int8 array +or int32 array. It is an intent(in) argument.

    other: shall be a variable of type other_data. It is an intent(out) argument. It is the other data associated with the key.

    @@ -1750,7 +1781,7 @@
    Example

    The following is an example of the retrieval of other data associated with a key:

    program example_get_other_data
    -  use stdlib_kinds, only: int8
    +  use stdlib_kinds, only: int8, int64
       use stdlib_hashmaps, only: chaining_hashmap_type, int_index
       use stdlib_hashmap_wrappers, only: fnv_1_hasher, key_type, other_type, set, get
       implicit none
    @@ -1759,15 +1790,23 @@ 
    Example
    type(other_type) :: other type(chaining_hashmap_type) :: map type dummy_type - integer(int8) :: value(4) + integer :: value(4) end type dummy_type type(dummy_type) :: dummy - class(*), allocatable :: data - dummy%value = [4_int8, 3_int8, 2_int8, 1_int8] - allocate (data, source=dummy) + class(*), allocatable :: data + integer(int8), allocatable :: key_array(:) + integer :: int_scalar + + ! Initialize hashmap call map%init(fnv_1_hasher) - call set(key, [0_int8, 1_int8, 2_int8, 3_int8, 4_int8]) - call set(other, data) + + ! Hashmap functions are setup to store scalar value types (other). Use a dervied + ! type wrapper to store arrays. + dummy%value = [4, 3, 2, 1] + call set(other, dummy) + + ! Explicitly set key type using set function + call set(key, [0, 1]) call map%map_entry(key, other, conflict) if (.not. conflict) then call map%get_other_data(key, other) @@ -1781,6 +1820,70 @@
    Example
    class default print *, 'Invalid data type in other' end select + +! Also can use map_entry and get_other_data generic key interfaces. +! This is an exmple with integer arrays. + call map%map_entry( [2,3], other, conflict) + if (.not. conflict) then + call map%get_other_data( [2,3], other) + else + error stop 'Key is already present in the map.' + end if + call get(other, data) + select type (data) + type is (dummy_type) + print *, 'Other data % value = ', data%value + class default + print *, 'Invalid data type in other' + end select + + ! Integer scalars need to be passed as an array. + int_scalar = 2 + call map%map_entry( [int_scalar], other, conflict) + if (.not. conflict) then + call map%get_other_data( [int_scalar], other) + else + error stop 'Key is already present in the map.' + end if + call get(other, data) + select type (data) + type is (dummy_type) + print *, 'Other data % value = ', data%value + class default + print *, 'Invalid data type in other' + end select + + ! Example using character type key interface + call map%map_entry( 'key_string', other, conflict) + if (.not. conflict) then + call map%get_other_data( 'key_string', other) + else + error stop 'Key is already present in the map.' + end if + call get(other, data) + select type (data) + type is (dummy_type) + print *, 'Other data % value = ', data%value + class default + print *, 'Invalid data type in other' + end select + +! Transfer to int8 arrays to generate key for unsupported types. + key_array = transfer( [0_int64, 1_int64], [0_int8] ) + call map%map_entry( key_array, other, conflict) + if (.not. conflict) then + call map%get_other_data( key_array, other) + else + error stop 'Key is already present in the map.' + end if + call get(other, data) + select type (data) + type is (dummy_type) + print *, 'Other data % value = ', data%value + class default + print *, 'Invalid data type in other' + end select + end program example_get_other_data
    @@ -1861,9 +1964,9 @@
    Arguments
    chaining_hashmap_type or open_hashmap_type. It is an intent(inout) argument. It is the hash map whose entries are examined.

    -

    key: shall be a scalar expression of type key_type. It -is an intent(in) argument. It is a key whose presence in the map -is being examined.

    +

    key: shall be a of type key_type scalar, character scalar, int8 array +or int32 array. It is an intent(in) argument. It is a key whose +presence in the map is being examined.

    present (optional): shall be a scalar variable of type default logical. It is an intent(out) argument. It is a logical flag where .true. indicates that an entry with that key is present in the @@ -1929,9 +2032,9 @@

    Arguments
    chaining_hashmap_type or open_hashmap_type. It is an intent(inout) argument. It is the hash map to receive the entry.

    -

    key: shall be a scalar expression of type key_type. - It is an intent(in) argument. It is the key for the entry to be - placed in the table.

    +

    key: shall be a of type key_type scalar, character scalar, int8 array +or int32 array. It is an intent(in) argument. It is the key for the entry +to be placed in the table.

    other (optional): shall be a scalar expression of type other_type. It is an intent(in) argument. If present it is the other data to be associated with the key.

    @@ -1947,7 +2050,7 @@
    Arguments
    Example
    program example_map_entry
    -  use, intrinsic:: iso_fortran_env, only: int8
    +  use, intrinsic:: iso_fortran_env, only: int8, int64
       use stdlib_hashmaps, only: chaining_hashmap_type
       use stdlib_hashmap_wrappers, only: fnv_1_hasher, key_type, other_type, set
       implicit none
    @@ -1955,13 +2058,39 @@ 
    Example
    type(key_type) :: key logical :: conflict type(other_type) :: other - class(*), allocatable :: dummy - allocate (dummy, source=4) + integer :: int_scalar + + ! Initialize hashmap with 2^10 slots. + ! Hashmap will dynamically increase size if needed. call map%init(fnv_1_hasher, slots_bits=10) - call set(key, [5_int8, 7_int8, 4_int8, 13_int8]) - call set(other, dummy) + ! Initialize other type with data to store. + call set(other, 4) + + ! Explicitly set key using set function + call set(key, [1, 2, 3]) call map%map_entry(key, other, conflict) print *, 'CONFLICT = ', conflict + + ! Using map_entry int32 array interface + call map%map_entry( [4, 5, 6], other, conflict) + print *, 'CONFLICT = ', conflict + + ! Integer scalars need to be passed as an array. + int_scalar = 1 + call map%map_entry( [int_scalar], other, conflict) + print *, 'CONFLICT = ', conflict + + ! Using map_entry character interface + call map%map_entry( 'key_string', other, conflict) + print *, 'CONFLICT = ', conflict + + ! Transfer unsupported key types to int8 arrays. + call map%map_entry( transfer( [1_int64, 2_int64, 3_int64], [0_int8] ), other, conflict) + print *, 'CONFLICT = ', conflict + +! Keys can be mapped alone without a corresponding value (other). + call map%map_entry( [7, 8, 9], conflict=conflict) + print *, 'CONFLICT = ', conflict end program example_map_entry
    @@ -2076,9 +2205,9 @@
    Arguments
    chaining_hashmap_type or open_hashmap_type. It is an intent(inout) argument. It is the hash map with the element to be removed.

    -

    key: shall be a scalar expression of type key_type. It -is an intent(in) argument. It is the key identifying the entry -to be removed.

    +

    key: shall be a of type key_type scalar, character scalar, int8 array +or int32 array. It is an intent(in) argument. It is the key identifying +the entry to be removed.

    existed (optional): shall be a scalar variable of type default logical. It is an intent(out) argument. If present with the value .true. the entry existed in the map before removal, if .false. the @@ -2086,7 +2215,7 @@

    Arguments
    absent, the procedure returns with no entry with the given key.

    Example
    program example_remove
    -  use stdlib_kinds, only: int8
    +  use stdlib_kinds, only: int8, int64
       use stdlib_hashmaps, only: open_hashmap_type, int_index
       use stdlib_hashmap_wrappers, only: fnv_1_hasher, &
                                          fnv_1a_hasher, key_type, other_type, set
    @@ -2095,14 +2224,41 @@ 
    Example
    type(key_type) :: key type(other_type) :: other logical :: existed - class(*), allocatable :: dummy - allocate (dummy, source=4.0) + integer :: int_scalar + + ! Initialize hashmap with 2^10 slots. + ! Hashmap will dynamically increase size if needed. call map%init(fnv_1_hasher, slots_bits=10) - call set(key, [5_int8, 7_int8, 4_int8, 13_int8]) - call set(other, dummy) + + ! Initialize other type with data to store. + call set(other, 4.0) + + ! Explicitly set key type using set function + call set(key, [1, 2, 3]) call map%map_entry(key, other) call map%remove(key, existed) print *, "Removed key existed = ", existed + + ! Using map_entry and remove int32 generic interface. + call map%map_entry([1, 2, 3], other) + call map%remove([1, 2, 3], existed) + print *, "Removed key existed = ", existed + + ! Integer scalars need to be passed as an array. + int_scalar = 1 + call map%map_entry( [int_scalar], other) + call map%remove( [int_scalar], existed) + print *, "Removed key existed = ", existed + + ! Using map_entry and remove character generic interface. + call map%map_entry('key_string', other) + call map%remove('key_string', existed) + print *, "Removed key existed = ", existed + + ! Use transfer to int8 arrays for unsupported key types. + call map%map_entry( transfer( [1_int64, 2_int64], [0_int8] ), other) + call map%remove( transfer( [1_int64,2_int64], [0_int8] ), existed) + print *, "Removed key existed = ", existed end program example_remove
    @@ -2121,9 +2277,9 @@
    Arguments
    chaining_hashmap_type or open_hashmap_type. It is an intent(inout) argument. It will be a hash map used to store and access the entry's data.

    -

    key: shall be a scalar expression of type key_type. It -is an intent(in) argument. It is the key to the entry whose -other data is to be replaced.

    +

    key: shall be a of type key_type scalar, character scalar, int8 array +or int32 array. It is an intent(in) argument. It is the key to the +entry whose other data is to be replaced.

    other: shall be a scalar expression of type other_type. It is an intent(in) argument. It is the data to be stored as the other data for the entry with the key value, key.

    @@ -2143,17 +2299,18 @@
    Example
    type(open_hashmap_type) :: map type(key_type) :: key type(other_type) :: other - class(*), allocatable :: dummy + + ! Initialize hashmap with 2^10 slots. + ! Hashmap will dynamically increase size if needed. call map%init(fnv_1_hasher, slots_bits=10) - allocate (dummy, source='A value') - call set(key, [5_int8, 7_int8, 4_int8, 13_int8]) - call set(other, dummy) + call set(key, [5, 7, 4, 13]) + call set(other, 'A value') call map%map_entry(key, other) - deallocate (dummy) - allocate (dummy, source='Another value') - call set(other, dummy) + + call set(other, 'Another value') call map%set_other_data(key, other, exists) print *, 'The entry to have its other data replaced exists = ', exists + end program example_set_other_data
    @@ -2163,7 +2320,7 @@

    Status
    Description

    Returns the total number of bits used to address the hash map slots.

    Syntax
    -

    result = map % slots_bits ( )

    +

    result = map % slots_bits ( )

    Class

    Pure function

    Argument
    @@ -2194,7 +2351,7 @@
    Description

    Returns the total number of one's based offsets of slot entries from their slot index for a hash map

    Syntax
    -

    result = map % total_depth ( )

    +

    result = map % total_depth ( )

    Class

    Pure function

    Argument
    @@ -2226,13 +2383,13 @@
    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_io.html b/page/specs/stdlib_io.html index dbf3366e5..733a33fae 100644 --- a/page/specs/stdlib_io.html +++ b/page/specs/stdlib_io.html @@ -459,13 +459,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_kinds.html b/page/specs/stdlib_kinds.html index f9255dec9..c15b2f4fe 100644 --- a/page/specs/stdlib_kinds.html +++ b/page/specs/stdlib_kinds.html @@ -204,13 +204,13 @@

    c_bool

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_linalg.html b/page/specs/stdlib_linalg.html index bc16cf58a..34faa834e 100644 --- a/page/specs/stdlib_linalg.html +++ b/page/specs/stdlib_linalg.html @@ -1358,13 +1358,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_linalg_state_type.html b/page/specs/stdlib_linalg_state_type.html index d35152b77..ba41a3344 100644 --- a/page/specs/stdlib_linalg_state_type.html +++ b/page/specs/stdlib_linalg_state_type.html @@ -232,13 +232,13 @@

    Comparison operators provided

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_logger.html b/page/specs/stdlib_logger.html index 54179c7cd..9db9b9ace 100644 --- a/page/specs/stdlib_logger.html +++ b/page/specs/stdlib_logger.html @@ -1272,13 +1272,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_math.html b/page/specs/stdlib_math.html index 583de770d..581a13b91 100644 --- a/page/specs/stdlib_math.html +++ b/page/specs/stdlib_math.html @@ -951,13 +951,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_optval.html b/page/specs/stdlib_optval.html index 23636c3fe..ddcb06822 100644 --- a/page/specs/stdlib_optval.html +++ b/page/specs/stdlib_optval.html @@ -198,13 +198,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_quadrature.html b/page/specs/stdlib_quadrature.html index b1a3ad699..abd235127 100644 --- a/page/specs/stdlib_quadrature.html +++ b/page/specs/stdlib_quadrature.html @@ -389,13 +389,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_random.html b/page/specs/stdlib_random.html index 0766d3606..287b403ed 100644 --- a/page/specs/stdlib_random.html +++ b/page/specs/stdlib_random.html @@ -231,13 +231,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_selection.html b/page/specs/stdlib_selection.html index 740ea79fc..123970c09 100644 --- a/page/specs/stdlib_selection.html +++ b/page/specs/stdlib_selection.html @@ -473,13 +473,13 @@

    Comparison with using sort

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_sorting.html b/page/specs/stdlib_sorting.html index bcde6297c..44fae41e0 100644 --- a/page/specs/stdlib_sorting.html +++ b/page/specs/stdlib_sorting.html @@ -1532,13 +1532,13 @@

    Performance benchmarks

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_specialfunctions.html b/page/specs/stdlib_specialfunctions.html index 650fa76e8..30920391c 100644 --- a/page/specs/stdlib_specialfunctions.html +++ b/page/specs/stdlib_specialfunctions.html @@ -204,13 +204,13 @@

    Return value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_specialfunctions_gamma.html b/page/specs/stdlib_specialfunctions_gamma.html index 3d62d4414..fa791f13f 100644 --- a/page/specs/stdlib_specialfunctions_gamma.html +++ b/page/specs/stdlib_specialfunctions_gamma.html @@ -543,13 +543,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_stats.html b/page/specs/stdlib_stats.html index 550d051f5..d672f64d4 100644 --- a/page/specs/stdlib_stats.html +++ b/page/specs/stdlib_stats.html @@ -461,13 +461,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_stats_distribution_exponential.html b/page/specs/stdlib_stats_distribution_exponential.html index 5473819a6..f1ad182fa 100644 --- a/page/specs/stdlib_stats_distribution_exponential.html +++ b/page/specs/stdlib_stats_distribution_exponential.html @@ -438,13 +438,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_stats_distribution_normal.html b/page/specs/stdlib_stats_distribution_normal.html index 0cebf4361..400284c10 100644 --- a/page/specs/stdlib_stats_distribution_normal.html +++ b/page/specs/stdlib_stats_distribution_normal.html @@ -445,13 +445,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_stats_distribution_uniform.html b/page/specs/stdlib_stats_distribution_uniform.html index 5647ce3ae..2ba298173 100644 --- a/page/specs/stdlib_stats_distribution_uniform.html +++ b/page/specs/stdlib_stats_distribution_uniform.html @@ -494,13 +494,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_str2num.html b/page/specs/stdlib_str2num.html index e2277474a..930475f98 100644 --- a/page/specs/stdlib_str2num.html +++ b/page/specs/stdlib_str2num.html @@ -250,13 +250,13 @@

    Note

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_string_type.html b/page/specs/stdlib_string_type.html index c40760673..060041cb5 100644 --- a/page/specs/stdlib_string_type.html +++ b/page/specs/stdlib_string_type.html @@ -1328,7 +1328,7 @@

    Description

    Returns a new string_type instance which holds the lowercase version of the character sequence hold by the input string.

    Syntax

    -

    lowercase_string = to_lower (string)

    +

    lowercase_string = to_lower (string)

    Class

    Elemental function.

    Argument

    @@ -1358,7 +1358,7 @@

    Description

    Returns a new string_type instance which holds the uppercase version of the character sequence hold by the input string.

    Syntax

    -

    uppercase_string = to_upper (string)

    +

    uppercase_string = to_upper (string)

    Class

    Elemental function.

    Argument

    @@ -1393,7 +1393,7 @@

    Description

    character(s) and numeral(s) only and doesn't exclude any alphabetical character or numeral present next to either of its 2 ends.

    Syntax

    -

    titlecase_string = to_title (string)

    +

    titlecase_string = to_title (string)

    Class

    Elemental function.

    Argument

    @@ -1426,7 +1426,7 @@

    Description

    is transformed to uppercase unless it follows a numeral and the rest of the characters in the sequence are transformed to lowercase.

    Syntax

    -

    sentencecase_string = to_sentence (string)

    +

    sentencecase_string = to_sentence (string)

    Class

    Elemental function.

    Argument

    @@ -1456,7 +1456,7 @@

    Description

    Returns a new string_type instance which holds the reversed version of the character sequence hold by the input string.

    Syntax

    -

    reverse_string = reverse (string)

    +

    reverse_string = reverse (string)

    Class

    Elemental function.

    Argument

    @@ -1981,13 +1981,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_stringlist_type.html b/page/specs/stdlib_stringlist_type.html index fe1e28572..b8a8412fc 100644 --- a/page/specs/stdlib_stringlist_type.html +++ b/page/specs/stdlib_stringlist_type.html @@ -396,7 +396,7 @@

    get

    Description

    Returns the string present currently at the index idx in a stringlist. If index idx is out of bounds, then an empty string is returned.

    Syntax

    -

    res = stringlist_type % get (idx)

    +

    res = stringlist_type % get (idx)

    Status

    Experimental.

    Class

    @@ -444,7 +444,7 @@

    len

    Description

    Returns the number of elements present currently in the stringlist.

    Syntax

    -

    res = stringlist_type % len ()

    +

    res = stringlist_type % len ()

    Status

    Experimental.

    Class

    @@ -687,13 +687,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_strings.html b/page/specs/stdlib_strings.html index 926ef46f7..5ff9d8e61 100644 --- a/page/specs/stdlib_strings.html +++ b/page/specs/stdlib_strings.html @@ -765,13 +765,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/page/specs/stdlib_version.html b/page/specs/stdlib_version.html index d6253b45a..805ba7a30 100644 --- a/page/specs/stdlib_version.html +++ b/page/specs/stdlib_version.html @@ -209,13 +209,13 @@

    Example

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/bits.html b/proc/bits.html index 087624200..ad08ff627 100644 --- a/proc/bits.html +++ b/proc/bits.html @@ -167,7 +167,7 @@

    Arguments

  • @@ -185,7 +185,7 @@

    Arguments

    Return Value - + integer(kind=bits_kind)

    @@ -229,13 +229,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/check.html b/proc/check.html index 1c3b8549d..9207a2908 100644 --- a/proc/check.html +++ b/proc/check.html @@ -216,7 +216,7 @@

    Arguments

    @@ -231,7 +231,7 @@

    Arguments

    @@ -349,13 +349,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/copy_key.html b/proc/copy_key.html index 55e7e19c1..b763e962a 100644 --- a/proc/copy_key.html +++ b/proc/copy_key.html @@ -243,13 +243,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/copy_other.html b/proc/copy_other.html index 6776ce0e3..6e97fa913 100644 --- a/proc/copy_other.html +++ b/proc/copy_other.html @@ -243,13 +243,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/error_handler.html b/proc/error_handler.html index be838e04a..79c824036 100644 --- a/proc/error_handler.html +++ b/proc/error_handler.html @@ -163,7 +163,7 @@

    Arguments

    @@ -193,7 +193,7 @@

    Arguments

    @@ -208,7 +208,7 @@

    Arguments

    @@ -223,7 +223,7 @@

    Arguments

    @@ -275,13 +275,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/eye.html b/proc/eye.html index a66488c20..3b32b4b27 100644 --- a/proc/eye.html +++ b/proc/eye.html @@ -199,7 +199,7 @@

    Arguments

    Return Value - + integer(kind=int8), allocatable, (:,:)

    @@ -250,13 +250,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/falseloc.html b/proc/falseloc.html index 7635b9441..6f02ce8cc 100644 --- a/proc/falseloc.html +++ b/proc/falseloc.html @@ -166,7 +166,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    Return Value - + integer, (count(.not.array))

    @@ -242,13 +242,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/fibonacci_hash.html b/proc/fibonacci_hash.html index 4a85dc459..fd5aead5e 100644 --- a/proc/fibonacci_hash.html +++ b/proc/fibonacci_hash.html @@ -85,15 +85,15 @@

    fibonacci_hash
  • - Source File + Source File
  • @@ -149,9 +149,9 @@

    public elemental function fibonacci_hash(key, nbits) result(sample)

    -

    Maps the 32 bit integer key to an unsigned integer value with only nbits -bits where nbits is less than 32 -(Specification)

    +

    Maps the 64 bit integer key to an unsigned integer value with only nbits +bits where nbits is less than 64 +(Specification)

    Arguments

    @@ -167,8 +167,8 @@

    Arguments

    @@ -230,13 +230,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/fnv_1a_hasher.html b/proc/fnv_1a_hasher.html index 578eb76c7..040e227a2 100644 --- a/proc/fnv_1a_hasher.html +++ b/proc/fnv_1a_hasher.html @@ -168,7 +168,7 @@

    Arguments

    @@ -233,13 +233,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/free_key.html b/proc/free_key.html index 65ee73892..02276f599 100644 --- a/proc/free_key.html +++ b/proc/free_key.html @@ -168,7 +168,7 @@

    Arguments

    @@ -225,13 +225,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/free_other.html b/proc/free_other.html index caafb9a25..96da19477 100644 --- a/proc/free_other.html +++ b/proc/free_other.html @@ -168,7 +168,7 @@

    Arguments

    @@ -225,13 +225,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/get_stdlib_version.html b/proc/get_stdlib_version.html index 5e2f0ef2f..7e0bb0989 100644 --- a/proc/get_stdlib_version.html +++ b/proc/get_stdlib_version.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -281,13 +281,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_alpha.html b/proc/is_alpha.html index 02f2e4b5c..df83bbb66 100644 --- a/proc/is_alpha.html +++ b/proc/is_alpha.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_alphanum.html b/proc/is_alphanum.html index b585a6f66..e711a18b0 100644 --- a/proc/is_alphanum.html +++ b/proc/is_alphanum.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_ascii.html b/proc/is_ascii.html index 6e1c78844..4b0b15694 100644 --- a/proc/is_ascii.html +++ b/proc/is_ascii.html @@ -159,7 +159,7 @@

    Arguments

    @@ -204,13 +204,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_blank.html b/proc/is_blank.html index d5abad413..abf6575e0 100644 --- a/proc/is_blank.html +++ b/proc/is_blank.html @@ -159,7 +159,7 @@

    Arguments

    @@ -204,13 +204,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_control.html b/proc/is_control.html index 4de98ac46..7df83e730 100644 --- a/proc/is_control.html +++ b/proc/is_control.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_digit.html b/proc/is_digit.html index cbc976b7d..e17c09386 100644 --- a/proc/is_digit.html +++ b/proc/is_digit.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_graphical.html b/proc/is_graphical.html index c3b9c76a3..658248ae3 100644 --- a/proc/is_graphical.html +++ b/proc/is_graphical.html @@ -159,7 +159,7 @@

    Arguments

    @@ -204,13 +204,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_hex_digit.html b/proc/is_hex_digit.html index 203c5b8b5..531a44047 100644 --- a/proc/is_hex_digit.html +++ b/proc/is_hex_digit.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_lower.html b/proc/is_lower.html index c9af19a89..b2169ce33 100644 --- a/proc/is_lower.html +++ b/proc/is_lower.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_octal_digit.html b/proc/is_octal_digit.html index ad2fadf11..c30241476 100644 --- a/proc/is_octal_digit.html +++ b/proc/is_octal_digit.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_printable.html b/proc/is_printable.html index 39ad8568c..c7ea1dac1 100644 --- a/proc/is_printable.html +++ b/proc/is_printable.html @@ -159,7 +159,7 @@

    Arguments

    @@ -204,13 +204,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_punctuation.html b/proc/is_punctuation.html index 86b5aad85..b943d8bc2 100644 --- a/proc/is_punctuation.html +++ b/proc/is_punctuation.html @@ -160,7 +160,7 @@

    Arguments

    @@ -205,13 +205,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_upper.html b/proc/is_upper.html index b55da2ec6..d16519d8e 100644 --- a/proc/is_upper.html +++ b/proc/is_upper.html @@ -158,7 +158,7 @@

    Arguments

    @@ -203,13 +203,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/is_white.html b/proc/is_white.html index 38690ca51..a3a2ee974 100644 --- a/proc/is_white.html +++ b/proc/is_white.html @@ -160,7 +160,7 @@

    Arguments

    @@ -205,13 +205,13 @@

    Return Value

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/linalg_error_handling.html b/proc/linalg_error_handling.html index 920609b5e..a43afc7e4 100644 --- a/proc/linalg_error_handling.html +++ b/proc/linalg_error_handling.html @@ -164,7 +164,7 @@

    Arguments

    @@ -238,13 +238,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/odd_random_integer.html b/proc/odd_random_integer.html index 7e40738c0..c4bea8fbb 100644 --- a/proc/odd_random_integer.html +++ b/proc/odd_random_integer.html @@ -80,20 +80,20 @@

    odd_random_integer
  • 7 statements + title=" 0.0% of total for procedures.">9 statements
  • - Source File + Source File
  • @@ -149,9 +149,9 @@

    public subroutine odd_random_integer(harvest)

    -

    Returns a 32 bit pseudo random integer, harvest, distributed uniformly over -the odd integers of the int32 kind. -(Specification)

    +

    Returns a 64 bit pseudo random integer, harvest, distributed uniformly over +the odd integers of the 64 bit kind. +(Specification)

    Arguments

    @@ -168,7 +168,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    Return Value - + integer

    @@ -358,13 +358,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/parse_mode.html b/proc/parse_mode.html index 0da917a9e..ed5c5f7b2 100644 --- a/proc/parse_mode.html +++ b/proc/parse_mode.html @@ -249,13 +249,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/reverse.html b/proc/reverse.html index 6ad7ba990..f05c46fa9 100644 --- a/proc/reverse.html +++ b/proc/reverse.html @@ -166,7 +166,7 @@

    Arguments

    @@ -228,13 +228,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/seeded_nmhash32_hasher.html b/proc/seeded_nmhash32_hasher.html index 08cf15086..67c2fd89d 100644 --- a/proc/seeded_nmhash32_hasher.html +++ b/proc/seeded_nmhash32_hasher.html @@ -169,7 +169,7 @@

    Arguments

    @@ -236,13 +236,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/seeded_nmhash32x_hasher.html b/proc/seeded_nmhash32x_hasher.html index 337021ea4..968c442aa 100644 --- a/proc/seeded_nmhash32x_hasher.html +++ b/proc/seeded_nmhash32x_hasher.html @@ -169,7 +169,7 @@

    Arguments

    @@ -235,13 +235,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/seeded_water_hasher.html b/proc/seeded_water_hasher.html index d88ab83ea..4a67ae3cb 100644 --- a/proc/seeded_water_hasher.html +++ b/proc/seeded_water_hasher.html @@ -168,7 +168,7 @@

    Arguments

    @@ -234,13 +234,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_caxpy.html b/proc/stdlib_caxpy.html index 0e44aa815..6a2300963 100644 --- a/proc/stdlib_caxpy.html +++ b/proc/stdlib_caxpy.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -319,13 +319,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ccopy.html b/proc/stdlib_ccopy.html index 25a03f9f5..d44557e40 100644 --- a/proc/stdlib_ccopy.html +++ b/proc/stdlib_ccopy.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -302,13 +302,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cdotc.html b/proc/stdlib_cdotc.html index e31ccde5a..bd7c74472 100644 --- a/proc/stdlib_cdotc.html +++ b/proc/stdlib_cdotc.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -316,13 +316,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cdotu.html b/proc/stdlib_cdotu.html index e2af416a8..e070f02e8 100644 --- a/proc/stdlib_cdotu.html +++ b/proc/stdlib_cdotu.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -314,13 +314,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cgbmv.html b/proc/stdlib_cgbmv.html index 4d94df23b..59f74eaa9 100644 --- a/proc/stdlib_cgbmv.html +++ b/proc/stdlib_cgbmv.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -333,7 +333,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -562,13 +562,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cgemm.html b/proc/stdlib_cgemm.html index 0d0e45449..6c281da73 100644 --- a/proc/stdlib_cgemm.html +++ b/proc/stdlib_cgemm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -349,7 +349,7 @@

    Arguments

    @@ -640,13 +640,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cgemv.html b/proc/stdlib_cgemv.html index 50f9b94c3..bf971403e 100644 --- a/proc/stdlib_cgemv.html +++ b/proc/stdlib_cgemv.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -521,13 +521,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cgerc.html b/proc/stdlib_cgerc.html index 1445cf88d..9b2afae43 100644 --- a/proc/stdlib_cgerc.html +++ b/proc/stdlib_cgerc.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -408,13 +408,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cgeru.html b/proc/stdlib_cgeru.html index 8e18fc0db..0b0d783f2 100644 --- a/proc/stdlib_cgeru.html +++ b/proc/stdlib_cgeru.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -408,13 +408,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_chbmv.html b/proc/stdlib_chbmv.html index 11a5cf3cd..99d6aad11 100644 --- a/proc/stdlib_chbmv.html +++ b/proc/stdlib_chbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -522,13 +522,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_chemm.html b/proc/stdlib_chemm.html index 669104f5c..63244b203 100644 --- a/proc/stdlib_chemm.html +++ b/proc/stdlib_chemm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -526,13 +526,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_chemv.html b/proc/stdlib_chemv.html index d1146fadf..a64c66c5f 100644 --- a/proc/stdlib_chemv.html +++ b/proc/stdlib_chemv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -497,13 +497,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cher.html b/proc/stdlib_cher.html index 7e24bdec1..fa2bfe638 100644 --- a/proc/stdlib_cher.html +++ b/proc/stdlib_cher.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -414,13 +414,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cher2.html b/proc/stdlib_cher2.html index 4443264b1..3788502e8 100644 --- a/proc/stdlib_cher2.html +++ b/proc/stdlib_cher2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -468,13 +468,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cher2k.html b/proc/stdlib_cher2k.html index 4ce0e3ad0..b2b310ecb 100644 --- a/proc/stdlib_cher2k.html +++ b/proc/stdlib_cher2k.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -586,13 +586,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cherk.html b/proc/stdlib_cherk.html index a0fbc57cc..c6608f1fb 100644 --- a/proc/stdlib_cherk.html +++ b/proc/stdlib_cherk.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -543,13 +543,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_chpmv.html b/proc/stdlib_chpmv.html index ae7cc88de..616d30e2d 100644 --- a/proc/stdlib_chpmv.html +++ b/proc/stdlib_chpmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -488,13 +488,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_chpr.html b/proc/stdlib_chpr.html index 7297d7d89..7c29afbbf 100644 --- a/proc/stdlib_chpr.html +++ b/proc/stdlib_chpr.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -406,13 +406,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_chpr2.html b/proc/stdlib_chpr2.html index 167987820..cdf83e366 100644 --- a/proc/stdlib_chpr2.html +++ b/proc/stdlib_chpr2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -459,13 +459,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_crotg.html b/proc/stdlib_crotg.html index 5584c7665..178be9f55 100644 --- a/proc/stdlib_crotg.html +++ b/proc/stdlib_crotg.html @@ -176,7 +176,7 @@

    Arguments

    @@ -191,7 +191,7 @@

    Arguments

    @@ -206,7 +206,7 @@

    Arguments

    @@ -221,7 +221,7 @@

    Arguments

    @@ -378,13 +378,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cscal.html b/proc/stdlib_cscal.html index 80d6b17ba..9cd399b7f 100644 --- a/proc/stdlib_cscal.html +++ b/proc/stdlib_cscal.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -281,13 +281,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_csrot.html b/proc/stdlib_csrot.html index 3889aca9f..85ce5ce29 100644 --- a/proc/stdlib_csrot.html +++ b/proc/stdlib_csrot.html @@ -166,7 +166,7 @@

    Arguments

    @@ -181,7 +181,7 @@

    Arguments

    @@ -196,7 +196,7 @@

    Arguments

    @@ -211,7 +211,7 @@

    Arguments

    @@ -226,7 +226,7 @@

    Arguments

    @@ -241,7 +241,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -342,13 +342,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_csscal.html b/proc/stdlib_csscal.html index 330e4e381..f2453f6c6 100644 --- a/proc/stdlib_csscal.html +++ b/proc/stdlib_csscal.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -283,13 +283,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_cswap.html b/proc/stdlib_cswap.html index d219e070e..6e41f0623 100644 --- a/proc/stdlib_cswap.html +++ b/proc/stdlib_cswap.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -306,13 +306,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_csymm.html b/proc/stdlib_csymm.html index d5b1ad631..c02ba31cf 100644 --- a/proc/stdlib_csymm.html +++ b/proc/stdlib_csymm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -524,13 +524,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_csyr2k.html b/proc/stdlib_csyr2k.html index 2df89368f..466740ab1 100644 --- a/proc/stdlib_csyr2k.html +++ b/proc/stdlib_csyr2k.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -553,13 +553,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_csyrk.html b/proc/stdlib_csyrk.html index a242e1276..b0d3a717f 100644 --- a/proc/stdlib_csyrk.html +++ b/proc/stdlib_csyrk.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -515,13 +515,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctbmv.html b/proc/stdlib_ctbmv.html index 3fc6ee2ad..ad36a3aa7 100644 --- a/proc/stdlib_ctbmv.html +++ b/proc/stdlib_ctbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -543,13 +543,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctbsv.html b/proc/stdlib_ctbsv.html index 183c67450..8a0482ccd 100644 --- a/proc/stdlib_ctbsv.html +++ b/proc/stdlib_ctbsv.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -549,13 +549,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctpmv.html b/proc/stdlib_ctpmv.html index 6706362ad..ca7ed92a4 100644 --- a/proc/stdlib_ctpmv.html +++ b/proc/stdlib_ctpmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -516,13 +516,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctpsv.html b/proc/stdlib_ctpsv.html index 76122f781..1ed870cb8 100644 --- a/proc/stdlib_ctpsv.html +++ b/proc/stdlib_ctpsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -520,13 +520,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctrmm.html b/proc/stdlib_ctrmm.html index 01a1f3525..26df6cab3 100644 --- a/proc/stdlib_ctrmm.html +++ b/proc/stdlib_ctrmm.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -602,13 +602,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctrmv.html b/proc/stdlib_ctrmv.html index 9a91bceb2..963c4b06e 100644 --- a/proc/stdlib_ctrmv.html +++ b/proc/stdlib_ctrmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -511,13 +511,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctrsm.html b/proc/stdlib_ctrsm.html index 9b91ac1a6..8e6e9e3af 100644 --- a/proc/stdlib_ctrsm.html +++ b/proc/stdlib_ctrsm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -626,13 +626,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ctrsv.html b/proc/stdlib_ctrsv.html index f37946bad..12fd71cfd 100644 --- a/proc/stdlib_ctrsv.html +++ b/proc/stdlib_ctrsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -515,13 +515,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dasum.html b/proc/stdlib_dasum.html index a7b9eef70..b265b716f 100644 --- a/proc/stdlib_dasum.html +++ b/proc/stdlib_dasum.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -291,13 +291,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_daxpy.html b/proc/stdlib_daxpy.html index fce195a24..00de3a72d 100644 --- a/proc/stdlib_daxpy.html +++ b/proc/stdlib_daxpy.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -335,13 +335,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dcabs1.html b/proc/stdlib_dcabs1.html index 4d45c1a36..39552ea7b 100644 --- a/proc/stdlib_dcabs1.html +++ b/proc/stdlib_dcabs1.html @@ -164,7 +164,7 @@

    Arguments

    @@ -228,13 +228,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dcopy.html b/proc/stdlib_dcopy.html index b91ed844d..36bcae598 100644 --- a/proc/stdlib_dcopy.html +++ b/proc/stdlib_dcopy.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -321,13 +321,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ddot.html b/proc/stdlib_ddot.html index 972f9ca54..067fa9c7d 100644 --- a/proc/stdlib_ddot.html +++ b/proc/stdlib_ddot.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -329,13 +329,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dgbmv.html b/proc/stdlib_dgbmv.html index 192ae9d9a..e653733bf 100644 --- a/proc/stdlib_dgbmv.html +++ b/proc/stdlib_dgbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -332,7 +332,7 @@

    Arguments

    @@ -347,7 +347,7 @@

    Arguments

    @@ -544,13 +544,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dgemm.html b/proc/stdlib_dgemm.html index 4c5198de5..ae06be49c 100644 --- a/proc/stdlib_dgemm.html +++ b/proc/stdlib_dgemm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -349,7 +349,7 @@

    Arguments

    @@ -554,13 +554,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dgemv.html b/proc/stdlib_dgemv.html index 11310d90c..4b053eda1 100644 --- a/proc/stdlib_dgemv.html +++ b/proc/stdlib_dgemv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -503,13 +503,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dger.html b/proc/stdlib_dger.html index 3fc39cc81..3cb457f94 100644 --- a/proc/stdlib_dger.html +++ b/proc/stdlib_dger.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -408,13 +408,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dnrm2.html b/proc/stdlib_dnrm2.html index aad14de9a..1463d0618 100644 --- a/proc/stdlib_dnrm2.html +++ b/proc/stdlib_dnrm2.html @@ -166,7 +166,7 @@

    Arguments

    @@ -181,7 +181,7 @@

    Arguments

    @@ -196,7 +196,7 @@

    Arguments

    @@ -333,13 +333,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_drot.html b/proc/stdlib_drot.html index 05dfe9638..c5a29b368 100644 --- a/proc/stdlib_drot.html +++ b/proc/stdlib_drot.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -254,7 +254,7 @@

    Arguments

    @@ -337,13 +337,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_drotg.html b/proc/stdlib_drotg.html index 785b848f2..509c6a60a 100644 --- a/proc/stdlib_drotg.html +++ b/proc/stdlib_drotg.html @@ -177,7 +177,7 @@

    Arguments

    @@ -192,7 +192,7 @@

    Arguments

    @@ -207,7 +207,7 @@

    Arguments

    @@ -222,7 +222,7 @@

    Arguments

    @@ -325,13 +325,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_drotm.html b/proc/stdlib_drotm.html index c86a4409d..0ecc39bfa 100644 --- a/proc/stdlib_drotm.html +++ b/proc/stdlib_drotm.html @@ -175,7 +175,7 @@

    Arguments

    @@ -190,7 +190,7 @@

    Arguments

    @@ -205,7 +205,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -235,7 +235,7 @@

    Arguments

    @@ -250,7 +250,7 @@

    Arguments

    @@ -399,13 +399,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_drotmg.html b/proc/stdlib_drotmg.html index 2ec630ddd..97194f59a 100644 --- a/proc/stdlib_drotmg.html +++ b/proc/stdlib_drotmg.html @@ -175,7 +175,7 @@

    Arguments

    @@ -190,7 +190,7 @@

    Arguments

    @@ -205,7 +205,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -235,7 +235,7 @@

    Arguments

    @@ -442,13 +442,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsbmv.html b/proc/stdlib_dsbmv.html index b9c7d2376..14d3bb3d1 100644 --- a/proc/stdlib_dsbmv.html +++ b/proc/stdlib_dsbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -521,13 +521,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dscal.html b/proc/stdlib_dscal.html index a6f7b59a2..4d732c235 100644 --- a/proc/stdlib_dscal.html +++ b/proc/stdlib_dscal.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -298,13 +298,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsdot.html b/proc/stdlib_dsdot.html index f04a9a308..ad87b1d9a 100644 --- a/proc/stdlib_dsdot.html +++ b/proc/stdlib_dsdot.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -325,13 +325,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dspmv.html b/proc/stdlib_dspmv.html index 6c7464d0a..b2dc1b065 100644 --- a/proc/stdlib_dspmv.html +++ b/proc/stdlib_dspmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -485,13 +485,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dspr.html b/proc/stdlib_dspr.html index 6bf50e516..033ad35b7 100644 --- a/proc/stdlib_dspr.html +++ b/proc/stdlib_dspr.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -391,13 +391,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dspr2.html b/proc/stdlib_dspr2.html index 3d89cf60b..c5877468e 100644 --- a/proc/stdlib_dspr2.html +++ b/proc/stdlib_dspr2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -441,13 +441,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dswap.html b/proc/stdlib_dswap.html index c808ac938..ddc7ce5a9 100644 --- a/proc/stdlib_dswap.html +++ b/proc/stdlib_dswap.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -327,13 +327,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsymm.html b/proc/stdlib_dsymm.html index e47af0545..5aee8d561 100644 --- a/proc/stdlib_dsymm.html +++ b/proc/stdlib_dsymm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -523,13 +523,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsymv.html b/proc/stdlib_dsymv.html index 288b4817a..1b33d0c9f 100644 --- a/proc/stdlib_dsymv.html +++ b/proc/stdlib_dsymv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -496,13 +496,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsyr.html b/proc/stdlib_dsyr.html index fa475f01f..2a7d0b95d 100644 --- a/proc/stdlib_dsyr.html +++ b/proc/stdlib_dsyr.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -402,13 +402,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsyr2.html b/proc/stdlib_dsyr2.html index 11f513ba3..199ff627d 100644 --- a/proc/stdlib_dsyr2.html +++ b/proc/stdlib_dsyr2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -452,13 +452,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsyr2k.html b/proc/stdlib_dsyr2k.html index 3471af952..8c06406db 100644 --- a/proc/stdlib_dsyr2k.html +++ b/proc/stdlib_dsyr2k.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -552,13 +552,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dsyrk.html b/proc/stdlib_dsyrk.html index 4c8205cc9..3d58e3a45 100644 --- a/proc/stdlib_dsyrk.html +++ b/proc/stdlib_dsyrk.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -514,13 +514,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtbmv.html b/proc/stdlib_dtbmv.html index 8f473aa1a..fa870a172 100644 --- a/proc/stdlib_dtbmv.html +++ b/proc/stdlib_dtbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -512,13 +512,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtbsv.html b/proc/stdlib_dtbsv.html index 97b3bbbcf..1cc147ccb 100644 --- a/proc/stdlib_dtbsv.html +++ b/proc/stdlib_dtbsv.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -518,13 +518,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtpmv.html b/proc/stdlib_dtpmv.html index b414e67a4..fb6ee8cb3 100644 --- a/proc/stdlib_dtpmv.html +++ b/proc/stdlib_dtpmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -481,13 +481,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtpsv.html b/proc/stdlib_dtpsv.html index daddcc571..192dd9603 100644 --- a/proc/stdlib_dtpsv.html +++ b/proc/stdlib_dtpsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -485,13 +485,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtrmm.html b/proc/stdlib_dtrmm.html index c65f0996e..088fb5f63 100644 --- a/proc/stdlib_dtrmm.html +++ b/proc/stdlib_dtrmm.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -566,13 +566,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtrmv.html b/proc/stdlib_dtrmv.html index 8cb39e7d0..419555186 100644 --- a/proc/stdlib_dtrmv.html +++ b/proc/stdlib_dtrmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -480,13 +480,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtrsm.html b/proc/stdlib_dtrsm.html index 1fb1d38cc..6810c65a6 100644 --- a/proc/stdlib_dtrsm.html +++ b/proc/stdlib_dtrsm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -592,13 +592,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dtrsv.html b/proc/stdlib_dtrsv.html index 13f48e63e..ead189606 100644 --- a/proc/stdlib_dtrsv.html +++ b/proc/stdlib_dtrsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -484,13 +484,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dzasum.html b/proc/stdlib_dzasum.html index 6e2820c11..cc724024e 100644 --- a/proc/stdlib_dzasum.html +++ b/proc/stdlib_dzasum.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -278,13 +278,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_dznrm2.html b/proc/stdlib_dznrm2.html index 0d3fa069b..390c14709 100644 --- a/proc/stdlib_dznrm2.html +++ b/proc/stdlib_dznrm2.html @@ -166,7 +166,7 @@

    Arguments

    @@ -181,7 +181,7 @@

    Arguments

    @@ -196,7 +196,7 @@

    Arguments

    @@ -342,13 +342,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_icamax.html b/proc/stdlib_icamax.html index 5d84bd750..91b8f0124 100644 --- a/proc/stdlib_icamax.html +++ b/proc/stdlib_icamax.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -286,13 +286,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_idamax.html b/proc/stdlib_idamax.html index 5449e91f7..d9ffca3fe 100644 --- a/proc/stdlib_idamax.html +++ b/proc/stdlib_idamax.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -288,13 +288,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_isamax.html b/proc/stdlib_isamax.html index a35a8029b..f2fec0e6e 100644 --- a/proc/stdlib_isamax.html +++ b/proc/stdlib_isamax.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -288,13 +288,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_izamax.html b/proc/stdlib_izamax.html index b741a0d39..0afebfc17 100644 --- a/proc/stdlib_izamax.html +++ b/proc/stdlib_izamax.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -286,13 +286,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_lsame.html b/proc/stdlib_lsame.html index e1a67760f..5d1f76c47 100644 --- a/proc/stdlib_lsame.html +++ b/proc/stdlib_lsame.html @@ -165,7 +165,7 @@

    Arguments

    @@ -276,13 +276,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sasum.html b/proc/stdlib_sasum.html index 6cac3e3dd..1e92bee75 100644 --- a/proc/stdlib_sasum.html +++ b/proc/stdlib_sasum.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -293,13 +293,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_saxpy.html b/proc/stdlib_saxpy.html index 4a603eed6..4311c0c1e 100644 --- a/proc/stdlib_saxpy.html +++ b/proc/stdlib_saxpy.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -335,13 +335,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_scabs1.html b/proc/stdlib_scabs1.html index b6e1daedf..18601493b 100644 --- a/proc/stdlib_scabs1.html +++ b/proc/stdlib_scabs1.html @@ -164,7 +164,7 @@

    Arguments

    @@ -228,13 +228,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_scasum.html b/proc/stdlib_scasum.html index 7af2757f0..a25ec1645 100644 --- a/proc/stdlib_scasum.html +++ b/proc/stdlib_scasum.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -280,13 +280,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_scnrm2.html b/proc/stdlib_scnrm2.html index 0b4bbc52f..020c3624f 100644 --- a/proc/stdlib_scnrm2.html +++ b/proc/stdlib_scnrm2.html @@ -166,7 +166,7 @@

    Arguments

    @@ -181,7 +181,7 @@

    Arguments

    @@ -196,7 +196,7 @@

    Arguments

    @@ -342,13 +342,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_scopy.html b/proc/stdlib_scopy.html index 28f4518ca..ea49f8314 100644 --- a/proc/stdlib_scopy.html +++ b/proc/stdlib_scopy.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -321,13 +321,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sdot.html b/proc/stdlib_sdot.html index a071f3765..c4d956cb4 100644 --- a/proc/stdlib_sdot.html +++ b/proc/stdlib_sdot.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -329,13 +329,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sdsdot.html b/proc/stdlib_sdsdot.html index 1a17c261d..3ce33399d 100644 --- a/proc/stdlib_sdsdot.html +++ b/proc/stdlib_sdsdot.html @@ -169,7 +169,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -341,13 +341,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sgbmv.html b/proc/stdlib_sgbmv.html index ca7a80944..a3ded99c3 100644 --- a/proc/stdlib_sgbmv.html +++ b/proc/stdlib_sgbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -332,7 +332,7 @@

    Arguments

    @@ -347,7 +347,7 @@

    Arguments

    @@ -544,13 +544,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sgemm.html b/proc/stdlib_sgemm.html index 585c16213..ad160ee5c 100644 --- a/proc/stdlib_sgemm.html +++ b/proc/stdlib_sgemm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -349,7 +349,7 @@

    Arguments

    @@ -554,13 +554,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sgemv.html b/proc/stdlib_sgemv.html index 69b625ed4..0aab924b8 100644 --- a/proc/stdlib_sgemv.html +++ b/proc/stdlib_sgemv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -503,13 +503,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sger.html b/proc/stdlib_sger.html index a6fd8a039..9652b1a80 100644 --- a/proc/stdlib_sger.html +++ b/proc/stdlib_sger.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -408,13 +408,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_snrm2.html b/proc/stdlib_snrm2.html index fdd1ee01f..c8d440a4d 100644 --- a/proc/stdlib_snrm2.html +++ b/proc/stdlib_snrm2.html @@ -166,7 +166,7 @@

    Arguments

    @@ -181,7 +181,7 @@

    Arguments

    @@ -196,7 +196,7 @@

    Arguments

    @@ -333,13 +333,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_srot.html b/proc/stdlib_srot.html index cbf61f41a..e1a61d846 100644 --- a/proc/stdlib_srot.html +++ b/proc/stdlib_srot.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -254,7 +254,7 @@

    Arguments

    @@ -337,13 +337,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_srotg.html b/proc/stdlib_srotg.html index c18eaf6c9..d7ccc50ab 100644 --- a/proc/stdlib_srotg.html +++ b/proc/stdlib_srotg.html @@ -177,7 +177,7 @@

    Arguments

    @@ -192,7 +192,7 @@

    Arguments

    @@ -207,7 +207,7 @@

    Arguments

    @@ -222,7 +222,7 @@

    Arguments

    @@ -325,13 +325,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_srotm.html b/proc/stdlib_srotm.html index 7d9afbfc5..2bbbe77fa 100644 --- a/proc/stdlib_srotm.html +++ b/proc/stdlib_srotm.html @@ -175,7 +175,7 @@

    Arguments

    @@ -190,7 +190,7 @@

    Arguments

    @@ -205,7 +205,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -235,7 +235,7 @@

    Arguments

    @@ -250,7 +250,7 @@

    Arguments

    @@ -399,13 +399,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_srotmg.html b/proc/stdlib_srotmg.html index 5ae51012c..c3ad7e8a4 100644 --- a/proc/stdlib_srotmg.html +++ b/proc/stdlib_srotmg.html @@ -175,7 +175,7 @@

    Arguments

    @@ -190,7 +190,7 @@

    Arguments

    @@ -205,7 +205,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -235,7 +235,7 @@

    Arguments

    @@ -442,13 +442,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ssbmv.html b/proc/stdlib_ssbmv.html index a2e29879c..313d0f7e3 100644 --- a/proc/stdlib_ssbmv.html +++ b/proc/stdlib_ssbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -521,13 +521,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sscal.html b/proc/stdlib_sscal.html index 36b81805a..619616df0 100644 --- a/proc/stdlib_sscal.html +++ b/proc/stdlib_sscal.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -298,13 +298,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sspmv.html b/proc/stdlib_sspmv.html index ad33a9859..3566f5f15 100644 --- a/proc/stdlib_sspmv.html +++ b/proc/stdlib_sspmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -485,13 +485,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sspr.html b/proc/stdlib_sspr.html index 23cf5872c..edaea7e9d 100644 --- a/proc/stdlib_sspr.html +++ b/proc/stdlib_sspr.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -391,13 +391,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sspr2.html b/proc/stdlib_sspr2.html index cc907dd23..7d5576ae8 100644 --- a/proc/stdlib_sspr2.html +++ b/proc/stdlib_sspr2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -441,13 +441,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_sswap.html b/proc/stdlib_sswap.html index ec19a3056..9d8f99840 100644 --- a/proc/stdlib_sswap.html +++ b/proc/stdlib_sswap.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -327,13 +327,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ssymm.html b/proc/stdlib_ssymm.html index 5cd5bfe6c..a44133f66 100644 --- a/proc/stdlib_ssymm.html +++ b/proc/stdlib_ssymm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -523,13 +523,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ssymv.html b/proc/stdlib_ssymv.html index 195cd1550..3d290db5b 100644 --- a/proc/stdlib_ssymv.html +++ b/proc/stdlib_ssymv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -496,13 +496,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ssyr.html b/proc/stdlib_ssyr.html index 11f9c1ca5..8f1813bf4 100644 --- a/proc/stdlib_ssyr.html +++ b/proc/stdlib_ssyr.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -402,13 +402,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ssyr2.html b/proc/stdlib_ssyr2.html index 2ca566766..594d87415 100644 --- a/proc/stdlib_ssyr2.html +++ b/proc/stdlib_ssyr2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -452,13 +452,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ssyr2k.html b/proc/stdlib_ssyr2k.html index 42622f314..f0c3e8353 100644 --- a/proc/stdlib_ssyr2k.html +++ b/proc/stdlib_ssyr2k.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -552,13 +552,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ssyrk.html b/proc/stdlib_ssyrk.html index 2afe8aaef..5832f4ba6 100644 --- a/proc/stdlib_ssyrk.html +++ b/proc/stdlib_ssyrk.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -514,13 +514,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_stbmv.html b/proc/stdlib_stbmv.html index 44ae43eba..c1bc735e6 100644 --- a/proc/stdlib_stbmv.html +++ b/proc/stdlib_stbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -512,13 +512,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_stbsv.html b/proc/stdlib_stbsv.html index ac5825fdb..e8dea7acc 100644 --- a/proc/stdlib_stbsv.html +++ b/proc/stdlib_stbsv.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -518,13 +518,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_stpmv.html b/proc/stdlib_stpmv.html index e0e0cacde..289e088ad 100644 --- a/proc/stdlib_stpmv.html +++ b/proc/stdlib_stpmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -481,13 +481,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_stpsv.html b/proc/stdlib_stpsv.html index ea3ed9749..93642ff30 100644 --- a/proc/stdlib_stpsv.html +++ b/proc/stdlib_stpsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -485,13 +485,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_strmm.html b/proc/stdlib_strmm.html index bcdf6b197..b185cb2bf 100644 --- a/proc/stdlib_strmm.html +++ b/proc/stdlib_strmm.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -566,13 +566,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_strmv.html b/proc/stdlib_strmv.html index dd589108f..0e8f806cf 100644 --- a/proc/stdlib_strmv.html +++ b/proc/stdlib_strmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -480,13 +480,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_strsm.html b/proc/stdlib_strsm.html index fd88c68c4..1ed992898 100644 --- a/proc/stdlib_strsm.html +++ b/proc/stdlib_strsm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -592,13 +592,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_strsv.html b/proc/stdlib_strsv.html index 5b6ce1e86..9498ed934 100644 --- a/proc/stdlib_strsv.html +++ b/proc/stdlib_strsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -484,13 +484,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_xerbla.html b/proc/stdlib_xerbla.html index be50e661a..2f716963b 100644 --- a/proc/stdlib_xerbla.html +++ b/proc/stdlib_xerbla.html @@ -183,7 +183,7 @@

    Arguments

    @@ -246,13 +246,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_xerbla_array.html b/proc/stdlib_xerbla_array.html index dab292b23..29dfa9526 100644 --- a/proc/stdlib_xerbla_array.html +++ b/proc/stdlib_xerbla_array.html @@ -209,7 +209,7 @@

    Arguments

    @@ -292,13 +292,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zaxpy.html b/proc/stdlib_zaxpy.html index 7edf2b651..60381e05b 100644 --- a/proc/stdlib_zaxpy.html +++ b/proc/stdlib_zaxpy.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -319,13 +319,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zcopy.html b/proc/stdlib_zcopy.html index 9df80aea9..3947e13ea 100644 --- a/proc/stdlib_zcopy.html +++ b/proc/stdlib_zcopy.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -302,13 +302,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zdotc.html b/proc/stdlib_zdotc.html index f9e716ed7..25377f009 100644 --- a/proc/stdlib_zdotc.html +++ b/proc/stdlib_zdotc.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -316,13 +316,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zdotu.html b/proc/stdlib_zdotu.html index d42db93bd..37f6b0900 100644 --- a/proc/stdlib_zdotu.html +++ b/proc/stdlib_zdotu.html @@ -165,7 +165,7 @@

    Arguments

    @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -314,13 +314,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zdrot.html b/proc/stdlib_zdrot.html index 93421356e..8edf0e53d 100644 --- a/proc/stdlib_zdrot.html +++ b/proc/stdlib_zdrot.html @@ -166,7 +166,7 @@

    Arguments

    @@ -181,7 +181,7 @@

    Arguments

    @@ -196,7 +196,7 @@

    Arguments

    @@ -211,7 +211,7 @@

    Arguments

    @@ -226,7 +226,7 @@

    Arguments

    @@ -241,7 +241,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -342,13 +342,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zdscal.html b/proc/stdlib_zdscal.html index c462aabd3..2a8990b4a 100644 --- a/proc/stdlib_zdscal.html +++ b/proc/stdlib_zdscal.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -283,13 +283,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zgbmv.html b/proc/stdlib_zgbmv.html index f6a9fd774..2c63e9f11 100644 --- a/proc/stdlib_zgbmv.html +++ b/proc/stdlib_zgbmv.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -333,7 +333,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -562,13 +562,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zgemm.html b/proc/stdlib_zgemm.html index d8603aca7..c125ba6e8 100644 --- a/proc/stdlib_zgemm.html +++ b/proc/stdlib_zgemm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -349,7 +349,7 @@

    Arguments

    @@ -640,13 +640,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zgemv.html b/proc/stdlib_zgemv.html index e78e1c469..8f2062916 100644 --- a/proc/stdlib_zgemv.html +++ b/proc/stdlib_zgemv.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -521,13 +521,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zgerc.html b/proc/stdlib_zgerc.html index 7b63bfd82..a261c2a9a 100644 --- a/proc/stdlib_zgerc.html +++ b/proc/stdlib_zgerc.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -408,13 +408,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zgeru.html b/proc/stdlib_zgeru.html index 8a8951090..97344c190 100644 --- a/proc/stdlib_zgeru.html +++ b/proc/stdlib_zgeru.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -408,13 +408,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zhbmv.html b/proc/stdlib_zhbmv.html index 81f671772..a47078a90 100644 --- a/proc/stdlib_zhbmv.html +++ b/proc/stdlib_zhbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -522,13 +522,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zhemm.html b/proc/stdlib_zhemm.html index 1120536d0..02364fb67 100644 --- a/proc/stdlib_zhemm.html +++ b/proc/stdlib_zhemm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -526,13 +526,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zhemv.html b/proc/stdlib_zhemv.html index a9f9f5dca..1aad15abe 100644 --- a/proc/stdlib_zhemv.html +++ b/proc/stdlib_zhemv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -497,13 +497,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zher.html b/proc/stdlib_zher.html index 988e9c4a1..d8c76ad06 100644 --- a/proc/stdlib_zher.html +++ b/proc/stdlib_zher.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -414,13 +414,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zher2.html b/proc/stdlib_zher2.html index f1512bf98..222a0d3be 100644 --- a/proc/stdlib_zher2.html +++ b/proc/stdlib_zher2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -468,13 +468,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zher2k.html b/proc/stdlib_zher2k.html index aa2070079..9b7990160 100644 --- a/proc/stdlib_zher2k.html +++ b/proc/stdlib_zher2k.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -586,13 +586,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zherk.html b/proc/stdlib_zherk.html index 37f6ab9ee..444a91c9c 100644 --- a/proc/stdlib_zherk.html +++ b/proc/stdlib_zherk.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -543,13 +543,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zhpmv.html b/proc/stdlib_zhpmv.html index 59784f4e2..bccf3f5db 100644 --- a/proc/stdlib_zhpmv.html +++ b/proc/stdlib_zhpmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -488,13 +488,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zhpr.html b/proc/stdlib_zhpr.html index c9e21fd96..c7aa9587d 100644 --- a/proc/stdlib_zhpr.html +++ b/proc/stdlib_zhpr.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -406,13 +406,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zhpr2.html b/proc/stdlib_zhpr2.html index e2fd58fbd..9e3e77f51 100644 --- a/proc/stdlib_zhpr2.html +++ b/proc/stdlib_zhpr2.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -459,13 +459,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zrotg.html b/proc/stdlib_zrotg.html index 12bfe2638..bd6af0bc4 100644 --- a/proc/stdlib_zrotg.html +++ b/proc/stdlib_zrotg.html @@ -176,7 +176,7 @@

    Arguments

    @@ -191,7 +191,7 @@

    Arguments

    @@ -206,7 +206,7 @@

    Arguments

    @@ -221,7 +221,7 @@

    Arguments

    @@ -378,13 +378,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zscal.html b/proc/stdlib_zscal.html index e4e761730..ed6238085 100644 --- a/proc/stdlib_zscal.html +++ b/proc/stdlib_zscal.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -281,13 +281,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zswap.html b/proc/stdlib_zswap.html index 974ae55cf..be0ab5748 100644 --- a/proc/stdlib_zswap.html +++ b/proc/stdlib_zswap.html @@ -164,7 +164,7 @@

    Arguments

    @@ -179,7 +179,7 @@

    Arguments

    @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -306,13 +306,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zsymm.html b/proc/stdlib_zsymm.html index 758a1d3d4..ce7b7b6c9 100644 --- a/proc/stdlib_zsymm.html +++ b/proc/stdlib_zsymm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -524,13 +524,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zsyr2k.html b/proc/stdlib_zsyr2k.html index 0685556fc..4af290363 100644 --- a/proc/stdlib_zsyr2k.html +++ b/proc/stdlib_zsyr2k.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -553,13 +553,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_zsyrk.html b/proc/stdlib_zsyrk.html index 693876350..2faec908d 100644 --- a/proc/stdlib_zsyrk.html +++ b/proc/stdlib_zsyrk.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -305,7 +305,7 @@

    Arguments

    @@ -515,13 +515,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztbmv.html b/proc/stdlib_ztbmv.html index 33c8f9295..91ea88f3b 100644 --- a/proc/stdlib_ztbmv.html +++ b/proc/stdlib_ztbmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -287,7 +287,7 @@

    Arguments

    @@ -543,13 +543,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztbsv.html b/proc/stdlib_ztbsv.html index c7d93180c..3f6713c65 100644 --- a/proc/stdlib_ztbsv.html +++ b/proc/stdlib_ztbsv.html @@ -170,7 +170,7 @@

    Arguments

    @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -549,13 +549,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztpmv.html b/proc/stdlib_ztpmv.html index be33d8ad9..47ddff76b 100644 --- a/proc/stdlib_ztpmv.html +++ b/proc/stdlib_ztpmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -516,13 +516,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztpsv.html b/proc/stdlib_ztpsv.html index 1866de48f..3392acf5c 100644 --- a/proc/stdlib_ztpsv.html +++ b/proc/stdlib_ztpsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -520,13 +520,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztrmm.html b/proc/stdlib_ztrmm.html index 9911b6503..8b6f58277 100644 --- a/proc/stdlib_ztrmm.html +++ b/proc/stdlib_ztrmm.html @@ -168,7 +168,7 @@

    Arguments

    @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -288,7 +288,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -602,13 +602,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztrmv.html b/proc/stdlib_ztrmv.html index 28f239cba..23288a6f1 100644 --- a/proc/stdlib_ztrmv.html +++ b/proc/stdlib_ztrmv.html @@ -167,7 +167,7 @@

    Arguments

    @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -511,13 +511,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztrsm.html b/proc/stdlib_ztrsm.html index 500c3d27a..f22ff13d7 100644 --- a/proc/stdlib_ztrsm.html +++ b/proc/stdlib_ztrsm.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -626,13 +626,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/stdlib_ztrsv.html b/proc/stdlib_ztrsv.html index c9c8b84e5..d6e42cefe 100644 --- a/proc/stdlib_ztrsv.html +++ b/proc/stdlib_ztrsv.html @@ -169,7 +169,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -515,13 +515,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/to_lower.html b/proc/to_lower.html index 06e91d0b4..c377ec3de 100644 --- a/proc/to_lower.html +++ b/proc/to_lower.html @@ -166,7 +166,7 @@

    Arguments

    @@ -227,13 +227,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/to_sentence.html b/proc/to_sentence.html index 739a4fe69..265cc5c6d 100644 --- a/proc/to_sentence.html +++ b/proc/to_sentence.html @@ -166,7 +166,7 @@

    Arguments

    @@ -184,7 +184,7 @@

    Arguments

    Return Value - + character(len=len)

    @@ -238,13 +238,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/to_title.html b/proc/to_title.html index c4559d125..893cabfed 100644 --- a/proc/to_title.html +++ b/proc/to_title.html @@ -166,7 +166,7 @@

    Arguments

    @@ -239,13 +239,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/to_upper.html b/proc/to_upper.html index 38e161fcf..1140bdf8b 100644 --- a/proc/to_upper.html +++ b/proc/to_upper.html @@ -166,7 +166,7 @@

    Arguments

    @@ -227,13 +227,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/trueloc.html b/proc/trueloc.html index d4dd14ccf..c6492cc81 100644 --- a/proc/trueloc.html +++ b/proc/trueloc.html @@ -166,7 +166,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    Return Value - + integer, (count(array))

    @@ -242,13 +242,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/universal_mult_hash.html b/proc/universal_mult_hash.html index 0e585e63d..37778c2ab 100644 --- a/proc/universal_mult_hash.html +++ b/proc/universal_mult_hash.html @@ -85,15 +85,15 @@

    universal_mult_hash
  • - Source File + Source File
  • @@ -149,9 +149,9 @@

    public elemental function universal_mult_hash(key, seed, nbits) result(sampl

    -

    Uses the "random" odd 32 bit integer seed to map the 32 bit integer key to -an unsigned integer value with only nbits bits where nbits is less than 32 -(Specification)

    +

    Uses the "random" odd 64 bit integer seed to map the 64 bit integer key to +an unsigned integer value with only nbits bits where nbits is less than 64. +(Specification)

    Arguments

    @@ -167,8 +167,8 @@

    Arguments

    TypeIntentOptional AttributesName
    - - type(string_type), - intent(in), - dimension(:) - :: lhs @@ -438,7 +316,7 @@

    Arguments

    - type(stringlist_type), + type(string_type), intent(in) @@ -470,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(SLASH=)~2.html b/interface/operator(SLASH=)~2.html index be0bcb938..4ee196ad9 100644 --- a/interface/operator(SLASH=)~2.html +++ b/interface/operator(SLASH=)~2.html @@ -80,20 +80,20 @@

    operator(/=)
  • 10 statements + title="

    0.0% of total for procedures.

    Including implementation: 32 statements, 0.1% of total for procedures.">7 statements
  • - Source File + Source File
  • @@ -123,19 +123,6 @@

    Contents

    - - @@ -143,6 +130,22 @@

    Functions

    + + @@ -152,35 +155,19 @@

    Functions

    public interface operator(/=)

    -

    Returns .true. if not all bits in set1 and set2 have the same value, - .false. otherwise. The sets must have the same number of bits - otherwise the result is undefined. -(Specification)

    -

    Example

    -
        program example_inequality
    -        use stdlib_bitsets
    -        type(bitset_64) :: set0, set1, set2
    -        call set0 % init( 33 )
    -        call set1 % init( 33 )
    -        call set2 % init( 33 )
    -        call set1 % set( 0 )
    -        call set2 % set( 32 )
    -        if ( set0 /= set1 .and. set0 /= set2 .and. set1 /= set2 .and. &
    -            .not. set0 /= set0 .and. .not. set1 /= set1 .and. .not.   &
    -            set2 /= set2 ) then
    -            write(*,*) 'Passed 64 bit inequality tests.'
    -        else
    -            error stop 'Failed 64 bit inequality tests.'
    -        end if
    -    end program example_inequality
    -
    +

    Compares stringlist for inequality with the input entity +Returns a logical +Specifications


    -

    Functions

    + + +

    Module Procedures

    -

    private elemental module function neqv_64(set1, set2) result(neqv) +

    private pure function ineq_stringlist(lhs, rhs)

    - +

    Compares stringlist 'lhs' for inequality with stringlist 'rhs' +Returns a logical

    Arguments

    @@ -195,30 +182,30 @@

    Arguments

    - + - + @@ -236,10 +223,11 @@

    -

    private elemental module function neqv_large(set1, set2) result(neqv) +

    private pure function ineq_stringlist_carray(lhs, rhs)

    - +

    Compares stringlist 'lhs' for inequality with chararray 'rhs' +Returns a logical

    Arguments

    - - type(bitset_64), + + type(stringlist_type), intent(in) ::set1lhs
    - - type(bitset_64), + + type(stringlist_type), intent(in) ::set2rhs
    @@ -254,30 +242,90 @@

    Arguments

    - + + + + + + + + + + +
    - - type(bitset_large), + + type(stringlist_type), intent(in) ::set1lhs + +
    + + character(len=*), + intent(in), + dimension(:) + ::rhs
    + +

    + Return Value + logical +

    + + +
    +

    + +
    +

    private pure function ineq_stringlist_sarray(lhs, rhs) +

    +
    +

    Compares stringlist 'lhs' for inequality with stringarray 'rhs' +Returns a logical

    + +

    Arguments

    + + + + + + + + + + - + + + + + + + + + @@ -294,7 +342,125 @@

    +
    +

    private pure function ineq_carray_stringlist(lhs, rhs) +

    +
    +

    Compares chararray 'lhs' for inequality with stringlist 'rhs' +Returns a logical

    +

    Arguments

    +

    TypeIntentOptional AttributesName
    - - type(bitset_large), + + type(stringlist_type), intent(in) ::set2lhs + +
    + + type(string_type), + intent(in), + dimension(:) + ::rhs
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + character(len=*), + intent(in), + dimension(:) + ::lhs + +
    + + type(stringlist_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +
    + +
    +

    private pure function ineq_sarray_stringlist(lhs, rhs) +

    +
    +

    Compares stringarray 'lhs' for inequality with stringlist 'rhs' +Returns a logical

    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + type(string_type), + intent(in), + dimension(:) + ::lhs + +
    + + type(stringlist_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +
    @@ -304,13 +470,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(SLASH=)~3.html b/interface/operator(SLASH=)~3.html index 659247d67..725866572 100644 --- a/interface/operator(SLASH=)~3.html +++ b/interface/operator(SLASH=)~3.html @@ -75,24 +75,25 @@

    operator(/=)
    • Creative Commons License
    • +
    • experimental
    • 4 statements + title="

      0.0% of total for procedures.

      Including implementation: 10 statements, 0.0% of total for procedures.">10 statements
    • - Source File + Source File
    @@ -122,27 +123,27 @@

    Contents

    - - - - - - - @@ -151,16 +152,35 @@

    Module Procedures

    public interface operator(/=)

    - - - - -

    Module Procedures

    +

    Returns .true. if not all bits in set1 and set2 have the same value, + .false. otherwise. The sets must have the same number of bits + otherwise the result is undefined. +(Specification)

    +

    Example

    +
        program example_inequality
    +        use stdlib_bitsets
    +        type(bitset_64) :: set0, set1, set2
    +        call set0 % init( 33 )
    +        call set1 % init( 33 )
    +        call set2 % init( 33 )
    +        call set1 % set( 0 )
    +        call set2 % set( 32 )
    +        if ( set0 /= set1 .and. set0 /= set2 .and. set1 /= set2 .and. &
    +            .not. set0 /= set0 .and. .not. set1 /= set1 .and. .not.   &
    +            set2 /= set2 ) then
    +            write(*,*) 'Passed 64 bit inequality tests.'
    +        else
    +            error stop 'Failed 64 bit inequality tests.'
    +        end if
    +    end program example_inequality
    +
    +
    +

    Functions

    -

    private elemental function state_neq_flag(err, flag) +

    private elemental module function neqv_64(set1, set2) result(neqv)

    -

    Compare the error state with an integer flag

    +

    Arguments

    @@ -175,30 +195,30 @@

    Arguments

    - + - + @@ -208,7 +228,7 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    @@ -216,10 +236,10 @@

    -

    private elemental function flag_neq_state(flag, err) +

    private elemental module function neqv_large(set1, set2) result(neqv)

    -

    Compare an integer flag with the error state

    +

    Arguments

    - - type(linalg_state_type), + + type(bitset_64), intent(in) ::errset1
    - - integer, + + type(bitset_64), intent(in) ::flagset2
    @@ -234,30 +254,30 @@

    Arguments

    - + - + @@ -267,13 +287,15 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    + +
    @@ -282,13 +304,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(SLASH=)~4.html b/interface/operator(SLASH=)~4.html index 59191573c..34233e4a3 100644 --- a/interface/operator(SLASH=)~4.html +++ b/interface/operator(SLASH=)~4.html @@ -79,20 +79,20 @@

    operator(/=)
  • 5 statements + title="

    0.0% of total for procedures.

    Including implementation: 14 statements, 0.1% of total for procedures.">4 statements
  • - Source File + Source File
  • @@ -152,80 +151,16 @@

    Module Procedures

    public interface operator(/=)

    -

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

    -

    This operator is elemental and returns a default logical scalar value.

    -
    - - -

    Module Procedures

    -
    -

    private elemental function ne_string_string(lhs, rhs) result(is_ne) -

    -
    -

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

    - -

    Arguments

    -
    - - integer, + + type(bitset_large), intent(in) ::flagset1
    - - type(linalg_state_type), + + type(bitset_large), intent(in) ::errset2
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(string_type), - intent(in) - - ::lhs - -
    - - type(string_type), - intent(in) - - ::rhs - -
    + -

    - Return Value - logical -

    - -
    -

    +

    Module Procedures

    -

    private elemental function ne_string_char(lhs, rhs) result(is_ne) +

    private elemental function state_neq_flag(err, flag)

    -

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

    +

    Compare the error state with an integer flag

    Arguments

    @@ -240,30 +175,30 @@

    Arguments

    - + - + @@ -273,7 +208,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -281,11 +216,10 @@

    -

    private elemental function ne_char_string(lhs, rhs) result(is_ne) +

    private elemental function flag_neq_state(flag, err)

    -

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

    +

    Compare an integer flag with the error state

    Arguments

    - - type(string_type), + + type(linalg_state_type), intent(in) ::lhserr
    - - character(len=*), + + integer, intent(in) ::rhsflag
    @@ -300,30 +234,30 @@

    Arguments

    - + - + @@ -333,7 +267,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -348,13 +282,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(SLASHSLASH).html b/interface/operator(SLASHSLASH).html index 1d0c85adb..65f3930f4 100644 --- a/interface/operator(SLASHSLASH).html +++ b/interface/operator(SLASHSLASH).html @@ -79,20 +79,20 @@

    operator(//)
  • 22 statements + title="

    0.0% of total for procedures.

    Including implementation: 23 statements, 0.1% of total for procedures.">5 statements
  • - Source File + Source File
  • @@ -122,21 +122,6 @@

    Contents

    - - @@ -144,6 +129,20 @@

    Functions

    + + @@ -153,73 +152,19 @@

    Functions

    public interface operator(//)

    - - -

    Functions

    -
    -

    private pure module function concat_left(lval, code) result(str) -

    -
    -

    Concatenate an escape code with a string and turn it into an actual escape sequence

    - -

    Arguments

    -

    - - character(len=*), + + integer, intent(in) ::lhsflag
    - - type(string_type), + + type(linalg_state_type), intent(in) ::rhserr
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - character(len=*), - intent(in) - - ::lval -

    String to add the escape code to

    -
    - - type(ansi_code), - intent(in) - - ::code -

    Escape sequence

    -
    +

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

    +

    This operator is elemental and returns a scalar character value.

    +
    -

    - Return Value - character(len=:), allocatable -

    -

    Concatenated string

    - -
    -

    +

    Module Procedures

    -

    private pure module function concat_left_str(lval, code) result(str) +

    private elemental function concat_string_string(lhs, rhs) result(string)

    -

    Concatenate an escape code with a string and turn it into an actual escape sequence

    +

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

    Arguments

    @@ -234,7 +179,7 @@

    Arguments

    @@ -242,24 +187,24 @@

    Arguments

    - + - + @@ -269,16 +214,17 @@

    Return Value type(string_type)

    -

    Concatenated string

    +
    -

    private pure module function concat_right(code, rval) result(str) +

    private elemental function concat_string_char(lhs, rhs) result(string)

    -

    Concatenate an escape code with a string and turn it into an actual escape sequence

    +

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

    Arguments

    - + type(string_type), intent(in) ::lvallhs -

    String to add the escape code to

    +
    - - type(ansi_code), + + type(string_type), intent(in) ::coderhs -

    Escape sequence

    +
    @@ -293,22 +239,22 @@

    Arguments

    - + @@ -316,9 +262,9 @@

    Arguments

    - + @@ -326,18 +272,19 @@

    Arguments

    Return Value - character(len=:), allocatable + type(string_type)

    -

    Concatenated string

    +
    -

    private pure module function concat_right_str(code, rval) result(str) +

    private elemental function concat_char_string(lhs, rhs) result(string)

    -

    Concatenate an escape code with a string and turn it into an actual escape sequence

    +

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

    Arguments

    - - type(ansi_code), + + type(string_type), intent(in) ::codelhs -

    Escape sequence

    +
    - + character(len=*), intent(in) ::rvalrhs -

    String to add the escape code to

    +
    @@ -352,22 +299,22 @@

    Arguments

    - + @@ -375,9 +322,9 @@

    Arguments

    - + @@ -387,13 +334,11 @@

    Return Value type(string_type)

    -

    Concatenated string

    + - -
    @@ -402,13 +347,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(SLASHSLASH)~2.html b/interface/operator(SLASHSLASH)~2.html index c914d52af..95b62424b 100644 --- a/interface/operator(SLASHSLASH)~2.html +++ b/interface/operator(SLASHSLASH)~2.html @@ -186,7 +186,7 @@

    Arguments

    @@ -201,7 +201,7 @@

    Arguments

    @@ -246,7 +246,7 @@

    Arguments

    @@ -261,7 +261,7 @@

    Arguments

    @@ -306,7 +306,7 @@

    Arguments

    @@ -321,7 +321,7 @@

    Arguments

    @@ -366,7 +366,7 @@

    Arguments

    @@ -381,7 +381,7 @@

    Arguments

    @@ -426,7 +426,7 @@

    Arguments

    @@ -441,7 +441,7 @@

    Arguments

    @@ -486,7 +486,7 @@

    Arguments

    @@ -501,7 +501,7 @@

    Arguments

    @@ -546,7 +546,7 @@

    Arguments

    @@ -561,7 +561,7 @@

    Arguments

    @@ -606,7 +606,7 @@

    Arguments

    @@ -621,7 +621,7 @@

    Arguments

    @@ -666,7 +666,7 @@

    Arguments

    @@ -681,7 +681,7 @@

    Arguments

    @@ -714,13 +714,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(SLASHSLASH)~3.html b/interface/operator(SLASHSLASH)~3.html index eb30541f1..13b26a93a 100644 --- a/interface/operator(SLASHSLASH)~3.html +++ b/interface/operator(SLASHSLASH)~3.html @@ -79,20 +79,20 @@

    operator(//)
  • 5 statements + title="

    0.1% of total for procedures.

    Including implementation: 22 statements, 0.1% of total for procedures.">22 statements
  • - Source File + Source File
  • @@ -122,28 +122,29 @@

    Contents

    - - - - - - - @@ -152,19 +153,73 @@

    Module Procedures

    public interface operator(//)

    -

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

    -

    This operator is elemental and returns a scalar character value.

    -
    + + +

    Functions

    +
    +

    private pure module function concat_left(lval, code) result(str) +

    +
    +

    Concatenate an escape code with a string and turn it into an actual escape sequence

    + +

    Arguments

    +

    - - type(ansi_code), + + character(len=*), intent(in) ::codelhs -

    Escape sequence

    +
    - + type(string_type), intent(in) ::rvalrhs -

    String to add the escape code to

    +
    - + type(stringlist_type), intent(in)
    - + character(len=*), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + type(stringlist_type), intent(in)
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + character(len=*), + intent(in) + + ::lval +

    String to add the escape code to

    +
    + + type(ansi_code), + intent(in) + + ::code +

    Escape sequence

    +
    +

    + Return Value + character(len=:), allocatable +

    +

    Concatenated string

    + +
    +

    -

    Module Procedures

    -

    private elemental function concat_string_string(lhs, rhs) result(string) +

    private pure module function concat_left_str(lval, code) result(str)

    -

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

    +

    Concatenate an escape code with a string and turn it into an actual escape sequence

    Arguments

    @@ -179,7 +234,7 @@

    Arguments

    @@ -187,24 +242,24 @@

    Arguments

    - + - + @@ -214,17 +269,16 @@

    Return Value type(string_type)

    - +

    Concatenated string

    -

    private elemental function concat_string_char(lhs, rhs) result(string) +

    private pure module function concat_right(code, rval) result(str)

    -

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

    +

    Concatenate an escape code with a string and turn it into an actual escape sequence

    Arguments

    - + type(string_type), intent(in) ::lhslval - +

    String to add the escape code to

    - - type(string_type), + + type(ansi_code), intent(in) ::rhscode - +

    Escape sequence

    @@ -239,22 +293,22 @@

    Arguments

    - + @@ -262,9 +316,9 @@

    Arguments

    - + @@ -272,19 +326,18 @@

    Arguments

    Return Value - type(string_type) + character(len=:), allocatable

    - +

    Concatenated string

    -

    private elemental function concat_char_string(lhs, rhs) result(string) +

    private pure module function concat_right_str(code, rval) result(str)

    -

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

    +

    Concatenate an escape code with a string and turn it into an actual escape sequence

    Arguments

    - - type(string_type), + + type(ansi_code), intent(in) ::lhscode - +

    Escape sequence

    - + character(len=*), intent(in) ::rhsrval - +

    String to add the escape code to

    @@ -299,22 +352,22 @@

    Arguments

    - + @@ -322,9 +375,9 @@

    Arguments

    - + @@ -334,11 +387,13 @@

    Return Value type(string_type)

    - +

    Concatenated string

    + +
    @@ -347,13 +402,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(gt).html b/interface/operator(gt).html index e4323590b..8e4ea61b3 100644 --- a/interface/operator(gt).html +++ b/interface/operator(gt).html @@ -75,25 +75,24 @@

    operator(>)
    @@ -123,19 +122,6 @@

    Contents

    - - @@ -143,6 +129,20 @@

    Functions

    + + @@ -152,36 +152,20 @@

    Functions

    public interface operator(>)

    -

    Returns .true. if the bits in set1 and set2 differ and the - highest order different bit is set to 1 in set1 and to 0 in set2, - .false. otherwise. The sets must have the same number of bits - otherwise the result is undefined. -(Specification)

    -

    Example

    -
        program example_gt
    -        use stdlib_bitsets
    -        type(bitset_64) :: set0, set1, set2
    -        call set0 % init( 33 )
    -        call set1 % init( 33 )
    -        call set2 % init( 33 )
    -        call set1 % set( 0 )
    -        call set2 % set( 32 )
    -        if ( set1 > set0 .and. set2 > set1 .and. set2 > set0 .and. &
    -            .not. set0 > set0 .and. .not. set0 > set1 .and. .not.   &
    -            set1 > set2 ) then
    -            write(*,*) 'Passed 64 bit greater than tests.'
    -        else
    -            error stop 'Failed 64 bit greater than tests.'
    -        end if
    -    end program example_gt
    -
    +

    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.

    +

    This operator is elemental and returns a default logical scalar value.


    -

    Functions

    + + +

    Module Procedures

    -

    private elemental module function gt_64(set1, set2) result(gt) +

    private elemental function gt_string_string(lhs, rhs) result(is_gt)

    - +

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

    Arguments

    - - character(len=*), + + type(ansi_code), intent(in) ::lhscode - +

    Escape sequence

    - + type(string_type), intent(in) ::rhsrval - +

    String to add the escape code to

    @@ -196,30 +180,30 @@

    Arguments

    - + - + @@ -237,10 +221,11 @@

    -

    private elemental module function gt_large(set1, set2) result(gt) +

    private elemental function gt_string_char(lhs, rhs) result(is_gt)

    - +

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

    Arguments

    - - type(bitset_64), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_64), + + type(string_type), intent(in) ::set2rhs
    @@ -255,30 +240,30 @@

    Arguments

    - + - + @@ -295,7 +280,65 @@

    +
    +

    private elemental function gt_char_string(lhs, rhs) result(is_gt) +

    +
    +

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

    +

    Arguments

    +

    - - type(bitset_large), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_large), + + character(len=*), intent(in) ::set2rhs
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + character(len=*), + intent(in) + + ::lhs + +
    + + type(string_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +

    @@ -305,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(gt)~2.html b/interface/operator(gt)~2.html index e8ecfbb8e..269fb78cd 100644 --- a/interface/operator(gt)~2.html +++ b/interface/operator(gt)~2.html @@ -75,24 +75,25 @@

    operator(>)
    • Creative Commons License
    • +
    • experimental
    • 4 statements + title="

      0.0% of total for procedures.

      Including implementation: 10 statements, 0.0% of total for procedures.">10 statements
    • - Source File + Source File
    @@ -122,27 +123,27 @@

    Contents

    - - - - - - - @@ -151,16 +152,36 @@

    Module Procedures

    public interface operator(>)

    - - - - -

    Module Procedures

    +

    Returns .true. if the bits in set1 and set2 differ and the + highest order different bit is set to 1 in set1 and to 0 in set2, + .false. otherwise. The sets must have the same number of bits + otherwise the result is undefined. +(Specification)

    +

    Example

    +
        program example_gt
    +        use stdlib_bitsets
    +        type(bitset_64) :: set0, set1, set2
    +        call set0 % init( 33 )
    +        call set1 % init( 33 )
    +        call set2 % init( 33 )
    +        call set1 % set( 0 )
    +        call set2 % set( 32 )
    +        if ( set1 > set0 .and. set2 > set1 .and. set2 > set0 .and. &
    +            .not. set0 > set0 .and. .not. set0 > set1 .and. .not.   &
    +            set1 > set2 ) then
    +            write(*,*) 'Passed 64 bit greater than tests.'
    +        else
    +            error stop 'Failed 64 bit greater than tests.'
    +        end if
    +    end program example_gt
    +
    +
    +

    Functions

    -

    private elemental function state_gt_flag(err, flag) +

    private elemental module function gt_64(set1, set2) result(gt)

    -

    Compare the error state with an integer flag

    +

    Arguments

    @@ -175,30 +196,30 @@

    Arguments

    - + - + @@ -208,7 +229,7 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    @@ -216,10 +237,10 @@

    -

    private elemental function flag_gt_state(flag, err) +

    private elemental module function gt_large(set1, set2) result(gt)

    -

    Compare an integer flag with the error state

    +

    Arguments

    - - type(linalg_state_type), + + type(bitset_64), intent(in) ::errset1
    - - integer, + + type(bitset_64), intent(in) ::flagset2
    @@ -234,30 +255,30 @@

    Arguments

    - + - + @@ -267,13 +288,15 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    + +
    @@ -282,13 +305,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(gt)~3.html b/interface/operator(gt)~3.html index 0f6eafe8c..848028993 100644 --- a/interface/operator(gt)~3.html +++ b/interface/operator(gt)~3.html @@ -79,20 +79,20 @@

    operator(>)
  • 5 statements + title="

    0.0% of total for procedures.

    Including implementation: 14 statements, 0.1% of total for procedures.">4 statements
  • - Source File + Source File
  • @@ -152,80 +151,16 @@

    Module Procedures

    public interface operator(>)

    -

    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.

    -

    This operator is elemental and returns a default logical scalar value.

    -
    - - -

    Module Procedures

    -
    -

    private elemental function gt_string_string(lhs, rhs) result(is_gt) -

    -
    -

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

    - -

    Arguments

    -
    - - integer, + + type(bitset_large), intent(in) ::flagset1
    - - type(linalg_state_type), + + type(bitset_large), intent(in) ::errset2
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(string_type), - intent(in) - - ::lhs - -
    - - type(string_type), - intent(in) - - ::rhs - -
    + -

    - Return Value - logical -

    - -
    -

    +

    Module Procedures

    -

    private elemental function gt_string_char(lhs, rhs) result(is_gt) +

    private elemental function state_gt_flag(err, flag)

    -

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

    +

    Compare the error state with an integer flag

    Arguments

    @@ -240,30 +175,30 @@

    Arguments

    - + - + @@ -273,7 +208,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -281,11 +216,10 @@

    -

    private elemental function gt_char_string(lhs, rhs) result(is_gt) +

    private elemental function flag_gt_state(flag, err)

    -

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

    +

    Compare an integer flag with the error state

    Arguments

    - - type(string_type), + + type(linalg_state_type), intent(in) ::lhserr
    - - character(len=*), + + integer, intent(in) ::rhsflag
    @@ -300,30 +234,30 @@

    Arguments

    - + - + @@ -333,7 +267,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -348,13 +282,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(gt=).html b/interface/operator(gt=).html index 6e2d8d8dc..76c584367 100644 --- a/interface/operator(gt=).html +++ b/interface/operator(gt=).html @@ -75,25 +75,24 @@

    operator(>=)
    @@ -123,19 +122,6 @@

    Contents

    - - @@ -143,6 +129,20 @@

    Functions

    + + @@ -152,37 +152,20 @@

    Functions

    public interface operator(>=)

    -

    Returns .true. if the bits in set1 and set2 are the same or the - highest order different bit is set to 1 in set1 and to 0 in set2, - .false. otherwise. The sets must have the same number of bits - otherwise the result is undefined. - (Specification)

    -

    Example

    -
        program example_ge
    -        use stdlib_bitsets
    -        type(bitset_64) :: set0, set1, set2
    -        call set0 % init( 33 )
    -        call set1 % init( 33 )
    -        call set2 % init( 33 )
    -        call set1 % set( 0 )
    -        call set2 % set( 32 )
    -        if ( set1 >= set0 .and. set2 >= set1 .and. set2 >= set0 .and. &
    -            set0 >= set0 .and. set1 >= set1 .and. set2 >= set2 .and. &
    -            .not. set0 >= set1 .and. .not. set0 >= set2 .and. .not.   &
    -            set1 >= set2 ) then
    -            write(*,*) 'Passed 64 bit greater than or equals tests.'
    -        else
    -            error stop 'Failed 64 bit greater than or equals tests.'
    -        end if
    -    end program example_ge
    -
    +

    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.

    +

    This operator is elemental and returns a default logical scalar value.


    -

    Functions

    + + +

    Module Procedures

    -

    private elemental module function ge_64(set1, set2) result(ge) +

    private elemental function ge_string_string(lhs, rhs) result(is_ge)

    - +

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

    Arguments

    - - character(len=*), + + integer, intent(in) ::lhsflag
    - - type(string_type), + + type(linalg_state_type), intent(in) ::rhserr
    @@ -197,30 +180,30 @@

    Arguments

    - + - + @@ -238,10 +221,11 @@

    -

    private elemental module function ge_large(set1, set2) result(ge) +

    private elemental function ge_string_char(lhs, rhs) result(is_ge)

    - +

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

    Arguments

    - - type(bitset_64), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_64), + + type(string_type), intent(in) ::set2rhs
    @@ -256,30 +240,30 @@

    Arguments

    - + - + @@ -296,7 +280,65 @@

    +
    +

    private elemental function ge_char_string(lhs, rhs) result(is_ge) +

    +
    +

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

    +

    Arguments

    +

    - - type(bitset_large), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_large), + + character(len=*), intent(in) ::set2rhs
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + character(len=*), + intent(in) + + ::lhs + +
    + + type(string_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +

    @@ -306,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(gt=)~2.html b/interface/operator(gt=)~2.html index 537af58d7..627032182 100644 --- a/interface/operator(gt=)~2.html +++ b/interface/operator(gt=)~2.html @@ -75,24 +75,25 @@

    operator(>=)
    • Creative Commons License
    • +
    • experimental
    • 4 statements + title="

      0.0% of total for procedures.

      Including implementation: 10 statements, 0.0% of total for procedures.">10 statements
    • - Source File + Source File
    @@ -122,27 +123,27 @@

    Contents

    - - - - - - - @@ -151,16 +152,37 @@

    Module Procedures

    public interface operator(>=)

    - - - - -

    Module Procedures

    +

    Returns .true. if the bits in set1 and set2 are the same or the + highest order different bit is set to 1 in set1 and to 0 in set2, + .false. otherwise. The sets must have the same number of bits + otherwise the result is undefined. + (Specification)

    +

    Example

    +
        program example_ge
    +        use stdlib_bitsets
    +        type(bitset_64) :: set0, set1, set2
    +        call set0 % init( 33 )
    +        call set1 % init( 33 )
    +        call set2 % init( 33 )
    +        call set1 % set( 0 )
    +        call set2 % set( 32 )
    +        if ( set1 >= set0 .and. set2 >= set1 .and. set2 >= set0 .and. &
    +            set0 >= set0 .and. set1 >= set1 .and. set2 >= set2 .and. &
    +            .not. set0 >= set1 .and. .not. set0 >= set2 .and. .not.   &
    +            set1 >= set2 ) then
    +            write(*,*) 'Passed 64 bit greater than or equals tests.'
    +        else
    +            error stop 'Failed 64 bit greater than or equals tests.'
    +        end if
    +    end program example_ge
    +
    +
    +

    Functions

    -

    private elemental function state_ge_flag(err, flag) +

    private elemental module function ge_64(set1, set2) result(ge)

    -

    Compare the error state with an integer flag

    +

    Arguments

    @@ -175,30 +197,30 @@

    Arguments

    - + - + @@ -208,7 +230,7 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    @@ -216,10 +238,10 @@

    -

    private elemental function flag_ge_state(flag, err) +

    private elemental module function ge_large(set1, set2) result(ge)

    -

    Compare an integer flag with the error state

    +

    Arguments

    - - type(linalg_state_type), + + type(bitset_64), intent(in) ::errset1
    - - integer, + + type(bitset_64), intent(in) ::flagset2
    @@ -234,30 +256,30 @@

    Arguments

    - + - + @@ -267,13 +289,15 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    + +
    @@ -282,13 +306,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(gt=)~3.html b/interface/operator(gt=)~3.html index c55fba807..bd525459a 100644 --- a/interface/operator(gt=)~3.html +++ b/interface/operator(gt=)~3.html @@ -79,20 +79,20 @@

    operator(>=)
  • 5 statements + title="

    0.0% of total for procedures.

    Including implementation: 14 statements, 0.1% of total for procedures.">4 statements
  • - Source File + Source File
  • @@ -152,80 +151,16 @@

    Module Procedures

    public interface operator(>=)

    -

    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.

    -

    This operator is elemental and returns a default logical scalar value.

    -
    - - -

    Module Procedures

    -
    -

    private elemental function ge_string_string(lhs, rhs) result(is_ge) -

    -
    -

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

    - -

    Arguments

    -
    - - integer, + + type(bitset_large), intent(in) ::flagset1
    - - type(linalg_state_type), + + type(bitset_large), intent(in) ::errset2
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(string_type), - intent(in) - - ::lhs - -
    - - type(string_type), - intent(in) - - ::rhs - -
    + -

    - Return Value - logical -

    - -
    -

    +

    Module Procedures

    -

    private elemental function ge_string_char(lhs, rhs) result(is_ge) +

    private elemental function state_ge_flag(err, flag)

    -

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

    +

    Compare the error state with an integer flag

    Arguments

    @@ -240,30 +175,30 @@

    Arguments

    - + - + @@ -273,7 +208,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -281,11 +216,10 @@

    -

    private elemental function ge_char_string(lhs, rhs) result(is_ge) +

    private elemental function flag_ge_state(flag, err)

    -

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

    +

    Compare an integer flag with the error state

    Arguments

    - - type(string_type), + + type(linalg_state_type), intent(in) ::lhserr
    - - character(len=*), + + integer, intent(in) ::rhsflag
    @@ -300,30 +234,30 @@

    Arguments

    - + - + @@ -333,7 +267,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -348,13 +282,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(lt).html b/interface/operator(lt).html index ca862481b..ed9cb10bd 100644 --- a/interface/operator(lt).html +++ b/interface/operator(lt).html @@ -75,25 +75,24 @@

    operator(<)
    @@ -123,19 +122,6 @@

    Contents

    - - @@ -143,6 +129,20 @@

    Functions

    + + @@ -152,36 +152,20 @@

    Functions

    public interface operator(<)

    -

    Returns .true. if the bits in set1 and set2 differ and the - highest order different bit is set to 0 in set1 and to 1 in set2, - .false. otherwise. The sets must have the same number of bits - otherwise the result is undefined. -(Specification)

    -

    Example

    -
        program example_lt
    -        use stdlib_bitsets
    -        type(bitset_64) :: set0, set1, set2
    -        call set0 % init( 33 )
    -        call set1 % init( 33 )
    -        call set2 % init( 33 )
    -        call set1 % set( 0 )
    -        call set2 % set( 32 )
    -        if ( set0 < set1 .and. set1 < set2 .and. set0 < set2 .and. &
    -            .not. set0 < set0 .and. .not. set2 < set0 .and. .not.   &
    -            set2 < set1 ) then
    -            write(*,*) 'Passed 64 bit less than tests.'
    -        else
    -            error stop 'Failed 64 bit less than tests.'
    -        end if
    -    end program example_lt
    -
    +

    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.

    +

    This operator is elemental and returns a default logical scalar value.


    -

    Functions

    + + +

    Module Procedures

    -

    private elemental module function lt_64(set1, set2) result(lt) +

    private elemental function lt_string_string(lhs, rhs) result(is_lt)

    - +

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

    Arguments

    - - character(len=*), + + integer, intent(in) ::lhsflag
    - - type(string_type), + + type(linalg_state_type), intent(in) ::rhserr
    @@ -196,30 +180,30 @@

    Arguments

    - + - + @@ -237,10 +221,11 @@

    -

    private elemental module function lt_large(set1, set2) result(lt) +

    private elemental function lt_string_char(lhs, rhs) result(is_lt)

    - +

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

    Arguments

    - - type(bitset_64), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_64), + + type(string_type), intent(in) ::set2rhs
    @@ -255,30 +240,30 @@

    Arguments

    - + - + @@ -295,7 +280,65 @@

    +
    +

    private elemental function lt_char_string(lhs, rhs) result(is_lt) +

    +
    +

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

    +

    Arguments

    +

    - - type(bitset_large), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_large), + + character(len=*), intent(in) ::set2rhs
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + character(len=*), + intent(in) + + ::lhs + +
    + + type(string_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +

    @@ -305,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(lt)~2.html b/interface/operator(lt)~2.html index 695e01d03..b513d71dd 100644 --- a/interface/operator(lt)~2.html +++ b/interface/operator(lt)~2.html @@ -75,24 +75,25 @@

    operator(<)
    • Creative Commons License
    • +
    • experimental
    • 4 statements + title="

      0.0% of total for procedures.

      Including implementation: 10 statements, 0.0% of total for procedures.">10 statements
    • - Source File + Source File
    @@ -122,27 +123,27 @@

    Contents

    - - - - - - - @@ -151,16 +152,36 @@

    Module Procedures

    public interface operator(<)

    - - - - -

    Module Procedures

    +

    Returns .true. if the bits in set1 and set2 differ and the + highest order different bit is set to 0 in set1 and to 1 in set2, + .false. otherwise. The sets must have the same number of bits + otherwise the result is undefined. +(Specification)

    +

    Example

    +
        program example_lt
    +        use stdlib_bitsets
    +        type(bitset_64) :: set0, set1, set2
    +        call set0 % init( 33 )
    +        call set1 % init( 33 )
    +        call set2 % init( 33 )
    +        call set1 % set( 0 )
    +        call set2 % set( 32 )
    +        if ( set0 < set1 .and. set1 < set2 .and. set0 < set2 .and. &
    +            .not. set0 < set0 .and. .not. set2 < set0 .and. .not.   &
    +            set2 < set1 ) then
    +            write(*,*) 'Passed 64 bit less than tests.'
    +        else
    +            error stop 'Failed 64 bit less than tests.'
    +        end if
    +    end program example_lt
    +
    +
    +

    Functions

    -

    private elemental function state_lt_flag(err, flag) +

    private elemental module function lt_64(set1, set2) result(lt)

    -

    Compare the error state with an integer flag

    +

    Arguments

    @@ -175,30 +196,30 @@

    Arguments

    - + - + @@ -208,7 +229,7 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    @@ -216,10 +237,10 @@

    -

    private elemental function flag_lt_state(flag, err) +

    private elemental module function lt_large(set1, set2) result(lt)

    -

    Compare an integer flag with the error state

    +

    Arguments

    - - type(linalg_state_type), + + type(bitset_64), intent(in) ::errset1
    - - integer, + + type(bitset_64), intent(in) ::flagset2
    @@ -234,30 +255,30 @@

    Arguments

    - + - + @@ -267,13 +288,15 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    + +
    @@ -282,13 +305,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(lt)~3.html b/interface/operator(lt)~3.html index 638fb99ce..e107e9b9c 100644 --- a/interface/operator(lt)~3.html +++ b/interface/operator(lt)~3.html @@ -79,20 +79,20 @@

    operator(<)
  • 5 statements + title="

    0.0% of total for procedures.

    Including implementation: 14 statements, 0.1% of total for procedures.">4 statements
  • - Source File + Source File
  • @@ -152,80 +151,16 @@

    Module Procedures

    public interface operator(<)

    -

    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.

    -

    This operator is elemental and returns a default logical scalar value.

    -
    - - -

    Module Procedures

    -
    -

    private elemental function lt_string_string(lhs, rhs) result(is_lt) -

    -
    -

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

    - -

    Arguments

    -
    - - integer, + + type(bitset_large), intent(in) ::flagset1
    - - type(linalg_state_type), + + type(bitset_large), intent(in) ::errset2
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(string_type), - intent(in) - - ::lhs - -
    - - type(string_type), - intent(in) - - ::rhs - -
    + -

    - Return Value - logical -

    - -
    -

    +

    Module Procedures

    -

    private elemental function lt_string_char(lhs, rhs) result(is_lt) +

    private elemental function state_lt_flag(err, flag)

    -

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

    +

    Compare the error state with an integer flag

    Arguments

    @@ -240,30 +175,30 @@

    Arguments

    - + - + @@ -273,7 +208,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -281,11 +216,10 @@

    -

    private elemental function lt_char_string(lhs, rhs) result(is_lt) +

    private elemental function flag_lt_state(flag, err)

    -

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

    +

    Compare an integer flag with the error state

    Arguments

    - - type(string_type), + + type(linalg_state_type), intent(in) ::lhserr
    - - character(len=*), + + integer, intent(in) ::rhsflag
    @@ -300,30 +234,30 @@

    Arguments

    - + - + @@ -333,7 +267,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -348,13 +282,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(lt=).html b/interface/operator(lt=).html index 59e713966..a83d455d8 100644 --- a/interface/operator(lt=).html +++ b/interface/operator(lt=).html @@ -75,25 +75,24 @@

    operator(<=)
    @@ -123,19 +122,6 @@

    Contents

    - - @@ -143,6 +129,20 @@

    Functions

    + + @@ -152,37 +152,20 @@

    Functions

    public interface operator(<=)

    -

    Returns .true. if the bits in set1 and set2 are the same or the - highest order different bit is set to 0 in set1 and to 1 in set2, - .false. otherwise. The sets must have the same number of bits - otherwise the result is undefined. -(Specification)

    -

    Example

    -
        program example_le
    -        use stdlib_bitsets
    -        type(bitset_64) :: set0, set1, set2
    -        call set0 % init( 33 )
    -        call set1 % init( 33 )
    -        call set2 % init( 33 )
    -        call set1 % set( 0 )
    -        call set2 % set( 32 )
    -        if ( set0 <= set1 .and. set1 <= set2 .and. set0 <= set2 .and. &
    -            set0 <= set0 .and. set1 <= set1 .and. set2 <= set2 .and. &
    -            .not. set1 <= set0 .and. .not. set2 <= set0 .and. .not.   &
    -            set2 <= set1 ) then
    -            write(*,*) 'Passed 64 bit less than or equal tests.'
    -        else
    -            error stop 'Failed 64 bit less than or equal tests.'
    -        end if
    -    end program example_le
    -
    +

    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.

    +

    This operator is elemental and returns a default logical scalar value.


    -

    Functions

    + + +

    Module Procedures

    -

    private elemental module function le_64(set1, set2) result(le) +

    private elemental function le_string_string(lhs, rhs) result(is_le)

    - +

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

    Arguments

    - - character(len=*), + + integer, intent(in) ::lhsflag
    - - type(string_type), + + type(linalg_state_type), intent(in) ::rhserr
    @@ -197,30 +180,30 @@

    Arguments

    - + - + @@ -238,10 +221,11 @@

    -

    private elemental module function le_large(set1, set2) result(le) +

    private elemental function le_string_char(lhs, rhs) result(is_le)

    - +

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

    Arguments

    - - type(bitset_64), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_64), + + type(string_type), intent(in) ::set2rhs
    @@ -256,30 +240,30 @@

    Arguments

    - + - + @@ -296,7 +280,65 @@

    +
    +

    private elemental function le_char_string(lhs, rhs) result(is_le) +

    +
    +

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

    +

    Arguments

    +

    - - type(bitset_large), + + type(string_type), intent(in) ::set1lhs
    - - type(bitset_large), + + character(len=*), intent(in) ::set2rhs
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeIntentOptional AttributesName
    + + character(len=*), + intent(in) + + ::lhs + +
    + + type(string_type), + intent(in) + + ::rhs + +
    + +

    + Return Value + logical +

    + + +
    +

    @@ -306,13 +348,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(lt=)~2.html b/interface/operator(lt=)~2.html index b4664549e..e32890c8d 100644 --- a/interface/operator(lt=)~2.html +++ b/interface/operator(lt=)~2.html @@ -75,24 +75,25 @@

    operator(<=)
    • Creative Commons License
    • +
    • experimental
    • 4 statements + title="

      0.0% of total for procedures.

      Including implementation: 10 statements, 0.0% of total for procedures.">10 statements
    • - Source File + Source File
    @@ -122,27 +123,27 @@

    Contents

    - - - - - - - @@ -151,16 +152,37 @@

    Module Procedures

    public interface operator(<=)

    - - - - -

    Module Procedures

    +

    Returns .true. if the bits in set1 and set2 are the same or the + highest order different bit is set to 0 in set1 and to 1 in set2, + .false. otherwise. The sets must have the same number of bits + otherwise the result is undefined. +(Specification)

    +

    Example

    +
        program example_le
    +        use stdlib_bitsets
    +        type(bitset_64) :: set0, set1, set2
    +        call set0 % init( 33 )
    +        call set1 % init( 33 )
    +        call set2 % init( 33 )
    +        call set1 % set( 0 )
    +        call set2 % set( 32 )
    +        if ( set0 <= set1 .and. set1 <= set2 .and. set0 <= set2 .and. &
    +            set0 <= set0 .and. set1 <= set1 .and. set2 <= set2 .and. &
    +            .not. set1 <= set0 .and. .not. set2 <= set0 .and. .not.   &
    +            set2 <= set1 ) then
    +            write(*,*) 'Passed 64 bit less than or equal tests.'
    +        else
    +            error stop 'Failed 64 bit less than or equal tests.'
    +        end if
    +    end program example_le
    +
    +
    +

    Functions

    -

    private elemental function state_le_flag(err, flag) +

    private elemental module function le_64(set1, set2) result(le)

    -

    Compare the error state with an integer flag

    +

    Arguments

    @@ -175,30 +197,30 @@

    Arguments

    - + - + @@ -208,7 +230,7 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    @@ -216,10 +238,10 @@

    -

    private elemental function flag_le_state(flag, err) +

    private elemental module function le_large(set1, set2) result(le)

    -

    Compare an integer flag with the error state

    +

    Arguments

    - - type(linalg_state_type), + + type(bitset_64), intent(in) ::errset1
    - - integer, + + type(bitset_64), intent(in) ::flagset2
    @@ -234,30 +256,30 @@

    Arguments

    - + - + @@ -267,13 +289,15 @@

    Arguments

    Return Value - logical(kind=lk) + logical

    + +
    @@ -282,13 +306,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/operator(lt=)~3.html b/interface/operator(lt=)~3.html index a3aac9340..18d7a232b 100644 --- a/interface/operator(lt=)~3.html +++ b/interface/operator(lt=)~3.html @@ -79,20 +79,20 @@

    operator(<=)
  • 5 statements + title="

    0.0% of total for procedures.

    Including implementation: 14 statements, 0.1% of total for procedures.">4 statements
  • - Source File + Source File
  • @@ -152,80 +151,16 @@

    Module Procedures

    public interface operator(<=)

    -

    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.

    -

    This operator is elemental and returns a default logical scalar value.

    -
    - - -

    Module Procedures

    -
    -

    private elemental function le_string_string(lhs, rhs) result(is_le) -

    -
    -

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

    - -

    Arguments

    -
    - - integer, + + type(bitset_large), intent(in) ::flagset1
    - - type(linalg_state_type), + + type(bitset_large), intent(in) ::errset2
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeIntentOptional AttributesName
    - - type(string_type), - intent(in) - - ::lhs - -
    - - type(string_type), - intent(in) - - ::rhs - -
    + -

    - Return Value - logical -

    - -
    -

    +

    Module Procedures

    -

    private elemental function le_string_char(lhs, rhs) result(is_le) +

    private elemental function state_le_flag(err, flag)

    -

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

    +

    Compare the error state with an integer flag

    Arguments

    @@ -240,30 +175,30 @@

    Arguments

    - + - + @@ -273,7 +208,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -281,11 +216,10 @@

    -

    private elemental function le_char_string(lhs, rhs) result(is_le) +

    private elemental function flag_le_state(flag, err)

    -

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

    +

    Compare an integer flag with the error state

    Arguments

    - - type(string_type), + + type(linalg_state_type), intent(in) ::lhserr
    - - character(len=*), + + integer, intent(in) ::rhsflag
    @@ -300,30 +234,30 @@

    Arguments

    - + - + @@ -333,7 +267,7 @@

    Arguments

    Return Value - logical + logical(kind=lk)

    @@ -348,13 +282,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/optval.html b/interface/optval.html index 6384aac73..bb3f64e99 100644 --- a/interface/optval.html +++ b/interface/optval.html @@ -185,7 +185,7 @@

    Arguments

    @@ -244,7 +244,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -362,7 +362,7 @@

    Arguments

    @@ -421,7 +421,7 @@

    Arguments

    @@ -480,7 +480,7 @@

    Arguments

    @@ -539,7 +539,7 @@

    Arguments

    @@ -598,7 +598,7 @@

    Arguments

    @@ -657,7 +657,7 @@

    Arguments

    @@ -716,7 +716,7 @@

    Arguments

    @@ -764,13 +764,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/or.html b/interface/or.html index 600388f7f..9af41e254 100644 --- a/interface/or.html +++ b/interface/or.html @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -267,7 +267,7 @@

    Arguments

    @@ -296,13 +296,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/ord_sort.html b/interface/ord_sort.html index bc72df7b8..c5e648822 100644 --- a/interface/ord_sort.html +++ b/interface/ord_sort.html @@ -884,13 +884,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/outer_product.html b/interface/outer_product.html index 0f2a79b3e..04b2e1aba 100644 --- a/interface/outer_product.html +++ b/interface/outer_product.html @@ -182,7 +182,7 @@

    Arguments

    @@ -197,7 +197,7 @@

    Arguments

    @@ -241,7 +241,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -359,7 +359,7 @@

    Arguments

    @@ -374,7 +374,7 @@

    Arguments

    @@ -418,7 +418,7 @@

    Arguments

    @@ -433,7 +433,7 @@

    Arguments

    @@ -477,7 +477,7 @@

    Arguments

    @@ -492,7 +492,7 @@

    Arguments

    @@ -536,7 +536,7 @@

    Arguments

    @@ -551,7 +551,7 @@

    Arguments

    @@ -595,7 +595,7 @@

    Arguments

    @@ -610,7 +610,7 @@

    Arguments

    @@ -645,13 +645,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/padl.html b/interface/padl.html index d78a7e3c8..5261cbc52 100644 --- a/interface/padl.html +++ b/interface/padl.html @@ -180,7 +180,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -438,13 +438,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/padr.html b/interface/padr.html index 7d7c00c4a..1197a1084 100644 --- a/interface/padr.html +++ b/interface/padr.html @@ -180,7 +180,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -438,13 +438,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/pdf_exp.html b/interface/pdf_exp.html index 808e66474..e33bbcda4 100644 --- a/interface/pdf_exp.html +++ b/interface/pdf_exp.html @@ -180,7 +180,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -298,7 +298,7 @@

    Arguments

    @@ -357,7 +357,7 @@

    Arguments

    @@ -405,13 +405,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/pdf_normal.html b/interface/pdf_normal.html index e479977df..a271f81fc 100644 --- a/interface/pdf_normal.html +++ b/interface/pdf_normal.html @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -254,7 +254,7 @@

    Arguments

    @@ -269,7 +269,7 @@

    Arguments

    @@ -284,7 +284,7 @@

    Arguments

    @@ -328,7 +328,7 @@

    Arguments

    @@ -343,7 +343,7 @@

    Arguments

    @@ -358,7 +358,7 @@

    Arguments

    @@ -402,7 +402,7 @@

    Arguments

    @@ -417,7 +417,7 @@

    Arguments

    @@ -432,7 +432,7 @@

    Arguments

    @@ -465,13 +465,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/pdf_uniform.html b/interface/pdf_uniform.html index 38415d1c7..d45793884 100644 --- a/interface/pdf_uniform.html +++ b/interface/pdf_uniform.html @@ -185,7 +185,7 @@

    Arguments

    @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -333,7 +333,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -407,7 +407,7 @@

    Arguments

    @@ -422,7 +422,7 @@

    Arguments

    @@ -437,7 +437,7 @@

    Arguments

    @@ -481,7 +481,7 @@

    Arguments

    @@ -496,7 +496,7 @@

    Arguments

    @@ -511,7 +511,7 @@

    Arguments

    @@ -555,7 +555,7 @@

    Arguments

    @@ -570,7 +570,7 @@

    Arguments

    @@ -585,7 +585,7 @@

    Arguments

    @@ -629,7 +629,7 @@

    Arguments

    @@ -644,7 +644,7 @@

    Arguments

    @@ -659,7 +659,7 @@

    Arguments

    @@ -703,7 +703,7 @@

    Arguments

    @@ -718,7 +718,7 @@

    Arguments

    @@ -733,7 +733,7 @@

    Arguments

    @@ -766,13 +766,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/pengy_hash.html b/interface/pengy_hash.html index 8b81b0a64..745ea59d5 100644 --- a/interface/pengy_hash.html +++ b/interface/pengy_hash.html @@ -178,7 +178,7 @@

    Arguments

    @@ -193,7 +193,7 @@

    Arguments

    @@ -237,7 +237,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -296,7 +296,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -355,7 +355,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -464,13 +464,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/radix_sort.html b/interface/radix_sort.html index dee8b885c..03552c159 100644 --- a/interface/radix_sort.html +++ b/interface/radix_sort.html @@ -571,13 +571,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/random_seed.html b/interface/random_seed.html index 8938f5776..df41b6ef0 100644 --- a/interface/random_seed.html +++ b/interface/random_seed.html @@ -195,7 +195,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -357,7 +357,7 @@

    Arguments

    @@ -385,13 +385,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/read(formatted).html b/interface/read(formatted).html index eaa98b256..5bbd3357e 100644 --- a/interface/read(formatted).html +++ b/interface/read(formatted).html @@ -174,7 +174,7 @@

    Arguments

    @@ -189,7 +189,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -277,13 +277,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/read(unformatted).html b/interface/read(unformatted).html index e7a725170..f8bdf67de 100644 --- a/interface/read(unformatted).html +++ b/interface/read(unformatted).html @@ -174,7 +174,7 @@

    Arguments

    @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -247,13 +247,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/regularized_gamma_p.html b/interface/regularized_gamma_p.html index e363595fb..e6e90a7a1 100644 --- a/interface/regularized_gamma_p.html +++ b/interface/regularized_gamma_p.html @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -419,7 +419,7 @@

    Arguments

    @@ -434,7 +434,7 @@

    Arguments

    @@ -478,7 +478,7 @@

    Arguments

    @@ -493,7 +493,7 @@

    Arguments

    @@ -537,7 +537,7 @@

    Arguments

    @@ -552,7 +552,7 @@

    Arguments

    @@ -596,7 +596,7 @@

    Arguments

    @@ -611,7 +611,7 @@

    Arguments

    @@ -655,7 +655,7 @@

    Arguments

    @@ -670,7 +670,7 @@

    Arguments

    @@ -714,7 +714,7 @@

    Arguments

    @@ -729,7 +729,7 @@

    Arguments

    @@ -762,13 +762,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/regularized_gamma_q.html b/interface/regularized_gamma_q.html index 1f754b9d5..6cfc6ac2e 100644 --- a/interface/regularized_gamma_q.html +++ b/interface/regularized_gamma_q.html @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -419,7 +419,7 @@

    Arguments

    @@ -434,7 +434,7 @@

    Arguments

    @@ -478,7 +478,7 @@

    Arguments

    @@ -493,7 +493,7 @@

    Arguments

    @@ -537,7 +537,7 @@

    Arguments

    @@ -552,7 +552,7 @@

    Arguments

    @@ -596,7 +596,7 @@

    Arguments

    @@ -611,7 +611,7 @@

    Arguments

    @@ -655,7 +655,7 @@

    Arguments

    @@ -670,7 +670,7 @@

    Arguments

    @@ -714,7 +714,7 @@

    Arguments

    @@ -729,7 +729,7 @@

    Arguments

    @@ -762,13 +762,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/repeat.html b/interface/repeat.html index 742207d47..f0c1950d0 100644 --- a/interface/repeat.html +++ b/interface/repeat.html @@ -177,7 +177,7 @@

    Arguments

    @@ -225,13 +225,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/replace_all.html b/interface/replace_all.html index 367f316c4..19f3ac230 100644 --- a/interface/replace_all.html +++ b/interface/replace_all.html @@ -185,7 +185,7 @@

    Arguments

    @@ -261,7 +261,7 @@

    Arguments

    @@ -337,7 +337,7 @@

    Arguments

    @@ -413,7 +413,7 @@

    Arguments

    @@ -489,7 +489,7 @@

    Arguments

    @@ -565,7 +565,7 @@

    Arguments

    @@ -641,7 +641,7 @@

    Arguments

    @@ -717,7 +717,7 @@

    Arguments

    @@ -780,13 +780,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/reverse~2.html b/interface/reverse.html similarity index 97% rename from interface/reverse~2.html rename to interface/reverse.html index 65ee37f9c..7cb222ed6 100644 --- a/interface/reverse~2.html +++ b/interface/reverse.html @@ -136,7 +136,7 @@

    Module Procedures

    @@ -176,7 +176,7 @@

    Arguments

    @@ -209,13 +209,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/rot.html b/interface/rot.html index b64f92f83..900f89202 100644 --- a/interface/rot.html +++ b/interface/rot.html @@ -186,7 +186,7 @@

    Arguments

    @@ -201,7 +201,7 @@

    Arguments

    @@ -216,7 +216,7 @@

    Arguments

    @@ -231,7 +231,7 @@

    Arguments

    @@ -246,7 +246,7 @@

    Arguments

    @@ -261,7 +261,7 @@

    Arguments

    @@ -276,7 +276,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -330,7 +330,7 @@

    Arguments

    @@ -345,7 +345,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -390,7 +390,7 @@

    Arguments

    @@ -405,7 +405,7 @@

    Arguments

    @@ -447,7 +447,7 @@

    Arguments

    @@ -462,7 +462,7 @@

    Arguments

    @@ -477,7 +477,7 @@

    Arguments

    @@ -492,7 +492,7 @@

    Arguments

    @@ -507,7 +507,7 @@

    Arguments

    @@ -522,7 +522,7 @@

    Arguments

    @@ -537,7 +537,7 @@

    Arguments

    @@ -577,7 +577,7 @@

    Arguments

    @@ -592,7 +592,7 @@

    Arguments

    @@ -607,7 +607,7 @@

    Arguments

    @@ -622,7 +622,7 @@

    Arguments

    @@ -637,7 +637,7 @@

    Arguments

    @@ -652,7 +652,7 @@

    Arguments

    @@ -667,7 +667,7 @@

    Arguments

    @@ -695,13 +695,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/rotg.html b/interface/rotg.html index 0d84fe66d..a9180d238 100644 --- a/interface/rotg.html +++ b/interface/rotg.html @@ -202,7 +202,7 @@

    Arguments

    @@ -217,7 +217,7 @@

    Arguments

    @@ -232,7 +232,7 @@

    Arguments

    @@ -247,7 +247,7 @@

    Arguments

    @@ -286,7 +286,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -331,7 +331,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -385,7 +385,7 @@

    Arguments

    @@ -400,7 +400,7 @@

    Arguments

    @@ -415,7 +415,7 @@

    Arguments

    @@ -454,7 +454,7 @@

    Arguments

    @@ -469,7 +469,7 @@

    Arguments

    @@ -484,7 +484,7 @@

    Arguments

    @@ -499,7 +499,7 @@

    Arguments

    @@ -553,7 +553,7 @@

    Arguments

    @@ -568,7 +568,7 @@

    Arguments

    @@ -583,7 +583,7 @@

    Arguments

    @@ -598,7 +598,7 @@

    Arguments

    @@ -651,7 +651,7 @@

    Arguments

    @@ -666,7 +666,7 @@

    Arguments

    @@ -681,7 +681,7 @@

    Arguments

    @@ -696,7 +696,7 @@

    Arguments

    @@ -749,7 +749,7 @@

    Arguments

    @@ -764,7 +764,7 @@

    Arguments

    @@ -779,7 +779,7 @@

    Arguments

    @@ -794,7 +794,7 @@

    Arguments

    @@ -846,7 +846,7 @@

    Arguments

    @@ -861,7 +861,7 @@

    Arguments

    @@ -876,7 +876,7 @@

    Arguments

    @@ -891,7 +891,7 @@

    Arguments

    @@ -919,13 +919,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/rotm.html b/interface/rotm.html index 0b0f296dd..1909ade0e 100644 --- a/interface/rotm.html +++ b/interface/rotm.html @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -326,7 +326,7 @@

    Arguments

    @@ -341,7 +341,7 @@

    Arguments

    @@ -356,7 +356,7 @@

    Arguments

    @@ -371,7 +371,7 @@

    Arguments

    @@ -386,7 +386,7 @@

    Arguments

    @@ -439,7 +439,7 @@

    Arguments

    @@ -454,7 +454,7 @@

    Arguments

    @@ -469,7 +469,7 @@

    Arguments

    @@ -484,7 +484,7 @@

    Arguments

    @@ -499,7 +499,7 @@

    Arguments

    @@ -514,7 +514,7 @@

    Arguments

    @@ -565,7 +565,7 @@

    Arguments

    @@ -580,7 +580,7 @@

    Arguments

    @@ -595,7 +595,7 @@

    Arguments

    @@ -610,7 +610,7 @@

    Arguments

    @@ -625,7 +625,7 @@

    Arguments

    @@ -640,7 +640,7 @@

    Arguments

    @@ -668,13 +668,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/rotmg.html b/interface/rotmg.html index 557c885b3..2f5b9af9d 100644 --- a/interface/rotmg.html +++ b/interface/rotmg.html @@ -197,7 +197,7 @@

    Arguments

    @@ -212,7 +212,7 @@

    Arguments

    @@ -227,7 +227,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -296,7 +296,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -326,7 +326,7 @@

    Arguments

    @@ -341,7 +341,7 @@

    Arguments

    @@ -356,7 +356,7 @@

    Arguments

    @@ -409,7 +409,7 @@

    Arguments

    @@ -424,7 +424,7 @@

    Arguments

    @@ -439,7 +439,7 @@

    Arguments

    @@ -454,7 +454,7 @@

    Arguments

    @@ -469,7 +469,7 @@

    Arguments

    @@ -520,7 +520,7 @@

    Arguments

    @@ -535,7 +535,7 @@

    Arguments

    @@ -550,7 +550,7 @@

    Arguments

    @@ -565,7 +565,7 @@

    Arguments

    @@ -580,7 +580,7 @@

    Arguments

    @@ -608,13 +608,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/rvs_exp.html b/interface/rvs_exp.html index 908065d71..36e2e742e 100644 --- a/interface/rvs_exp.html +++ b/interface/rvs_exp.html @@ -393,7 +393,7 @@

    Arguments

    @@ -452,7 +452,7 @@

    Arguments

    @@ -511,7 +511,7 @@

    Arguments

    @@ -570,7 +570,7 @@

    Arguments

    @@ -603,13 +603,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/rvs_normal.html b/interface/rvs_normal.html index d808285ec..8a20d929b 100644 --- a/interface/rvs_normal.html +++ b/interface/rvs_normal.html @@ -202,7 +202,7 @@

    Arguments

    @@ -217,7 +217,7 @@

    Arguments

    @@ -261,7 +261,7 @@

    Arguments

    @@ -276,7 +276,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -379,7 +379,7 @@

    Arguments

    @@ -394,7 +394,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -512,7 +512,7 @@

    Arguments

    @@ -527,7 +527,7 @@

    Arguments

    @@ -542,7 +542,7 @@

    Arguments

    @@ -586,7 +586,7 @@

    Arguments

    @@ -601,7 +601,7 @@

    Arguments

    @@ -616,7 +616,7 @@

    Arguments

    @@ -660,7 +660,7 @@

    Arguments

    @@ -675,7 +675,7 @@

    Arguments

    @@ -690,7 +690,7 @@

    Arguments

    @@ -723,13 +723,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/rvs_uniform.html b/interface/rvs_uniform.html index 2869ffb00..fb0ba2267 100644 --- a/interface/rvs_uniform.html +++ b/interface/rvs_uniform.html @@ -219,7 +219,7 @@

    Arguments

    @@ -263,7 +263,7 @@

    Arguments

    @@ -307,7 +307,7 @@

    Arguments

    @@ -351,7 +351,7 @@

    Arguments

    @@ -395,7 +395,7 @@

    Arguments

    @@ -439,7 +439,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -527,7 +527,7 @@

    Arguments

    @@ -571,7 +571,7 @@

    Arguments

    @@ -586,7 +586,7 @@

    Arguments

    @@ -630,7 +630,7 @@

    Arguments

    @@ -645,7 +645,7 @@

    Arguments

    @@ -689,7 +689,7 @@

    Arguments

    @@ -704,7 +704,7 @@

    Arguments

    @@ -748,7 +748,7 @@

    Arguments

    @@ -763,7 +763,7 @@

    Arguments

    @@ -807,7 +807,7 @@

    Arguments

    @@ -822,7 +822,7 @@

    Arguments

    @@ -866,7 +866,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -925,7 +925,7 @@

    Arguments

    @@ -940,7 +940,7 @@

    Arguments

    @@ -984,7 +984,7 @@

    Arguments

    @@ -999,7 +999,7 @@

    Arguments

    @@ -1043,7 +1043,7 @@

    Arguments

    @@ -1058,7 +1058,7 @@

    Arguments

    @@ -1073,7 +1073,7 @@

    Arguments

    @@ -1117,7 +1117,7 @@

    Arguments

    @@ -1132,7 +1132,7 @@

    Arguments

    @@ -1147,7 +1147,7 @@

    Arguments

    @@ -1191,7 +1191,7 @@

    Arguments

    @@ -1206,7 +1206,7 @@

    Arguments

    @@ -1221,7 +1221,7 @@

    Arguments

    @@ -1265,7 +1265,7 @@

    Arguments

    @@ -1280,7 +1280,7 @@

    Arguments

    @@ -1295,7 +1295,7 @@

    Arguments

    @@ -1339,7 +1339,7 @@

    Arguments

    @@ -1354,7 +1354,7 @@

    Arguments

    @@ -1369,7 +1369,7 @@

    Arguments

    @@ -1413,7 +1413,7 @@

    Arguments

    @@ -1428,7 +1428,7 @@

    Arguments

    @@ -1443,7 +1443,7 @@

    Arguments

    @@ -1487,7 +1487,7 @@

    Arguments

    @@ -1502,7 +1502,7 @@

    Arguments

    @@ -1517,7 +1517,7 @@

    Arguments

    @@ -1561,7 +1561,7 @@

    Arguments

    @@ -1576,7 +1576,7 @@

    Arguments

    @@ -1591,7 +1591,7 @@

    Arguments

    @@ -1624,13 +1624,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/save_npy.html b/interface/save_npy.html index 77754848c..7521beefc 100644 --- a/interface/save_npy.html +++ b/interface/save_npy.html @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -282,7 +282,7 @@

    Arguments

    @@ -297,7 +297,7 @@

    Arguments

    @@ -312,7 +312,7 @@

    Arguments

    @@ -327,7 +327,7 @@

    Arguments

    @@ -366,7 +366,7 @@

    Arguments

    @@ -381,7 +381,7 @@

    Arguments

    @@ -396,7 +396,7 @@

    Arguments

    @@ -411,7 +411,7 @@

    Arguments

    @@ -450,7 +450,7 @@

    Arguments

    @@ -465,7 +465,7 @@

    Arguments

    @@ -480,7 +480,7 @@

    Arguments

    @@ -495,7 +495,7 @@

    Arguments

    @@ -534,7 +534,7 @@

    Arguments

    @@ -549,7 +549,7 @@

    Arguments

    @@ -564,7 +564,7 @@

    Arguments

    @@ -579,7 +579,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -648,7 +648,7 @@

    Arguments

    @@ -663,7 +663,7 @@

    Arguments

    @@ -702,7 +702,7 @@

    Arguments

    @@ -717,7 +717,7 @@

    Arguments

    @@ -732,7 +732,7 @@

    Arguments

    @@ -747,7 +747,7 @@

    Arguments

    @@ -786,7 +786,7 @@

    Arguments

    @@ -801,7 +801,7 @@

    Arguments

    @@ -816,7 +816,7 @@

    Arguments

    @@ -831,7 +831,7 @@

    Arguments

    @@ -870,7 +870,7 @@

    Arguments

    @@ -885,7 +885,7 @@

    Arguments

    @@ -900,7 +900,7 @@

    Arguments

    @@ -915,7 +915,7 @@

    Arguments

    @@ -954,7 +954,7 @@

    Arguments

    @@ -969,7 +969,7 @@

    Arguments

    @@ -984,7 +984,7 @@

    Arguments

    @@ -999,7 +999,7 @@

    Arguments

    @@ -1038,7 +1038,7 @@

    Arguments

    @@ -1053,7 +1053,7 @@

    Arguments

    @@ -1068,7 +1068,7 @@

    Arguments

    @@ -1083,7 +1083,7 @@

    Arguments

    @@ -1122,7 +1122,7 @@

    Arguments

    @@ -1137,7 +1137,7 @@

    Arguments

    @@ -1152,7 +1152,7 @@

    Arguments

    @@ -1167,7 +1167,7 @@

    Arguments

    @@ -1206,7 +1206,7 @@

    Arguments

    @@ -1221,7 +1221,7 @@

    Arguments

    @@ -1236,7 +1236,7 @@

    Arguments

    @@ -1251,7 +1251,7 @@

    Arguments

    @@ -1290,7 +1290,7 @@

    Arguments

    @@ -1305,7 +1305,7 @@

    Arguments

    @@ -1320,7 +1320,7 @@

    Arguments

    @@ -1335,7 +1335,7 @@

    Arguments

    @@ -1374,7 +1374,7 @@

    Arguments

    @@ -1389,7 +1389,7 @@

    Arguments

    @@ -1404,7 +1404,7 @@

    Arguments

    @@ -1419,7 +1419,7 @@

    Arguments

    @@ -1458,7 +1458,7 @@

    Arguments

    @@ -1473,7 +1473,7 @@

    Arguments

    @@ -1488,7 +1488,7 @@

    Arguments

    @@ -1503,7 +1503,7 @@

    Arguments

    @@ -1542,7 +1542,7 @@

    Arguments

    @@ -1557,7 +1557,7 @@

    Arguments

    @@ -1572,7 +1572,7 @@

    Arguments

    @@ -1587,7 +1587,7 @@

    Arguments

    @@ -1626,7 +1626,7 @@

    Arguments

    @@ -1641,7 +1641,7 @@

    Arguments

    @@ -1656,7 +1656,7 @@

    Arguments

    @@ -1671,7 +1671,7 @@

    Arguments

    @@ -1710,7 +1710,7 @@

    Arguments

    @@ -1725,7 +1725,7 @@

    Arguments

    @@ -1740,7 +1740,7 @@

    Arguments

    @@ -1755,7 +1755,7 @@

    Arguments

    @@ -1794,7 +1794,7 @@

    Arguments

    @@ -1809,7 +1809,7 @@

    Arguments

    @@ -1824,7 +1824,7 @@

    Arguments

    @@ -1839,7 +1839,7 @@

    Arguments

    @@ -1878,7 +1878,7 @@

    Arguments

    @@ -1893,7 +1893,7 @@

    Arguments

    @@ -1908,7 +1908,7 @@

    Arguments

    @@ -1923,7 +1923,7 @@

    Arguments

    @@ -1962,7 +1962,7 @@

    Arguments

    @@ -1977,7 +1977,7 @@

    Arguments

    @@ -1992,7 +1992,7 @@

    Arguments

    @@ -2007,7 +2007,7 @@

    Arguments

    @@ -2046,7 +2046,7 @@

    Arguments

    @@ -2061,7 +2061,7 @@

    Arguments

    @@ -2076,7 +2076,7 @@

    Arguments

    @@ -2091,7 +2091,7 @@

    Arguments

    @@ -2130,7 +2130,7 @@

    Arguments

    @@ -2145,7 +2145,7 @@

    Arguments

    @@ -2160,7 +2160,7 @@

    Arguments

    @@ -2175,7 +2175,7 @@

    Arguments

    @@ -2204,13 +2204,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/savetxt.html b/interface/savetxt.html index b839166f4..8153d4970 100644 --- a/interface/savetxt.html +++ b/interface/savetxt.html @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -258,7 +258,7 @@

    Arguments

    @@ -302,7 +302,7 @@

    Arguments

    @@ -317,7 +317,7 @@

    Arguments

    @@ -361,7 +361,7 @@

    Arguments

    @@ -376,7 +376,7 @@

    Arguments

    @@ -420,7 +420,7 @@

    Arguments

    @@ -435,7 +435,7 @@

    Arguments

    @@ -479,7 +479,7 @@

    Arguments

    @@ -494,7 +494,7 @@

    Arguments

    @@ -538,7 +538,7 @@

    Arguments

    @@ -553,7 +553,7 @@

    Arguments

    @@ -597,7 +597,7 @@

    Arguments

    @@ -612,7 +612,7 @@

    Arguments

    @@ -644,13 +644,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/sbmv.html b/interface/sbmv.html index 39679a6ea..e0e4df640 100644 --- a/interface/sbmv.html +++ b/interface/sbmv.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -324,7 +324,7 @@

    Arguments

    @@ -339,7 +339,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -648,7 +648,7 @@

    Arguments

    @@ -663,7 +663,7 @@

    Arguments

    @@ -678,7 +678,7 @@

    Arguments

    @@ -693,7 +693,7 @@

    Arguments

    @@ -708,7 +708,7 @@

    Arguments

    @@ -723,7 +723,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -796,7 +796,7 @@

    Arguments

    @@ -811,7 +811,7 @@

    Arguments

    @@ -826,7 +826,7 @@

    Arguments

    @@ -841,7 +841,7 @@

    Arguments

    @@ -856,7 +856,7 @@

    Arguments

    @@ -871,7 +871,7 @@

    Arguments

    @@ -886,7 +886,7 @@

    Arguments

    @@ -901,7 +901,7 @@

    Arguments

    @@ -916,7 +916,7 @@

    Arguments

    @@ -944,13 +944,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/scal.html b/interface/scal.html index 380601fbf..a9948ff60 100644 --- a/interface/scal.html +++ b/interface/scal.html @@ -190,7 +190,7 @@

    Arguments

    @@ -205,7 +205,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -235,7 +235,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -358,7 +358,7 @@

    Arguments

    @@ -373,7 +373,7 @@

    Arguments

    @@ -388,7 +388,7 @@

    Arguments

    @@ -403,7 +403,7 @@

    Arguments

    @@ -442,7 +442,7 @@

    Arguments

    @@ -457,7 +457,7 @@

    Arguments

    @@ -472,7 +472,7 @@

    Arguments

    @@ -487,7 +487,7 @@

    Arguments

    @@ -529,7 +529,7 @@

    Arguments

    @@ -544,7 +544,7 @@

    Arguments

    @@ -559,7 +559,7 @@

    Arguments

    @@ -574,7 +574,7 @@

    Arguments

    @@ -615,7 +615,7 @@

    Arguments

    @@ -630,7 +630,7 @@

    Arguments

    @@ -645,7 +645,7 @@

    Arguments

    @@ -660,7 +660,7 @@

    Arguments

    @@ -701,7 +701,7 @@

    Arguments

    @@ -716,7 +716,7 @@

    Arguments

    @@ -731,7 +731,7 @@

    Arguments

    @@ -746,7 +746,7 @@

    Arguments

    @@ -786,7 +786,7 @@

    Arguments

    @@ -801,7 +801,7 @@

    Arguments

    @@ -816,7 +816,7 @@

    Arguments

    @@ -831,7 +831,7 @@

    Arguments

    @@ -859,13 +859,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/scan.html b/interface/scan.html index cc487c3ae..1be62e437 100644 --- a/interface/scan.html +++ b/interface/scan.html @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -259,7 +259,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -349,7 +349,7 @@

    Arguments

    @@ -397,13 +397,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/sdot.html b/interface/sdot.html index b8a500dda..aecfadd4f 100644 --- a/interface/sdot.html +++ b/interface/sdot.html @@ -129,7 +129,7 @@

    Functions

    - dsdot + dsdot
    @@ -170,7 +170,7 @@

    public interface sdot


    Functions

    -

    public pure function dsdot(n, sx, incx, sy, incy) +

    public pure function dsdot(n, sx, incx, sy, incy)

    @@ -188,7 +188,7 @@

    Arguments

    @@ -203,7 +203,7 @@

    Arguments

    @@ -218,7 +218,7 @@

    Arguments

    @@ -233,7 +233,7 @@

    Arguments

    @@ -248,7 +248,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -331,7 +331,7 @@

    Arguments

    @@ -346,7 +346,7 @@

    Arguments

    @@ -361,7 +361,7 @@

    Arguments

    @@ -394,13 +394,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/select.html b/interface/select.html index b4a02931e..ab32d828c 100644 --- a/interface/select.html +++ b/interface/select.html @@ -200,7 +200,7 @@

    Arguments

    @@ -218,7 +218,7 @@

    Arguments

    @@ -250,7 +250,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -324,7 +324,7 @@

    Arguments

    @@ -342,7 +342,7 @@

    Arguments

    @@ -374,7 +374,7 @@

    Arguments

    @@ -398,7 +398,7 @@

    Arguments

    @@ -448,7 +448,7 @@

    Arguments

    @@ -466,7 +466,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -522,7 +522,7 @@

    Arguments

    @@ -572,7 +572,7 @@

    Arguments

    @@ -590,7 +590,7 @@

    Arguments

    @@ -622,7 +622,7 @@

    Arguments

    @@ -646,7 +646,7 @@

    Arguments

    @@ -696,7 +696,7 @@

    Arguments

    @@ -714,7 +714,7 @@

    Arguments

    @@ -746,7 +746,7 @@

    Arguments

    @@ -770,7 +770,7 @@

    Arguments

    @@ -820,7 +820,7 @@

    Arguments

    @@ -838,7 +838,7 @@

    Arguments

    @@ -870,7 +870,7 @@

    Arguments

    @@ -894,7 +894,7 @@

    Arguments

    @@ -944,7 +944,7 @@

    Arguments

    @@ -962,7 +962,7 @@

    Arguments

    @@ -994,7 +994,7 @@

    Arguments

    @@ -1018,7 +1018,7 @@

    Arguments

    @@ -1068,7 +1068,7 @@

    Arguments

    @@ -1086,7 +1086,7 @@

    Arguments

    @@ -1118,7 +1118,7 @@

    Arguments

    @@ -1142,7 +1142,7 @@

    Arguments

    @@ -1192,7 +1192,7 @@

    Arguments

    @@ -1210,7 +1210,7 @@

    Arguments

    @@ -1242,7 +1242,7 @@

    Arguments

    @@ -1266,7 +1266,7 @@

    Arguments

    @@ -1316,7 +1316,7 @@

    Arguments

    @@ -1334,7 +1334,7 @@

    Arguments

    @@ -1366,7 +1366,7 @@

    Arguments

    @@ -1390,7 +1390,7 @@

    Arguments

    @@ -1440,7 +1440,7 @@

    Arguments

    @@ -1458,7 +1458,7 @@

    Arguments

    @@ -1490,7 +1490,7 @@

    Arguments

    @@ -1514,7 +1514,7 @@

    Arguments

    @@ -1564,7 +1564,7 @@

    Arguments

    @@ -1582,7 +1582,7 @@

    Arguments

    @@ -1614,7 +1614,7 @@

    Arguments

    @@ -1638,7 +1638,7 @@

    Arguments

    @@ -1688,7 +1688,7 @@

    Arguments

    @@ -1706,7 +1706,7 @@

    Arguments

    @@ -1738,7 +1738,7 @@

    Arguments

    @@ -1762,7 +1762,7 @@

    Arguments

    @@ -1812,7 +1812,7 @@

    Arguments

    @@ -1830,7 +1830,7 @@

    Arguments

    @@ -1862,7 +1862,7 @@

    Arguments

    @@ -1886,7 +1886,7 @@

    Arguments

    @@ -1936,7 +1936,7 @@

    Arguments

    @@ -1954,7 +1954,7 @@

    Arguments

    @@ -1986,7 +1986,7 @@

    Arguments

    @@ -2010,7 +2010,7 @@

    Arguments

    @@ -2060,7 +2060,7 @@

    Arguments

    @@ -2078,7 +2078,7 @@

    Arguments

    @@ -2110,7 +2110,7 @@

    Arguments

    @@ -2134,7 +2134,7 @@

    Arguments

    @@ -2184,7 +2184,7 @@

    Arguments

    @@ -2202,7 +2202,7 @@

    Arguments

    @@ -2234,7 +2234,7 @@

    Arguments

    @@ -2258,7 +2258,7 @@

    Arguments

    @@ -2308,7 +2308,7 @@

    Arguments

    @@ -2326,7 +2326,7 @@

    Arguments

    @@ -2358,7 +2358,7 @@

    Arguments

    @@ -2382,7 +2382,7 @@

    Arguments

    @@ -2432,7 +2432,7 @@

    Arguments

    @@ -2450,7 +2450,7 @@

    Arguments

    @@ -2482,7 +2482,7 @@

    Arguments

    @@ -2506,7 +2506,7 @@

    Arguments

    @@ -2556,7 +2556,7 @@

    Arguments

    @@ -2574,7 +2574,7 @@

    Arguments

    @@ -2606,7 +2606,7 @@

    Arguments

    @@ -2630,7 +2630,7 @@

    Arguments

    @@ -2680,7 +2680,7 @@

    Arguments

    @@ -2698,7 +2698,7 @@

    Arguments

    @@ -2730,7 +2730,7 @@

    Arguments

    @@ -2754,7 +2754,7 @@

    Arguments

    @@ -2804,7 +2804,7 @@

    Arguments

    @@ -2822,7 +2822,7 @@

    Arguments

    @@ -2854,7 +2854,7 @@

    Arguments

    @@ -2878,7 +2878,7 @@

    Arguments

    @@ -2928,7 +2928,7 @@

    Arguments

    @@ -2946,7 +2946,7 @@

    Arguments

    @@ -2978,7 +2978,7 @@

    Arguments

    @@ -3002,7 +3002,7 @@

    Arguments

    @@ -3052,7 +3052,7 @@

    Arguments

    @@ -3070,7 +3070,7 @@

    Arguments

    @@ -3102,7 +3102,7 @@

    Arguments

    @@ -3126,7 +3126,7 @@

    Arguments

    @@ -3163,13 +3163,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/set.html b/interface/set.html index 04f55ebc5..3189cdfa5 100644 --- a/interface/set.html +++ b/interface/set.html @@ -180,7 +180,7 @@

    Arguments

    @@ -195,7 +195,7 @@

    Arguments

    @@ -237,7 +237,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -351,7 +351,7 @@

    Arguments

    @@ -366,7 +366,7 @@

    Arguments

    @@ -394,13 +394,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/shuffle.html b/interface/shuffle.html index ee9eb88c3..0a8bfdddd 100644 --- a/interface/shuffle.html +++ b/interface/shuffle.html @@ -526,13 +526,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/simps.html b/interface/simps.html index 94d7c8a30..4547993d3 100644 --- a/interface/simps.html +++ b/interface/simps.html @@ -177,7 +177,7 @@

    Arguments

    @@ -192,7 +192,7 @@

    Arguments

    @@ -207,7 +207,7 @@

    Arguments

    @@ -251,7 +251,7 @@

    Arguments

    @@ -266,7 +266,7 @@

    Arguments

    @@ -281,7 +281,7 @@

    Arguments

    @@ -325,7 +325,7 @@

    Arguments

    @@ -340,7 +340,7 @@

    Arguments

    @@ -355,7 +355,7 @@

    Arguments

    @@ -399,7 +399,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -464,13 +464,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/simps_weights.html b/interface/simps_weights.html index e6e75b79a..4a29228df 100644 --- a/interface/simps_weights.html +++ b/interface/simps_weights.html @@ -175,7 +175,7 @@

    Arguments

    @@ -190,7 +190,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -284,13 +284,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/slice.html b/interface/slice.html index bd0c05cc1..2c0188814 100644 --- a/interface/slice.html +++ b/interface/slice.html @@ -178,7 +178,7 @@

    Arguments

    @@ -208,7 +208,7 @@

    Arguments

    @@ -269,7 +269,7 @@

    Arguments

    @@ -299,7 +299,7 @@

    Arguments

    @@ -347,13 +347,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/solve.html b/interface/solve.html index ab3b4a106..cba057323 100644 --- a/interface/solve.html +++ b/interface/solve.html @@ -205,7 +205,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -323,7 +323,7 @@

    Arguments

    @@ -338,7 +338,7 @@

    Arguments

    @@ -353,7 +353,7 @@

    Arguments

    @@ -368,7 +368,7 @@

    Arguments

    @@ -412,7 +412,7 @@

    Arguments

    @@ -427,7 +427,7 @@

    Arguments

    @@ -442,7 +442,7 @@

    Arguments

    @@ -457,7 +457,7 @@

    Arguments

    @@ -501,7 +501,7 @@

    Arguments

    @@ -516,7 +516,7 @@

    Arguments

    @@ -560,7 +560,7 @@

    Arguments

    @@ -575,7 +575,7 @@

    Arguments

    @@ -619,7 +619,7 @@

    Arguments

    @@ -634,7 +634,7 @@

    Arguments

    @@ -649,7 +649,7 @@

    Arguments

    @@ -664,7 +664,7 @@

    Arguments

    @@ -708,7 +708,7 @@

    Arguments

    @@ -723,7 +723,7 @@

    Arguments

    @@ -738,7 +738,7 @@

    Arguments

    @@ -753,7 +753,7 @@

    Arguments

    @@ -797,7 +797,7 @@

    Arguments

    @@ -812,7 +812,7 @@

    Arguments

    @@ -856,7 +856,7 @@

    Arguments

    @@ -871,7 +871,7 @@

    Arguments

    @@ -915,7 +915,7 @@

    Arguments

    @@ -930,7 +930,7 @@

    Arguments

    @@ -945,7 +945,7 @@

    Arguments

    @@ -960,7 +960,7 @@

    Arguments

    @@ -1004,7 +1004,7 @@

    Arguments

    @@ -1019,7 +1019,7 @@

    Arguments

    @@ -1034,7 +1034,7 @@

    Arguments

    @@ -1049,7 +1049,7 @@

    Arguments

    @@ -1093,7 +1093,7 @@

    Arguments

    @@ -1108,7 +1108,7 @@

    Arguments

    @@ -1152,7 +1152,7 @@

    Arguments

    @@ -1167,7 +1167,7 @@

    Arguments

    @@ -1211,7 +1211,7 @@

    Arguments

    @@ -1226,7 +1226,7 @@

    Arguments

    @@ -1241,7 +1241,7 @@

    Arguments

    @@ -1256,7 +1256,7 @@

    Arguments

    @@ -1300,7 +1300,7 @@

    Arguments

    @@ -1315,7 +1315,7 @@

    Arguments

    @@ -1330,7 +1330,7 @@

    Arguments

    @@ -1345,7 +1345,7 @@

    Arguments

    @@ -1380,13 +1380,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/solve_lstsq.html b/interface/solve_lstsq.html index 67dddf12b..9a74f8d0e 100644 --- a/interface/solve_lstsq.html +++ b/interface/solve_lstsq.html @@ -196,7 +196,7 @@

    Arguments

    @@ -211,7 +211,7 @@

    Arguments

    @@ -226,7 +226,7 @@

    Arguments

    @@ -241,7 +241,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -271,7 +271,7 @@

    Arguments

    @@ -286,7 +286,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -331,7 +331,7 @@

    Arguments

    @@ -346,7 +346,7 @@

    Arguments

    @@ -385,7 +385,7 @@

    Arguments

    @@ -400,7 +400,7 @@

    Arguments

    @@ -415,7 +415,7 @@

    Arguments

    @@ -430,7 +430,7 @@

    Arguments

    @@ -445,7 +445,7 @@

    Arguments

    @@ -460,7 +460,7 @@

    Arguments

    @@ -475,7 +475,7 @@

    Arguments

    @@ -490,7 +490,7 @@

    Arguments

    @@ -505,7 +505,7 @@

    Arguments

    @@ -520,7 +520,7 @@

    Arguments

    @@ -535,7 +535,7 @@

    Arguments

    @@ -574,7 +574,7 @@

    Arguments

    @@ -589,7 +589,7 @@

    Arguments

    @@ -604,7 +604,7 @@

    Arguments

    @@ -619,7 +619,7 @@

    Arguments

    @@ -634,7 +634,7 @@

    Arguments

    @@ -649,7 +649,7 @@

    Arguments

    @@ -664,7 +664,7 @@

    Arguments

    @@ -679,7 +679,7 @@

    Arguments

    @@ -694,7 +694,7 @@

    Arguments

    @@ -709,7 +709,7 @@

    Arguments

    @@ -748,7 +748,7 @@

    Arguments

    @@ -763,7 +763,7 @@

    Arguments

    @@ -778,7 +778,7 @@

    Arguments

    @@ -793,7 +793,7 @@

    Arguments

    @@ -808,7 +808,7 @@

    Arguments

    @@ -823,7 +823,7 @@

    Arguments

    @@ -838,7 +838,7 @@

    Arguments

    @@ -853,7 +853,7 @@

    Arguments

    @@ -868,7 +868,7 @@

    Arguments

    @@ -883,7 +883,7 @@

    Arguments

    @@ -922,7 +922,7 @@

    Arguments

    @@ -937,7 +937,7 @@

    Arguments

    @@ -952,7 +952,7 @@

    Arguments

    @@ -967,7 +967,7 @@

    Arguments

    @@ -982,7 +982,7 @@

    Arguments

    @@ -997,7 +997,7 @@

    Arguments

    @@ -1012,7 +1012,7 @@

    Arguments

    @@ -1027,7 +1027,7 @@

    Arguments

    @@ -1042,7 +1042,7 @@

    Arguments

    @@ -1057,7 +1057,7 @@

    Arguments

    @@ -1096,7 +1096,7 @@

    Arguments

    @@ -1111,7 +1111,7 @@

    Arguments

    @@ -1126,7 +1126,7 @@

    Arguments

    @@ -1141,7 +1141,7 @@

    Arguments

    @@ -1156,7 +1156,7 @@

    Arguments

    @@ -1171,7 +1171,7 @@

    Arguments

    @@ -1186,7 +1186,7 @@

    Arguments

    @@ -1201,7 +1201,7 @@

    Arguments

    @@ -1216,7 +1216,7 @@

    Arguments

    @@ -1231,7 +1231,7 @@

    Arguments

    @@ -1270,7 +1270,7 @@

    Arguments

    @@ -1285,7 +1285,7 @@

    Arguments

    @@ -1300,7 +1300,7 @@

    Arguments

    @@ -1315,7 +1315,7 @@

    Arguments

    @@ -1330,7 +1330,7 @@

    Arguments

    @@ -1345,7 +1345,7 @@

    Arguments

    @@ -1360,7 +1360,7 @@

    Arguments

    @@ -1375,7 +1375,7 @@

    Arguments

    @@ -1390,7 +1390,7 @@

    Arguments

    @@ -1405,7 +1405,7 @@

    Arguments

    @@ -1420,7 +1420,7 @@

    Arguments

    @@ -1459,7 +1459,7 @@

    Arguments

    @@ -1474,7 +1474,7 @@

    Arguments

    @@ -1489,7 +1489,7 @@

    Arguments

    @@ -1504,7 +1504,7 @@

    Arguments

    @@ -1519,7 +1519,7 @@

    Arguments

    @@ -1534,7 +1534,7 @@

    Arguments

    @@ -1549,7 +1549,7 @@

    Arguments

    @@ -1564,7 +1564,7 @@

    Arguments

    @@ -1579,7 +1579,7 @@

    Arguments

    @@ -1594,7 +1594,7 @@

    Arguments

    @@ -1609,7 +1609,7 @@

    Arguments

    @@ -1638,13 +1638,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/solve_lu.html b/interface/solve_lu.html index 3c291fb07..54bffd84d 100644 --- a/interface/solve_lu.html +++ b/interface/solve_lu.html @@ -200,7 +200,7 @@

    Arguments

    @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -314,7 +314,7 @@

    Arguments

    @@ -329,7 +329,7 @@

    Arguments

    @@ -344,7 +344,7 @@

    Arguments

    @@ -374,7 +374,7 @@

    Arguments

    @@ -389,7 +389,7 @@

    Arguments

    @@ -428,7 +428,7 @@

    Arguments

    @@ -443,7 +443,7 @@

    Arguments

    @@ -458,7 +458,7 @@

    Arguments

    @@ -488,7 +488,7 @@

    Arguments

    @@ -503,7 +503,7 @@

    Arguments

    @@ -542,7 +542,7 @@

    Arguments

    @@ -557,7 +557,7 @@

    Arguments

    @@ -572,7 +572,7 @@

    Arguments

    @@ -602,7 +602,7 @@

    Arguments

    @@ -617,7 +617,7 @@

    Arguments

    @@ -656,7 +656,7 @@

    Arguments

    @@ -671,7 +671,7 @@

    Arguments

    @@ -686,7 +686,7 @@

    Arguments

    @@ -716,7 +716,7 @@

    Arguments

    @@ -731,7 +731,7 @@

    Arguments

    @@ -770,7 +770,7 @@

    Arguments

    @@ -785,7 +785,7 @@

    Arguments

    @@ -800,7 +800,7 @@

    Arguments

    @@ -830,7 +830,7 @@

    Arguments

    @@ -845,7 +845,7 @@

    Arguments

    @@ -884,7 +884,7 @@

    Arguments

    @@ -899,7 +899,7 @@

    Arguments

    @@ -914,7 +914,7 @@

    Arguments

    @@ -944,7 +944,7 @@

    Arguments

    @@ -959,7 +959,7 @@

    Arguments

    @@ -998,7 +998,7 @@

    Arguments

    @@ -1013,7 +1013,7 @@

    Arguments

    @@ -1028,7 +1028,7 @@

    Arguments

    @@ -1058,7 +1058,7 @@

    Arguments

    @@ -1073,7 +1073,7 @@

    Arguments

    @@ -1102,13 +1102,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/sort.html b/interface/sort.html index 6e0747491..e1c0589bb 100644 --- a/interface/sort.html +++ b/interface/sort.html @@ -755,13 +755,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/sort_index.html b/interface/sort_index.html index cb90d495e..ea324fe8e 100644 --- a/interface/sort_index.html +++ b/interface/sort_index.html @@ -220,7 +220,7 @@

    Arguments

    @@ -323,7 +323,7 @@

    Arguments

    @@ -426,7 +426,7 @@

    Arguments

    @@ -529,7 +529,7 @@

    Arguments

    @@ -632,7 +632,7 @@

    Arguments

    @@ -735,7 +735,7 @@

    Arguments

    @@ -838,7 +838,7 @@

    Arguments

    @@ -941,7 +941,7 @@

    Arguments

    @@ -1044,7 +1044,7 @@

    Arguments

    @@ -1147,7 +1147,7 @@

    Arguments

    @@ -1250,7 +1250,7 @@

    Arguments

    @@ -1353,7 +1353,7 @@

    Arguments

    @@ -1456,7 +1456,7 @@

    Arguments

    @@ -1559,7 +1559,7 @@

    Arguments

    @@ -1662,7 +1662,7 @@

    Arguments

    @@ -1765,7 +1765,7 @@

    Arguments

    @@ -1868,7 +1868,7 @@

    Arguments

    @@ -1971,7 +1971,7 @@

    Arguments

    @@ -2074,7 +2074,7 @@

    Arguments

    @@ -2177,7 +2177,7 @@

    Arguments

    @@ -2251,13 +2251,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/spmv.html b/interface/spmv.html index 05d8bdeb0..30c486ee0 100644 --- a/interface/spmv.html +++ b/interface/spmv.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -691,7 +691,7 @@

    Arguments

    @@ -706,7 +706,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -751,7 +751,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -796,7 +796,7 @@

    Arguments

    @@ -824,13 +824,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/spooky_hash.html b/interface/spooky_hash.html index fe08e8c6e..8b400dfd2 100644 --- a/interface/spooky_hash.html +++ b/interface/spooky_hash.html @@ -178,7 +178,7 @@

    Arguments

    @@ -193,7 +193,7 @@

    Arguments

    @@ -237,7 +237,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -296,7 +296,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -355,7 +355,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -464,13 +464,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/spookyhash_128.html b/interface/spookyhash_128.html index 0d9b73f4d..51024feac 100644 --- a/interface/spookyhash_128.html +++ b/interface/spookyhash_128.html @@ -158,7 +158,7 @@

    Arguments

    @@ -200,13 +200,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/spr.html b/interface/spr.html index a5945a7ca..3173e3b24 100644 --- a/interface/spr.html +++ b/interface/spr.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -303,7 +303,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -333,7 +333,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -541,7 +541,7 @@

    Arguments

    @@ -556,7 +556,7 @@

    Arguments

    @@ -571,7 +571,7 @@

    Arguments

    @@ -586,7 +586,7 @@

    Arguments

    @@ -601,7 +601,7 @@

    Arguments

    @@ -616,7 +616,7 @@

    Arguments

    @@ -644,13 +644,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/spr2.html b/interface/spr2.html index f58e32aaf..202af4b14 100644 --- a/interface/spr2.html +++ b/interface/spr2.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -333,7 +333,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -631,7 +631,7 @@

    Arguments

    @@ -646,7 +646,7 @@

    Arguments

    @@ -661,7 +661,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -691,7 +691,7 @@

    Arguments

    @@ -706,7 +706,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -764,13 +764,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/srot.html b/interface/srot.html index 9ebac6f9a..390705b35 100644 --- a/interface/srot.html +++ b/interface/srot.html @@ -186,7 +186,7 @@

    Arguments

    @@ -201,7 +201,7 @@

    Arguments

    @@ -216,7 +216,7 @@

    Arguments

    @@ -231,7 +231,7 @@

    Arguments

    @@ -246,7 +246,7 @@

    Arguments

    @@ -261,7 +261,7 @@

    Arguments

    @@ -276,7 +276,7 @@

    Arguments

    @@ -320,7 +320,7 @@

    Arguments

    @@ -335,7 +335,7 @@

    Arguments

    @@ -350,7 +350,7 @@

    Arguments

    @@ -365,7 +365,7 @@

    Arguments

    @@ -380,7 +380,7 @@

    Arguments

    @@ -395,7 +395,7 @@

    Arguments

    @@ -410,7 +410,7 @@

    Arguments

    @@ -438,13 +438,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/sscal.html b/interface/sscal.html index 09b3bd4b2..9e1b5742a 100644 --- a/interface/sscal.html +++ b/interface/sscal.html @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -214,7 +214,7 @@

    Arguments

    @@ -229,7 +229,7 @@

    Arguments

    @@ -271,7 +271,7 @@

    Arguments

    @@ -286,7 +286,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -344,13 +344,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/starts_with.html b/interface/starts_with.html index 4f0a06331..21a43d832 100644 --- a/interface/starts_with.html +++ b/interface/starts_with.html @@ -178,7 +178,7 @@

    Arguments

    @@ -193,7 +193,7 @@

    Arguments

    @@ -237,7 +237,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -296,7 +296,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -355,7 +355,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -403,13 +403,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/string_type.html b/interface/string_type.html index d70f67237..9278e1459 100644 --- a/interface/string_type.html +++ b/interface/string_type.html @@ -177,7 +177,7 @@

    Arguments

    @@ -221,7 +221,7 @@

    Arguments

    @@ -265,7 +265,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -353,7 +353,7 @@

    Arguments

    @@ -397,7 +397,7 @@

    Arguments

    @@ -432,13 +432,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/stringlist_type.html b/interface/stringlist_type.html index 676f1cfa0..7c04be404 100644 --- a/interface/stringlist_type.html +++ b/interface/stringlist_type.html @@ -198,7 +198,7 @@

    Arguments

    @@ -243,7 +243,7 @@

    Arguments

    @@ -276,13 +276,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/strip.html b/interface/strip.html index ce92d4780..b68b6be23 100644 --- a/interface/strip.html +++ b/interface/strip.html @@ -176,7 +176,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -253,13 +253,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/svd.html b/interface/svd.html index 7097bb23f..c9bc3f4ad 100644 --- a/interface/svd.html +++ b/interface/svd.html @@ -215,7 +215,7 @@

    Arguments

    @@ -230,7 +230,7 @@

    Arguments

    @@ -245,7 +245,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -290,7 +290,7 @@

    Arguments

    @@ -306,7 +306,7 @@

    Arguments

    @@ -359,7 +359,7 @@

    Arguments

    @@ -374,7 +374,7 @@

    Arguments

    @@ -389,7 +389,7 @@

    Arguments

    @@ -404,7 +404,7 @@

    Arguments

    @@ -419,7 +419,7 @@

    Arguments

    @@ -434,7 +434,7 @@

    Arguments

    @@ -450,7 +450,7 @@

    Arguments

    @@ -503,7 +503,7 @@

    Arguments

    @@ -518,7 +518,7 @@

    Arguments

    @@ -533,7 +533,7 @@

    Arguments

    @@ -548,7 +548,7 @@

    Arguments

    @@ -563,7 +563,7 @@

    Arguments

    @@ -578,7 +578,7 @@

    Arguments

    @@ -594,7 +594,7 @@

    Arguments

    @@ -647,7 +647,7 @@

    Arguments

    @@ -662,7 +662,7 @@

    Arguments

    @@ -677,7 +677,7 @@

    Arguments

    @@ -692,7 +692,7 @@

    Arguments

    @@ -707,7 +707,7 @@

    Arguments

    @@ -722,7 +722,7 @@

    Arguments

    @@ -738,7 +738,7 @@

    Arguments

    @@ -767,13 +767,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/svdvals.html b/interface/svdvals.html index 71ef8c3f8..d7ec07a30 100644 --- a/interface/svdvals.html +++ b/interface/svdvals.html @@ -207,7 +207,7 @@

    Arguments

    @@ -222,7 +222,7 @@

    Arguments

    @@ -274,7 +274,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -341,7 +341,7 @@

    Arguments

    @@ -356,7 +356,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -458,13 +458,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/swap.html b/interface/swap.html index a115569eb..3f0a534a3 100644 --- a/interface/swap.html +++ b/interface/swap.html @@ -190,7 +190,7 @@

    Arguments

    @@ -205,7 +205,7 @@

    Arguments

    @@ -220,7 +220,7 @@

    Arguments

    @@ -235,7 +235,7 @@

    Arguments

    @@ -250,7 +250,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -304,7 +304,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -334,7 +334,7 @@

    Arguments

    @@ -349,7 +349,7 @@

    Arguments

    @@ -388,7 +388,7 @@

    Arguments

    @@ -403,7 +403,7 @@

    Arguments

    @@ -418,7 +418,7 @@

    Arguments

    @@ -433,7 +433,7 @@

    Arguments

    @@ -448,7 +448,7 @@

    Arguments

    @@ -487,7 +487,7 @@

    Arguments

    @@ -502,7 +502,7 @@

    Arguments

    @@ -517,7 +517,7 @@

    Arguments

    @@ -532,7 +532,7 @@

    Arguments

    @@ -547,7 +547,7 @@

    Arguments

    @@ -589,7 +589,7 @@

    Arguments

    @@ -604,7 +604,7 @@

    Arguments

    @@ -619,7 +619,7 @@

    Arguments

    @@ -634,7 +634,7 @@

    Arguments

    @@ -649,7 +649,7 @@

    Arguments

    @@ -690,7 +690,7 @@

    Arguments

    @@ -705,7 +705,7 @@

    Arguments

    @@ -720,7 +720,7 @@

    Arguments

    @@ -735,7 +735,7 @@

    Arguments

    @@ -750,7 +750,7 @@

    Arguments

    @@ -791,7 +791,7 @@

    Arguments

    @@ -806,7 +806,7 @@

    Arguments

    @@ -821,7 +821,7 @@

    Arguments

    @@ -836,7 +836,7 @@

    Arguments

    @@ -851,7 +851,7 @@

    Arguments

    @@ -891,7 +891,7 @@

    Arguments

    @@ -906,7 +906,7 @@

    Arguments

    @@ -921,7 +921,7 @@

    Arguments

    @@ -936,7 +936,7 @@

    Arguments

    @@ -951,7 +951,7 @@

    Arguments

    @@ -979,13 +979,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/symm.html b/interface/symm.html index f2a37f86e..ffdae23cf 100644 --- a/interface/symm.html +++ b/interface/symm.html @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -330,7 +330,7 @@

    Arguments

    @@ -345,7 +345,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -399,7 +399,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -444,7 +444,7 @@

    Arguments

    @@ -459,7 +459,7 @@

    Arguments

    @@ -474,7 +474,7 @@

    Arguments

    @@ -489,7 +489,7 @@

    Arguments

    @@ -504,7 +504,7 @@

    Arguments

    @@ -519,7 +519,7 @@

    Arguments

    @@ -534,7 +534,7 @@

    Arguments

    @@ -549,7 +549,7 @@

    Arguments

    @@ -564,7 +564,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -648,7 +648,7 @@

    Arguments

    @@ -663,7 +663,7 @@

    Arguments

    @@ -678,7 +678,7 @@

    Arguments

    @@ -693,7 +693,7 @@

    Arguments

    @@ -708,7 +708,7 @@

    Arguments

    @@ -723,7 +723,7 @@

    Arguments

    @@ -738,7 +738,7 @@

    Arguments

    @@ -753,7 +753,7 @@

    Arguments

    @@ -768,7 +768,7 @@

    Arguments

    @@ -807,7 +807,7 @@

    Arguments

    @@ -822,7 +822,7 @@

    Arguments

    @@ -837,7 +837,7 @@

    Arguments

    @@ -852,7 +852,7 @@

    Arguments

    @@ -867,7 +867,7 @@

    Arguments

    @@ -882,7 +882,7 @@

    Arguments

    @@ -897,7 +897,7 @@

    Arguments

    @@ -912,7 +912,7 @@

    Arguments

    @@ -927,7 +927,7 @@

    Arguments

    @@ -942,7 +942,7 @@

    Arguments

    @@ -957,7 +957,7 @@

    Arguments

    @@ -972,7 +972,7 @@

    Arguments

    @@ -1019,7 +1019,7 @@

    Arguments

    @@ -1034,7 +1034,7 @@

    Arguments

    @@ -1049,7 +1049,7 @@

    Arguments

    @@ -1064,7 +1064,7 @@

    Arguments

    @@ -1079,7 +1079,7 @@

    Arguments

    @@ -1094,7 +1094,7 @@

    Arguments

    @@ -1109,7 +1109,7 @@

    Arguments

    @@ -1124,7 +1124,7 @@

    Arguments

    @@ -1139,7 +1139,7 @@

    Arguments

    @@ -1154,7 +1154,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1229,7 +1229,7 @@

    Arguments

    @@ -1244,7 +1244,7 @@

    Arguments

    @@ -1259,7 +1259,7 @@

    Arguments

    @@ -1274,7 +1274,7 @@

    Arguments

    @@ -1289,7 +1289,7 @@

    Arguments

    @@ -1304,7 +1304,7 @@

    Arguments

    @@ -1319,7 +1319,7 @@

    Arguments

    @@ -1334,7 +1334,7 @@

    Arguments

    @@ -1349,7 +1349,7 @@

    Arguments

    @@ -1364,7 +1364,7 @@

    Arguments

    @@ -1379,7 +1379,7 @@

    Arguments

    @@ -1394,7 +1394,7 @@

    Arguments

    @@ -1439,7 +1439,7 @@

    Arguments

    @@ -1454,7 +1454,7 @@

    Arguments

    @@ -1469,7 +1469,7 @@

    Arguments

    @@ -1484,7 +1484,7 @@

    Arguments

    @@ -1499,7 +1499,7 @@

    Arguments

    @@ -1514,7 +1514,7 @@

    Arguments

    @@ -1529,7 +1529,7 @@

    Arguments

    @@ -1544,7 +1544,7 @@

    Arguments

    @@ -1559,7 +1559,7 @@

    Arguments

    @@ -1574,7 +1574,7 @@

    Arguments

    @@ -1589,7 +1589,7 @@

    Arguments

    @@ -1604,7 +1604,7 @@

    Arguments

    @@ -1649,7 +1649,7 @@

    Arguments

    @@ -1664,7 +1664,7 @@

    Arguments

    @@ -1679,7 +1679,7 @@

    Arguments

    @@ -1694,7 +1694,7 @@

    Arguments

    @@ -1709,7 +1709,7 @@

    Arguments

    @@ -1724,7 +1724,7 @@

    Arguments

    @@ -1739,7 +1739,7 @@

    Arguments

    @@ -1754,7 +1754,7 @@

    Arguments

    @@ -1769,7 +1769,7 @@

    Arguments

    @@ -1784,7 +1784,7 @@

    Arguments

    @@ -1799,7 +1799,7 @@

    Arguments

    @@ -1814,7 +1814,7 @@

    Arguments

    @@ -1842,13 +1842,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/symv.html b/interface/symv.html index 4ca7165f8..3e1c9dbb5 100644 --- a/interface/symv.html +++ b/interface/symv.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -324,7 +324,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -648,7 +648,7 @@

    Arguments

    @@ -663,7 +663,7 @@

    Arguments

    @@ -678,7 +678,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -751,7 +751,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -796,7 +796,7 @@

    Arguments

    @@ -811,7 +811,7 @@

    Arguments

    @@ -826,7 +826,7 @@

    Arguments

    @@ -841,7 +841,7 @@

    Arguments

    @@ -856,7 +856,7 @@

    Arguments

    @@ -884,13 +884,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/syr.html b/interface/syr.html index 7ed0f3f6e..95117b425 100644 --- a/interface/syr.html +++ b/interface/syr.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -318,7 +318,7 @@

    Arguments

    @@ -333,7 +333,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -586,7 +586,7 @@

    Arguments

    @@ -601,7 +601,7 @@

    Arguments

    @@ -616,7 +616,7 @@

    Arguments

    @@ -631,7 +631,7 @@

    Arguments

    @@ -646,7 +646,7 @@

    Arguments

    @@ -661,7 +661,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -704,13 +704,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/syr2.html b/interface/syr2.html index 5d1ff9655..33574f9ca 100644 --- a/interface/syr2.html +++ b/interface/syr2.html @@ -189,7 +189,7 @@

    Arguments

    @@ -204,7 +204,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -234,7 +234,7 @@

    Arguments

    @@ -249,7 +249,7 @@

    Arguments

    @@ -264,7 +264,7 @@

    Arguments

    @@ -279,7 +279,7 @@

    Arguments

    @@ -294,7 +294,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -348,7 +348,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -378,7 +378,7 @@

    Arguments

    @@ -393,7 +393,7 @@

    Arguments

    @@ -408,7 +408,7 @@

    Arguments

    @@ -423,7 +423,7 @@

    Arguments

    @@ -438,7 +438,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -691,7 +691,7 @@

    Arguments

    @@ -706,7 +706,7 @@

    Arguments

    @@ -721,7 +721,7 @@

    Arguments

    @@ -736,7 +736,7 @@

    Arguments

    @@ -751,7 +751,7 @@

    Arguments

    @@ -766,7 +766,7 @@

    Arguments

    @@ -781,7 +781,7 @@

    Arguments

    @@ -796,7 +796,7 @@

    Arguments

    @@ -824,13 +824,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/syr2k.html b/interface/syr2k.html index 06778cd56..5e98c6605 100644 --- a/interface/syr2k.html +++ b/interface/syr2k.html @@ -196,7 +196,7 @@

    Arguments

    @@ -211,7 +211,7 @@

    Arguments

    @@ -226,7 +226,7 @@

    Arguments

    @@ -241,7 +241,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -271,7 +271,7 @@

    Arguments

    @@ -286,7 +286,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -331,7 +331,7 @@

    Arguments

    @@ -346,7 +346,7 @@

    Arguments

    @@ -361,7 +361,7 @@

    Arguments

    @@ -400,7 +400,7 @@

    Arguments

    @@ -415,7 +415,7 @@

    Arguments

    @@ -430,7 +430,7 @@

    Arguments

    @@ -445,7 +445,7 @@

    Arguments

    @@ -460,7 +460,7 @@

    Arguments

    @@ -475,7 +475,7 @@

    Arguments

    @@ -490,7 +490,7 @@

    Arguments

    @@ -505,7 +505,7 @@

    Arguments

    @@ -520,7 +520,7 @@

    Arguments

    @@ -535,7 +535,7 @@

    Arguments

    @@ -550,7 +550,7 @@

    Arguments

    @@ -565,7 +565,7 @@

    Arguments

    @@ -604,7 +604,7 @@

    Arguments

    @@ -619,7 +619,7 @@

    Arguments

    @@ -634,7 +634,7 @@

    Arguments

    @@ -649,7 +649,7 @@

    Arguments

    @@ -664,7 +664,7 @@

    Arguments

    @@ -679,7 +679,7 @@

    Arguments

    @@ -694,7 +694,7 @@

    Arguments

    @@ -709,7 +709,7 @@

    Arguments

    @@ -724,7 +724,7 @@

    Arguments

    @@ -739,7 +739,7 @@

    Arguments

    @@ -754,7 +754,7 @@

    Arguments

    @@ -769,7 +769,7 @@

    Arguments

    @@ -808,7 +808,7 @@

    Arguments

    @@ -823,7 +823,7 @@

    Arguments

    @@ -838,7 +838,7 @@

    Arguments

    @@ -853,7 +853,7 @@

    Arguments

    @@ -868,7 +868,7 @@

    Arguments

    @@ -883,7 +883,7 @@

    Arguments

    @@ -898,7 +898,7 @@

    Arguments

    @@ -913,7 +913,7 @@

    Arguments

    @@ -928,7 +928,7 @@

    Arguments

    @@ -943,7 +943,7 @@

    Arguments

    @@ -958,7 +958,7 @@

    Arguments

    @@ -973,7 +973,7 @@

    Arguments

    @@ -1021,7 +1021,7 @@

    Arguments

    @@ -1036,7 +1036,7 @@

    Arguments

    @@ -1051,7 +1051,7 @@

    Arguments

    @@ -1066,7 +1066,7 @@

    Arguments

    @@ -1081,7 +1081,7 @@

    Arguments

    @@ -1096,7 +1096,7 @@

    Arguments

    @@ -1111,7 +1111,7 @@

    Arguments

    @@ -1126,7 +1126,7 @@

    Arguments

    @@ -1141,7 +1141,7 @@

    Arguments

    @@ -1156,7 +1156,7 @@

    Arguments

    @@ -1171,7 +1171,7 @@

    Arguments

    @@ -1186,7 +1186,7 @@

    Arguments

    @@ -1232,7 +1232,7 @@

    Arguments

    @@ -1247,7 +1247,7 @@

    Arguments

    @@ -1262,7 +1262,7 @@

    Arguments

    @@ -1277,7 +1277,7 @@

    Arguments

    @@ -1292,7 +1292,7 @@

    Arguments

    @@ -1307,7 +1307,7 @@

    Arguments

    @@ -1322,7 +1322,7 @@

    Arguments

    @@ -1337,7 +1337,7 @@

    Arguments

    @@ -1352,7 +1352,7 @@

    Arguments

    @@ -1367,7 +1367,7 @@

    Arguments

    @@ -1382,7 +1382,7 @@

    Arguments

    @@ -1397,7 +1397,7 @@

    Arguments

    @@ -1443,7 +1443,7 @@

    Arguments

    @@ -1458,7 +1458,7 @@

    Arguments

    @@ -1473,7 +1473,7 @@

    Arguments

    @@ -1488,7 +1488,7 @@

    Arguments

    @@ -1503,7 +1503,7 @@

    Arguments

    @@ -1518,7 +1518,7 @@

    Arguments

    @@ -1533,7 +1533,7 @@

    Arguments

    @@ -1548,7 +1548,7 @@

    Arguments

    @@ -1563,7 +1563,7 @@

    Arguments

    @@ -1578,7 +1578,7 @@

    Arguments

    @@ -1593,7 +1593,7 @@

    Arguments

    @@ -1608,7 +1608,7 @@

    Arguments

    @@ -1654,7 +1654,7 @@

    Arguments

    @@ -1669,7 +1669,7 @@

    Arguments

    @@ -1684,7 +1684,7 @@

    Arguments

    @@ -1699,7 +1699,7 @@

    Arguments

    @@ -1714,7 +1714,7 @@

    Arguments

    @@ -1729,7 +1729,7 @@

    Arguments

    @@ -1744,7 +1744,7 @@

    Arguments

    @@ -1759,7 +1759,7 @@

    Arguments

    @@ -1774,7 +1774,7 @@

    Arguments

    @@ -1789,7 +1789,7 @@

    Arguments

    @@ -1804,7 +1804,7 @@

    Arguments

    @@ -1819,7 +1819,7 @@

    Arguments

    @@ -1847,13 +1847,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/syrk.html b/interface/syrk.html index 05e15dcbc..36f7a5d6a 100644 --- a/interface/syrk.html +++ b/interface/syrk.html @@ -196,7 +196,7 @@

    Arguments

    @@ -211,7 +211,7 @@

    Arguments

    @@ -226,7 +226,7 @@

    Arguments

    @@ -241,7 +241,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -271,7 +271,7 @@

    Arguments

    @@ -286,7 +286,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -331,7 +331,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -385,7 +385,7 @@

    Arguments

    @@ -400,7 +400,7 @@

    Arguments

    @@ -415,7 +415,7 @@

    Arguments

    @@ -430,7 +430,7 @@

    Arguments

    @@ -445,7 +445,7 @@

    Arguments

    @@ -460,7 +460,7 @@

    Arguments

    @@ -475,7 +475,7 @@

    Arguments

    @@ -490,7 +490,7 @@

    Arguments

    @@ -505,7 +505,7 @@

    Arguments

    @@ -544,7 +544,7 @@

    Arguments

    @@ -559,7 +559,7 @@

    Arguments

    @@ -574,7 +574,7 @@

    Arguments

    @@ -589,7 +589,7 @@

    Arguments

    @@ -604,7 +604,7 @@

    Arguments

    @@ -619,7 +619,7 @@

    Arguments

    @@ -634,7 +634,7 @@

    Arguments

    @@ -649,7 +649,7 @@

    Arguments

    @@ -664,7 +664,7 @@

    Arguments

    @@ -679,7 +679,7 @@

    Arguments

    @@ -718,7 +718,7 @@

    Arguments

    @@ -733,7 +733,7 @@

    Arguments

    @@ -748,7 +748,7 @@

    Arguments

    @@ -763,7 +763,7 @@

    Arguments

    @@ -778,7 +778,7 @@

    Arguments

    @@ -793,7 +793,7 @@

    Arguments

    @@ -808,7 +808,7 @@

    Arguments

    @@ -823,7 +823,7 @@

    Arguments

    @@ -838,7 +838,7 @@

    Arguments

    @@ -853,7 +853,7 @@

    Arguments

    @@ -901,7 +901,7 @@

    Arguments

    @@ -916,7 +916,7 @@

    Arguments

    @@ -931,7 +931,7 @@

    Arguments

    @@ -946,7 +946,7 @@

    Arguments

    @@ -961,7 +961,7 @@

    Arguments

    @@ -976,7 +976,7 @@

    Arguments

    @@ -991,7 +991,7 @@

    Arguments

    @@ -1006,7 +1006,7 @@

    Arguments

    @@ -1021,7 +1021,7 @@

    Arguments

    @@ -1036,7 +1036,7 @@

    Arguments

    @@ -1082,7 +1082,7 @@

    Arguments

    @@ -1097,7 +1097,7 @@

    Arguments

    @@ -1112,7 +1112,7 @@

    Arguments

    @@ -1127,7 +1127,7 @@

    Arguments

    @@ -1142,7 +1142,7 @@

    Arguments

    @@ -1157,7 +1157,7 @@

    Arguments

    @@ -1172,7 +1172,7 @@

    Arguments

    @@ -1187,7 +1187,7 @@

    Arguments

    @@ -1202,7 +1202,7 @@

    Arguments

    @@ -1217,7 +1217,7 @@

    Arguments

    @@ -1263,7 +1263,7 @@

    Arguments

    @@ -1278,7 +1278,7 @@

    Arguments

    @@ -1293,7 +1293,7 @@

    Arguments

    @@ -1308,7 +1308,7 @@

    Arguments

    @@ -1323,7 +1323,7 @@

    Arguments

    @@ -1338,7 +1338,7 @@

    Arguments

    @@ -1353,7 +1353,7 @@

    Arguments

    @@ -1368,7 +1368,7 @@

    Arguments

    @@ -1383,7 +1383,7 @@

    Arguments

    @@ -1398,7 +1398,7 @@

    Arguments

    @@ -1444,7 +1444,7 @@

    Arguments

    @@ -1459,7 +1459,7 @@

    Arguments

    @@ -1474,7 +1474,7 @@

    Arguments

    @@ -1489,7 +1489,7 @@

    Arguments

    @@ -1504,7 +1504,7 @@

    Arguments

    @@ -1519,7 +1519,7 @@

    Arguments

    @@ -1534,7 +1534,7 @@

    Arguments

    @@ -1549,7 +1549,7 @@

    Arguments

    @@ -1564,7 +1564,7 @@

    Arguments

    @@ -1579,7 +1579,7 @@

    Arguments

    @@ -1607,13 +1607,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/tbmv.html b/interface/tbmv.html index 8caedecce..a3b24827c 100644 --- a/interface/tbmv.html +++ b/interface/tbmv.html @@ -193,7 +193,7 @@

    Arguments

    @@ -208,7 +208,7 @@

    Arguments

    @@ -223,7 +223,7 @@

    Arguments

    @@ -238,7 +238,7 @@

    Arguments

    @@ -253,7 +253,7 @@

    Arguments

    @@ -268,7 +268,7 @@

    Arguments

    @@ -283,7 +283,7 @@

    Arguments

    @@ -298,7 +298,7 @@

    Arguments

    @@ -313,7 +313,7 @@

    Arguments

    @@ -352,7 +352,7 @@

    Arguments

    @@ -367,7 +367,7 @@

    Arguments

    @@ -382,7 +382,7 @@

    Arguments

    @@ -397,7 +397,7 @@

    Arguments

    @@ -412,7 +412,7 @@

    Arguments

    @@ -427,7 +427,7 @@

    Arguments

    @@ -442,7 +442,7 @@

    Arguments

    @@ -457,7 +457,7 @@

    Arguments

    @@ -472,7 +472,7 @@

    Arguments

    @@ -511,7 +511,7 @@

    Arguments

    @@ -526,7 +526,7 @@

    Arguments

    @@ -541,7 +541,7 @@

    Arguments

    @@ -556,7 +556,7 @@

    Arguments

    @@ -571,7 +571,7 @@

    Arguments

    @@ -586,7 +586,7 @@

    Arguments

    @@ -601,7 +601,7 @@

    Arguments

    @@ -616,7 +616,7 @@

    Arguments

    @@ -631,7 +631,7 @@

    Arguments

    @@ -670,7 +670,7 @@

    Arguments

    @@ -685,7 +685,7 @@

    Arguments

    @@ -700,7 +700,7 @@

    Arguments

    @@ -715,7 +715,7 @@

    Arguments

    @@ -730,7 +730,7 @@

    Arguments

    @@ -745,7 +745,7 @@

    Arguments

    @@ -760,7 +760,7 @@

    Arguments

    @@ -775,7 +775,7 @@

    Arguments

    @@ -790,7 +790,7 @@

    Arguments

    @@ -835,7 +835,7 @@

    Arguments

    @@ -850,7 +850,7 @@

    Arguments

    @@ -865,7 +865,7 @@

    Arguments

    @@ -880,7 +880,7 @@

    Arguments

    @@ -895,7 +895,7 @@

    Arguments

    @@ -910,7 +910,7 @@

    Arguments

    @@ -925,7 +925,7 @@

    Arguments

    @@ -940,7 +940,7 @@

    Arguments

    @@ -955,7 +955,7 @@

    Arguments

    @@ -998,7 +998,7 @@

    Arguments

    @@ -1013,7 +1013,7 @@

    Arguments

    @@ -1028,7 +1028,7 @@

    Arguments

    @@ -1043,7 +1043,7 @@

    Arguments

    @@ -1058,7 +1058,7 @@

    Arguments

    @@ -1073,7 +1073,7 @@

    Arguments

    @@ -1088,7 +1088,7 @@

    Arguments

    @@ -1103,7 +1103,7 @@

    Arguments

    @@ -1118,7 +1118,7 @@

    Arguments

    @@ -1161,7 +1161,7 @@

    Arguments

    @@ -1176,7 +1176,7 @@

    Arguments

    @@ -1191,7 +1191,7 @@

    Arguments

    @@ -1206,7 +1206,7 @@

    Arguments

    @@ -1221,7 +1221,7 @@

    Arguments

    @@ -1236,7 +1236,7 @@

    Arguments

    @@ -1251,7 +1251,7 @@

    Arguments

    @@ -1266,7 +1266,7 @@

    Arguments

    @@ -1281,7 +1281,7 @@

    Arguments

    @@ -1324,7 +1324,7 @@

    Arguments

    @@ -1339,7 +1339,7 @@

    Arguments

    @@ -1354,7 +1354,7 @@

    Arguments

    @@ -1369,7 +1369,7 @@

    Arguments

    @@ -1384,7 +1384,7 @@

    Arguments

    @@ -1399,7 +1399,7 @@

    Arguments

    @@ -1414,7 +1414,7 @@

    Arguments

    @@ -1429,7 +1429,7 @@

    Arguments

    @@ -1444,7 +1444,7 @@

    Arguments

    @@ -1472,13 +1472,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/tbsv.html b/interface/tbsv.html index 62cd87a29..495853bf3 100644 --- a/interface/tbsv.html +++ b/interface/tbsv.html @@ -196,7 +196,7 @@

    Arguments

    @@ -211,7 +211,7 @@

    Arguments

    @@ -226,7 +226,7 @@

    Arguments

    @@ -241,7 +241,7 @@

    Arguments

    @@ -256,7 +256,7 @@

    Arguments

    @@ -271,7 +271,7 @@

    Arguments

    @@ -286,7 +286,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -355,7 +355,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -385,7 +385,7 @@

    Arguments

    @@ -400,7 +400,7 @@

    Arguments

    @@ -415,7 +415,7 @@

    Arguments

    @@ -430,7 +430,7 @@

    Arguments

    @@ -445,7 +445,7 @@

    Arguments

    @@ -460,7 +460,7 @@

    Arguments

    @@ -475,7 +475,7 @@

    Arguments

    @@ -514,7 +514,7 @@

    Arguments

    @@ -529,7 +529,7 @@

    Arguments

    @@ -544,7 +544,7 @@

    Arguments

    @@ -559,7 +559,7 @@

    Arguments

    @@ -574,7 +574,7 @@

    Arguments

    @@ -589,7 +589,7 @@

    Arguments

    @@ -604,7 +604,7 @@

    Arguments

    @@ -619,7 +619,7 @@

    Arguments

    @@ -634,7 +634,7 @@

    Arguments

    @@ -673,7 +673,7 @@

    Arguments

    @@ -688,7 +688,7 @@

    Arguments

    @@ -703,7 +703,7 @@

    Arguments

    @@ -718,7 +718,7 @@

    Arguments

    @@ -733,7 +733,7 @@

    Arguments

    @@ -748,7 +748,7 @@

    Arguments

    @@ -763,7 +763,7 @@

    Arguments

    @@ -778,7 +778,7 @@

    Arguments

    @@ -793,7 +793,7 @@

    Arguments

    @@ -841,7 +841,7 @@

    Arguments

    @@ -856,7 +856,7 @@

    Arguments

    @@ -871,7 +871,7 @@

    Arguments

    @@ -886,7 +886,7 @@

    Arguments

    @@ -901,7 +901,7 @@

    Arguments

    @@ -916,7 +916,7 @@

    Arguments

    @@ -931,7 +931,7 @@

    Arguments

    @@ -946,7 +946,7 @@

    Arguments

    @@ -961,7 +961,7 @@

    Arguments

    @@ -1007,7 +1007,7 @@

    Arguments

    @@ -1022,7 +1022,7 @@

    Arguments

    @@ -1037,7 +1037,7 @@

    Arguments

    @@ -1052,7 +1052,7 @@

    Arguments

    @@ -1067,7 +1067,7 @@

    Arguments

    @@ -1082,7 +1082,7 @@

    Arguments

    @@ -1097,7 +1097,7 @@

    Arguments

    @@ -1112,7 +1112,7 @@

    Arguments

    @@ -1127,7 +1127,7 @@

    Arguments

    @@ -1173,7 +1173,7 @@

    Arguments

    @@ -1188,7 +1188,7 @@

    Arguments

    @@ -1203,7 +1203,7 @@

    Arguments

    @@ -1218,7 +1218,7 @@

    Arguments

    @@ -1233,7 +1233,7 @@

    Arguments

    @@ -1248,7 +1248,7 @@

    Arguments

    @@ -1263,7 +1263,7 @@

    Arguments

    @@ -1278,7 +1278,7 @@

    Arguments

    @@ -1293,7 +1293,7 @@

    Arguments

    @@ -1339,7 +1339,7 @@

    Arguments

    @@ -1354,7 +1354,7 @@

    Arguments

    @@ -1369,7 +1369,7 @@

    Arguments

    @@ -1384,7 +1384,7 @@

    Arguments

    @@ -1399,7 +1399,7 @@

    Arguments

    @@ -1414,7 +1414,7 @@

    Arguments

    @@ -1429,7 +1429,7 @@

    Arguments

    @@ -1444,7 +1444,7 @@

    Arguments

    @@ -1459,7 +1459,7 @@

    Arguments

    @@ -1487,13 +1487,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_lower~2.html b/interface/to_lower.html similarity index 97% rename from interface/to_lower~2.html rename to interface/to_lower.html index 0c7a774d1..d71272c02 100644 --- a/interface/to_lower~2.html +++ b/interface/to_lower.html @@ -136,7 +136,7 @@

    Module Procedures

    @@ -176,7 +176,7 @@

    Arguments

    @@ -209,13 +209,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_num.html b/interface/to_num.html index f717c7a30..7d1c6e2dc 100644 --- a/interface/to_num.html +++ b/interface/to_num.html @@ -181,7 +181,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -299,7 +299,7 @@

    Arguments

    @@ -358,7 +358,7 @@

    Arguments

    @@ -417,7 +417,7 @@

    Arguments

    @@ -476,7 +476,7 @@

    Arguments

    @@ -524,13 +524,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_num_from_stream.html b/interface/to_num_from_stream.html index 397e61912..03f3fcd88 100644 --- a/interface/to_num_from_stream.html +++ b/interface/to_num_from_stream.html @@ -181,7 +181,7 @@

    Arguments

    @@ -211,7 +211,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -329,7 +329,7 @@

    Arguments

    @@ -359,7 +359,7 @@

    Arguments

    @@ -403,7 +403,7 @@

    Arguments

    @@ -433,7 +433,7 @@

    Arguments

    @@ -477,7 +477,7 @@

    Arguments

    @@ -507,7 +507,7 @@

    Arguments

    @@ -551,7 +551,7 @@

    Arguments

    @@ -581,7 +581,7 @@

    Arguments

    @@ -614,13 +614,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_real.html b/interface/to_real.html index 92349d205..8186dd70c 100644 --- a/interface/to_real.html +++ b/interface/to_real.html @@ -176,7 +176,7 @@

    Arguments

    @@ -251,7 +251,7 @@

    Arguments

    @@ -314,13 +314,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_sentence~2.html b/interface/to_sentence.html similarity index 97% rename from interface/to_sentence~2.html rename to interface/to_sentence.html index 72c0448bb..ca1cf2c9f 100644 --- a/interface/to_sentence~2.html +++ b/interface/to_sentence.html @@ -136,7 +136,7 @@

    Module Procedures

    @@ -176,7 +176,7 @@

    Arguments

    @@ -209,13 +209,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_string.html b/interface/to_string.html index 94e539e1f..8b8904a56 100644 --- a/interface/to_string.html +++ b/interface/to_string.html @@ -172,7 +172,7 @@

    Arguments

    @@ -207,13 +207,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_string~2.html b/interface/to_string~2.html index bd1d29fd6..f06cda929 100644 --- a/interface/to_string~2.html +++ b/interface/to_string~2.html @@ -187,7 +187,7 @@

    Arguments

    @@ -231,7 +231,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -319,7 +319,7 @@

    Arguments

    @@ -363,7 +363,7 @@

    Arguments

    @@ -407,7 +407,7 @@

    Arguments

    @@ -422,7 +422,7 @@

    Arguments

    @@ -466,7 +466,7 @@

    Arguments

    @@ -481,7 +481,7 @@

    Arguments

    @@ -525,7 +525,7 @@

    Arguments

    @@ -540,7 +540,7 @@

    Arguments

    @@ -584,7 +584,7 @@

    Arguments

    @@ -599,7 +599,7 @@

    Arguments

    @@ -643,7 +643,7 @@

    Arguments

    @@ -658,7 +658,7 @@

    Arguments

    @@ -702,7 +702,7 @@

    Arguments

    @@ -717,7 +717,7 @@

    Arguments

    @@ -761,7 +761,7 @@

    Arguments

    @@ -776,7 +776,7 @@

    Arguments

    @@ -820,7 +820,7 @@

    Arguments

    @@ -835,7 +835,7 @@

    Arguments

    @@ -879,7 +879,7 @@

    Arguments

    @@ -894,7 +894,7 @@

    Arguments

    @@ -929,13 +929,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_title~2.html b/interface/to_title.html similarity index 97% rename from interface/to_title~2.html rename to interface/to_title.html index 2c88fcea8..cd0f9f99c 100644 --- a/interface/to_title~2.html +++ b/interface/to_title.html @@ -136,7 +136,7 @@

    Module Procedures

    @@ -176,7 +176,7 @@

    Arguments

    @@ -209,13 +209,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/to_upper~2.html b/interface/to_upper.html similarity index 97% rename from interface/to_upper~2.html rename to interface/to_upper.html index b7eb13683..ae80ca25e 100644 --- a/interface/to_upper~2.html +++ b/interface/to_upper.html @@ -136,7 +136,7 @@

    Module Procedures

    @@ -176,7 +176,7 @@

    Arguments

    @@ -209,13 +209,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/tpmv.html b/interface/tpmv.html index 2856e5b1a..5df1cee03 100644 --- a/interface/tpmv.html +++ b/interface/tpmv.html @@ -193,7 +193,7 @@

    Arguments

    @@ -208,7 +208,7 @@

    Arguments

    @@ -223,7 +223,7 @@

    Arguments

    @@ -238,7 +238,7 @@

    Arguments

    @@ -253,7 +253,7 @@

    Arguments

    @@ -268,7 +268,7 @@

    Arguments

    @@ -283,7 +283,7 @@

    Arguments

    @@ -322,7 +322,7 @@

    Arguments

    @@ -337,7 +337,7 @@

    Arguments

    @@ -352,7 +352,7 @@

    Arguments

    @@ -367,7 +367,7 @@

    Arguments

    @@ -382,7 +382,7 @@

    Arguments

    @@ -397,7 +397,7 @@

    Arguments

    @@ -412,7 +412,7 @@

    Arguments

    @@ -451,7 +451,7 @@

    Arguments

    @@ -466,7 +466,7 @@

    Arguments

    @@ -481,7 +481,7 @@

    Arguments

    @@ -496,7 +496,7 @@

    Arguments

    @@ -511,7 +511,7 @@

    Arguments

    @@ -526,7 +526,7 @@

    Arguments

    @@ -541,7 +541,7 @@

    Arguments

    @@ -580,7 +580,7 @@

    Arguments

    @@ -595,7 +595,7 @@

    Arguments

    @@ -610,7 +610,7 @@

    Arguments

    @@ -625,7 +625,7 @@

    Arguments

    @@ -640,7 +640,7 @@

    Arguments

    @@ -655,7 +655,7 @@

    Arguments

    @@ -670,7 +670,7 @@

    Arguments

    @@ -715,7 +715,7 @@

    Arguments

    @@ -730,7 +730,7 @@

    Arguments

    @@ -745,7 +745,7 @@

    Arguments

    @@ -760,7 +760,7 @@

    Arguments

    @@ -775,7 +775,7 @@

    Arguments

    @@ -790,7 +790,7 @@

    Arguments

    @@ -805,7 +805,7 @@

    Arguments

    @@ -848,7 +848,7 @@

    Arguments

    @@ -863,7 +863,7 @@

    Arguments

    @@ -878,7 +878,7 @@

    Arguments

    @@ -893,7 +893,7 @@

    Arguments

    @@ -908,7 +908,7 @@

    Arguments

    @@ -923,7 +923,7 @@

    Arguments

    @@ -938,7 +938,7 @@

    Arguments

    @@ -981,7 +981,7 @@

    Arguments

    @@ -996,7 +996,7 @@

    Arguments

    @@ -1011,7 +1011,7 @@

    Arguments

    @@ -1026,7 +1026,7 @@

    Arguments

    @@ -1041,7 +1041,7 @@

    Arguments

    @@ -1056,7 +1056,7 @@

    Arguments

    @@ -1071,7 +1071,7 @@

    Arguments

    @@ -1114,7 +1114,7 @@

    Arguments

    @@ -1129,7 +1129,7 @@

    Arguments

    @@ -1144,7 +1144,7 @@

    Arguments

    @@ -1159,7 +1159,7 @@

    Arguments

    @@ -1174,7 +1174,7 @@

    Arguments

    @@ -1189,7 +1189,7 @@

    Arguments

    @@ -1204,7 +1204,7 @@

    Arguments

    @@ -1232,13 +1232,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/tpsv.html b/interface/tpsv.html index b701e69b1..95c328b0c 100644 --- a/interface/tpsv.html +++ b/interface/tpsv.html @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -324,7 +324,7 @@

    Arguments

    @@ -339,7 +339,7 @@

    Arguments

    @@ -354,7 +354,7 @@

    Arguments

    @@ -369,7 +369,7 @@

    Arguments

    @@ -384,7 +384,7 @@

    Arguments

    @@ -399,7 +399,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -453,7 +453,7 @@

    Arguments

    @@ -468,7 +468,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -582,7 +582,7 @@

    Arguments

    @@ -597,7 +597,7 @@

    Arguments

    @@ -612,7 +612,7 @@

    Arguments

    @@ -627,7 +627,7 @@

    Arguments

    @@ -642,7 +642,7 @@

    Arguments

    @@ -657,7 +657,7 @@

    Arguments

    @@ -672,7 +672,7 @@

    Arguments

    @@ -719,7 +719,7 @@

    Arguments

    @@ -734,7 +734,7 @@

    Arguments

    @@ -749,7 +749,7 @@

    Arguments

    @@ -764,7 +764,7 @@

    Arguments

    @@ -779,7 +779,7 @@

    Arguments

    @@ -794,7 +794,7 @@

    Arguments

    @@ -809,7 +809,7 @@

    Arguments

    @@ -854,7 +854,7 @@

    Arguments

    @@ -869,7 +869,7 @@

    Arguments

    @@ -884,7 +884,7 @@

    Arguments

    @@ -899,7 +899,7 @@

    Arguments

    @@ -914,7 +914,7 @@

    Arguments

    @@ -929,7 +929,7 @@

    Arguments

    @@ -944,7 +944,7 @@

    Arguments

    @@ -989,7 +989,7 @@

    Arguments

    @@ -1004,7 +1004,7 @@

    Arguments

    @@ -1019,7 +1019,7 @@

    Arguments

    @@ -1034,7 +1034,7 @@

    Arguments

    @@ -1049,7 +1049,7 @@

    Arguments

    @@ -1064,7 +1064,7 @@

    Arguments

    @@ -1079,7 +1079,7 @@

    Arguments

    @@ -1124,7 +1124,7 @@

    Arguments

    @@ -1139,7 +1139,7 @@

    Arguments

    @@ -1154,7 +1154,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1199,7 +1199,7 @@

    Arguments

    @@ -1214,7 +1214,7 @@

    Arguments

    @@ -1242,13 +1242,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trace.html b/interface/trace.html index e4140cad5..476d7bb96 100644 --- a/interface/trace.html +++ b/interface/trace.html @@ -184,7 +184,7 @@

    Arguments

    @@ -228,7 +228,7 @@

    Arguments

    @@ -272,7 +272,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -404,7 +404,7 @@

    Arguments

    @@ -448,7 +448,7 @@

    Arguments

    @@ -492,7 +492,7 @@

    Arguments

    @@ -525,13 +525,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trapz.html b/interface/trapz.html index 02c6d4bef..94e5d8500 100644 --- a/interface/trapz.html +++ b/interface/trapz.html @@ -177,7 +177,7 @@

    Arguments

    @@ -192,7 +192,7 @@

    Arguments

    @@ -236,7 +236,7 @@

    Arguments

    @@ -251,7 +251,7 @@

    Arguments

    @@ -295,7 +295,7 @@

    Arguments

    @@ -310,7 +310,7 @@

    Arguments

    @@ -354,7 +354,7 @@

    Arguments

    @@ -369,7 +369,7 @@

    Arguments

    @@ -404,13 +404,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trapz_weights.html b/interface/trapz_weights.html index fc9e4e435..3807184d7 100644 --- a/interface/trapz_weights.html +++ b/interface/trapz_weights.html @@ -175,7 +175,7 @@

    Arguments

    @@ -219,7 +219,7 @@

    Arguments

    @@ -254,13 +254,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trim.html b/interface/trim.html index 52346f66d..1c17bdafd 100644 --- a/interface/trim.html +++ b/interface/trim.html @@ -175,7 +175,7 @@

    Arguments

    @@ -208,13 +208,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trmm.html b/interface/trmm.html index ec631c241..5dc83dbd0 100644 --- a/interface/trmm.html +++ b/interface/trmm.html @@ -194,7 +194,7 @@

    Arguments

    @@ -209,7 +209,7 @@

    Arguments

    @@ -224,7 +224,7 @@

    Arguments

    @@ -239,7 +239,7 @@

    Arguments

    @@ -254,7 +254,7 @@

    Arguments

    @@ -269,7 +269,7 @@

    Arguments

    @@ -284,7 +284,7 @@

    Arguments

    @@ -299,7 +299,7 @@

    Arguments

    @@ -314,7 +314,7 @@

    Arguments

    @@ -329,7 +329,7 @@

    Arguments

    @@ -344,7 +344,7 @@

    Arguments

    @@ -383,7 +383,7 @@

    Arguments

    @@ -398,7 +398,7 @@

    Arguments

    @@ -413,7 +413,7 @@

    Arguments

    @@ -428,7 +428,7 @@

    Arguments

    @@ -443,7 +443,7 @@

    Arguments

    @@ -458,7 +458,7 @@

    Arguments

    @@ -473,7 +473,7 @@

    Arguments

    @@ -488,7 +488,7 @@

    Arguments

    @@ -503,7 +503,7 @@

    Arguments

    @@ -518,7 +518,7 @@

    Arguments

    @@ -533,7 +533,7 @@

    Arguments

    @@ -572,7 +572,7 @@

    Arguments

    @@ -587,7 +587,7 @@

    Arguments

    @@ -602,7 +602,7 @@

    Arguments

    @@ -617,7 +617,7 @@

    Arguments

    @@ -632,7 +632,7 @@

    Arguments

    @@ -647,7 +647,7 @@

    Arguments

    @@ -662,7 +662,7 @@

    Arguments

    @@ -677,7 +677,7 @@

    Arguments

    @@ -692,7 +692,7 @@

    Arguments

    @@ -707,7 +707,7 @@

    Arguments

    @@ -722,7 +722,7 @@

    Arguments

    @@ -761,7 +761,7 @@

    Arguments

    @@ -776,7 +776,7 @@

    Arguments

    @@ -791,7 +791,7 @@

    Arguments

    @@ -806,7 +806,7 @@

    Arguments

    @@ -821,7 +821,7 @@

    Arguments

    @@ -836,7 +836,7 @@

    Arguments

    @@ -851,7 +851,7 @@

    Arguments

    @@ -866,7 +866,7 @@

    Arguments

    @@ -881,7 +881,7 @@

    Arguments

    @@ -896,7 +896,7 @@

    Arguments

    @@ -911,7 +911,7 @@

    Arguments

    @@ -957,7 +957,7 @@

    Arguments

    @@ -972,7 +972,7 @@

    Arguments

    @@ -987,7 +987,7 @@

    Arguments

    @@ -1002,7 +1002,7 @@

    Arguments

    @@ -1017,7 +1017,7 @@

    Arguments

    @@ -1032,7 +1032,7 @@

    Arguments

    @@ -1047,7 +1047,7 @@

    Arguments

    @@ -1062,7 +1062,7 @@

    Arguments

    @@ -1077,7 +1077,7 @@

    Arguments

    @@ -1092,7 +1092,7 @@

    Arguments

    @@ -1107,7 +1107,7 @@

    Arguments

    @@ -1151,7 +1151,7 @@

    Arguments

    @@ -1166,7 +1166,7 @@

    Arguments

    @@ -1181,7 +1181,7 @@

    Arguments

    @@ -1196,7 +1196,7 @@

    Arguments

    @@ -1211,7 +1211,7 @@

    Arguments

    @@ -1226,7 +1226,7 @@

    Arguments

    @@ -1241,7 +1241,7 @@

    Arguments

    @@ -1256,7 +1256,7 @@

    Arguments

    @@ -1271,7 +1271,7 @@

    Arguments

    @@ -1286,7 +1286,7 @@

    Arguments

    @@ -1301,7 +1301,7 @@

    Arguments

    @@ -1345,7 +1345,7 @@

    Arguments

    @@ -1360,7 +1360,7 @@

    Arguments

    @@ -1375,7 +1375,7 @@

    Arguments

    @@ -1390,7 +1390,7 @@

    Arguments

    @@ -1405,7 +1405,7 @@

    Arguments

    @@ -1420,7 +1420,7 @@

    Arguments

    @@ -1435,7 +1435,7 @@

    Arguments

    @@ -1450,7 +1450,7 @@

    Arguments

    @@ -1465,7 +1465,7 @@

    Arguments

    @@ -1480,7 +1480,7 @@

    Arguments

    @@ -1495,7 +1495,7 @@

    Arguments

    @@ -1539,7 +1539,7 @@

    Arguments

    @@ -1554,7 +1554,7 @@

    Arguments

    @@ -1569,7 +1569,7 @@

    Arguments

    @@ -1584,7 +1584,7 @@

    Arguments

    @@ -1599,7 +1599,7 @@

    Arguments

    @@ -1614,7 +1614,7 @@

    Arguments

    @@ -1629,7 +1629,7 @@

    Arguments

    @@ -1644,7 +1644,7 @@

    Arguments

    @@ -1659,7 +1659,7 @@

    Arguments

    @@ -1674,7 +1674,7 @@

    Arguments

    @@ -1689,7 +1689,7 @@

    Arguments

    @@ -1717,13 +1717,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trmv.html b/interface/trmv.html index bf623e589..93a6df64d 100644 --- a/interface/trmv.html +++ b/interface/trmv.html @@ -193,7 +193,7 @@

    Arguments

    @@ -208,7 +208,7 @@

    Arguments

    @@ -223,7 +223,7 @@

    Arguments

    @@ -238,7 +238,7 @@

    Arguments

    @@ -253,7 +253,7 @@

    Arguments

    @@ -268,7 +268,7 @@

    Arguments

    @@ -283,7 +283,7 @@

    Arguments

    @@ -298,7 +298,7 @@

    Arguments

    @@ -337,7 +337,7 @@

    Arguments

    @@ -352,7 +352,7 @@

    Arguments

    @@ -367,7 +367,7 @@

    Arguments

    @@ -382,7 +382,7 @@

    Arguments

    @@ -397,7 +397,7 @@

    Arguments

    @@ -412,7 +412,7 @@

    Arguments

    @@ -427,7 +427,7 @@

    Arguments

    @@ -442,7 +442,7 @@

    Arguments

    @@ -481,7 +481,7 @@

    Arguments

    @@ -496,7 +496,7 @@

    Arguments

    @@ -511,7 +511,7 @@

    Arguments

    @@ -526,7 +526,7 @@

    Arguments

    @@ -541,7 +541,7 @@

    Arguments

    @@ -556,7 +556,7 @@

    Arguments

    @@ -571,7 +571,7 @@

    Arguments

    @@ -586,7 +586,7 @@

    Arguments

    @@ -625,7 +625,7 @@

    Arguments

    @@ -640,7 +640,7 @@

    Arguments

    @@ -655,7 +655,7 @@

    Arguments

    @@ -670,7 +670,7 @@

    Arguments

    @@ -685,7 +685,7 @@

    Arguments

    @@ -700,7 +700,7 @@

    Arguments

    @@ -715,7 +715,7 @@

    Arguments

    @@ -730,7 +730,7 @@

    Arguments

    @@ -775,7 +775,7 @@

    Arguments

    @@ -790,7 +790,7 @@

    Arguments

    @@ -805,7 +805,7 @@

    Arguments

    @@ -820,7 +820,7 @@

    Arguments

    @@ -835,7 +835,7 @@

    Arguments

    @@ -850,7 +850,7 @@

    Arguments

    @@ -865,7 +865,7 @@

    Arguments

    @@ -880,7 +880,7 @@

    Arguments

    @@ -923,7 +923,7 @@

    Arguments

    @@ -938,7 +938,7 @@

    Arguments

    @@ -953,7 +953,7 @@

    Arguments

    @@ -968,7 +968,7 @@

    Arguments

    @@ -983,7 +983,7 @@

    Arguments

    @@ -998,7 +998,7 @@

    Arguments

    @@ -1013,7 +1013,7 @@

    Arguments

    @@ -1028,7 +1028,7 @@

    Arguments

    @@ -1071,7 +1071,7 @@

    Arguments

    @@ -1086,7 +1086,7 @@

    Arguments

    @@ -1101,7 +1101,7 @@

    Arguments

    @@ -1116,7 +1116,7 @@

    Arguments

    @@ -1131,7 +1131,7 @@

    Arguments

    @@ -1146,7 +1146,7 @@

    Arguments

    @@ -1161,7 +1161,7 @@

    Arguments

    @@ -1176,7 +1176,7 @@

    Arguments

    @@ -1219,7 +1219,7 @@

    Arguments

    @@ -1234,7 +1234,7 @@

    Arguments

    @@ -1249,7 +1249,7 @@

    Arguments

    @@ -1264,7 +1264,7 @@

    Arguments

    @@ -1279,7 +1279,7 @@

    Arguments

    @@ -1294,7 +1294,7 @@

    Arguments

    @@ -1309,7 +1309,7 @@

    Arguments

    @@ -1324,7 +1324,7 @@

    Arguments

    @@ -1352,13 +1352,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trsm.html b/interface/trsm.html index e345a0135..13b95f507 100644 --- a/interface/trsm.html +++ b/interface/trsm.html @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -315,7 +315,7 @@

    Arguments

    @@ -330,7 +330,7 @@

    Arguments

    @@ -345,7 +345,7 @@

    Arguments

    @@ -384,7 +384,7 @@

    Arguments

    @@ -399,7 +399,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -444,7 +444,7 @@

    Arguments

    @@ -459,7 +459,7 @@

    Arguments

    @@ -474,7 +474,7 @@

    Arguments

    @@ -489,7 +489,7 @@

    Arguments

    @@ -504,7 +504,7 @@

    Arguments

    @@ -519,7 +519,7 @@

    Arguments

    @@ -534,7 +534,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -633,7 +633,7 @@

    Arguments

    @@ -648,7 +648,7 @@

    Arguments

    @@ -663,7 +663,7 @@

    Arguments

    @@ -678,7 +678,7 @@

    Arguments

    @@ -693,7 +693,7 @@

    Arguments

    @@ -708,7 +708,7 @@

    Arguments

    @@ -723,7 +723,7 @@

    Arguments

    @@ -762,7 +762,7 @@

    Arguments

    @@ -777,7 +777,7 @@

    Arguments

    @@ -792,7 +792,7 @@

    Arguments

    @@ -807,7 +807,7 @@

    Arguments

    @@ -822,7 +822,7 @@

    Arguments

    @@ -837,7 +837,7 @@

    Arguments

    @@ -852,7 +852,7 @@

    Arguments

    @@ -867,7 +867,7 @@

    Arguments

    @@ -882,7 +882,7 @@

    Arguments

    @@ -897,7 +897,7 @@

    Arguments

    @@ -912,7 +912,7 @@

    Arguments

    @@ -959,7 +959,7 @@

    Arguments

    @@ -974,7 +974,7 @@

    Arguments

    @@ -989,7 +989,7 @@

    Arguments

    @@ -1004,7 +1004,7 @@

    Arguments

    @@ -1019,7 +1019,7 @@

    Arguments

    @@ -1034,7 +1034,7 @@

    Arguments

    @@ -1049,7 +1049,7 @@

    Arguments

    @@ -1064,7 +1064,7 @@

    Arguments

    @@ -1079,7 +1079,7 @@

    Arguments

    @@ -1094,7 +1094,7 @@

    Arguments

    @@ -1109,7 +1109,7 @@

    Arguments

    @@ -1154,7 +1154,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1199,7 +1199,7 @@

    Arguments

    @@ -1214,7 +1214,7 @@

    Arguments

    @@ -1229,7 +1229,7 @@

    Arguments

    @@ -1244,7 +1244,7 @@

    Arguments

    @@ -1259,7 +1259,7 @@

    Arguments

    @@ -1274,7 +1274,7 @@

    Arguments

    @@ -1289,7 +1289,7 @@

    Arguments

    @@ -1304,7 +1304,7 @@

    Arguments

    @@ -1349,7 +1349,7 @@

    Arguments

    @@ -1364,7 +1364,7 @@

    Arguments

    @@ -1379,7 +1379,7 @@

    Arguments

    @@ -1394,7 +1394,7 @@

    Arguments

    @@ -1409,7 +1409,7 @@

    Arguments

    @@ -1424,7 +1424,7 @@

    Arguments

    @@ -1439,7 +1439,7 @@

    Arguments

    @@ -1454,7 +1454,7 @@

    Arguments

    @@ -1469,7 +1469,7 @@

    Arguments

    @@ -1484,7 +1484,7 @@

    Arguments

    @@ -1499,7 +1499,7 @@

    Arguments

    @@ -1544,7 +1544,7 @@

    Arguments

    @@ -1559,7 +1559,7 @@

    Arguments

    @@ -1574,7 +1574,7 @@

    Arguments

    @@ -1589,7 +1589,7 @@

    Arguments

    @@ -1604,7 +1604,7 @@

    Arguments

    @@ -1619,7 +1619,7 @@

    Arguments

    @@ -1634,7 +1634,7 @@

    Arguments

    @@ -1649,7 +1649,7 @@

    Arguments

    @@ -1664,7 +1664,7 @@

    Arguments

    @@ -1679,7 +1679,7 @@

    Arguments

    @@ -1694,7 +1694,7 @@

    Arguments

    @@ -1722,13 +1722,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/trsv.html b/interface/trsv.html index 85b63c332..9a76fbe53 100644 --- a/interface/trsv.html +++ b/interface/trsv.html @@ -195,7 +195,7 @@

    Arguments

    @@ -210,7 +210,7 @@

    Arguments

    @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -255,7 +255,7 @@

    Arguments

    @@ -270,7 +270,7 @@

    Arguments

    @@ -285,7 +285,7 @@

    Arguments

    @@ -300,7 +300,7 @@

    Arguments

    @@ -339,7 +339,7 @@

    Arguments

    @@ -354,7 +354,7 @@

    Arguments

    @@ -369,7 +369,7 @@

    Arguments

    @@ -384,7 +384,7 @@

    Arguments

    @@ -399,7 +399,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -444,7 +444,7 @@

    Arguments

    @@ -483,7 +483,7 @@

    Arguments

    @@ -498,7 +498,7 @@

    Arguments

    @@ -513,7 +513,7 @@

    Arguments

    @@ -528,7 +528,7 @@

    Arguments

    @@ -543,7 +543,7 @@

    Arguments

    @@ -558,7 +558,7 @@

    Arguments

    @@ -573,7 +573,7 @@

    Arguments

    @@ -588,7 +588,7 @@

    Arguments

    @@ -627,7 +627,7 @@

    Arguments

    @@ -642,7 +642,7 @@

    Arguments

    @@ -657,7 +657,7 @@

    Arguments

    @@ -672,7 +672,7 @@

    Arguments

    @@ -687,7 +687,7 @@

    Arguments

    @@ -702,7 +702,7 @@

    Arguments

    @@ -717,7 +717,7 @@

    Arguments

    @@ -732,7 +732,7 @@

    Arguments

    @@ -779,7 +779,7 @@

    Arguments

    @@ -794,7 +794,7 @@

    Arguments

    @@ -809,7 +809,7 @@

    Arguments

    @@ -824,7 +824,7 @@

    Arguments

    @@ -839,7 +839,7 @@

    Arguments

    @@ -854,7 +854,7 @@

    Arguments

    @@ -869,7 +869,7 @@

    Arguments

    @@ -884,7 +884,7 @@

    Arguments

    @@ -929,7 +929,7 @@

    Arguments

    @@ -944,7 +944,7 @@

    Arguments

    @@ -959,7 +959,7 @@

    Arguments

    @@ -974,7 +974,7 @@

    Arguments

    @@ -989,7 +989,7 @@

    Arguments

    @@ -1004,7 +1004,7 @@

    Arguments

    @@ -1019,7 +1019,7 @@

    Arguments

    @@ -1034,7 +1034,7 @@

    Arguments

    @@ -1079,7 +1079,7 @@

    Arguments

    @@ -1094,7 +1094,7 @@

    Arguments

    @@ -1109,7 +1109,7 @@

    Arguments

    @@ -1124,7 +1124,7 @@

    Arguments

    @@ -1139,7 +1139,7 @@

    Arguments

    @@ -1154,7 +1154,7 @@

    Arguments

    @@ -1169,7 +1169,7 @@

    Arguments

    @@ -1184,7 +1184,7 @@

    Arguments

    @@ -1229,7 +1229,7 @@

    Arguments

    @@ -1244,7 +1244,7 @@

    Arguments

    @@ -1259,7 +1259,7 @@

    Arguments

    @@ -1274,7 +1274,7 @@

    Arguments

    @@ -1289,7 +1289,7 @@

    Arguments

    @@ -1304,7 +1304,7 @@

    Arguments

    @@ -1319,7 +1319,7 @@

    Arguments

    @@ -1334,7 +1334,7 @@

    Arguments

    @@ -1362,13 +1362,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/upper_incomplete_gamma.html b/interface/upper_incomplete_gamma.html index f17fcf2e9..73b7d4ea2 100644 --- a/interface/upper_incomplete_gamma.html +++ b/interface/upper_incomplete_gamma.html @@ -183,7 +183,7 @@

    Arguments

    @@ -198,7 +198,7 @@

    Arguments

    @@ -242,7 +242,7 @@

    Arguments

    @@ -257,7 +257,7 @@

    Arguments

    @@ -301,7 +301,7 @@

    Arguments

    @@ -316,7 +316,7 @@

    Arguments

    @@ -360,7 +360,7 @@

    Arguments

    @@ -375,7 +375,7 @@

    Arguments

    @@ -419,7 +419,7 @@

    Arguments

    @@ -434,7 +434,7 @@

    Arguments

    @@ -478,7 +478,7 @@

    Arguments

    @@ -493,7 +493,7 @@

    Arguments

    @@ -537,7 +537,7 @@

    Arguments

    @@ -552,7 +552,7 @@

    Arguments

    @@ -596,7 +596,7 @@

    Arguments

    @@ -611,7 +611,7 @@

    Arguments

    @@ -655,7 +655,7 @@

    Arguments

    @@ -670,7 +670,7 @@

    Arguments

    @@ -714,7 +714,7 @@

    Arguments

    @@ -729,7 +729,7 @@

    Arguments

    @@ -762,13 +762,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/var.html b/interface/var.html index 8d56ef20d..c059fdd42 100644 --- a/interface/var.html +++ b/interface/var.html @@ -269,7 +269,7 @@

    Arguments

    @@ -284,7 +284,7 @@

    Arguments

    @@ -299,7 +299,7 @@

    Arguments

    @@ -314,7 +314,7 @@

    Arguments

    @@ -358,7 +358,7 @@

    Arguments

    @@ -373,7 +373,7 @@

    Arguments

    @@ -388,7 +388,7 @@

    Arguments

    @@ -403,7 +403,7 @@

    Arguments

    @@ -447,7 +447,7 @@

    Arguments

    @@ -462,7 +462,7 @@

    Arguments

    @@ -477,7 +477,7 @@

    Arguments

    @@ -492,7 +492,7 @@

    Arguments

    @@ -536,7 +536,7 @@

    Arguments

    @@ -551,7 +551,7 @@

    Arguments

    @@ -566,7 +566,7 @@

    Arguments

    @@ -581,7 +581,7 @@

    Arguments

    @@ -625,7 +625,7 @@

    Arguments

    @@ -640,7 +640,7 @@

    Arguments

    @@ -655,7 +655,7 @@

    Arguments

    @@ -670,7 +670,7 @@

    Arguments

    @@ -714,7 +714,7 @@

    Arguments

    @@ -729,7 +729,7 @@

    Arguments

    @@ -744,7 +744,7 @@

    Arguments

    @@ -759,7 +759,7 @@

    Arguments

    @@ -803,7 +803,7 @@

    Arguments

    @@ -818,7 +818,7 @@

    Arguments

    @@ -833,7 +833,7 @@

    Arguments

    @@ -848,7 +848,7 @@

    Arguments

    @@ -892,7 +892,7 @@

    Arguments

    @@ -907,7 +907,7 @@

    Arguments

    @@ -922,7 +922,7 @@

    Arguments

    @@ -937,7 +937,7 @@

    Arguments

    @@ -981,7 +981,7 @@

    Arguments

    @@ -996,7 +996,7 @@

    Arguments

    @@ -1011,7 +1011,7 @@

    Arguments

    @@ -1026,7 +1026,7 @@

    Arguments

    @@ -1070,7 +1070,7 @@

    Arguments

    @@ -1085,7 +1085,7 @@

    Arguments

    @@ -1100,7 +1100,7 @@

    Arguments

    @@ -1115,7 +1115,7 @@

    Arguments

    @@ -1159,7 +1159,7 @@

    Arguments

    @@ -1174,7 +1174,7 @@

    Arguments

    @@ -1189,7 +1189,7 @@

    Arguments

    @@ -1204,7 +1204,7 @@

    Arguments

    @@ -1248,7 +1248,7 @@

    Arguments

    @@ -1263,7 +1263,7 @@

    Arguments

    @@ -1278,7 +1278,7 @@

    Arguments

    @@ -1293,7 +1293,7 @@

    Arguments

    @@ -1337,7 +1337,7 @@

    Arguments

    @@ -1352,7 +1352,7 @@

    Arguments

    @@ -1367,7 +1367,7 @@

    Arguments

    @@ -1382,7 +1382,7 @@

    Arguments

    @@ -1426,7 +1426,7 @@

    Arguments

    @@ -1441,7 +1441,7 @@

    Arguments

    @@ -1456,7 +1456,7 @@

    Arguments

    @@ -1471,7 +1471,7 @@

    Arguments

    @@ -1515,7 +1515,7 @@

    Arguments

    @@ -1530,7 +1530,7 @@

    Arguments

    @@ -1545,7 +1545,7 @@

    Arguments

    @@ -1560,7 +1560,7 @@

    Arguments

    @@ -1604,7 +1604,7 @@

    Arguments

    @@ -1619,7 +1619,7 @@

    Arguments

    @@ -1634,7 +1634,7 @@

    Arguments

    @@ -1649,7 +1649,7 @@

    Arguments

    @@ -1693,7 +1693,7 @@

    Arguments

    @@ -1708,7 +1708,7 @@

    Arguments

    @@ -1723,7 +1723,7 @@

    Arguments

    @@ -1738,7 +1738,7 @@

    Arguments

    @@ -1782,7 +1782,7 @@

    Arguments

    @@ -1797,7 +1797,7 @@

    Arguments

    @@ -1812,7 +1812,7 @@

    Arguments

    @@ -1827,7 +1827,7 @@

    Arguments

    @@ -1871,7 +1871,7 @@

    Arguments

    @@ -1886,7 +1886,7 @@

    Arguments

    @@ -1901,7 +1901,7 @@

    Arguments

    @@ -1916,7 +1916,7 @@

    Arguments

    @@ -1960,7 +1960,7 @@

    Arguments

    @@ -1975,7 +1975,7 @@

    Arguments

    @@ -1990,7 +1990,7 @@

    Arguments

    @@ -2005,7 +2005,7 @@

    Arguments

    @@ -2049,7 +2049,7 @@

    Arguments

    @@ -2064,7 +2064,7 @@

    Arguments

    @@ -2079,7 +2079,7 @@

    Arguments

    @@ -2094,7 +2094,7 @@

    Arguments

    @@ -2138,7 +2138,7 @@

    Arguments

    @@ -2153,7 +2153,7 @@

    Arguments

    @@ -2168,7 +2168,7 @@

    Arguments

    @@ -2183,7 +2183,7 @@

    Arguments

    @@ -2227,7 +2227,7 @@

    Arguments

    @@ -2242,7 +2242,7 @@

    Arguments

    @@ -2257,7 +2257,7 @@

    Arguments

    @@ -2272,7 +2272,7 @@

    Arguments

    @@ -2316,7 +2316,7 @@

    Arguments

    @@ -2331,7 +2331,7 @@

    Arguments

    @@ -2346,7 +2346,7 @@

    Arguments

    @@ -2361,7 +2361,7 @@

    Arguments

    @@ -2405,7 +2405,7 @@

    Arguments

    @@ -2420,7 +2420,7 @@

    Arguments

    @@ -2435,7 +2435,7 @@

    Arguments

    @@ -2479,7 +2479,7 @@

    Arguments

    @@ -2494,7 +2494,7 @@

    Arguments

    @@ -2509,7 +2509,7 @@

    Arguments

    @@ -2553,7 +2553,7 @@

    Arguments

    @@ -2568,7 +2568,7 @@

    Arguments

    @@ -2583,7 +2583,7 @@

    Arguments

    @@ -2627,7 +2627,7 @@

    Arguments

    @@ -2642,7 +2642,7 @@

    Arguments

    @@ -2657,7 +2657,7 @@

    Arguments

    @@ -2701,7 +2701,7 @@

    Arguments

    @@ -2716,7 +2716,7 @@

    Arguments

    @@ -2731,7 +2731,7 @@

    Arguments

    @@ -2775,7 +2775,7 @@

    Arguments

    @@ -2790,7 +2790,7 @@

    Arguments

    @@ -2805,7 +2805,7 @@

    Arguments

    @@ -2849,7 +2849,7 @@

    Arguments

    @@ -2864,7 +2864,7 @@

    Arguments

    @@ -2879,7 +2879,7 @@

    Arguments

    @@ -2923,7 +2923,7 @@

    Arguments

    @@ -2938,7 +2938,7 @@

    Arguments

    @@ -2953,7 +2953,7 @@

    Arguments

    @@ -2997,7 +2997,7 @@

    Arguments

    @@ -3012,7 +3012,7 @@

    Arguments

    @@ -3027,7 +3027,7 @@

    Arguments

    @@ -3071,7 +3071,7 @@

    Arguments

    @@ -3086,7 +3086,7 @@

    Arguments

    @@ -3101,7 +3101,7 @@

    Arguments

    @@ -3145,7 +3145,7 @@

    Arguments

    @@ -3160,7 +3160,7 @@

    Arguments

    @@ -3175,7 +3175,7 @@

    Arguments

    @@ -3219,7 +3219,7 @@

    Arguments

    @@ -3234,7 +3234,7 @@

    Arguments

    @@ -3249,7 +3249,7 @@

    Arguments

    @@ -3293,7 +3293,7 @@

    Arguments

    @@ -3308,7 +3308,7 @@

    Arguments

    @@ -3323,7 +3323,7 @@

    Arguments

    @@ -3367,7 +3367,7 @@

    Arguments

    @@ -3382,7 +3382,7 @@

    Arguments

    @@ -3397,7 +3397,7 @@

    Arguments

    @@ -3441,7 +3441,7 @@

    Arguments

    @@ -3456,7 +3456,7 @@

    Arguments

    @@ -3471,7 +3471,7 @@

    Arguments

    @@ -3515,7 +3515,7 @@

    Arguments

    @@ -3530,7 +3530,7 @@

    Arguments

    @@ -3545,7 +3545,7 @@

    Arguments

    @@ -3589,7 +3589,7 @@

    Arguments

    @@ -3604,7 +3604,7 @@

    Arguments

    @@ -3619,7 +3619,7 @@

    Arguments

    @@ -3663,7 +3663,7 @@

    Arguments

    @@ -3678,7 +3678,7 @@

    Arguments

    @@ -3693,7 +3693,7 @@

    Arguments

    @@ -3737,7 +3737,7 @@

    Arguments

    @@ -3752,7 +3752,7 @@

    Arguments

    @@ -3767,7 +3767,7 @@

    Arguments

    @@ -3811,7 +3811,7 @@

    Arguments

    @@ -3826,7 +3826,7 @@

    Arguments

    @@ -3841,7 +3841,7 @@

    Arguments

    @@ -3885,7 +3885,7 @@

    Arguments

    @@ -3900,7 +3900,7 @@

    Arguments

    @@ -3915,7 +3915,7 @@

    Arguments

    @@ -3959,7 +3959,7 @@

    Arguments

    @@ -3974,7 +3974,7 @@

    Arguments

    @@ -3989,7 +3989,7 @@

    Arguments

    @@ -4033,7 +4033,7 @@

    Arguments

    @@ -4048,7 +4048,7 @@

    Arguments

    @@ -4063,7 +4063,7 @@

    Arguments

    @@ -4107,7 +4107,7 @@

    Arguments

    @@ -4122,7 +4122,7 @@

    Arguments

    @@ -4137,7 +4137,7 @@

    Arguments

    @@ -4181,7 +4181,7 @@

    Arguments

    @@ -4196,7 +4196,7 @@

    Arguments

    @@ -4211,7 +4211,7 @@

    Arguments

    @@ -4226,7 +4226,7 @@

    Arguments

    @@ -4270,7 +4270,7 @@

    Arguments

    @@ -4285,7 +4285,7 @@

    Arguments

    @@ -4300,7 +4300,7 @@

    Arguments

    @@ -4315,7 +4315,7 @@

    Arguments

    @@ -4359,7 +4359,7 @@

    Arguments

    @@ -4374,7 +4374,7 @@

    Arguments

    @@ -4389,7 +4389,7 @@

    Arguments

    @@ -4404,7 +4404,7 @@

    Arguments

    @@ -4448,7 +4448,7 @@

    Arguments

    @@ -4463,7 +4463,7 @@

    Arguments

    @@ -4478,7 +4478,7 @@

    Arguments

    @@ -4493,7 +4493,7 @@

    Arguments

    @@ -4537,7 +4537,7 @@

    Arguments

    @@ -4552,7 +4552,7 @@

    Arguments

    @@ -4567,7 +4567,7 @@

    Arguments

    @@ -4582,7 +4582,7 @@

    Arguments

    @@ -4626,7 +4626,7 @@

    Arguments

    @@ -4641,7 +4641,7 @@

    Arguments

    @@ -4656,7 +4656,7 @@

    Arguments

    @@ -4671,7 +4671,7 @@

    Arguments

    @@ -4715,7 +4715,7 @@

    Arguments

    @@ -4730,7 +4730,7 @@

    Arguments

    @@ -4745,7 +4745,7 @@

    Arguments

    @@ -4760,7 +4760,7 @@

    Arguments

    @@ -4804,7 +4804,7 @@

    Arguments

    @@ -4819,7 +4819,7 @@

    Arguments

    @@ -4834,7 +4834,7 @@

    Arguments

    @@ -4849,7 +4849,7 @@

    Arguments

    @@ -4893,7 +4893,7 @@

    Arguments

    @@ -4908,7 +4908,7 @@

    Arguments

    @@ -4923,7 +4923,7 @@

    Arguments

    @@ -4938,7 +4938,7 @@

    Arguments

    @@ -4982,7 +4982,7 @@

    Arguments

    @@ -4997,7 +4997,7 @@

    Arguments

    @@ -5012,7 +5012,7 @@

    Arguments

    @@ -5027,7 +5027,7 @@

    Arguments

    @@ -5071,7 +5071,7 @@

    Arguments

    @@ -5086,7 +5086,7 @@

    Arguments

    @@ -5101,7 +5101,7 @@

    Arguments

    @@ -5116,7 +5116,7 @@

    Arguments

    @@ -5160,7 +5160,7 @@

    Arguments

    @@ -5175,7 +5175,7 @@

    Arguments

    @@ -5190,7 +5190,7 @@

    Arguments

    @@ -5205,7 +5205,7 @@

    Arguments

    @@ -5249,7 +5249,7 @@

    Arguments

    @@ -5264,7 +5264,7 @@

    Arguments

    @@ -5279,7 +5279,7 @@

    Arguments

    @@ -5294,7 +5294,7 @@

    Arguments

    @@ -5338,7 +5338,7 @@

    Arguments

    @@ -5353,7 +5353,7 @@

    Arguments

    @@ -5368,7 +5368,7 @@

    Arguments

    @@ -5383,7 +5383,7 @@

    Arguments

    @@ -5427,7 +5427,7 @@

    Arguments

    @@ -5442,7 +5442,7 @@

    Arguments

    @@ -5457,7 +5457,7 @@

    Arguments

    @@ -5472,7 +5472,7 @@

    Arguments

    @@ -5516,7 +5516,7 @@

    Arguments

    @@ -5531,7 +5531,7 @@

    Arguments

    @@ -5546,7 +5546,7 @@

    Arguments

    @@ -5561,7 +5561,7 @@

    Arguments

    @@ -5605,7 +5605,7 @@

    Arguments

    @@ -5620,7 +5620,7 @@

    Arguments

    @@ -5635,7 +5635,7 @@

    Arguments

    @@ -5650,7 +5650,7 @@

    Arguments

    @@ -5694,7 +5694,7 @@

    Arguments

    @@ -5709,7 +5709,7 @@

    Arguments

    @@ -5724,7 +5724,7 @@

    Arguments

    @@ -5739,7 +5739,7 @@

    Arguments

    @@ -5783,7 +5783,7 @@

    Arguments

    @@ -5798,7 +5798,7 @@

    Arguments

    @@ -5813,7 +5813,7 @@

    Arguments

    @@ -5828,7 +5828,7 @@

    Arguments

    @@ -5872,7 +5872,7 @@

    Arguments

    @@ -5887,7 +5887,7 @@

    Arguments

    @@ -5902,7 +5902,7 @@

    Arguments

    @@ -5917,7 +5917,7 @@

    Arguments

    @@ -5961,7 +5961,7 @@

    Arguments

    @@ -5976,7 +5976,7 @@

    Arguments

    @@ -5991,7 +5991,7 @@

    Arguments

    @@ -6006,7 +6006,7 @@

    Arguments

    @@ -6050,7 +6050,7 @@

    Arguments

    @@ -6065,7 +6065,7 @@

    Arguments

    @@ -6080,7 +6080,7 @@

    Arguments

    @@ -6095,7 +6095,7 @@

    Arguments

    @@ -6139,7 +6139,7 @@

    Arguments

    @@ -6154,7 +6154,7 @@

    Arguments

    @@ -6169,7 +6169,7 @@

    Arguments

    @@ -6184,7 +6184,7 @@

    Arguments

    @@ -6228,7 +6228,7 @@

    Arguments

    @@ -6243,7 +6243,7 @@

    Arguments

    @@ -6258,7 +6258,7 @@

    Arguments

    @@ -6273,7 +6273,7 @@

    Arguments

    @@ -6317,7 +6317,7 @@

    Arguments

    @@ -6332,7 +6332,7 @@

    Arguments

    @@ -6347,7 +6347,7 @@

    Arguments

    @@ -6391,7 +6391,7 @@

    Arguments

    @@ -6406,7 +6406,7 @@

    Arguments

    @@ -6421,7 +6421,7 @@

    Arguments

    @@ -6465,7 +6465,7 @@

    Arguments

    @@ -6480,7 +6480,7 @@

    Arguments

    @@ -6495,7 +6495,7 @@

    Arguments

    @@ -6539,7 +6539,7 @@

    Arguments

    @@ -6554,7 +6554,7 @@

    Arguments

    @@ -6569,7 +6569,7 @@

    Arguments

    @@ -6613,7 +6613,7 @@

    Arguments

    @@ -6628,7 +6628,7 @@

    Arguments

    @@ -6643,7 +6643,7 @@

    Arguments

    @@ -6687,7 +6687,7 @@

    Arguments

    @@ -6702,7 +6702,7 @@

    Arguments

    @@ -6717,7 +6717,7 @@

    Arguments

    @@ -6761,7 +6761,7 @@

    Arguments

    @@ -6776,7 +6776,7 @@

    Arguments

    @@ -6791,7 +6791,7 @@

    Arguments

    @@ -6835,7 +6835,7 @@

    Arguments

    @@ -6850,7 +6850,7 @@

    Arguments

    @@ -6865,7 +6865,7 @@

    Arguments

    @@ -6909,7 +6909,7 @@

    Arguments

    @@ -6924,7 +6924,7 @@

    Arguments

    @@ -6939,7 +6939,7 @@

    Arguments

    @@ -6983,7 +6983,7 @@

    Arguments

    @@ -6998,7 +6998,7 @@

    Arguments

    @@ -7013,7 +7013,7 @@

    Arguments

    @@ -7057,7 +7057,7 @@

    Arguments

    @@ -7072,7 +7072,7 @@

    Arguments

    @@ -7087,7 +7087,7 @@

    Arguments

    @@ -7131,7 +7131,7 @@

    Arguments

    @@ -7146,7 +7146,7 @@

    Arguments

    @@ -7161,7 +7161,7 @@

    Arguments

    @@ -7205,7 +7205,7 @@

    Arguments

    @@ -7220,7 +7220,7 @@

    Arguments

    @@ -7235,7 +7235,7 @@

    Arguments

    @@ -7279,7 +7279,7 @@

    Arguments

    @@ -7294,7 +7294,7 @@

    Arguments

    @@ -7309,7 +7309,7 @@

    Arguments

    @@ -7353,7 +7353,7 @@

    Arguments

    @@ -7368,7 +7368,7 @@

    Arguments

    @@ -7383,7 +7383,7 @@

    Arguments

    @@ -7427,7 +7427,7 @@

    Arguments

    @@ -7442,7 +7442,7 @@

    Arguments

    @@ -7457,7 +7457,7 @@

    Arguments

    @@ -7501,7 +7501,7 @@

    Arguments

    @@ -7516,7 +7516,7 @@

    Arguments

    @@ -7531,7 +7531,7 @@

    Arguments

    @@ -7575,7 +7575,7 @@

    Arguments

    @@ -7590,7 +7590,7 @@

    Arguments

    @@ -7605,7 +7605,7 @@

    Arguments

    @@ -7649,7 +7649,7 @@

    Arguments

    @@ -7664,7 +7664,7 @@

    Arguments

    @@ -7679,7 +7679,7 @@

    Arguments

    @@ -7723,7 +7723,7 @@

    Arguments

    @@ -7738,7 +7738,7 @@

    Arguments

    @@ -7753,7 +7753,7 @@

    Arguments

    @@ -7797,7 +7797,7 @@

    Arguments

    @@ -7812,7 +7812,7 @@

    Arguments

    @@ -7827,7 +7827,7 @@

    Arguments

    @@ -7871,7 +7871,7 @@

    Arguments

    @@ -7886,7 +7886,7 @@

    Arguments

    @@ -7901,7 +7901,7 @@

    Arguments

    @@ -7945,7 +7945,7 @@

    Arguments

    @@ -7960,7 +7960,7 @@

    Arguments

    @@ -7975,7 +7975,7 @@

    Arguments

    @@ -8019,7 +8019,7 @@

    Arguments

    @@ -8034,7 +8034,7 @@

    Arguments

    @@ -8049,7 +8049,7 @@

    Arguments

    @@ -8084,13 +8084,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/verify.html b/interface/verify.html index f5a432029..6ac4b4dbf 100644 --- a/interface/verify.html +++ b/interface/verify.html @@ -184,7 +184,7 @@

    Arguments

    @@ -199,7 +199,7 @@

    Arguments

    @@ -260,7 +260,7 @@

    Arguments

    @@ -275,7 +275,7 @@

    Arguments

    @@ -336,7 +336,7 @@

    Arguments

    @@ -351,7 +351,7 @@

    Arguments

    @@ -399,13 +399,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/water_hash.html b/interface/water_hash.html index f6ce622ba..b97cc9a1c 100644 --- a/interface/water_hash.html +++ b/interface/water_hash.html @@ -178,7 +178,7 @@

    Arguments

    @@ -193,7 +193,7 @@

    Arguments

    @@ -237,7 +237,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -296,7 +296,7 @@

    Arguments

    @@ -311,7 +311,7 @@

    Arguments

    @@ -355,7 +355,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -414,7 +414,7 @@

    Arguments

    @@ -429,7 +429,7 @@

    Arguments

    @@ -464,13 +464,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/write(formatted).html b/interface/write(formatted).html index e01c72fcb..f5c15e1e8 100644 --- a/interface/write(formatted).html +++ b/interface/write(formatted).html @@ -176,7 +176,7 @@

    Arguments

    @@ -191,7 +191,7 @@

    Arguments

    @@ -236,7 +236,7 @@

    Arguments

    @@ -251,7 +251,7 @@

    Arguments

    @@ -279,13 +279,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/write(unformatted).html b/interface/write(unformatted).html index 109a2e99b..51806a01d 100644 --- a/interface/write(unformatted).html +++ b/interface/write(unformatted).html @@ -176,7 +176,7 @@

    Arguments

    @@ -191,7 +191,7 @@

    Arguments

    @@ -206,7 +206,7 @@

    Arguments

    @@ -221,7 +221,7 @@

    Arguments

    @@ -249,13 +249,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/xor.html b/interface/xor.html index 33439ded9..df7bbb741 100644 --- a/interface/xor.html +++ b/interface/xor.html @@ -198,7 +198,7 @@

    Arguments

    @@ -213,7 +213,7 @@

    Arguments

    @@ -252,7 +252,7 @@

    Arguments

    @@ -267,7 +267,7 @@

    Arguments

    @@ -296,13 +296,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/interface/zfill.html b/interface/zfill.html index 4af13b436..264b0f667 100644 --- a/interface/zfill.html +++ b/interface/zfill.html @@ -178,7 +178,7 @@

    Arguments

    @@ -238,7 +238,7 @@

    Arguments

    @@ -286,13 +286,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/lists/absint.html b/lists/absint.html index c8bbd3eb1..647e82be3 100644 --- a/lists/absint.html +++ b/lists/absint.html @@ -87,13 +87,13 @@

    Abstract Interfaces

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/lists/files.html b/lists/files.html index 09cbb0a0b..c82086758 100644 --- a/lists/files.html +++ b/lists/files.html @@ -522,13 +522,13 @@

    Source Files

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/lists/modules.html b/lists/modules.html index 94b539711..e729172b0 100644 --- a/lists/modules.html +++ b/lists/modules.html @@ -596,13 +596,13 @@

    Modules

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/lists/procedures.html b/lists/procedures.html index a6b3f1dd2..4d186796a 100644 --- a/lists/procedures.html +++ b/lists/procedures.html @@ -147,16 +147,16 @@

    Procedures

    - + - + - - + + - + @@ -376,19 +376,19 @@

    Procedures

    - - - - - - + + + + + + @@ -406,17 +406,17 @@

    Procedures

    - + +(Specification)

    - + +(Specification)

    @@ -428,17 +428,17 @@

    Procedures

    - + +(Specification)

    - + +(Specification)

    @@ -1069,19 +1069,19 @@

    Procedures

    - - - - - - + + + + + + @@ -1105,9 +1105,10 @@

    Procedures

    - + - + @@ -1119,13 +1120,20 @@

    Procedures

    - + - + + + + + + + - + +(Specification)

    Read more… - + - + - +a string.

    Read more… - + +(Specification)

    Read more… - + - + - +a string.

    Read more… - + +(Specification)

    Read more… - + - + - +a string.

    Read more… - + - + - - - - - - +(Specification)

    Read more… @@ -1234,59 +1236,57 @@

    Procedures

    + + + + + + - +a string.

    Read more… - + +(Specification)

    Read more… - + - + - +a string.

    Read more… - + + (Specification)

    Read more… - + - - - - - - @@ -1427,6 +1427,12 @@

    Procedures

    + + + + + + @@ -1434,12 +1440,6 @@

    Procedures

    - - - - - - @@ -3303,6 +3303,12 @@

    Procedures

    diagonals. No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.

    + + + + + + @@ -3310,12 +3316,6 @@

    Procedures

    - - - - - - @@ -3336,6 +3336,12 @@

    Procedures

    + + + + + + @@ -3343,12 +3349,6 @@

    Procedures

    - - - - - - @@ -3362,6 +3362,12 @@

    Procedures

    + + + + + + @@ -3371,10 +3377,10 @@

    Procedures

    (Specification)

    Read more… - + - + @@ -3382,12 +3388,6 @@

    Procedures

    - - - - - - @@ -3487,19 +3487,19 @@

    Procedures

    - - - - - - + + + + + + @@ -3568,13 +3568,13 @@

    Procedures

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/lists/types.html b/lists/types.html index f1a29494f..64d6eaa93 100644 --- a/lists/types.html +++ b/lists/types.html @@ -178,13 +178,13 @@

    Derived Types

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/f08estop.html b/module/f08estop.html index 58756ec5b..ba22bab0d 100644 --- a/module/f08estop.html +++ b/module/f08estop.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/f18estop.html b/module/f18estop.html index e7a93f2b3..ddebc071b 100644 --- a/module/f18estop.html +++ b/module/f18estop.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_ansi.html b/module/stdlib_ansi.html index e0ffdc695..64858f1f8 100644 --- a/module/stdlib_ansi.html +++ b/module/stdlib_ansi.html @@ -164,7 +164,7 @@

    Interfaces

    @@ -799,8 +799,8 @@

    - -

    public interface operator(//) + +

    public interface operator(//)

      @@ -839,7 +839,7 @@

      Arguments

    @@ -897,7 +897,7 @@

    Arguments

    @@ -940,7 +940,7 @@

    Arguments

    @@ -998,7 +998,7 @@

    Arguments

    @@ -1066,7 +1066,7 @@

    Arguments

    @@ -1132,13 +1132,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_ansi_operator.html b/module/stdlib_ansi_operator.html index 5eabd002e..42ef62340 100644 --- a/module/stdlib_ansi_operator.html +++ b/module/stdlib_ansi_operator.html @@ -180,13 +180,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_ansi_to_string.html b/module/stdlib_ansi_to_string.html index 81b9e1c9a..8338f1df9 100644 --- a/module/stdlib_ansi_to_string.html +++ b/module/stdlib_ansi_to_string.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_array.html b/module/stdlib_array.html index e8572800c..d01efe5ae 100644 --- a/module/stdlib_array.html +++ b/module/stdlib_array.html @@ -188,7 +188,7 @@

    Arguments

    @@ -253,7 +253,7 @@

    Arguments

    @@ -308,13 +308,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_ascii.html b/module/stdlib_ascii.html index 63630339f..13bccc4ef 100644 --- a/module/stdlib_ascii.html +++ b/module/stdlib_ascii.html @@ -122,7 +122,7 @@

    Variables

    BEL BS CAN - CR + CR DC1 DC2 DC3 @@ -138,7 +138,7 @@

    Variables

    FF FS GS - LF + LF NAK NUL RS @@ -151,7 +151,7 @@

    Variables

    TAB US VT - digits + digits fullhex_digits hex_digits letters @@ -320,7 +320,7 @@

    Variables

    @@ -592,7 +592,7 @@

    Variables

    @@ -813,7 +813,7 @@

    Variables

    @@ -996,7 +996,7 @@

    Arguments

    @@ -1041,7 +1041,7 @@

    Arguments

    @@ -1087,7 +1087,7 @@

    Arguments

    @@ -1133,7 +1133,7 @@

    Arguments

    @@ -1178,7 +1178,7 @@

    Arguments

    @@ -1223,7 +1223,7 @@

    Arguments

    @@ -1269,7 +1269,7 @@

    Arguments

    @@ -1314,7 +1314,7 @@

    Arguments

    @@ -1359,7 +1359,7 @@

    Arguments

    @@ -1404,7 +1404,7 @@

    Arguments

    @@ -1450,7 +1450,7 @@

    Arguments

    @@ -1497,7 +1497,7 @@

    Arguments

    @@ -1542,7 +1542,7 @@

    Arguments

    @@ -1589,7 +1589,7 @@

    Arguments

    @@ -1635,7 +1635,7 @@

    Arguments

    @@ -1681,7 +1681,7 @@

    Arguments

    @@ -1727,7 +1727,7 @@

    Arguments

    @@ -1773,7 +1773,7 @@

    Arguments

    @@ -1819,7 +1819,7 @@

    Arguments

    @@ -1859,13 +1859,13 @@

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_bitsets.html b/module/stdlib_bitsets.html index 654dd0876..872f67c36 100644 --- a/module/stdlib_bitsets.html +++ b/module/stdlib_bitsets.html @@ -79,7 +79,7 @@

    stdlib_bitsets
  • 688 statements + title=" 0.9% of total for modules and submodules.">688 statements
  • @@ -124,13 +124,13 @@

    Variables

    char_string_too_large_error char_string_too_small_error eof_failure - index_invalid_error + index_invalid_error integer_overflow_error max_digits overflow_bits read_failure - success - write_failure + success + write_failure
  • @@ -150,14 +150,14 @@

    Interfaces

    @@ -229,8 +229,8 @@

    Uses

    @@ -457,7 +457,7 @@

    Variables

    @@ -474,7 +474,7 @@

    Variables

    @@ -550,7 +550,7 @@

    Arguments

    @@ -565,7 +565,7 @@

    Arguments

    @@ -603,7 +603,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -692,7 +692,7 @@

    Arguments

    @@ -707,7 +707,7 @@

    Arguments

    @@ -745,7 +745,7 @@

    Arguments

    @@ -760,7 +760,7 @@

    Arguments

    @@ -783,8 +783,8 @@

    Arguments

    - -

    public interface assignment(=) + +

    public interface assignment(=)

    @@ -839,7 +839,7 @@

    Arguments

    @@ -854,7 +854,7 @@

    Arguments

    @@ -893,7 +893,7 @@

    Arguments

    @@ -908,7 +908,7 @@

    Arguments

    @@ -947,7 +947,7 @@

    Arguments

    @@ -962,7 +962,7 @@

    Arguments

    @@ -1001,7 +1001,7 @@

    Arguments

    @@ -1016,7 +1016,7 @@

    Arguments

    @@ -1055,7 +1055,7 @@

    Arguments

    @@ -1070,7 +1070,7 @@

    Arguments

    @@ -1109,7 +1109,7 @@

    Arguments

    @@ -1124,7 +1124,7 @@

    Arguments

    @@ -1163,7 +1163,7 @@

    Arguments

    @@ -1178,7 +1178,7 @@

    Arguments

    @@ -1217,7 +1217,7 @@

    Arguments

    @@ -1232,7 +1232,7 @@

    Arguments

    @@ -1301,7 +1301,7 @@

    Arguments

    @@ -1316,7 +1316,7 @@

    Arguments

    @@ -1331,7 +1331,7 @@

    Arguments

    @@ -1346,7 +1346,7 @@

    Arguments

    @@ -1361,7 +1361,7 @@

    Arguments

    @@ -1399,7 +1399,7 @@

    Arguments

    @@ -1414,7 +1414,7 @@

    Arguments

    @@ -1429,7 +1429,7 @@

    Arguments

    @@ -1444,7 +1444,7 @@

    Arguments

    @@ -1459,7 +1459,7 @@

    Arguments

    @@ -1482,8 +1482,8 @@

    Arguments

    - -

    public interface operator(/=) + +

    public interface operator(/=)

    @@ -1531,7 +1531,7 @@

    Arguments

    @@ -1546,7 +1546,7 @@

    Arguments

    @@ -1589,7 +1589,7 @@

    Arguments

    @@ -1604,7 +1604,7 @@

    Arguments

    @@ -1632,8 +1632,8 @@

    - -

    public interface operator(<) + +

    public interface operator(<)

    @@ -1682,7 +1682,7 @@

    Arguments

    @@ -1697,7 +1697,7 @@

    Arguments

    @@ -1740,7 +1740,7 @@

    Arguments

    @@ -1755,7 +1755,7 @@

    Arguments

    @@ -1783,8 +1783,8 @@

    - -

    public interface operator(<=) + +

    public interface operator(<=)

    @@ -1834,7 +1834,7 @@

    Arguments

    @@ -1849,7 +1849,7 @@

    Arguments

    @@ -1892,7 +1892,7 @@

    Arguments

    @@ -1907,7 +1907,7 @@

    Arguments

    @@ -1935,8 +1935,8 @@

    - -

    public interface operator(==) + +

    public interface operator(==)

    @@ -1984,7 +1984,7 @@

    Arguments

    @@ -1999,7 +1999,7 @@

    Arguments

    @@ -2042,7 +2042,7 @@

    Arguments

    @@ -2057,7 +2057,7 @@

    Arguments

    @@ -2085,8 +2085,8 @@

    - -

    public interface operator(>) + +

    public interface operator(>)

    @@ -2135,7 +2135,7 @@

    Arguments

    @@ -2150,7 +2150,7 @@

    Arguments

    @@ -2193,7 +2193,7 @@

    Arguments

    @@ -2208,7 +2208,7 @@

    Arguments

    @@ -2236,8 +2236,8 @@

    - -

    public interface operator(>=) + +

    public interface operator(>=)

    @@ -2287,7 +2287,7 @@

    Arguments

    @@ -2302,7 +2302,7 @@

    Arguments

    @@ -2345,7 +2345,7 @@

    Arguments

    @@ -2360,7 +2360,7 @@

    Arguments

    @@ -2439,7 +2439,7 @@

    Arguments

    @@ -2454,7 +2454,7 @@

    Arguments

    @@ -2492,7 +2492,7 @@

    Arguments

    @@ -2507,7 +2507,7 @@

    Arguments

    @@ -2581,7 +2581,7 @@

    Arguments

    @@ -2596,7 +2596,7 @@

    Arguments

    @@ -2634,7 +2634,7 @@

    Arguments

    @@ -2649,7 +2649,7 @@

    Arguments

    @@ -2696,22 +2696,22 @@

    Type-Bound Procedures

    + all => all_64 + any => any_64 + bit_count => bit_count_64 + bits @@ -2766,7 +2766,7 @@

    Type-Bound Procedures

    + none => none_64 @@ -2811,7 +2811,7 @@

    Type-Bound Procedures

    + test => test_64 @@ -2821,7 +2821,7 @@

    Type-Bound Procedures

    + value => value_64 @@ -2864,22 +2864,22 @@

    Type-Bound Procedures

    + all => all_large + any => any_large + bit_count => bit_count_large + bits @@ -2934,7 +2934,7 @@

    Type-Bound Procedures

    + none => none_large @@ -2979,7 +2979,7 @@

    Type-Bound Procedures

    + test => test_large @@ -2989,7 +2989,7 @@

    Type-Bound Procedures

    + value => value_large @@ -3032,22 +3032,22 @@

    Type-Bound Procedures

    + all + any + bit_count + bits @@ -3102,7 +3102,7 @@

    Type-Bound Procedures

    + none @@ -3132,7 +3132,7 @@

    Type-Bound Procedures

    + set => set_bit, set_range @@ -3147,7 +3147,7 @@

    Type-Bound Procedures

    + test @@ -3157,7 +3157,7 @@

    Type-Bound Procedures

    + value @@ -3209,7 +3209,7 @@

    Arguments

    @@ -3259,7 +3259,7 @@

    Arguments

    @@ -3289,7 +3289,7 @@

    Arguments

    @@ -3304,7 +3304,7 @@

    Arguments

    @@ -3319,7 +3319,7 @@

    Arguments

    @@ -3353,13 +3353,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_bitsets_64.html b/module/stdlib_bitsets_64.html index a72801207..e44ee1739 100644 --- a/module/stdlib_bitsets_64.html +++ b/module/stdlib_bitsets_64.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_bitsets_large.html b/module/stdlib_bitsets_large.html index c389e9499..909552319 100644 --- a/module/stdlib_bitsets_large.html +++ b/module/stdlib_bitsets_large.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_codata.html b/module/stdlib_codata.html index 1a908b7ff..fe40a75cd 100644 --- a/module/stdlib_codata.html +++ b/module/stdlib_codata.html @@ -510,8 +510,8 @@

    Uses

    @@ -6609,13 +6609,13 @@

    Variables

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_codata_type.html b/module/stdlib_codata_type.html index 3fa557795..7f8970232 100644 --- a/module/stdlib_codata_type.html +++ b/module/stdlib_codata_type.html @@ -167,9 +167,9 @@

    Uses

    @@ -215,7 +215,7 @@

    Arguments

    @@ -289,7 +289,7 @@

    Arguments

    @@ -377,7 +377,7 @@

    Components

    @@ -411,7 +411,7 @@

    Components

    @@ -428,7 +428,7 @@

    Components

    @@ -493,13 +493,13 @@

    Type-Bound Procedures

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_constants.html b/module/stdlib_constants.html index 114e458b2..11d76ec16 100644 --- a/module/stdlib_constants.html +++ b/module/stdlib_constants.html @@ -129,25 +129,25 @@

    Variables

    Rydberg Stefan_Boltzmann Wien - alpha - c + alpha + c e epsilon_0 fine_structure g2 gas_constant gravitation_constant - h + h hbar - k + k m_e m_n m_p m_u mu_0 - sigma + sigma speed_of_light - u + u
    @@ -398,7 +398,7 @@

    Variables

    @@ -415,7 +415,7 @@

    Variables

    @@ -534,7 +534,7 @@

    Variables

    @@ -568,7 +568,7 @@

    Variables

    @@ -670,7 +670,7 @@

    Variables

    @@ -704,7 +704,7 @@

    Variables

    @@ -742,13 +742,13 @@

    Variables

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_error.html b/module/stdlib_error.html index f8f28bf55..0e516ca14 100644 --- a/module/stdlib_error.html +++ b/module/stdlib_error.html @@ -225,7 +225,7 @@

    Arguments

    @@ -240,7 +240,7 @@

    Arguments

    @@ -309,7 +309,7 @@

    Arguments

    @@ -324,7 +324,7 @@

    Arguments

    @@ -373,13 +373,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_32bit.html b/module/stdlib_hash_32bit.html index 91b11b310..ecaa04f88 100644 --- a/module/stdlib_hash_32bit.html +++ b/module/stdlib_hash_32bit.html @@ -118,8 +118,8 @@

    Variables

    @@ -137,8 +137,8 @@

    Interfaces

    @@ -197,8 +197,8 @@

    Uses

    @@ -238,7 +238,7 @@

    Variables

    @@ -255,7 +255,7 @@

    Variables

    @@ -281,8 +281,8 @@

    Variables

    Interfaces

    - -

    public interface fnv_1_hash + +

    public interface fnv_1_hash

    @@ -310,7 +310,7 @@

    Arguments

    @@ -353,7 +353,7 @@

    Arguments

    @@ -396,7 +396,7 @@

    Arguments

    @@ -439,7 +439,7 @@

    Arguments

    @@ -482,7 +482,7 @@

    Arguments

    @@ -510,8 +510,8 @@

    - -

    public interface fnv_1a_hash + +

    public interface fnv_1a_hash

    @@ -539,7 +539,7 @@

    Arguments

    @@ -582,7 +582,7 @@

    Arguments

    @@ -625,7 +625,7 @@

    Arguments

    @@ -668,7 +668,7 @@

    Arguments

    @@ -711,7 +711,7 @@

    Arguments

    @@ -767,7 +767,7 @@

    Arguments

    @@ -818,7 +818,7 @@

    Arguments

    @@ -869,7 +869,7 @@

    Arguments

    @@ -921,7 +921,7 @@

    Arguments

    @@ -936,7 +936,7 @@

    Arguments

    @@ -979,7 +979,7 @@

    Arguments

    @@ -994,7 +994,7 @@

    Arguments

    @@ -1037,7 +1037,7 @@

    Arguments

    @@ -1052,7 +1052,7 @@

    Arguments

    @@ -1095,7 +1095,7 @@

    Arguments

    @@ -1110,7 +1110,7 @@

    Arguments

    @@ -1153,7 +1153,7 @@

    Arguments

    @@ -1168,7 +1168,7 @@

    Arguments

    @@ -1225,7 +1225,7 @@

    Arguments

    @@ -1240,7 +1240,7 @@

    Arguments

    @@ -1283,7 +1283,7 @@

    Arguments

    @@ -1298,7 +1298,7 @@

    Arguments

    @@ -1341,7 +1341,7 @@

    Arguments

    @@ -1356,7 +1356,7 @@

    Arguments

    @@ -1399,7 +1399,7 @@

    Arguments

    @@ -1414,7 +1414,7 @@

    Arguments

    @@ -1457,7 +1457,7 @@

    Arguments

    @@ -1472,7 +1472,7 @@

    Arguments

    @@ -1529,7 +1529,7 @@

    Arguments

    @@ -1544,7 +1544,7 @@

    Arguments

    @@ -1587,7 +1587,7 @@

    Arguments

    @@ -1602,7 +1602,7 @@

    Arguments

    @@ -1645,7 +1645,7 @@

    Arguments

    @@ -1660,7 +1660,7 @@

    Arguments

    @@ -1703,7 +1703,7 @@

    Arguments

    @@ -1718,7 +1718,7 @@

    Arguments

    @@ -1761,7 +1761,7 @@

    Arguments

    @@ -1776,7 +1776,7 @@

    Arguments

    @@ -1810,7 +1810,7 @@

    Functions

    -

    public elemental function fibonacci_hash(key, nbits) result(sample) +

    public elemental function fibonacci_hash(key, nbits) result(sample)

    @@ -1835,7 +1835,7 @@

    Arguments

    @@ -1850,7 +1850,7 @@

    Arguments

    @@ -1876,7 +1876,7 @@

    -

    public elemental function universal_mult_hash(key, seed, nbits) result(sample) +

    public elemental function universal_mult_hash(key, seed, nbits) result(sample)

    @@ -1901,7 +1901,7 @@

    Arguments

    @@ -1916,7 +1916,7 @@

    Arguments

    @@ -1931,7 +1931,7 @@

    Arguments

    @@ -1962,7 +1962,7 @@

    Subroutines

    -

    public subroutine odd_random_integer(harvest) +

    public subroutine odd_random_integer(harvest)

    @@ -1987,7 +1987,7 @@

    Arguments

    @@ -2021,13 +2021,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_32bit_fnv.html b/module/stdlib_hash_32bit_fnv.html index 4775ce5c4..053dbe5e4 100644 --- a/module/stdlib_hash_32bit_fnv.html +++ b/module/stdlib_hash_32bit_fnv.html @@ -177,13 +177,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_32bit_nm.html b/module/stdlib_hash_32bit_nm.html index bdb4c5283..28167d257 100644 --- a/module/stdlib_hash_32bit_nm.html +++ b/module/stdlib_hash_32bit_nm.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_32bit_water.html b/module/stdlib_hash_32bit_water.html index 2f40fcfaa..e7f132f8e 100644 --- a/module/stdlib_hash_32bit_water.html +++ b/module/stdlib_hash_32bit_water.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_64bit.html b/module/stdlib_hash_64bit.html index d6807cebf..697adc95b 100644 --- a/module/stdlib_hash_64bit.html +++ b/module/stdlib_hash_64bit.html @@ -118,18 +118,18 @@

    Variables

    @@ -147,8 +147,8 @@

    Interfaces

    @@ -206,8 +206,8 @@

    Uses

    @@ -247,7 +247,7 @@

    Variables

    @@ -264,7 +264,7 @@

    Variables

    @@ -281,7 +281,7 @@

    Variables

    @@ -298,7 +298,7 @@

    Variables

    @@ -315,7 +315,7 @@

    Variables

    @@ -332,7 +332,7 @@

    Variables

    @@ -349,7 +349,7 @@

    Variables

    @@ -366,7 +366,7 @@

    Variables

    @@ -383,7 +383,7 @@

    Variables

    @@ -400,7 +400,7 @@

    Variables

    @@ -417,7 +417,7 @@

    Variables

    @@ -434,7 +434,7 @@

    Variables

    @@ -460,8 +460,8 @@

    Variables

    Interfaces

    - -

    public interface fnv_1_hash + +

    public interface fnv_1_hash

    @@ -489,7 +489,7 @@

    Arguments

    @@ -532,7 +532,7 @@

    Arguments

    @@ -575,7 +575,7 @@

    Arguments

    @@ -618,7 +618,7 @@

    Arguments

    @@ -661,7 +661,7 @@

    Arguments

    @@ -689,8 +689,8 @@

    - -

    public interface fnv_1a_hash + +

    public interface fnv_1a_hash

    @@ -718,7 +718,7 @@

    Arguments

    @@ -761,7 +761,7 @@

    Arguments

    @@ -804,7 +804,7 @@

    Arguments

    @@ -847,7 +847,7 @@

    Arguments

    @@ -890,7 +890,7 @@

    Arguments

    @@ -943,7 +943,7 @@

    Arguments

    @@ -991,7 +991,7 @@

    Arguments

    @@ -1043,7 +1043,7 @@

    Arguments

    @@ -1058,7 +1058,7 @@

    Arguments

    @@ -1101,7 +1101,7 @@

    Arguments

    @@ -1116,7 +1116,7 @@

    Arguments

    @@ -1159,7 +1159,7 @@

    Arguments

    @@ -1174,7 +1174,7 @@

    Arguments

    @@ -1217,7 +1217,7 @@

    Arguments

    @@ -1232,7 +1232,7 @@

    Arguments

    @@ -1275,7 +1275,7 @@

    Arguments

    @@ -1290,7 +1290,7 @@

    Arguments

    @@ -1343,7 +1343,7 @@

    Arguments

    @@ -1410,7 +1410,7 @@

    Arguments

    @@ -1425,7 +1425,7 @@

    Arguments

    @@ -1468,7 +1468,7 @@

    Arguments

    @@ -1483,7 +1483,7 @@

    Arguments

    @@ -1526,7 +1526,7 @@

    Arguments

    @@ -1541,7 +1541,7 @@

    Arguments

    @@ -1584,7 +1584,7 @@

    Arguments

    @@ -1599,7 +1599,7 @@

    Arguments

    @@ -1642,7 +1642,7 @@

    Arguments

    @@ -1657,7 +1657,7 @@

    Arguments

    @@ -1691,7 +1691,7 @@

    Functions

    -

    public elemental function fibonacci_hash(key, nbits) result(sample) +

    public elemental function fibonacci_hash(key, nbits) result(sample)

    @@ -1716,7 +1716,7 @@

    Arguments

    @@ -1731,7 +1731,7 @@

    Arguments

    @@ -1757,7 +1757,7 @@

    -

    public elemental function universal_mult_hash(key, seed, nbits) result(sample) +

    public elemental function universal_mult_hash(key, seed, nbits) result(sample)

    @@ -1782,7 +1782,7 @@

    Arguments

    @@ -1797,7 +1797,7 @@

    Arguments

    @@ -1812,7 +1812,7 @@

    Arguments

    @@ -1843,7 +1843,7 @@

    Subroutines

    -

    public subroutine odd_random_integer(harvest) +

    public subroutine odd_random_integer(harvest)

    @@ -1868,7 +1868,7 @@

    Arguments

    @@ -1902,13 +1902,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_64bit_fnv.html b/module/stdlib_hash_64bit_fnv.html index d443bc2cb..e8aab8c7c 100644 --- a/module/stdlib_hash_64bit_fnv.html +++ b/module/stdlib_hash_64bit_fnv.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_64bit_pengy.html b/module/stdlib_hash_64bit_pengy.html index 7e3a2a864..b7c3dc727 100644 --- a/module/stdlib_hash_64bit_pengy.html +++ b/module/stdlib_hash_64bit_pengy.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hash_64bit_spookyv2.html b/module/stdlib_hash_64bit_spookyv2.html index 7e4182b09..c808d946e 100644 --- a/module/stdlib_hash_64bit_spookyv2.html +++ b/module/stdlib_hash_64bit_spookyv2.html @@ -175,13 +175,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hashmap_chaining.html b/module/stdlib_hashmap_chaining.html index 055f5c424..b4244ba81 100644 --- a/module/stdlib_hashmap_chaining.html +++ b/module/stdlib_hashmap_chaining.html @@ -176,13 +176,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hashmap_open.html b/module/stdlib_hashmap_open.html index e2a976b94..6f67cdde9 100644 --- a/module/stdlib_hashmap_open.html +++ b/module/stdlib_hashmap_open.html @@ -181,13 +181,13 @@

    Uses

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hashmap_wrappers.html b/module/stdlib_hashmap_wrappers.html index 85ac42edd..83bf596cb 100644 --- a/module/stdlib_hashmap_wrappers.html +++ b/module/stdlib_hashmap_wrappers.html @@ -211,9 +211,9 @@

    Uses

    @@ -258,7 +258,7 @@

    Arguments

    @@ -273,7 +273,7 @@

    Arguments

    @@ -314,7 +314,7 @@

    Arguments

    @@ -329,7 +329,7 @@

    Arguments

    @@ -370,7 +370,7 @@

    Arguments

    @@ -385,7 +385,7 @@

    Arguments

    @@ -426,7 +426,7 @@

    Arguments

    @@ -441,7 +441,7 @@

    Arguments

    @@ -564,7 +564,7 @@

    Arguments

    @@ -579,7 +579,7 @@

    Arguments

    @@ -620,7 +620,7 @@

    Arguments

    @@ -635,7 +635,7 @@

    Arguments

    @@ -676,7 +676,7 @@

    Arguments

    @@ -691,7 +691,7 @@

    Arguments

    @@ -732,7 +732,7 @@

    Arguments

    @@ -747,7 +747,7 @@

    Arguments

    @@ -802,7 +802,7 @@

    Arguments

    @@ -858,7 +858,7 @@

    Components

    @@ -907,7 +907,7 @@

    Components

    @@ -962,7 +962,7 @@

    Arguments

    @@ -1012,7 +1012,7 @@

    Arguments

    @@ -1062,7 +1062,7 @@

    Arguments

    @@ -1115,7 +1115,7 @@

    Arguments

    @@ -1165,7 +1165,7 @@

    Arguments

    @@ -1340,7 +1340,7 @@

    Arguments

    @@ -1385,7 +1385,7 @@

    Arguments

    @@ -1419,13 +1419,13 @@

    Arguments

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/module/stdlib_hashmaps.html b/module/stdlib_hashmaps.html index 3a6283f68..f9a218d22 100644 --- a/module/stdlib_hashmaps.html +++ b/module/stdlib_hashmaps.html @@ -79,7 +79,7 @@

    stdlib_hashmaps
  • 317 statements + title=" 0.6% of total for modules and submodules.">466 statements
  • @@ -127,7 +127,7 @@

    Variables

    int_probes load_factor max_bits - success + success
  • @@ -181,8 +181,8 @@

    Uses

  • @@ -374,7 +374,7 @@

    Variables

    @@ -435,6 +435,31 @@

    Type-Bound Procedures

    + + + + + + + + + + + + + + + + + + + + @@ -444,8 +469,8 @@

    Type-Bound Procedures

    - + @@ -453,19 +478,94 @@

    Type-Bound Procedures

    init => init_chaining_map + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + key_get_other_data => get_other_chaining_data + key_key_test => chaining_key_test + + + + + + + + + key_set_other_data => set_other_chaining_data + + + + + + + + + + + + @@ -484,23 +584,23 @@

    Type-Bound Procedures

    - + - + + slots_bits + total_depth => total_chaining_depth @@ -534,6 +634,31 @@

    Type-Bound Procedures

    + + + + + + + + + + + + + + + + + + + + @@ -543,8 +668,8 @@

    Type-Bound Procedures

    - + @@ -553,8 +678,83 @@

    Type-Bound Procedures

    - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -563,8 +763,8 @@

    Type-Bound Procedures

    - + @@ -583,24 +783,24 @@

    Type-Bound Procedures

    - + - + + slots_bits - + total_depth +
    - - character(len=*), + + integer, intent(in) ::lhsflag
    - - type(string_type), + + type(linalg_state_type), intent(in) ::rhserr
    - + real(kind=sp), intent(in),
    - + real(kind=dp), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(in),
    - + complex(kind=sp), intent(in),
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + character(len=*), intent(in),
    - + type(bitset_64), intent(inout)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(inout)
    - + type(bitset_large), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int8), intent(out)
    - + integer(kind=int16), intent(out)
    - + integer(kind=int32), intent(out)
    - + integer(kind=int64), intent(out)
    - + type(string_type), intent(inout)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + type(string_type), intent(inout)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + type(key_type), intent(out)
    - + character(len=*), intent(in)
    - + type(key_type), intent(out)
    - + integer(kind=int8), intent(in)
    - + type(key_type), intent(out)
    - + integer(kind=int32), intent(in)
    - + type(other_type), intent(out)
    - + class(*), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + integer, intent(in),
    - + real(kind=dp), intent(in),
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + integer, intent(in),
    - + type(string_type), intent(in)
    - + integer, intent(in),
    - + character(len=*), intent(in)
    - + integer, intent(in),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int8), intent(in),
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + logical(kind=lk), intent(in)
    - + character(len=*), intent(in),
    - + type(string_type), intent(in),
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out),
    - + complex(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out),
    - + complex(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + class(codata_constant_type), intent(in)
    - + class(codata_constant_type), intent(in)
    - + type(string_type), intent(in)
    - + type(ansi_code), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + logical(kind=lk), intent(in)
    - + integer(kind=int16), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=*), intent(in)
    - + logical(kind=lk), intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + character(len=*), intent(in),
    - + complex(kind=sp), intent(in)
    - + character(len=*), intent(in),
    - + real(kind=dp), intent(in)
    - + character(len=*), intent(in),
    - + real(kind=sp), intent(in)
    - + character(len=*), intent(in),
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=sp), intent(in),
    - + type(string_type), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int64), intent(in)
    - + type(string_type), intent(in)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + type(string_type), intent(in)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + type(bitset_64), intent(inout)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(inout)
    - + type(bitset_large), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    assignment(=)stdlib_bitsetsstdlib_string_type Interface

    Used to define assignment for bitset_large. - (Specification)

    Read more…

    Assign a character sequence to a string.

    assignment(=)stdlib_string_typeassignment(=)stdlib_bitsets Interface

    Assign a character sequence to a string.

    Used to define assignment for bitset_large. + (Specification)

    Read more…
    axpy
    fibonacci_hashstdlib_hash_32bitFunction

    Maps the 32 bit integer key to an unsigned integer value with only nbits -bits where nbits is less than 32 -(Specification)

    fibonacci_hash stdlib_hash_64bit Function

    Maps the 64 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 64 (Specification)

    fibonacci_hashstdlib_hash_32bitFunction

    Maps the 32 bit integer key to an unsigned integer value with only nbits +bits where nbits is less than 32 +(Specification)

    fidx
    fnv_1_hashstdlib_hash_32bitstdlib_hash_64bit Interface

    FNV_1 interfaces -(Specification)

    fnv_1_hashstdlib_hash_64bitstdlib_hash_32bit Interface

    FNV_1 interfaces -(Specification)

    fnv_1_hasher
    fnv_1a_hashstdlib_hash_32bitstdlib_hash_64bit Interface

    FNV_1A interfaces -(Specification)

    fnv_1a_hashstdlib_hash_64bitstdlib_hash_32bit Interface

    FNV_1A interfaces -(Specification)

    fnv_1a_hasher
    odd_random_integerstdlib_hash_32bitSubroutine

    Returns a 32 bit pseudo random integer, harvest, distributed uniformly over -the odd integers of the int32 kind. -(Specification)

    odd_random_integer stdlib_hash_64bit Subroutine

    Returns a 64 bit pseudo random integer, harvest, distributed uniformly over the odd integers of the 64 bit kind. (Specification)

    odd_random_integerstdlib_hash_32bitSubroutine

    Returns a 32 bit pseudo random integer, harvest, distributed uniformly over +the odd integers of the int32 kind. +(Specification)

    open
    operator(//)stdlib_ansistdlib_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(//)
    operator(//)stdlib_string_typestdlib_ansi 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(/=)stdlib_string_typeInterface

    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(/=) stdlib_stringlist_type Interface

    Compares stringlist for inequality with the input entity @@ -1133,78 +1141,78 @@

    Procedures

    Specifications

    operator(/=)operator(/=) stdlib_bitsets Interface

    Returns .true. if not all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits otherwise the result is undefined. -(Specification)

    Read more…
    operator(/=)operator(/=) stdlib_linalg_state Interface
    operator(/=)operator(<) stdlib_string_type Interface

    Compare two character sequences for inequality, the left-hand side, +

    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(<)operator(<) stdlib_bitsets Interface

    Returns .true. if the bits in set1 and set2 differ and the highest order different bit is set to 0 in set1 and to 1 in set2, .false. otherwise. The sets must have the same number of bits otherwise the result is undefined. -(Specification)

    Read more…
    operator(<)operator(<) stdlib_linalg_state Interface
    operator(<)operator(<=) stdlib_string_type Interface

    Compare two character sequences for being less, the left-hand side, +

    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(<=)operator(<=) stdlib_bitsets Interface

    Returns .true. if the bits in set1 and set2 are the same or the highest order different bit is set to 0 in set1 and to 1 in set2, .false. otherwise. The sets must have the same number of bits otherwise the result is undefined. -(Specification)

    Read more…
    operator(<=)operator(<=) stdlib_linalg_state Interface
    operator(<=)operator(==) stdlib_string_type Interface

    Compare two character sequences for being less than, the left-hand side, +

    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(==)operator(==) stdlib_stringlist_type Interface

    Compares stringlist for equality with the input entity @@ -1212,19 +1220,13 @@

    Procedures

    Specifications

    operator(==)operator(==) stdlib_bitsets Interface

    Returns .true. if all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits otherwise the result is undefined. -(Specification)

    Read more…
    operator(==)stdlib_linalg_stateInterface

    Comparison operators

    operator(==)
    operator(==)stdlib_linalg_stateInterface

    Comparison operators

    operator(>) stdlib_string_type Interface

    Compare two character sequences for equality, the left-hand side, +

    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(>)operator(>) stdlib_bitsets Interface

    Returns .true. if the bits in set1 and set2 differ and the highest order different bit is set to 1 in set1 and to 0 in set2, .false. otherwise. The sets must have the same number of bits otherwise the result is undefined. -(Specification)

    Read more…
    operator(>)operator(>) stdlib_linalg_state Interface
    operator(>)operator(>=) stdlib_string_type Interface

    Compare two character sequences for being greater, the left-hand side, +

    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…
    operator(>=)operator(>=) stdlib_bitsets Interface

    Returns .true. if the bits in set1 and set2 are the same or the highest order different bit is set to 1 in set1 and to 0 in set2, .false. otherwise. The sets must have the same number of bits otherwise the result is undefined. - (Specification)

    Read more…
    operator(>=)operator(>=) stdlib_linalg_state Interface
    operator(>=)stdlib_string_typeInterface

    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…
    optval

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

    reversestdlib_string_typeInterface

    Reverses the character sequence hold by the input string

    Read more…
    reverse Function

    Reverse the character order in the input character variable (Specification)

    Read more…
    reversestdlib_string_typeInterface

    Reverses the character sequence hold by the input string

    Read more…
    rot
    to_lowerstdlib_string_typeInterface

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

    Read more…
    to_lower Function

    Convert character variable to lower case (Specification)

    Read more…
    to_lowerstdlib_string_typeInterface

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

    Read more…
    to_num stdlib_codata_type Interface

    Get the constant value or uncertainty.

    to_sentencestdlib_string_typeInterface

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

    Read more…
    to_sentence Function

    Converts character sequence to sentence case (Specification)

    Read more…
    to_sentencestdlib_string_typeInterface

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

    Read more…
    to_string Interface

    Format or transfer other types as a string. (Specification)

    to_titlestdlib_string_typeInterface

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

    Read more…
    to_title
    to_titleto_upper stdlib_string_type Interface

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

    Read more…

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

    Read more…
    to_upper Function

    Convert character variable to upper case (Specification)

    Read more…
    to_upperstdlib_string_typeInterface

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

    Read more…
    tpmv
    universal_mult_hashstdlib_hash_32bitFunction

    Uses the "random" odd 32 bit integer seed to map the 32 bit integer key to -an unsigned integer value with only nbits bits where nbits is less than 32 -(Specification)

    universal_mult_hash stdlib_hash_64bit Function

    Uses the "random" odd 64 bit integer seed to map the 64 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 64. (Specification)

    universal_mult_hashstdlib_hash_32bitFunction

    Uses the "random" odd 32 bit integer seed to map the 32 bit integer key to +an unsigned integer value with only nbits bits where nbits is less than 32 +(Specification)

    upper_incomplete_gamma
    - + type(ansi_code), intent(in)
    - + type(ansi_code), intent(in)
    - + type(ansi_code), intent(in)
    - + type(ansi_code), intent(in)
    - + type(ansi_code), intent(in)
    - + logical, intent(in)
    - + logical, intent(in)
    - + character(len=1), public,
    - + character(len=1), public,
    - + character(len=*), public,
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + type(bitset_64), intent(inout)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(inout)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(inout)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(inout)
    - + type(bitset_large), intent(in)
    - + type(bitset_large), intent(out)
    - + logical(kind=int16), intent(in)
    - + type(bitset_large), intent(out)
    - + logical(kind=int32), intent(in)
    - + type(bitset_large), intent(out)
    - + logical(kind=int64), intent(in)
    - + type(bitset_large), intent(out)
    - + logical(kind=int8), intent(in)
    - + logical(kind=int16), intent(out),
    - + type(bitset_large), intent(in)
    - + logical(kind=int32), intent(out),
    - + type(bitset_large), intent(in)
    - + logical(kind=int64), intent(out),
    - + type(bitset_large), intent(in)
    - + logical(kind=int8), intent(out),
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(out)
    - + type(bitset_64), intent(in)
    - + integer(kind=bits_kind), intent(in)
    - + integer(kind=bits_kind), intent(in)
    - + integer, intent(out),
    - + type(bitset_large), intent(out)
    - + type(bitset_large), intent(in)
    - + integer(kind=bits_kind), intent(in)
    - + integer(kind=bits_kind), intent(in)
    - + integer, intent(out),
    - + type(bitset_64), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(inout)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(inout)
    - + type(bitset_large), intent(in)
    - + type(bitset_64), intent(inout)
    - + type(bitset_64), intent(in)
    - + type(bitset_large), intent(inout)
    - + type(bitset_large), intent(in)
    procedure, public, pass(self) :: - all => all_64
    procedure, public, pass(self) :: - any => any_64
    procedure, public, pass(self) :: - bit_count => bit_count_64
    procedure, public, pass(self) :: - bits
    procedure, public, pass(self) :: - none => none_64
    procedure, public, pass(self) :: - test => test_64
    procedure, public, pass(self) :: - value => value_64
    procedure, public, pass(self) :: - all => all_large
    procedure, public, pass(self) :: - any => any_large
    procedure, public, pass(self) :: - bit_count => bit_count_large
    procedure, public, pass(self) :: - bits
    procedure, public, pass(self) :: - none => none_large
    procedure, public, pass(self) :: - test => test_large
    procedure, public, pass(self) :: - value => value_large
    procedure(all_abstract), public, deferred, pass(self) :: - all
    procedure(any_abstract), public, deferred, pass(self) :: - any
    procedure(bit_count_abstract), public, deferred, pass(self) :: - bit_count
    procedure, public, pass(self) :: - bits
    procedure(none_abstract), public, deferred, pass(self) :: - none
    generic, public :: - set => set_bit, set_range
    procedure(test_abstract), public, deferred, pass(self) :: - test
    procedure(value_abstract), public, deferred, pass(self) :: - value
    - + class(bitset_type), intent(in)
    - + character(len=*), intent(in)
    - + integer, intent(out),
    - + character(len=*), intent(in),
    - + character(len=*), intent(in),
    - + class(codata_constant_type), intent(in)
    - + class(codata_constant_type), intent(in)
    - + character(len=64), public
    - + character(len=32), public
    - + real(kind=dp), public
    - + real(kind=dp), public,
    - + real(kind=dp), public,
    - + real(kind=dp), public,
    - + real(kind=dp), public,
    - + real(kind=dp), public,
    - + real(kind=dp), public,
    - + character(len=*), intent(in)
    - + integer, intent(in),
    - + character(len=*), intent(in),
    - + integer, intent(in),
    - + integer, public,
    - + logical, public,
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int64), intent(inout)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer(kind=int32), intent(out)
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + logical, public,
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int64), intent(inout)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int8), intent(in),
    - + character(len=*), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int_hash), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer(kind=int64), intent(out)
    - + type(key_type), intent(in)
    - + character(len=:), intent(out),
    - + type(key_type), intent(in)
    - + integer(kind=int8), intent(out),
    - + type(key_type), intent(in)
    - + integer(kind=int32), intent(out),
    - + type(other_type), intent(in)
    - + class(*), intent(out),
    - + type(key_type), intent(out)
    - + character(len=*), intent(in)
    - + type(key_type), intent(out)
    - + integer(kind=int8), intent(in)
    - + type(key_type), intent(out)
    - + integer(kind=int32), intent(in)
    - + type(other_type), intent(out)
    - + class(*), intent(in)
    - + type(key_type), intent(in)
    - + integer(kind=int8), public,
    - + class(*), public,
    - + type(key_type), intent(in)
    - + type(key_type), intent(in)
    - + type(key_type), intent(in)
    - + type(key_type), intent(in)
    - + type(key_type), intent(in)
    - + type(key_type), intent(inout)
    - + type(other_type), intent(inout)
    - + integer, public,
    procedure, public, non_overridable, pass(map) :: + char_get_other_data
    procedure, public, non_overridable, pass(map) :: + char_key_test
    procedure, public, non_overridable, pass(map) :: + char_map_entry
    procedure, public, non_overridable, pass(map) :: + char_remove_entry
    procedure, public, non_overridable, pass(map) :: + char_set_other_data
    procedure, public, non_overridable, pass(map) :: entries
    procedure, public :: - get_other_data => get_other_chaining_data generic, public :: + get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data
    procedure, public, non_overridable, pass(map) :: + int32_get_other_data
    procedure, public, non_overridable, pass(map) :: + int32_key_test
    procedure, public, non_overridable, pass(map) :: + int32_map_entry
    procedure, public, non_overridable, pass(map) :: + int32_remove_entry
    procedure, public, non_overridable, pass(map) :: + int32_set_other_data
    procedure, public, non_overridable, pass(map) :: + int8_get_other_data
    procedure, public, non_overridable, pass(map) :: + int8_key_test
    procedure, public, non_overridable, pass(map) :: + int8_map_entry
    procedure, public, non_overridable, pass(map) :: + int8_remove_entry
    procedure, public, non_overridable, pass(map) :: + int8_set_other_data
    procedure, public :: - key_test => chaining_key_test
    procedure, public :: - loading => chaining_loading
    procedure, public :: + key_map_entry => map_chain_entry
    procedure, public :: + key_remove_entry => remove_chaining_entry
    procedure, public :: - map_entry => map_chain_entry
    generic, public :: + key_test => key_key_test, int8_key_test, int32_key_test, char_key_test
    procedure, public :: + loading => chaining_loading
    generic, public :: + map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry
    procedure, public :: - remove => remove_chaining_entry generic, public :: + remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry
    procedure, public :: - set_other_data => set_other_chaining_data generic, public :: + set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data
    procedure, public, non_overridable, pass(map) :: - slots_bits
    procedure, public :: - total_depth => total_chaining_depth
    procedure, public, non_overridable, pass(map) :: + char_get_other_data
    procedure, public, non_overridable, pass(map) :: + char_key_test
    procedure, public, non_overridable, pass(map) :: + char_map_entry
    procedure, public, non_overridable, pass(map) :: + char_remove_entry
    procedure, public, non_overridable, pass(map) :: + char_set_other_data
    procedure, public, non_overridable, pass(map) :: entries
    procedure(get_other), public, deferred, pass(map) :: - get_other_data generic, public :: + get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data
    procedure(key_test), public, deferred, pass(map) :: - key_test procedure, public, non_overridable, pass(map) :: + int32_get_other_data
    procedure, public, non_overridable, pass(map) :: + int32_key_test
    procedure, public, non_overridable, pass(map) :: + int32_map_entry
    procedure, public, non_overridable, pass(map) :: + int32_remove_entry
    procedure, public, non_overridable, pass(map) :: + int32_set_other_data
    procedure, public, non_overridable, pass(map) :: + int8_get_other_data
    procedure, public, non_overridable, pass(map) :: + int8_key_test
    procedure, public, non_overridable, pass(map) :: + int8_map_entry
    procedure, public, non_overridable, pass(map) :: + int8_remove_entry
    procedure, public, non_overridable, pass(map) :: + int8_set_other_data
    procedure(key_get_other_data), public, deferred, pass(map) :: + key_get_other_data
    procedure(key_key_test), public, deferred, pass(map) :: + key_key_test
    procedure(key_map_entry), public, deferred, pass(map) :: + key_map_entry
    procedure(key_remove_entry), public, deferred, pass(map) :: + key_remove_entry
    procedure(key_set_other_data), public, deferred, pass(map) :: + key_set_other_data
    generic, public :: + key_test => key_key_test, int8_key_test, int32_key_test, char_key_test
    procedure(map_entry), public, deferred, pass(map) :: - map_entry generic, public :: + map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry
    procedure(remove_entry), public, deferred, pass(map) :: - remove generic, public :: + remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry
    procedure(set_other), public, deferred, pass(map) :: - set_other_data generic, public :: + set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data
    procedure, public, non_overridable, pass(map) :: - slots_bits
    procedure(total_depth), public, deferred, pass(map) :: - total_depth../../

    Key_test procedures.

    @@ -641,6 +841,31 @@

    Type-Bound Procedures

    procedure, public, non_overridable, pass(map) :: + char_get_other_data
    procedure, public, non_overridable, pass(map) :: + char_key_test
    procedure, public, non_overridable, pass(map) :: + char_map_entry
    procedure, public, non_overridable, pass(map) :: + char_remove_entry
    procedure, public, non_overridable, pass(map) :: + char_set_other_data
    procedure, public, non_overridable, pass(map) :: entries
    procedure, public :: - get_other_data => get_other_open_data generic, public :: + get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data
    procedure, public, non_overridable, pass(map) :: + int32_get_other_data
    procedure, public, non_overridable, pass(map) :: + int32_key_test
    procedure, public, non_overridable, pass(map) :: + int32_map_entry
    procedure, public, non_overridable, pass(map) :: + int32_remove_entry
    procedure, public, non_overridable, pass(map) :: + int32_set_other_data
    procedure, public, non_overridable, pass(map) :: + int8_get_other_data
    procedure, public, non_overridable, pass(map) :: + int8_key_test
    procedure, public, non_overridable, pass(map) :: + int8_map_entry
    procedure, public, non_overridable, pass(map) :: + int8_remove_entry
    procedure, public, non_overridable, pass(map) :: + int8_set_other_data
    procedure, public :: - key_test => open_key_test
    procedure, public :: - loading => open_loading
    procedure, public :: + key_map_entry => map_open_entry
    procedure, public :: + key_remove_entry => remove_open_entry
    procedure, public :: - map_entry => map_open_entry
    generic, public :: + key_test => key_key_test, int8_key_test, int32_key_test, char_key_test
    procedure, public :: + loading => open_loading
    generic, public :: + map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry
    procedure, public :: - remove => remove_open_entry generic, public :: + remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry
    procedure, public :: - set_other_data => set_other_open_data generic, public :: + set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data
    procedure, public, non_overridable, pass(map) :: - slots_bits
    procedure, public :: - total_depth => total_open_depth
    - + integer, intent(in)
    - + character(len=:), intent(out),
    - + integer, intent(out),
    - + character(len=:),
    - + integer, intent(in)
    - + type(string_type), intent(out)
    - + integer, intent(out),
    - + character(len=:),
    - + character(len=:), intent(out),
    - + integer, intent(out),
    - + character(len=:),
    - + type(string_type), intent(out)
    - + integer, intent(out),
    - + character(len=:),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + character(len=*), intent(in)
    - + integer, intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=*), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + character(len=1), intent(in)
    - + real(kind=dp), intent(in)
    - + character(len=1), intent(in)
    - + complex(kind=sp), intent(in)
    - + character(len=1), intent(in)
    - + complex(kind=dp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int16), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int64), intent(in)
    - + character(len=1), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + character(len=1), intent(in)
    - + real(kind=dp), intent(in)
    - + character(len=1), intent(in)
    - + complex(kind=sp), intent(in)
    - + character(len=1), intent(in)
    - + complex(kind=dp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int16), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=int64), intent(in)
    - + character(len=1), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(in),
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + complex(kind=sp), intent(in),
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + complex(kind=dp), intent(in),
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + complex(kind=dp), intent(in),
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + integer(kind=ilp), intent(out)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out)
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(inout),
    - + integer(kind=ilp), intent(inout),
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + integer(kind=ilp), intent(out),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(inout),
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out),
    - + complex(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(inout),
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out),
    - + real(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(inout),
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out),
    - + real(kind=sp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(inout),
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out),
    - + complex(kind=dp), intent(out),
    - + logical(kind=lk), intent(in),
    - + logical(kind=lk), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=sp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=dp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + complex(kind=dp), intent(in),
    - + type(linalg_state_type), intent(out),
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + type(linalg_state_type), intent(in)
    - + character(len=MSG_LENGTH), public
    - + integer(kind=ilp), public
    - + type(linalg_state_type), intent(in)
    - + integer, public,
    - + integer, public,
    - + integer, public,
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in),
    - + integer, intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in),
    - + integer, intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in),
    - + integer, intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in),
    - + integer, intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in),
    - + integer, intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in),
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=dp), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(in),
    - + complex(kind=sp), intent(in),
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + character(len=*), intent(in),
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + integer, intent(in),
    - + real(kind=dp), intent(in),
    - + integer, intent(in),
    - + real(kind=sp), intent(in),
    - + integer, intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=sp), intent(in),
    - + real(kind=dp), intent(in),
    - + real(kind=sp), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(out)
    - + integer(kind=int16), intent(out)
    - + integer(kind=int32), intent(out)
    - + integer(kind=int64), intent(out)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int8), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int32), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int32), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int64), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int64), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int8), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int16), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + integer(kind=int64), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + real(kind=sp), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in),
    - + integer(kind=int8), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in),
    - + integer(kind=int16), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in),
    - + integer(kind=int32), intent(in),
    - + real(kind=dp), intent(inout)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in),
    - + integer(kind=int64), intent(in),
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer(kind=int_index), intent(out)
    - + integer(kind=int_index_low), intent(out)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int8), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int16), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int32), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in),
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in),
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in),
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in),
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + complex(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int16), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int32), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int64), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + integer(kind=int8), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=dp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + logical, intent(in)
    - + logical, intent(in),
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer(kind=int8), intent(in)
    - + integer, intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer, intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer, intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer, intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer, intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer, intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer, intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer, intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + character(len=:),
    - + integer(kind=int8), intent(inout),
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(inout)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + integer, intent(in)
    - + type(string_type), intent(in)
    - + integer, intent(in)
    - + integer, intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(inout)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + type(string_type), intent(inout)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in),
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + logical(kind=lk), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + type(string_type), intent(in)
    - + integer, intent(in)
    - + integer, intent(out)
    - + character(len=*), intent(inout)
    - + type(stringlist_type), intent(in)
    - + character(len=*), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + type(stringlist_type), intent(in)
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + character(len=*), intent(in),
    - + type(stringlist_type), intent(in)
    - + type(string_type), intent(in),
    - + type(stringlist_type), intent(in)
    - + character(len=*), intent(in),
    - + type(string_type), intent(in),
    generic, public :: - get => get_string_idx
    procedure, public :: - len => length_list
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=1), intent(in)
    - + character(len=*), intent(in)
    - + character(len=1), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + integer, intent(in),
    - + character(len=*), intent(in)
    - + integer, intent(in),
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int16), intent(in)
    - + integer(kind=int32), intent(in)
    - + integer(kind=int64), intent(in)
    - + integer(kind=int8), intent(in)
    - + logical(kind=lk), intent(in)
    - + integer(kind=int16), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int32), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int64), intent(in)
    - + character(len=*), intent(in)
    - + integer(kind=int8), intent(in)
    - + character(len=*), intent(in)
    - + logical(kind=lk), intent(in)
    - + character(len=*), intent(in)
    - + complex(kind=dp), intent(in)
    - + character(len=*), intent(in),
    - + complex(kind=sp), intent(in)
    - + character(len=*), intent(in),
    - + real(kind=dp), intent(in)
    - + character(len=*), intent(in),
    - + real(kind=sp), intent(in)
    - + character(len=*), intent(in),
    - + type(string_type), intent(in)
    - + character(len=*), intent(in)
    - + integer, intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + class(bitset_type), intent(in)
    - + character(len=*), intent(in),
    - + integer, intent(in),
    - + character(len=*), intent(in)
    - + integer, intent(out),
    - + character(len=*), intent(in),
    - + character(len=*), intent(in),
    - + logical, intent(in)
    - - integer(kind=int32), + + integer(kind=int64), intent(in) @@ -200,8 +200,8 @@

    Arguments

    Return Value - - integer(kind=int32) + + integer(kind=int64)

    @@ -222,15 +222,15 @@

    Source Code

        elemental function fibonacci_hash( key, nbits ) result( sample )
     !! Version: experimental
     !!
    -!! Maps the 32 bit integer `key` to an unsigned integer value with only `nbits`
    -!! bits where `nbits` is less than 32
    -!! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits))
    +!! Maps the 64 bit integer `key` to an unsigned integer value with only `nbits`
    +!! bits where `nbits` is less than 64
    +!! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits_1))
     
    -        integer(int32), intent(in) :: key
    +        integer(int64), intent(in) :: key
             integer, intent(in)        :: nbits
    -        integer(int32)             :: sample
    +        integer(int64)             :: sample
     
    -        sample = ishft( key*pow32_over_phi, -32 + nbits )
    +        sample = ishft( key*pow64_over_phi, -64 + nbits )
     
         end function fibonacci_hash
     
    @@ -247,13 +247,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/fibonacci_hash~2.html b/proc/fibonacci_hash~2.html index 12b32a91b..b28408d8c 100644 --- a/proc/fibonacci_hash~2.html +++ b/proc/fibonacci_hash~2.html @@ -85,15 +85,15 @@

    fibonacci_hash
  • - Source File + Source File
  • @@ -149,9 +149,9 @@

    public elemental function fibonacci_hash(key, nbits) result(sample)

    -

    Maps the 64 bit integer key to an unsigned integer value with only nbits -bits where nbits is less than 64 -(Specification)

    +

    Maps the 32 bit integer key to an unsigned integer value with only nbits +bits where nbits is less than 32 +(Specification)

    Arguments

    @@ -167,8 +167,8 @@

    Arguments

    - - integer(kind=int64), + + integer(kind=int32), intent(in) @@ -200,8 +200,8 @@

    Arguments

    Return Value - - integer(kind=int64) + + integer(kind=int32)

    @@ -222,15 +222,15 @@

    Source Code

        elemental function fibonacci_hash( key, nbits ) result( sample )
     !! Version: experimental
     !!
    -!! Maps the 64 bit integer `key` to an unsigned integer value with only `nbits`
    -!! bits where `nbits` is less than 64
    -!! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits_1))
    +!! Maps the 32 bit integer `key` to an unsigned integer value with only `nbits`
    +!! bits where `nbits` is less than 32
    +!! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits))
     
    -        integer(int64), intent(in) :: key
    +        integer(int32), intent(in) :: key
             integer, intent(in)        :: nbits
    -        integer(int64)             :: sample
    +        integer(int32)             :: sample
     
    -        sample = ishft( key*pow64_over_phi, -64 + nbits )
    +        sample = ishft( key*pow32_over_phi, -32 + nbits )
     
         end function fibonacci_hash
     
    @@ -247,13 +247,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/fnv_1_hasher.html b/proc/fnv_1_hasher.html index 8df1e0541..c0b6bd3db 100644 --- a/proc/fnv_1_hasher.html +++ b/proc/fnv_1_hasher.html @@ -167,7 +167,7 @@

    Arguments

    - + type(key_type), intent(in)
    - + type(key_type), intent(in)
    - + type(key_type), intent(inout)
    - + type(other_type), intent(inout)
    - + integer, intent(out),
    - + integer, intent(out),
    - + character(len=:), intent(out),
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + type(linalg_state_type), intent(in)
    - integer(kind=int32), + integer(kind=int64), intent(out) @@ -200,16 +200,18 @@

    Source Code

        subroutine odd_random_integer( harvest )
     !! Version: experimental
     !!
    -!! Returns a 32 bit pseudo random integer, `harvest`, distributed uniformly over
    -!! the odd integers of the `int32` kind.
    -!! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-an-odd-integer))
    -        integer(int32), intent(out) :: harvest
    -        real(dp) :: sample
    +!! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over
    +!! the odd integers of the 64 bit kind.
    +!! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-odd-integer))
    +
    +        integer(int64), intent(out) :: harvest
    +        real(dp) :: sample(2)
    +        integer(int32) :: part(2)
     
             call random_number( sample )
    -        harvest = int( floor( sample * 2_int64**32, int64 ) - 2_int64**31, &
    -            int32 )
    -        harvest = ishft( harvest, 1 ) + 1_int32
    +        part = int( floor( sample * 2_int64**32, int64 ) - 2_int64**31, int32 )
    +        harvest = transfer( part, harvest )
    +        harvest = ishft( harvest, 1 ) + 1_int64
     
         end subroutine odd_random_integer
     
    @@ -226,13 +228,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/odd_random_integer~2.html b/proc/odd_random_integer~2.html index cec73d88e..a67984264 100644 --- a/proc/odd_random_integer~2.html +++ b/proc/odd_random_integer~2.html @@ -80,20 +80,20 @@

    odd_random_integer
  • 9 statements + title=" 0.0% of total for procedures.">7 statements
  • - Source File + Source File
  • @@ -149,9 +149,9 @@

    public subroutine odd_random_integer(harvest)

    -

    Returns a 64 bit pseudo random integer, harvest, distributed uniformly over -the odd integers of the 64 bit kind. -(Specification)

    +

    Returns a 32 bit pseudo random integer, harvest, distributed uniformly over +the odd integers of the int32 kind. +(Specification)

    Arguments

    @@ -167,8 +167,8 @@

    Arguments

    - - integer(kind=int64), + + integer(kind=int32), intent(out) @@ -200,18 +200,16 @@

    Source Code

        subroutine odd_random_integer( harvest )
     !! Version: experimental
     !!
    -!! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over
    -!! the odd integers of the 64 bit kind.
    -!! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-odd-integer))
    -
    -        integer(int64), intent(out) :: harvest
    -        real(dp) :: sample(2)
    -        integer(int32) :: part(2)
    +!! Returns a 32 bit pseudo random integer, `harvest`, distributed uniformly over
    +!! the odd integers of the `int32` kind.
    +!! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-an-odd-integer))
    +        integer(int32), intent(out) :: harvest
    +        real(dp) :: sample
     
             call random_number( sample )
    -        part = int( floor( sample * 2_int64**32, int64 ) - 2_int64**31, int32 )
    -        harvest = transfer( part, harvest )
    -        harvest = ishft( harvest, 1 ) + 1_int64
    +        harvest = int( floor( sample * 2_int64**32, int64 ) - 2_int64**31, &
    +            int32 )
    +        harvest = ishft( harvest, 1 ) + 1_int32
     
         end subroutine odd_random_integer
     
    @@ -228,13 +226,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/open.html b/proc/open.html index a6b0ce7a4..e65761be2 100644 --- a/proc/open.html +++ b/proc/open.html @@ -179,7 +179,7 @@

    Arguments

    - + character(len=*), intent(in)
    - + integer, intent(out),
    - + character(len=*), intent(in)
    - + type(key_type), intent(in)
    - + type(key_type), intent(in)
    - + type(key_type), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(inout)
    - + complex(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + complex(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(out)
    - + real(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(inout)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(out)
    - + real(kind=sp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(inout)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(out)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=sp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + real(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + real(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(inout)
    - + complex(kind=dp), intent(in)
    - + real(kind=dp), intent(out)
    - + complex(kind=dp), intent(out)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + character(len=1), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(in)
    - + integer(kind=ilp), intent(in)
    - + complex(kind=dp), intent(inout)
    - + integer(kind=ilp), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + character(len=*), intent(in)
    - + logical, intent(in)
    - - integer(kind=int32), + + integer(kind=int64), intent(in) @@ -182,8 +182,8 @@

    Arguments

    - - integer(kind=int32), + + integer(kind=int64), intent(in) @@ -215,8 +215,8 @@

    Arguments

    Return Value - - integer(kind=int32) + + integer(kind=int64)

    @@ -237,15 +237,16 @@

    Source Code

        elemental function universal_mult_hash( key, seed, nbits ) result( sample )
     !! Version: experimental
     !!
    -!! Uses the "random" odd 32 bit integer `seed` to map the 32 bit integer `key` to
    -!! an unsigned integer value with only `nbits` bits where `nbits` is less than 32
    -!! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits))
    -        integer(int32), intent(in) :: key
    -        integer(int32), intent(in) :: seed
    +!! Uses the "random" odd 64 bit integer `seed` to map the 64 bit integer `key` to
    +!! an unsigned integer value with only `nbits` bits where `nbits` is less than 64.
    +!! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits_1))
    +
    +        integer(int64), intent(in) :: key
    +        integer(int64), intent(in) :: seed
             integer, intent(in)        :: nbits
    -        integer(int32)             :: sample
    +        integer(int64)             :: sample
     
    -        sample = ishft( key*seed, -32 + nbits )
    +        sample = ishft( key*seed, -64 + nbits )
     
         end function universal_mult_hash
     
    @@ -262,13 +263,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/proc/universal_mult_hash~2.html b/proc/universal_mult_hash~2.html index b93427036..f41df1c5e 100644 --- a/proc/universal_mult_hash~2.html +++ b/proc/universal_mult_hash~2.html @@ -85,15 +85,15 @@

    universal_mult_hash
  • - Source File + Source File
  • @@ -149,9 +149,9 @@

    public elemental function universal_mult_hash(key, seed, nbits) result(sampl

    -

    Uses the "random" odd 64 bit integer seed to map the 64 bit integer key to -an unsigned integer value with only nbits bits where nbits is less than 64. -(Specification)

    +

    Uses the "random" odd 32 bit integer seed to map the 32 bit integer key to +an unsigned integer value with only nbits bits where nbits is less than 32 +(Specification)

    Arguments

    @@ -167,8 +167,8 @@

    Arguments

    - - integer(kind=int64), + + integer(kind=int32), intent(in) @@ -182,8 +182,8 @@

    Arguments

    - - integer(kind=int64), + + integer(kind=int32), intent(in) @@ -215,8 +215,8 @@

    Arguments

    Return Value - - integer(kind=int64) + + integer(kind=int32)

    @@ -237,16 +237,15 @@

    Source Code

        elemental function universal_mult_hash( key, seed, nbits ) result( sample )
     !! Version: experimental
     !!
    -!! Uses the "random" odd 64 bit integer `seed` to map the 64 bit integer `key` to
    -!! an unsigned integer value with only `nbits` bits where `nbits` is less than 64.
    -!! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits_1))
    -
    -        integer(int64), intent(in) :: key
    -        integer(int64), intent(in) :: seed
    +!! Uses the "random" odd 32 bit integer `seed` to map the 32 bit integer `key` to
    +!! an unsigned integer value with only `nbits` bits where `nbits` is less than 32
    +!! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits))
    +        integer(int32), intent(in) :: key
    +        integer(int32), intent(in) :: seed
             integer, intent(in)        :: nbits
    -        integer(int64)             :: sample
    +        integer(int32)             :: sample
     
    -        sample = ishft( key*seed, -64 + nbits )
    +        sample = ishft( key*seed, -32 + nbits )
     
         end function universal_mult_hash
     
    @@ -263,13 +262,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/search.html b/search.html index ac045eb97..22ced130d 100644 --- a/search.html +++ b/search.html @@ -93,13 +93,13 @@

    Search Results

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/f08estop.f90.html b/sourcefile/f08estop.f90.html index 2b60205d5..c527902fa 100644 --- a/sourcefile/f08estop.f90.html +++ b/sourcefile/f08estop.f90.html @@ -209,13 +209,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/f18estop.f90.html b/sourcefile/f18estop.f90.html index ec3e51f6f..9d37f7e4f 100644 --- a/sourcefile/f18estop.f90.html +++ b/sourcefile/f18estop.f90.html @@ -197,13 +197,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_ansi.f90.html b/sourcefile/stdlib_ansi.f90.html index 087b05110..78325ae7e 100644 --- a/sourcefile/stdlib_ansi.f90.html +++ b/sourcefile/stdlib_ansi.f90.html @@ -327,13 +327,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_ansi_operator.f90.html b/sourcefile/stdlib_ansi_operator.f90.html index ba4e8157a..9f6c2d9b6 100644 --- a/sourcefile/stdlib_ansi_operator.f90.html +++ b/sourcefile/stdlib_ansi_operator.f90.html @@ -240,13 +240,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_ansi_to_string.f90.html b/sourcefile/stdlib_ansi_to_string.f90.html index 8bc6c9009..b1ba8b882 100644 --- a/sourcefile/stdlib_ansi_to_string.f90.html +++ b/sourcefile/stdlib_ansi_to_string.f90.html @@ -208,13 +208,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_array.f90.html b/sourcefile/stdlib_array.f90.html index f7c4e2208..d43b4e37d 100644 --- a/sourcefile/stdlib_array.f90.html +++ b/sourcefile/stdlib_array.f90.html @@ -236,13 +236,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_ascii.fypp.html b/sourcefile/stdlib_ascii.fypp.html index fc2cc59d7..4fc82870c 100644 --- a/sourcefile/stdlib_ascii.fypp.html +++ b/sourcefile/stdlib_ascii.fypp.html @@ -516,13 +516,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_bitsets.fypp.html b/sourcefile/stdlib_bitsets.fypp.html index 6823850ca..d858219a8 100644 --- a/sourcefile/stdlib_bitsets.fypp.html +++ b/sourcefile/stdlib_bitsets.fypp.html @@ -79,7 +79,7 @@

    stdlib_bitsets.fypp
  • 688 statements + title=" 0.9% of total for source files.">688 statements
  • @@ -2240,13 +2240,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_bitsets_64.fypp.html b/sourcefile/stdlib_bitsets_64.fypp.html index 067999397..d189ea2b6 100644 --- a/sourcefile/stdlib_bitsets_64.fypp.html +++ b/sourcefile/stdlib_bitsets_64.fypp.html @@ -1262,13 +1262,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_bitsets_large.fypp.html b/sourcefile/stdlib_bitsets_large.fypp.html index 822cbc735..36af26737 100644 --- a/sourcefile/stdlib_bitsets_large.fypp.html +++ b/sourcefile/stdlib_bitsets_large.fypp.html @@ -1480,13 +1480,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_codata.f90.html b/sourcefile/stdlib_codata.f90.html index aecaa9439..73519d95f 100644 --- a/sourcefile/stdlib_codata.f90.html +++ b/sourcefile/stdlib_codata.f90.html @@ -1952,13 +1952,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_codata_type.fypp.html b/sourcefile/stdlib_codata_type.fypp.html index 0d374b4df..4e4c4b490 100644 --- a/sourcefile/stdlib_codata_type.fypp.html +++ b/sourcefile/stdlib_codata_type.fypp.html @@ -236,13 +236,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_constants.fypp.html b/sourcefile/stdlib_constants.fypp.html index bbb6ed342..1b4e12889 100644 --- a/sourcefile/stdlib_constants.fypp.html +++ b/sourcefile/stdlib_constants.fypp.html @@ -232,13 +232,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_error.f90.html b/sourcefile/stdlib_error.f90.html index 9ef517f08..7219f28e8 100644 --- a/sourcefile/stdlib_error.f90.html +++ b/sourcefile/stdlib_error.f90.html @@ -252,13 +252,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_32bit.fypp.html b/sourcefile/stdlib_hash_32bit.fypp.html index 9c215664d..3d6d08872 100644 --- a/sourcefile/stdlib_hash_32bit.fypp.html +++ b/sourcefile/stdlib_hash_32bit.fypp.html @@ -441,13 +441,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_32bit_fnv.fypp.html b/sourcefile/stdlib_hash_32bit_fnv.fypp.html index 27c5cbdd0..896ea889f 100644 --- a/sourcefile/stdlib_hash_32bit_fnv.fypp.html +++ b/sourcefile/stdlib_hash_32bit_fnv.fypp.html @@ -300,13 +300,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_32bit_nm.fypp.html b/sourcefile/stdlib_hash_32bit_nm.fypp.html index 831c788d6..9c64d3202 100644 --- a/sourcefile/stdlib_hash_32bit_nm.fypp.html +++ b/sourcefile/stdlib_hash_32bit_nm.fypp.html @@ -1013,13 +1013,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_32bit_water.fypp.html b/sourcefile/stdlib_hash_32bit_water.fypp.html index d680cbe14..596309c3f 100644 --- a/sourcefile/stdlib_hash_32bit_water.fypp.html +++ b/sourcefile/stdlib_hash_32bit_water.fypp.html @@ -507,13 +507,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_64bit.fypp.html b/sourcefile/stdlib_hash_64bit.fypp.html index 66468372e..71be0d13a 100644 --- a/sourcefile/stdlib_hash_64bit.fypp.html +++ b/sourcefile/stdlib_hash_64bit.fypp.html @@ -486,13 +486,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_64bit_fnv.fypp.html b/sourcefile/stdlib_hash_64bit_fnv.fypp.html index c43ad9319..fc3476a2b 100644 --- a/sourcefile/stdlib_hash_64bit_fnv.fypp.html +++ b/sourcefile/stdlib_hash_64bit_fnv.fypp.html @@ -301,13 +301,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_64bit_pengy.fypp.html b/sourcefile/stdlib_hash_64bit_pengy.fypp.html index 9a6213cda..0fdb9a76d 100644 --- a/sourcefile/stdlib_hash_64bit_pengy.fypp.html +++ b/sourcefile/stdlib_hash_64bit_pengy.fypp.html @@ -352,13 +352,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hash_64bit_spookyv2.fypp.html b/sourcefile/stdlib_hash_64bit_spookyv2.fypp.html index 30ecd6443..e7903f6fc 100644 --- a/sourcefile/stdlib_hash_64bit_spookyv2.fypp.html +++ b/sourcefile/stdlib_hash_64bit_spookyv2.fypp.html @@ -892,13 +892,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hashmap_chaining.f90.html b/sourcefile/stdlib_hashmap_chaining.f90.html index c8ad5f99f..03bc579fe 100644 --- a/sourcefile/stdlib_hashmap_chaining.f90.html +++ b/sourcefile/stdlib_hashmap_chaining.f90.html @@ -1052,13 +1052,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hashmap_open.f90.html b/sourcefile/stdlib_hashmap_open.f90.html index ef224b266..02d39dfc3 100644 --- a/sourcefile/stdlib_hashmap_open.f90.html +++ b/sourcefile/stdlib_hashmap_open.f90.html @@ -1081,13 +1081,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hashmap_wrappers.f90.html b/sourcefile/stdlib_hashmap_wrappers.f90.html index 96e7a53d2..3f4e8b328 100644 --- a/sourcefile/stdlib_hashmap_wrappers.f90.html +++ b/sourcefile/stdlib_hashmap_wrappers.f90.html @@ -611,13 +611,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_hashmaps.f90.html b/sourcefile/stdlib_hashmaps.f90.html index 26fcb74da..fa4d9dc87 100644 --- a/sourcefile/stdlib_hashmaps.f90.html +++ b/sourcefile/stdlib_hashmaps.f90.html @@ -79,7 +79,7 @@

    stdlib_hashmaps.f90
  • 317 statements + title=" 0.6% of total for source files.">466 statements
  • @@ -177,843 +177,1229 @@

    Source Code

    int32, & int64 - use stdlib_hashmap_wrappers - - implicit none - - private - -!! Public data_types - public :: & - chaining_hashmap_type, & - hashmap_type, & - open_hashmap_type - -!! Values that parameterize David Chase's empirical SLOT expansion code - integer, parameter :: & - inmap_probe_factor = 10, & - map_probe_factor = 5 - -!! Values that parameterize the SLOTS table size - integer, parameter, public :: & - default_bits = 6, & - max_bits = 30 - -!! KIND values used to parameterixe the hash map and its procedures - integer, parameter, public :: & - int_calls = int64, & - int_depth = int64, & - int_index = int32, & - int_probes = int64 + use stdlib_hashmap_wrappers, only: & + copy_key, & + copy_other, & + fibonacci_hash, & + fnv_1_hasher, & + fnv_1a_hasher, & + free_key, & + free_other, & + get, & + hasher_fun, & + operator(==), & + seeded_nmhash32_hasher, & + seeded_nmhash32x_hasher, & + seeded_water_hasher, & + set, & + key_type, & + other_type, & + int_hash + + implicit none + + private + +!! Public data_types + public :: & + chaining_hashmap_type, & + hashmap_type, & + open_hashmap_type -!! Error codes returned by the hash map procedures - integer, parameter, public :: & - success = 0, & - alloc_fault = 1, & - array_size_error = 2 - -! The number of bits used by various types - integer, parameter :: & -! Should be 8 - int8_bits = bit_size(0_int8), & - char_bits = character_storage_size - -!! The hash map load factor - real, parameter, public :: & - load_factor = 0.5625 - -!! The size of the pools of allocated map entries - integer(int32), parameter :: pool_size = 64 - - character(*), parameter, private :: module_name = 'STDLIB_HASHMAPS' - - type, abstract :: hashmap_type -!! Version: Experimental -!! -!! Type implementing an abstract hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-hashmap_type-abstract-type)) - private - integer(int_calls) :: call_count = 0 -!! Number of calls - integer(int_calls) :: probe_count = 0 -!! Number of probes since last expansion - integer(int_calls) :: total_probes = 0 -!! Cumulative number of probes - integer(int_index) :: num_entries = 0 -!! Number of entries - integer(int_index) :: num_free = 0 -!! Number of elements in the free_list - integer(int32) :: nbits = default_bits -!! Number of bits used to address the slots - procedure(hasher_fun), pointer, nopass :: hasher => fnv_1_hasher -!! Hash function - - contains - - procedure, non_overridable, pass(map) :: calls - procedure, non_overridable, pass(map) :: entries - procedure, non_overridable, pass(map) :: map_probes - procedure, non_overridable, pass(map) :: num_slots - procedure, non_overridable, pass(map) :: slots_bits - procedure(get_all_keys), deferred, pass(map) :: get_all_keys - procedure(get_other), deferred, pass(map) :: get_other_data - procedure(init_map), deferred, pass(map) :: init - procedure(key_test), deferred, pass(map) :: key_test - procedure(loading), deferred, pass(map) :: loading - procedure(map_entry), deferred, pass(map) :: map_entry - procedure(rehash_map), deferred, pass(map) :: rehash - procedure(remove_entry), deferred, pass(map) :: remove - procedure(set_other), deferred, pass(map) :: set_other_data - procedure(total_depth), deferred, pass(map) :: total_depth - - end type hashmap_type - - - abstract interface - - subroutine get_all_keys(map, all_keys) -!! Version: Experimental -!! -!! Returns the all keys contained in a hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#get_all_keys-returns-all-the-keys-contained-in-a-map)) -!! -!! Arguments: -!! map - a hash map -!! all_keys - all the keys contained in a hash map -! - import hashmap_type, key_type - class(hashmap_type), intent(in) :: map - type(key_type), allocatable, intent(out) :: all_keys(:) - end subroutine get_all_keys - - subroutine get_other( map, key, other, exists ) -!! Version: Experimental -!! -!! Returns the other data associated with the inverse table index -!! Arguments: -!! map - a hash map -!! key - the key associated with a map entry -!! other - the other data associated with the key -!! exists - a logical flag indicating whether an entry with that key exists -! - import hashmap_type, key_type, other_type - class(hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(out) :: other - logical, intent(out), optional :: exists - end subroutine get_other - - subroutine init_map( map, & - hasher, & - slots_bits, & - status ) -!! Version: Experimental -!! -!! Routine to allocate an empty map with HASHER as the hash function, -!! 2**SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a -!! maximum of 2**MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots), -!! map % inverse elements. All fields are initialized. -!! Arguments: -!! map - the hash maap to be initialized -!! hasher - the hash function to be used to map keys to slots -!! slots_bits - the number of bits initially used to map to the slots -!! status - an integer error status flag with the allowed values: -!! success - no problems were found -!! alloc_fault - map % slots or map % inverse could not be allocated -!! array_size_error - slots_bits or max_bits is less than -!! default_bits or greater than strict_max_bits -!! real_value_error - load_factor is less than 0.375 or greater than -!! 0.875 -! - import hashmap_type, hasher_fun, int32 - class(hashmap_type), intent(out) :: map - procedure(hasher_fun) :: hasher - integer, intent(in), optional :: slots_bits - integer(int32), intent(out), optional :: status - end subroutine init_map +!! Values that parameterize David Chase's empirical SLOT expansion code + integer, parameter :: & + inmap_probe_factor = 10, & + map_probe_factor = 5 + +!! Values that parameterize the SLOTS table size + integer, parameter, public :: & + default_bits = 6, & + max_bits = 30 + +!! KIND values used to parameterixe the hash map and its procedures + integer, parameter, public :: & + int_calls = int64, & + int_depth = int64, & + int_index = int32, & + int_probes = int64 + +!! Error codes returned by the hash map procedures + integer, parameter, public :: & + success = 0, & + alloc_fault = 1, & + array_size_error = 2 + +! The number of bits used by various types + integer, parameter :: & +! Should be 8 + int8_bits = bit_size(0_int8), & + char_bits = character_storage_size + +!! The hash map load factor + real, parameter, public :: & + load_factor = 0.5625 + +!! The size of the pools of allocated map entries + integer(int32), parameter :: pool_size = 64 + + character(*), parameter, private :: module_name = 'STDLIB_HASHMAPS' + + type, abstract :: hashmap_type +!! Version: Experimental +!! +!! Type implementing an abstract hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-hashmap_type-abstract-type)) + private + integer(int_calls) :: call_count = 0 +!! Number of calls + integer(int_calls) :: probe_count = 0 +!! Number of probes since last expansion + integer(int_calls) :: total_probes = 0 +!! Cumulative number of probes + integer(int_index) :: num_entries = 0 +!! Number of entries + integer(int_index) :: num_free = 0 +!! Number of elements in the free_list + integer(int32) :: nbits = default_bits +!! Number of bits used to address the slots + procedure(hasher_fun), pointer, nopass :: hasher => fnv_1_hasher +!! Hash function + + contains + procedure, non_overridable, pass(map) :: calls + procedure, non_overridable, pass(map) :: entries + procedure, non_overridable, pass(map) :: map_probes + procedure, non_overridable, pass(map) :: num_slots + procedure, non_overridable, pass(map) :: slots_bits + procedure(get_all_keys), deferred, pass(map) :: get_all_keys + procedure(init_map), deferred, pass(map) :: init + procedure(loading), deferred, pass(map) :: loading + procedure(rehash_map), deferred, pass(map) :: rehash + procedure(total_depth), deferred, pass(map) :: total_depth + + !! Key_test procedures. + procedure(key_key_test), deferred, pass(map) :: key_key_test + procedure, non_overridable, pass(map) :: int8_key_test + procedure, non_overridable, pass(map) :: int32_key_test + procedure, non_overridable, pass(map) :: char_key_test + generic, public :: key_test => key_key_test, int8_key_test, int32_key_test, char_key_test + + ! Map_entry procedures + procedure(key_map_entry), deferred, pass(map) :: key_map_entry + procedure, non_overridable, pass(map) :: int8_map_entry + procedure, non_overridable, pass(map) :: int32_map_entry + procedure, non_overridable, pass(map) :: char_map_entry + generic, public :: map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry + + ! Get_other_data procedures + procedure(key_get_other_data), deferred, pass(map) :: key_get_other_data + procedure, non_overridable, pass(map) :: int8_get_other_data + procedure, non_overridable, pass(map) :: int32_get_other_data + procedure, non_overridable, pass(map) :: char_get_other_data + generic, public :: get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data + + ! Key_remove_entry procedures + procedure(key_remove_entry), deferred, pass(map) :: key_remove_entry + procedure, non_overridable, pass(map) :: int8_remove_entry + procedure, non_overridable, pass(map) :: int32_remove_entry + procedure, non_overridable, pass(map) :: char_remove_entry + generic, public :: remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry + + ! Set_other_data procedures + procedure(key_set_other_data), deferred, pass(map) :: key_set_other_data + procedure, non_overridable, pass(map) :: int8_set_other_data + procedure, non_overridable, pass(map) :: int32_set_other_data + procedure, non_overridable, pass(map) :: char_set_other_data + generic, public :: set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data + + end type hashmap_type + + + abstract interface + + subroutine get_all_keys(map, all_keys) +!! Version: Experimental +!! +!! Returns the all keys contained in a hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#get_all_keys-returns-all-the-keys-contained-in-a-map)) +!! +!! Arguments: +!! map - a hash map +!! all_keys - all the keys contained in a hash map +! + import hashmap_type, key_type + class(hashmap_type), intent(in) :: map + type(key_type), allocatable, intent(out) :: all_keys(:) + end subroutine get_all_keys - subroutine key_test(map, key, present) + subroutine key_get_other_data( map, key, other, exists ) !! Version: Experimental !! -!! Returns a logical flag indicating whether KEY exists in the hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) -!! -!! Arguments: -!! map - the hash map of interest -!! key - the key of interest -!! present - a flag indicating whether key is present in the map -! - import hashmap_type, key_type - class(hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - logical, intent(out) :: present - end subroutine key_test +!! Returns the other data associated with the inverse table index +!! Arguments: +!! map - a hash map +!! key - the key associated with a map entry +!! other - the other data associated with the key +!! exists - a logical flag indicating whether an entry with that key exists +! + import hashmap_type, key_type, other_type + class(hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + end subroutine key_get_other_data - pure function loading( map ) -!! Version: Experimental -!! -!! Returns the number of entries relative to slots in a hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#loading-returns-the-ratio-of-entries-to-slots)) + subroutine init_map( map, & + hasher, & + slots_bits, & + status ) +!! Version: Experimental !! -!! Arguments: -!! map - a hash map - import hashmap_type - class(hashmap_type), intent(in) :: map - real :: loading - end function loading - - subroutine map_entry(map, key, other, conflict) -!! Version: Experimental -!! -!! Inserts an entry into the hash table -!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) -!! - import hashmap_type, key_type, other_type - class(hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(in), optional :: other - logical, intent(out), optional :: conflict - end subroutine map_entry - - subroutine rehash_map( map, hasher ) -!! Version: Experimental -!! -!! Changes the hashing method of the table entries to that of HASHER. -!! Arguments: -!! map the table to be rehashed -!! hasher the hasher function to be used for the table -! - import hashmap_type, hasher_fun - class(hashmap_type), intent(inout) :: map - procedure(hasher_fun) :: hasher - end subroutine rehash_map - - subroutine remove_entry(map, key, existed) ! Chase's delent -!! Version: Experimental -!! -!! Remove the entry, if any, that has the key -!! Arguments: -!! map - the table from which the entry is to be removed -!! key - the key to an entry -!! existed - a logical flag indicating whether an entry with the key -!! was present in the original map -! - import hashmap_type, key_type - class(hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - logical, intent(out), optional :: existed - end subroutine remove_entry - - subroutine set_other( map, key, other, exists ) -!! Version: Experimental -!! -!! Change the other data associated with the key -!! Arguments: -!! map - the map with the entry of interest -!! key - the key to the entry inthe map -!! other - the new data to be associated with the key -!! exists - a logical flag indicating whether the key is already entered -!! in the map +!! Routine to allocate an empty map with HASHER as the hash function, +!! 2**SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a +!! maximum of 2**MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots), +!! map % inverse elements. All fields are initialized. +!! Arguments: +!! map - the hash maap to be initialized +!! hasher - the hash function to be used to map keys to slots +!! slots_bits - the number of bits initially used to map to the slots +!! status - an integer error status flag with the allowed values: +!! success - no problems were found +!! alloc_fault - map % slots or map % inverse could not be allocated +!! array_size_error - slots_bits or max_bits is less than +!! default_bits or greater than strict_max_bits +!! real_value_error - load_factor is less than 0.375 or greater than +!! 0.875 +! + import hashmap_type, hasher_fun, int32 + class(hashmap_type), intent(out) :: map + procedure(hasher_fun) :: hasher + integer, intent(in), optional :: slots_bits + integer(int32), intent(out), optional :: status + end subroutine init_map + + subroutine key_key_test(map, key, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) +!! +!! Arguments: +!! map - the hash map of interest +!! key - the key of interest +!! present - a flag indicating whether key is present in the map +! + import hashmap_type, key_type + class(hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + logical, intent(out) :: present + end subroutine key_key_test + + + pure function loading( map ) +!! Version: Experimental +!! +!! Returns the number of entries relative to slots in a hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#loading-returns-the-ratio-of-entries-to-slots)) +!! +!! Arguments: +!! map - a hash map + import hashmap_type + class(hashmap_type), intent(in) :: map + real :: loading + end function loading + + subroutine key_map_entry(map, key, other, conflict) +!! Version: Experimental +!! +!! Inserts an entry into the hash table +!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) !! -! - import hashmap_type, key_type, other_type - class(hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(in) :: other - logical, intent(out), optional :: exists - end subroutine set_other - - function total_depth( map ) -!! Version: Experimental -!! -!! Returns the total number of ones based offsets of slot entriesyy from -!! their slot index for a hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#total_depth-returns-the-total-depth-of-the-hash-map-entries)) -!! Arguments: -!! map - a hash map - import hashmap_type, int64 - class(hashmap_type), intent(in) :: map - integer(int64) :: total_depth - end function total_depth - - end interface - -!! API for the chaining_hashmap_type - - type :: chaining_map_entry_type ! Hash entry -!! Version: Experimental -!! -!! Chaining hash map entry type -!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type-derived-type)) - private - integer(int_hash) :: hash_val -!! Full hash value - type(key_type) :: key -!! The entry's key - type(other_type) :: other -!! Other entry data - integer(int_index) :: inmap -!! Index into inverse table - type(chaining_map_entry_type), pointer :: next => null() -!! Next bucket - end type chaining_map_entry_type - - - type chaining_map_entry_ptr -!! Version: Experimental + import hashmap_type, key_type, other_type + class(hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + end subroutine key_map_entry + + subroutine rehash_map( map, hasher ) +!! Version: Experimental +!! +!! Changes the hashing method of the table entries to that of HASHER. +!! Arguments: +!! map the table to be rehashed +!! hasher the hasher function to be used for the table +! + import hashmap_type, hasher_fun + class(hashmap_type), intent(inout) :: map + procedure(hasher_fun) :: hasher + end subroutine rehash_map + + subroutine key_remove_entry(map, key, existed) ! Chase's delent +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! key - the key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + import hashmap_type, key_type + class(hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + logical, intent(out), optional :: existed + end subroutine key_remove_entry + + subroutine key_set_other_data( map, key, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! key - the key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map !! -!! Wrapper for a pointer to a chaining map entry type object -!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type_ptr-derived-type)) - type(chaining_map_entry_type), pointer :: target => null() - end type chaining_map_entry_ptr - - - type :: chaining_map_entry_pool -!! Version: Experimental -!! -!! Type implementing a pool of allocated `chaining_map_entry_type` -!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_pool-derived-type)) - private -! Index of next bucket - integer(int_index) :: next = 0 - type(chaining_map_entry_type), allocatable :: more_map_entries(:) - type(chaining_map_entry_pool), pointer :: lastpool => null() - end type chaining_map_entry_pool - - - type, extends(hashmap_type) :: chaining_hashmap_type -!! Version: Experimental -!! -!! Type implementing the `chaining_hashmap_type` types -!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_hashmap_type-derived-type)) - private - type(chaining_map_entry_pool), pointer :: cache => null() -!! Pool of allocated chaining_map_entry_type objects - type(chaining_map_entry_type), pointer :: free_list => null() -!! free list of map entries - type(chaining_map_entry_ptr), allocatable :: inverse(:) -!! Array of bucket lists (inverses) Note max_elts=size(inverse) - type(chaining_map_entry_ptr), allocatable :: slots(:) -!! Array of bucket lists Note # slots=size(slots) - contains - procedure :: get_all_keys => get_all_chaining_keys - procedure :: get_other_data => get_other_chaining_data - procedure :: init => init_chaining_map - procedure :: loading => chaining_loading - procedure :: map_entry => map_chain_entry - procedure :: rehash => rehash_chaining_map - procedure :: remove => remove_chaining_entry - procedure :: set_other_data => set_other_chaining_data - procedure :: total_depth => total_chaining_depth - procedure :: key_test => chaining_key_test - final :: free_chaining_map - end type chaining_hashmap_type - - - interface - - module subroutine free_chaining_map( map ) -!! Version: Experimental -!! -!! Frees internal memory of an chaining map -!! Arguments: -!! map - the chaining hash map whose memory is to be freed -! - type(chaining_hashmap_type), intent(inout) :: map - end subroutine free_chaining_map - - - module subroutine get_all_chaining_keys(map, all_keys) -!! Version: Experimental -!! -!! Returns all the keys contained in a hashmap -!! Arguments: -!! map - an chaining hash map -!! all_keys - all the keys contained in a hash map -! - class(chaining_hashmap_type), intent(in) :: map - type(key_type), allocatable, intent(out) :: all_keys(:) - end subroutine get_all_chaining_keys - - - module subroutine get_other_chaining_data( map, key, other, exists ) -!! Version: Experimental -!! -!! Returns the other data associated with the inverse table index -!! Arguments: -!! map - a chaining hash table -!! key - the key associated with a map entry -!! other - the other data associated with the key -!! exists - a logical flag indicating whether an entry with that key exists -! - class(chaining_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(out) :: other - logical, intent(out), optional :: exists - end subroutine get_other_chaining_data - - - module subroutine init_chaining_map( map, & - hasher, & - slots_bits, & - status ) -!! Version: Experimental -!! -!! Routine to allocate an empty map with HASHER as the hash function, -!! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited -!! to a maximum of 2**MAX_BITS. All fields are initialized. -!! Arguments: -!! map - the chaining hash map to be initialized -!! hasher - the hash function to be used to map keys to slots -!! slots_bits - the bits of two used to initialize the number of slots -!! status - an integer error status flag with the allowed values: -!! success - no problems were found -!! alloc_fault - map % slots or map % inverse could not be allocated -!! array_size_error - slots_bits is less than default_bits or -!! greater than max_bits -! - class(chaining_hashmap_type), intent(out) :: map - procedure(hasher_fun) :: hasher - integer, intent(in), optional :: slots_bits - integer(int32), intent(out), optional :: status - end subroutine init_chaining_map - - - module subroutine chaining_key_test(map, key, present) -!! Version: Experimental -!! -!! Returns a logical flag indicating whether KEY is present in the hash map -!! Arguments: -!! map - the hash map of interest -!! key - the key of interest -!! present - a logical flag indicating whether key is present in map -! - class(chaining_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - logical, intent(out) :: present - end subroutine chaining_key_test - - - pure module function chaining_loading( map ) -!! Version: Experimental -!! -!! Returns the number of entries relative to slots in a hash map -!! Arguments: -!! map - a chaining hash map - class(chaining_hashmap_type), intent(in) :: map - real :: chaining_loading - end function chaining_loading - - - module subroutine map_chain_entry(map, key, other, conflict) -! -! Inserts an entry innto the hash map -! Arguments: -!! map - the hash table of interest -!! key - the key identifying the entry -!! other - other data associated with the key -!! conflict - logical flag indicating whether the entry key conflicts -!! with an existing key -! - class(chaining_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(in), optional :: other - logical, intent(out), optional :: conflict - end subroutine map_chain_entry - - - module subroutine rehash_chaining_map( map, hasher ) -!! Version: Experimental -!! -!! Changes the hashing method of the table entries to that of HASHER. -!! Arguments: -!! map the table to be rehashed -!! hasher the hasher function to be used for the table -! - class(chaining_hashmap_type), intent(inout) :: map - procedure(hasher_fun) :: hasher - end subroutine rehash_chaining_map - - - module subroutine remove_chaining_entry(map, key, existed) -!! Version: Experimental -!! -!! Remove the entry, if any, that has the key -!! Arguments: -!! map - the table from which the entry is to be removed -!! key - the key to an entry -!! existed - a logical flag indicating whether an entry with the key -!! was present in the original map -! - class(chaining_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - logical, intent(out), optional :: existed - end subroutine remove_chaining_entry - +! + import hashmap_type, key_type, other_type + class(hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + end subroutine key_set_other_data + + function total_depth( map ) +!! Version: Experimental +!! +!! Returns the total number of ones based offsets of slot entriesyy from +!! their slot index for a hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#total_depth-returns-the-total-depth-of-the-hash-map-entries)) +!! Arguments: +!! map - a hash map + import hashmap_type, int64 + class(hashmap_type), intent(in) :: map + integer(int64) :: total_depth + end function total_depth + + end interface + +!! API for the chaining_hashmap_type + + type :: chaining_map_entry_type ! Hash entry +!! Version: Experimental +!! +!! Chaining hash map entry type +!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type-derived-type)) + private + integer(int_hash) :: hash_val +!! Full hash value + type(key_type) :: key +!! The entry's key + type(other_type) :: other +!! Other entry data + integer(int_index) :: inmap +!! Index into inverse table + type(chaining_map_entry_type), pointer :: next => null() +!! Next bucket + end type chaining_map_entry_type + + + type chaining_map_entry_ptr +!! Version: Experimental +!! +!! Wrapper for a pointer to a chaining map entry type object +!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type_ptr-derived-type)) + type(chaining_map_entry_type), pointer :: target => null() + end type chaining_map_entry_ptr + + + type :: chaining_map_entry_pool +!! Version: Experimental +!! +!! Type implementing a pool of allocated `chaining_map_entry_type` +!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_pool-derived-type)) + private +! Index of next bucket + integer(int_index) :: next = 0 + type(chaining_map_entry_type), allocatable :: more_map_entries(:) + type(chaining_map_entry_pool), pointer :: lastpool => null() + end type chaining_map_entry_pool + + + type, extends(hashmap_type) :: chaining_hashmap_type +!! Version: Experimental +!! +!! Type implementing the `chaining_hashmap_type` types +!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_hashmap_type-derived-type)) + private + type(chaining_map_entry_pool), pointer :: cache => null() +!! Pool of allocated chaining_map_entry_type objects + type(chaining_map_entry_type), pointer :: free_list => null() +!! free list of map entries + type(chaining_map_entry_ptr), allocatable :: inverse(:) +!! Array of bucket lists (inverses) Note max_elts=size(inverse) + type(chaining_map_entry_ptr), allocatable :: slots(:) +!! Array of bucket lists Note # slots=size(slots) + contains + procedure :: get_all_keys => get_all_chaining_keys + procedure :: key_get_other_data => get_other_chaining_data + procedure :: init => init_chaining_map + procedure :: loading => chaining_loading + procedure :: key_map_entry => map_chain_entry + procedure :: rehash => rehash_chaining_map + procedure :: key_remove_entry => remove_chaining_entry + procedure :: key_set_other_data => set_other_chaining_data + procedure :: total_depth => total_chaining_depth + procedure :: key_key_test => chaining_key_test + final :: free_chaining_map + end type chaining_hashmap_type + + + interface + + module subroutine free_chaining_map( map ) +!! Version: Experimental +!! +!! Frees internal memory of an chaining map +!! Arguments: +!! map - the chaining hash map whose memory is to be freed +! + type(chaining_hashmap_type), intent(inout) :: map + end subroutine free_chaining_map + + + module subroutine get_all_chaining_keys(map, all_keys) +!! Version: Experimental +!! +!! Returns all the keys contained in a hashmap +!! Arguments: +!! map - an chaining hash map +!! all_keys - all the keys contained in a hash map +! + class(chaining_hashmap_type), intent(in) :: map + type(key_type), allocatable, intent(out) :: all_keys(:) + end subroutine get_all_chaining_keys + + + module subroutine get_other_chaining_data( map, key, other, exists ) +!! Version: Experimental +!! +!! Returns the other data associated with the inverse table index +!! Arguments: +!! map - a chaining hash table +!! key - the key associated with a map entry +!! other - the other data associated with the key +!! exists - a logical flag indicating whether an entry with that key exists +! + class(chaining_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + end subroutine get_other_chaining_data + + + module subroutine init_chaining_map( map, & + hasher, & + slots_bits, & + status ) +!! Version: Experimental +!! +!! Routine to allocate an empty map with HASHER as the hash function, +!! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited +!! to a maximum of 2**MAX_BITS. All fields are initialized. +!! Arguments: +!! map - the chaining hash map to be initialized +!! hasher - the hash function to be used to map keys to slots +!! slots_bits - the bits of two used to initialize the number of slots +!! status - an integer error status flag with the allowed values: +!! success - no problems were found +!! alloc_fault - map % slots or map % inverse could not be allocated +!! array_size_error - slots_bits is less than default_bits or +!! greater than max_bits +! + class(chaining_hashmap_type), intent(out) :: map + procedure(hasher_fun) :: hasher + integer, intent(in), optional :: slots_bits + integer(int32), intent(out), optional :: status + end subroutine init_chaining_map + + + module subroutine chaining_key_test(map, key, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY is present in the hash map +!! Arguments: +!! map - the hash map of interest +!! key - the key of interest +!! present - a logical flag indicating whether key is present in map +! + class(chaining_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + logical, intent(out) :: present + end subroutine chaining_key_test + + + pure module function chaining_loading( map ) +!! Version: Experimental +!! +!! Returns the number of entries relative to slots in a hash map +!! Arguments: +!! map - a chaining hash map + class(chaining_hashmap_type), intent(in) :: map + real :: chaining_loading + end function chaining_loading - module subroutine set_other_chaining_data( map, key, other, exists ) -!! Version: Experimental -!! -!! Change the other data associated with the key -!! Arguments: -!! map - the map with the entry of interest -!! key - the key to the entry inthe map -!! other - the new data to be associated with the key -!! exists - a logical flag indicating whether the key is already entered -!! in the map + + module subroutine map_chain_entry(map, key, other, conflict) +! +! Inserts an entry innto the hash map +! Arguments: +!! map - the hash table of interest +!! key - the key identifying the entry +!! other - other data associated with the key +!! conflict - logical flag indicating whether the entry key conflicts +!! with an existing key ! class(chaining_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(in) :: other - logical, intent(out), optional :: exists - end subroutine set_other_chaining_data + type(key_type), intent(in) :: key + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + end subroutine map_chain_entry - module function total_chaining_depth( map ) result(total_depth) + module subroutine rehash_chaining_map( map, hasher ) !! Version: Experimental !! -!! Returns the total number of ones based offsets of slot entries from -!! their slot index for a hash map -!! Arguments: -!! map - an chaining hash map - class(chaining_hashmap_type), intent(in) :: map - integer(int_depth) :: total_depth - end function total_chaining_depth - - end interface +!! Changes the hashing method of the table entries to that of HASHER. +!! Arguments: +!! map the table to be rehashed +!! hasher the hasher function to be used for the table +! + class(chaining_hashmap_type), intent(inout) :: map + procedure(hasher_fun) :: hasher + end subroutine rehash_chaining_map + -!! API for the open_hashmap_type - - type :: open_map_entry_type -!! Version: Experimental -!! -!! Open hash map entry type -!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_type-derived-type)) - private - integer(int_hash) :: hash_val -!! Full hash value - type(key_type) :: key -!! Hash entry key - type(other_type) :: other -!! Other entry data - integer(int_index) :: inmap -!! Index into inverse table - end type open_map_entry_type - - type :: open_map_entry_list -!! Version: Experimental -!! -!! Open hash map entry type - private - type(open_map_entry_type), pointer :: target => null() - type(open_map_entry_list), pointer :: next => null() - end type open_map_entry_list - - - type open_map_entry_ptr -!! Version: Experimental -!! -!! Wrapper for a pointer to an open hash map entry type object -!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_ptr-derived-type)) - type(open_map_entry_type), pointer :: target => null() - end type open_map_entry_ptr - - - type :: open_map_entry_pool -!! Version: Experimental -!! -!! Type implementing a pool of allocated `open_map_entry_type` - private - integer(int_index) :: next = 0 -!! Index of next bucket - type(open_map_entry_type), allocatable :: more_map_entries(:) - type(open_map_entry_pool), pointer :: lastpool => null() - end type open_map_entry_pool - + module subroutine remove_chaining_entry(map, key, existed) +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! key - the key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(chaining_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + logical, intent(out), optional :: existed + end subroutine remove_chaining_entry + + + module subroutine set_other_chaining_data( map, key, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! key - the key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +! + class(chaining_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + end subroutine set_other_chaining_data + + + module function total_chaining_depth( map ) result(total_depth) +!! Version: Experimental +!! +!! Returns the total number of ones based offsets of slot entries from +!! their slot index for a hash map +!! Arguments: +!! map - an chaining hash map + class(chaining_hashmap_type), intent(in) :: map + integer(int_depth) :: total_depth + end function total_chaining_depth + + end interface + +!! API for the open_hashmap_type - type, extends(hashmap_type) :: open_hashmap_type + type :: open_map_entry_type !! Version: Experimental !! -!! Type implementing an "open" hash map - private - integer(int_index) :: index_mask = 2_int_index**default_bits-1 -!! Mask used in linear addressing - type(open_map_entry_pool), pointer :: cache => null() -!! Pool of allocated open_map_entry_type objects - type(open_map_entry_list), pointer :: free_list => null() -!! free list of map entries - type(open_map_entry_ptr), allocatable :: inverse(:) -!! Array of bucket lists (inverses) Note max_elts=size(inverse) - integer(int_index), allocatable :: slots(:) -!! Array of indices to the inverse Note # slots=size(slots) - contains - procedure :: get_all_keys => get_all_open_keys - procedure :: get_other_data => get_other_open_data - procedure :: init => init_open_map - procedure :: loading => open_loading - procedure :: map_entry => map_open_entry - procedure :: rehash => rehash_open_map - procedure :: remove => remove_open_entry - procedure :: set_other_data => set_other_open_data - procedure :: total_depth => total_open_depth - procedure :: key_test => open_key_test - final :: free_open_map - end type open_hashmap_type - - interface - - module subroutine free_open_map( map ) -!! Version: Experimental -!! -!! Frees internal memory of an open map -!! Arguments: -!! map - the open hash map whose memory is to be freed -! - type(open_hashmap_type), intent(inout) :: map - end subroutine free_open_map - - - module subroutine get_all_open_keys(map, all_keys) -!! Version: Experimental -!! -!! Returns all the keys contained in a hashmap -!! Arguments: -!! map - an open hash map -!! all_keys - all the keys contained in a hash map -! - class(open_hashmap_type), intent(in) :: map - type(key_type), allocatable, intent(out) :: all_keys(:) - end subroutine get_all_open_keys - - - module subroutine get_other_open_data( map, key, other, exists ) -!! Version: Experimental -!! -!! Returns the other data associated with the inverse table index -!! Arguments: -!! map - an open hash table -!! key - the key associated with a map entry -!! other - the other data associated with the key -!! exists - a logical flag indicating whether an entry with that key exists -! - class(open_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(out) :: other - logical, intent(out), optional :: exists - end subroutine get_other_open_data - - - module subroutine init_open_map( map, & - hasher, & - slots_bits, & - status ) -!! Version: Experimental -!! -!! Routine to allocate an empty map with HASHER as the hash function, -!! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a -!! maximum of 2**MAX_BITS. All fields are initialized. -!! Arguments: -!! map - the open hash maap to be initialized -!! hasher - the hash function to be used to map keys to slots -!! slots_bits - the number of bits used to map to the slots -!! status - an integer error status flag with the allowed values: -!! success - no problems were found -!! alloc_fault - map % slots or map % inverse could not be allocated -!! array_size_error - slots_bits is less than default_bitd or -!! greater than max_bits - - class(open_hashmap_type), intent(out) :: map - procedure(hasher_fun) :: hasher - integer, intent(in), optional :: slots_bits - integer(int32), intent(out), optional :: status - end subroutine init_open_map - - - module subroutine open_key_test(map, key, present) -!! Version: Experimental -!! -!! Returns a logical flag indicating whether KEY exists in the hash map -!! Arguments: -!! map - the hash map of interest -!! key - the key of interest -!! present - a logical flag indicating whether KEY exists in the hash map -! - class(open_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - logical, intent(out) :: present - end subroutine open_key_test - - - pure module function open_loading( map ) -!! Version: Experimental -!! -!! Returns the number of entries relative to slots in a hash map -!! Arguments: -!! map - an open hash map - class(open_hashmap_type), intent(in) :: map - real :: open_loading - end function open_loading - - - module subroutine map_open_entry(map, key, other, conflict) -!! Version: Experimental -!! -!! Inserts an entry into the hash table +!! Open hash map entry type +!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_type-derived-type)) + private + integer(int_hash) :: hash_val +!! Full hash value + type(key_type) :: key +!! Hash entry key + type(other_type) :: other +!! Other entry data + integer(int_index) :: inmap +!! Index into inverse table + end type open_map_entry_type + + type :: open_map_entry_list +!! Version: Experimental +!! +!! Open hash map entry type + private + type(open_map_entry_type), pointer :: target => null() + type(open_map_entry_list), pointer :: next => null() + end type open_map_entry_list + + + type open_map_entry_ptr +!! Version: Experimental +!! +!! Wrapper for a pointer to an open hash map entry type object +!! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_ptr-derived-type)) + type(open_map_entry_type), pointer :: target => null() + end type open_map_entry_ptr + + + type :: open_map_entry_pool +!! Version: Experimental +!! +!! Type implementing a pool of allocated `open_map_entry_type` + private + integer(int_index) :: next = 0 +!! Index of next bucket + type(open_map_entry_type), allocatable :: more_map_entries(:) + type(open_map_entry_pool), pointer :: lastpool => null() + end type open_map_entry_pool + + + type, extends(hashmap_type) :: open_hashmap_type +!! Version: Experimental +!! +!! Type implementing an "open" hash map + private + integer(int_index) :: index_mask = 2_int_index**default_bits-1 +!! Mask used in linear addressing + type(open_map_entry_pool), pointer :: cache => null() +!! Pool of allocated open_map_entry_type objects + type(open_map_entry_list), pointer :: free_list => null() +!! free list of map entries + type(open_map_entry_ptr), allocatable :: inverse(:) +!! Array of bucket lists (inverses) Note max_elts=size(inverse) + integer(int_index), allocatable :: slots(:) +!! Array of indices to the inverse Note # slots=size(slots) + contains + procedure :: get_all_keys => get_all_open_keys + procedure :: key_get_other_data => get_other_open_data + procedure :: init => init_open_map + procedure :: loading => open_loading + procedure :: key_map_entry => map_open_entry + procedure :: rehash => rehash_open_map + procedure :: key_remove_entry => remove_open_entry + procedure :: key_set_other_data => set_other_open_data + procedure :: total_depth => total_open_depth + procedure :: key_key_test => open_key_test + final :: free_open_map + end type open_hashmap_type + + interface + + module subroutine free_open_map( map ) +!! Version: Experimental +!! +!! Frees internal memory of an open map +!! Arguments: +!! map - the open hash map whose memory is to be freed +! + type(open_hashmap_type), intent(inout) :: map + end subroutine free_open_map + + + module subroutine get_all_open_keys(map, all_keys) +!! Version: Experimental +!! +!! Returns all the keys contained in a hashmap +!! Arguments: +!! map - an open hash map +!! all_keys - all the keys contained in a hash map +! + class(open_hashmap_type), intent(in) :: map + type(key_type), allocatable, intent(out) :: all_keys(:) + end subroutine get_all_open_keys + + + module subroutine get_other_open_data( map, key, other, exists ) +!! Version: Experimental +!! +!! Returns the other data associated with the inverse table index +!! Arguments: +!! map - an open hash table +!! key - the key associated with a map entry +!! other - the other data associated with the key +!! exists - a logical flag indicating whether an entry with that key exists +! + class(open_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + end subroutine get_other_open_data + + + module subroutine init_open_map( map, & + hasher, & + slots_bits, & + status ) +!! Version: Experimental +!! +!! Routine to allocate an empty map with HASHER as the hash function, +!! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a +!! maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: -!! map - the hash table of interest -!! key - the key identifying the entry -!! other - other data associated with the key -!! conflict - logical flag indicating whether the entry key conflicts -!! with an existing key -! - class(open_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(in), optional :: other - logical, intent(out), optional :: conflict - end subroutine map_open_entry - - - module subroutine rehash_open_map( map, hasher ) -!! Version: Experimental -!! -!! Changes the hashing method of the table entries to that of HASHER. -!! Arguments: -!! map the table to be rehashed -!! hasher the hasher function to be used for the table -! - class(open_hashmap_type), intent(inout) :: map - procedure(hasher_fun) :: hasher - end subroutine rehash_open_map - - - module subroutine remove_open_entry(map, key, existed) -!! Remove the entry, if any, that has the key -!! Arguments: -!! map - the table from which the entry is to be removed -!! key - the key to an entry -!! existed - a logical flag indicating whether an entry with the key -!! was present in the original map -! - class(open_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - logical, intent(out), optional :: existed - end subroutine remove_open_entry - - - module subroutine set_other_open_data( map, key, other, exists ) -!! Version: Experimental -!! -!! Change the other data associated with the key -!! Arguments: -!! map - the map with the entry of interest -!! key - the key to the entry inthe map -!! other - the new data to be associated with the key -!! exists - a logical flag indicating whether the key is already entered -!! in the map -! - class(open_hashmap_type), intent(inout) :: map - type(key_type), intent(in) :: key - type(other_type), intent(in) :: other - logical, intent(out), optional :: exists - end subroutine set_other_open_data - - - module function total_open_depth( map ) result(total_depth) -!! Version: Experimental -!! -!! Returns the total number of ones based offsets of slot entries from -!! their slot index for a hash map -!! Arguments: -!! map - an open hash map - class(open_hashmap_type), intent(in) :: map - integer(int64) :: total_depth - end function total_open_depth - - end interface - -contains +!! map - the open hash maap to be initialized +!! hasher - the hash function to be used to map keys to slots +!! slots_bits - the number of bits used to map to the slots +!! status - an integer error status flag with the allowed values: +!! success - no problems were found +!! alloc_fault - map % slots or map % inverse could not be allocated +!! array_size_error - slots_bits is less than default_bitd or +!! greater than max_bits + + class(open_hashmap_type), intent(out) :: map + procedure(hasher_fun) :: hasher + integer, intent(in), optional :: slots_bits + integer(int32), intent(out), optional :: status + end subroutine init_open_map + + + module subroutine open_key_test(map, key, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! Arguments: +!! map - the hash map of interest +!! key - the key of interest +!! present - a logical flag indicating whether KEY exists in the hash map +! + class(open_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + logical, intent(out) :: present + end subroutine open_key_test + + + pure module function open_loading( map ) +!! Version: Experimental +!! +!! Returns the number of entries relative to slots in a hash map +!! Arguments: +!! map - an open hash map + class(open_hashmap_type), intent(in) :: map + real :: open_loading + end function open_loading + + + module subroutine map_open_entry(map, key, other, conflict) +!! Version: Experimental +!! +!! Inserts an entry into the hash table +!! Arguments: +!! map - the hash table of interest +!! key - the key identifying the entry +!! other - other data associated with the key +!! conflict - logical flag indicating whether the entry key conflicts +!! with an existing key +! + class(open_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + end subroutine map_open_entry + + + module subroutine rehash_open_map( map, hasher ) +!! Version: Experimental +!! +!! Changes the hashing method of the table entries to that of HASHER. +!! Arguments: +!! map the table to be rehashed +!! hasher the hasher function to be used for the table +! + class(open_hashmap_type), intent(inout) :: map + procedure(hasher_fun) :: hasher + end subroutine rehash_open_map + - pure function calls( map ) -!! Version: Experimental -!! -!! Returns the number of subroutine calls on an open hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#calls-returns-the-number-of-calls-on-the-hash-map)) -!! -!! Arguments: -!! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_calls) :: calls - - calls = map % call_count + module subroutine remove_open_entry(map, key, existed) +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! key - the key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(open_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + logical, intent(out), optional :: existed + end subroutine remove_open_entry - end function calls - - pure function entries( map ) -!! Version: Experimental -!! -!! Returns the number of entries in a hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#entries-returns-the-number-of-entries-in-the-hash-map)) -!! -!! Arguments: -!! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_index) :: entries - - entries = map % num_entries - - end function entries - + + module subroutine set_other_open_data( map, key, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! key - the key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +! + class(open_hashmap_type), intent(inout) :: map + type(key_type), intent(in) :: key + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + end subroutine set_other_open_data - pure function map_probes( map ) -!! Version: Experimental -!! -!! Returns the total number of table probes on a hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_probes-returns-the-number-of-hash-map-probes)) -!! + + module function total_open_depth( map ) result(total_depth) +!! Version: Experimental +!! +!! Returns the total number of ones based offsets of slot entries from +!! their slot index for a hash map !! Arguments: !! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_calls) :: map_probes - - map_probes = map % total_probes + map % probe_count - - end function map_probes - - - pure function num_slots( map ) -!! Version: Experimental -!! -!! Returns the number of allocated slots in a hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#num_slots-returns-the-number-of-hash-map-slots)) -!! -!! Arguments: -!! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_index) :: num_slots - - num_slots = 2**map % nbits - - end function num_slots - - - pure function slots_bits( map ) -!! Version: Experimental -!! -!! Returns the number of bits used to specify the number of allocated -!! slots in a hash map -!! ([Specifications](../page/specs/stdlib_hashmaps.html#slots_bits-returns-the-number-of-bits-used-to-address-the-hash-map-slots)) -!! -!! Arguments: -!! map - an open hash map - class(hashmap_type), intent(in) :: map - integer :: slots_bits - - slots_bits = map % nbits - - end function slots_bits - - -end module stdlib_hashmaps + class(open_hashmap_type), intent(in) :: map + integer(int64) :: total_depth + end function total_open_depth + + end interface + + + contains + + + subroutine int8_get_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Int8 key generic interface for get_other_data function + + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_get_other_data( key, other, exists ) + + end subroutine int8_get_other_data + + + subroutine int32_get_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Int32 key generic interface for get_other_data function + + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_get_other_data( key, other, exists ) + + end subroutine int32_get_other_data + + + subroutine char_get_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Character key generic interface for get_other_data function + + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_get_other_data( key, other, exists ) + + end subroutine char_get_other_data + + + subroutine int8_remove_entry(map, value, existed) ! Chase's delent +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! value - the int8 array key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + logical, intent(out), optional :: existed + + type(key_type) :: key + + call set( key, value ) + + call map % key_remove_entry( key, existed ) + + end subroutine int8_remove_entry + + + subroutine int32_remove_entry(map, value, existed) ! Chase's delent +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! key - the key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + logical, intent(out), optional :: existed + + type(key_type) :: key + + call set( key, value ) + + call map % key_remove_entry( key, existed ) + + end subroutine int32_remove_entry + + + subroutine char_remove_entry(map, value, existed) ! Chase's delent +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! key - the key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + logical, intent(out), optional :: existed + + type(key_type) :: key + + call set( key, value ) + + call map % key_remove_entry( key, existed ) + + end subroutine char_remove_entry + + + subroutine int8_map_entry(map, value, other, conflict) + !! Version: Experimental + !! Int8 generic interface for map entry + !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) + !! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + + type(key_type) :: key + + call set( key, value ) + + call map % key_map_entry( key, other, conflict ) + + end subroutine int8_map_entry + + + subroutine int32_map_entry(map, value, other, conflict) +!! Version: Experimental +!! +!! Inserts an entry into the hash table +!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) +!! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + + type(key_type) :: key + + call set( key, value ) + + call map % key_map_entry( key, other, conflict ) + + end subroutine int32_map_entry + + + subroutine char_map_entry(map, value, other, conflict) +!! Version: Experimental +!! +!! Inserts an entry into the hash table +!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) +!! + class(hashmap_type), intent(inout) :: map + character(len=*), intent(in) :: value + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + + type(key_type) :: key + + call set( key, value ) + + call map % key_map_entry( key, other, conflict ) + + end subroutine char_map_entry + + + subroutine int8_key_test(map, value, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) +!! +!! Arguments: +!! map - the hash map of interest +!! value - int8 array that is the key to lookup. +!! present - a flag indicating whether key is present in the map +! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + logical, intent(out) :: present + + type(key_type) :: key + + ! Generate key from int8 array. + call set( key, value ) + + ! Call key test procedure. + call map % key_key_test( key, present ) + + end subroutine int8_key_test + + + subroutine int32_key_test(map, value, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) +!! +!! Arguments: +!! map - the hash map of interest +!! value - int32 array that is the key to lookup. +!! present - a flag indicating whether key is present in the map +! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + logical, intent(out) :: present + + type(key_type) :: key + + call set( key, value ) + + call map % key_key_test( key, present ) + + end subroutine int32_key_test + + + subroutine char_key_test(map, value, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) +!! +!! Arguments: +!! map - the hash map of interest +!! value - char array that is the key to lookup. +!! present - a flag indicating whether key is present in the map +! + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + logical, intent(out) :: present + + type(key_type) :: key + + call set( key, value ) + + call map % key_key_test( key, present ) + + end subroutine char_key_test + + + subroutine int8_set_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! value - the int8 array key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +!! +! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_set_other_data( key, other, exists ) + + end subroutine int8_set_other_data + + + subroutine int32_set_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! value - the int32 array key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +!! +! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_set_other_data( key, other, exists ) + + end subroutine int32_set_other_data + + + subroutine char_set_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! value - the char value key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +!! +! + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_set_other_data( key, other, exists ) + + end subroutine char_set_other_data + + + pure function calls( map ) +!! Version: Experimental +!! +!! Returns the number of subroutine calls on an open hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#calls-returns-the-number-of-calls-on-the-hash-map)) +!! +!! Arguments: +!! map - an open hash map + class(hashmap_type), intent(in) :: map + integer(int_calls) :: calls + + calls = map % call_count + + end function calls + + pure function entries( map ) +!! Version: Experimental +!! +!! Returns the number of entries in a hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#entries-returns-the-number-of-entries-in-the-hash-map)) +!! +!! Arguments: +!! map - an open hash map + class(hashmap_type), intent(in) :: map + integer(int_index) :: entries + + entries = map % num_entries + + end function entries + + + pure function map_probes( map ) +!! Version: Experimental +!! +!! Returns the total number of table probes on a hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_probes-returns-the-number-of-hash-map-probes)) +!! +!! Arguments: +!! map - an open hash map + class(hashmap_type), intent(in) :: map + integer(int_calls) :: map_probes + + map_probes = map % total_probes + map % probe_count + + end function map_probes + + + pure function num_slots( map ) +!! Version: Experimental +!! +!! Returns the number of allocated slots in a hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#num_slots-returns-the-number-of-hash-map-slots)) +!! +!! Arguments: +!! map - an open hash map + class(hashmap_type), intent(in) :: map + integer(int_index) :: num_slots + + num_slots = 2**map % nbits + + end function num_slots + + + pure function slots_bits( map ) +!! Version: Experimental +!! +!! Returns the number of bits used to specify the number of allocated +!! slots in a hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#slots_bits-returns-the-number-of-bits-used-to-address-the-hash-map-slots)) +!! +!! Arguments: +!! map - an open hash map + class(hashmap_type), intent(in) :: map + integer :: slots_bits + + slots_bits = map % nbits + + end function slots_bits + + +end module stdlib_hashmaps
  • @@ -1026,13 +1412,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_io.fypp.html b/sourcefile/stdlib_io.fypp.html index 5e3330544..3a027792d 100644 --- a/sourcefile/stdlib_io.fypp.html +++ b/sourcefile/stdlib_io.fypp.html @@ -688,13 +688,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_io_npy.fypp.html b/sourcefile/stdlib_io_npy.fypp.html index 6e9f471bb..ebc8a1edf 100644 --- a/sourcefile/stdlib_io_npy.fypp.html +++ b/sourcefile/stdlib_io_npy.fypp.html @@ -294,13 +294,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_io_npy_load.fypp.html b/sourcefile/stdlib_io_npy_load.fypp.html index eb7cb0df9..4340ce493 100644 --- a/sourcefile/stdlib_io_npy_load.fypp.html +++ b/sourcefile/stdlib_io_npy_load.fypp.html @@ -707,13 +707,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_io_npy_save.fypp.html b/sourcefile/stdlib_io_npy_save.fypp.html index b3abec58b..79c6c25f9 100644 --- a/sourcefile/stdlib_io_npy_save.fypp.html +++ b/sourcefile/stdlib_io_npy_save.fypp.html @@ -307,13 +307,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_kinds.fypp.html b/sourcefile/stdlib_kinds.fypp.html index dc1a1705e..ff0d0d734 100644 --- a/sourcefile/stdlib_kinds.fypp.html +++ b/sourcefile/stdlib_kinds.fypp.html @@ -195,13 +195,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg.fypp.html b/sourcefile/stdlib_linalg.fypp.html index ce213cc93..0ee27394e 100644 --- a/sourcefile/stdlib_linalg.fypp.html +++ b/sourcefile/stdlib_linalg.fypp.html @@ -1083,13 +1083,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas.fypp.html b/sourcefile/stdlib_linalg_blas.fypp.html index 52145a187..debb37652 100644 --- a/sourcefile/stdlib_linalg_blas.fypp.html +++ b/sourcefile/stdlib_linalg_blas.fypp.html @@ -2405,13 +2405,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas_aux.fypp.html b/sourcefile/stdlib_linalg_blas_aux.fypp.html index 9343a7fd0..a831ce389 100644 --- a/sourcefile/stdlib_linalg_blas_aux.fypp.html +++ b/sourcefile/stdlib_linalg_blas_aux.fypp.html @@ -628,13 +628,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas_c.fypp.html b/sourcefile/stdlib_linalg_blas_c.fypp.html index 49917db7d..ea441a1fe 100644 --- a/sourcefile/stdlib_linalg_blas_c.fypp.html +++ b/sourcefile/stdlib_linalg_blas_c.fypp.html @@ -5227,13 +5227,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas_d.fypp.html b/sourcefile/stdlib_linalg_blas_d.fypp.html index e8788732e..219e58b0b 100644 --- a/sourcefile/stdlib_linalg_blas_d.fypp.html +++ b/sourcefile/stdlib_linalg_blas_d.fypp.html @@ -4681,13 +4681,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas_q.fypp.html b/sourcefile/stdlib_linalg_blas_q.fypp.html index 12d7d95fb..0ef1449af 100644 --- a/sourcefile/stdlib_linalg_blas_q.fypp.html +++ b/sourcefile/stdlib_linalg_blas_q.fypp.html @@ -4674,13 +4674,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas_s.fypp.html b/sourcefile/stdlib_linalg_blas_s.fypp.html index a5ee92cab..458bbb90b 100644 --- a/sourcefile/stdlib_linalg_blas_s.fypp.html +++ b/sourcefile/stdlib_linalg_blas_s.fypp.html @@ -4683,13 +4683,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas_w.fypp.html b/sourcefile/stdlib_linalg_blas_w.fypp.html index b770d9297..ad5e57785 100644 --- a/sourcefile/stdlib_linalg_blas_w.fypp.html +++ b/sourcefile/stdlib_linalg_blas_w.fypp.html @@ -5222,13 +5222,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_blas_z.fypp.html b/sourcefile/stdlib_linalg_blas_z.fypp.html index f05274487..00832cbbb 100644 --- a/sourcefile/stdlib_linalg_blas_z.fypp.html +++ b/sourcefile/stdlib_linalg_blas_z.fypp.html @@ -5229,13 +5229,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_constants.fypp.html b/sourcefile/stdlib_linalg_constants.fypp.html index e0ee8488f..00540b182 100644 --- a/sourcefile/stdlib_linalg_constants.fypp.html +++ b/sourcefile/stdlib_linalg_constants.fypp.html @@ -182,13 +182,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_cross_product.fypp.html b/sourcefile/stdlib_linalg_cross_product.fypp.html index d4e25cecb..e4f6605d7 100644 --- a/sourcefile/stdlib_linalg_cross_product.fypp.html +++ b/sourcefile/stdlib_linalg_cross_product.fypp.html @@ -189,13 +189,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_determinant.fypp.html b/sourcefile/stdlib_linalg_determinant.fypp.html index b9aeac6d3..b0af94fa2 100644 --- a/sourcefile/stdlib_linalg_determinant.fypp.html +++ b/sourcefile/stdlib_linalg_determinant.fypp.html @@ -407,13 +407,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_diag.fypp.html b/sourcefile/stdlib_linalg_diag.fypp.html index ac07c1dd5..7945672a3 100644 --- a/sourcefile/stdlib_linalg_diag.fypp.html +++ b/sourcefile/stdlib_linalg_diag.fypp.html @@ -248,13 +248,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_kronecker.fypp.html b/sourcefile/stdlib_linalg_kronecker.fypp.html index 8c889d60d..0029bf5f2 100644 --- a/sourcefile/stdlib_linalg_kronecker.fypp.html +++ b/sourcefile/stdlib_linalg_kronecker.fypp.html @@ -198,13 +198,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_least_squares.fypp.html b/sourcefile/stdlib_linalg_least_squares.fypp.html index 0148c94ad..9e00aa621 100644 --- a/sourcefile/stdlib_linalg_least_squares.fypp.html +++ b/sourcefile/stdlib_linalg_least_squares.fypp.html @@ -550,13 +550,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_outer_product.fypp.html b/sourcefile/stdlib_linalg_outer_product.fypp.html index fb44f0f6b..9b69b6fa8 100644 --- a/sourcefile/stdlib_linalg_outer_product.fypp.html +++ b/sourcefile/stdlib_linalg_outer_product.fypp.html @@ -188,13 +188,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_solve.fypp.html b/sourcefile/stdlib_linalg_solve.fypp.html index ee491939f..ff21a286a 100644 --- a/sourcefile/stdlib_linalg_solve.fypp.html +++ b/sourcefile/stdlib_linalg_solve.fypp.html @@ -338,13 +338,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_state.fypp.html b/sourcefile/stdlib_linalg_state.fypp.html index 6cc8d9ea4..ff58e4f50 100644 --- a/sourcefile/stdlib_linalg_state.fypp.html +++ b/sourcefile/stdlib_linalg_state.fypp.html @@ -641,13 +641,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_linalg_svd.fypp.html b/sourcefile/stdlib_linalg_svd.fypp.html index 17114978e..474879971 100644 --- a/sourcefile/stdlib_linalg_svd.fypp.html +++ b/sourcefile/stdlib_linalg_svd.fypp.html @@ -461,13 +461,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_logger.f90.html b/sourcefile/stdlib_logger.f90.html index a71dbfcd6..e7ef164d5 100644 --- a/sourcefile/stdlib_logger.f90.html +++ b/sourcefile/stdlib_logger.f90.html @@ -1749,13 +1749,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math.fypp.html b/sourcefile/stdlib_math.fypp.html index e216c2237..e4df5a437 100644 --- a/sourcefile/stdlib_math.fypp.html +++ b/sourcefile/stdlib_math.fypp.html @@ -645,13 +645,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math_all_close.fypp.html b/sourcefile/stdlib_math_all_close.fypp.html index 67b560148..3fc43c974 100644 --- a/sourcefile/stdlib_math_all_close.fypp.html +++ b/sourcefile/stdlib_math_all_close.fypp.html @@ -193,13 +193,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math_arange.fypp.html b/sourcefile/stdlib_math_arange.fypp.html index 39c83a266..faae2ba68 100644 --- a/sourcefile/stdlib_math_arange.fypp.html +++ b/sourcefile/stdlib_math_arange.fypp.html @@ -222,13 +222,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math_diff.fypp.html b/sourcefile/stdlib_math_diff.fypp.html index 93bc40de5..73dcc0d4a 100644 --- a/sourcefile/stdlib_math_diff.fypp.html +++ b/sourcefile/stdlib_math_diff.fypp.html @@ -307,13 +307,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math_is_close.fypp.html b/sourcefile/stdlib_math_is_close.fypp.html index 45ed40994..501100684 100644 --- a/sourcefile/stdlib_math_is_close.fypp.html +++ b/sourcefile/stdlib_math_is_close.fypp.html @@ -215,13 +215,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math_linspace.fypp.html b/sourcefile/stdlib_math_linspace.fypp.html index f8ac5981b..446775e54 100644 --- a/sourcefile/stdlib_math_linspace.fypp.html +++ b/sourcefile/stdlib_math_linspace.fypp.html @@ -265,13 +265,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math_logspace.fypp.html b/sourcefile/stdlib_math_logspace.fypp.html index 1cc1387a5..b72558650 100644 --- a/sourcefile/stdlib_math_logspace.fypp.html +++ b/sourcefile/stdlib_math_logspace.fypp.html @@ -261,13 +261,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_math_meshgrid.fypp.html b/sourcefile/stdlib_math_meshgrid.fypp.html index 6e9388fda..70fa22344 100644 --- a/sourcefile/stdlib_math_meshgrid.fypp.html +++ b/sourcefile/stdlib_math_meshgrid.fypp.html @@ -218,13 +218,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_optval.fypp.html b/sourcefile/stdlib_optval.fypp.html index d622a94b9..f2e65ef2a 100644 --- a/sourcefile/stdlib_optval.fypp.html +++ b/sourcefile/stdlib_optval.fypp.html @@ -237,13 +237,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_quadrature.fypp.html b/sourcefile/stdlib_quadrature.fypp.html index e4629af44..60f3f2d02 100644 --- a/sourcefile/stdlib_quadrature.fypp.html +++ b/sourcefile/stdlib_quadrature.fypp.html @@ -300,13 +300,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_quadrature_gauss.f90.html b/sourcefile/stdlib_quadrature_gauss.f90.html index 55e8a78b1..8296bf5a7 100644 --- a/sourcefile/stdlib_quadrature_gauss.f90.html +++ b/sourcefile/stdlib_quadrature_gauss.f90.html @@ -288,13 +288,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_quadrature_simps.fypp.html b/sourcefile/stdlib_quadrature_simps.fypp.html index e3afa8fe5..efa5fdbf1 100644 --- a/sourcefile/stdlib_quadrature_simps.fypp.html +++ b/sourcefile/stdlib_quadrature_simps.fypp.html @@ -446,13 +446,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_quadrature_trapz.fypp.html b/sourcefile/stdlib_quadrature_trapz.fypp.html index abacd9289..86f66de2a 100644 --- a/sourcefile/stdlib_quadrature_trapz.fypp.html +++ b/sourcefile/stdlib_quadrature_trapz.fypp.html @@ -255,13 +255,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_random.fypp.html b/sourcefile/stdlib_random.fypp.html index d953d3c39..7f0efc30a 100644 --- a/sourcefile/stdlib_random.fypp.html +++ b/sourcefile/stdlib_random.fypp.html @@ -308,13 +308,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_selection.fypp.html b/sourcefile/stdlib_selection.fypp.html index 86f2b0c78..72f5dffb9 100644 --- a/sourcefile/stdlib_selection.fypp.html +++ b/sourcefile/stdlib_selection.fypp.html @@ -446,13 +446,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_sorting.fypp.html b/sourcefile/stdlib_sorting.fypp.html index ee093942c..15553f8fa 100644 --- a/sourcefile/stdlib_sorting.fypp.html +++ b/sourcefile/stdlib_sorting.fypp.html @@ -761,13 +761,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_sorting_ord_sort.fypp.html b/sourcefile/stdlib_sorting_ord_sort.fypp.html index 3e8566e3b..270079384 100644 --- a/sourcefile/stdlib_sorting_ord_sort.fypp.html +++ b/sourcefile/stdlib_sorting_ord_sort.fypp.html @@ -644,13 +644,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_sorting_radix_sort.f90.html b/sourcefile/stdlib_sorting_radix_sort.f90.html index 7110c09b7..7cc20bca1 100644 --- a/sourcefile/stdlib_sorting_radix_sort.f90.html +++ b/sourcefile/stdlib_sorting_radix_sort.f90.html @@ -634,13 +634,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_sorting_sort.fypp.html b/sourcefile/stdlib_sorting_sort.fypp.html index 272968cbd..cba66fb10 100644 --- a/sourcefile/stdlib_sorting_sort.fypp.html +++ b/sourcefile/stdlib_sorting_sort.fypp.html @@ -459,13 +459,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_sorting_sort_index.fypp.html b/sourcefile/stdlib_sorting_sort_index.fypp.html index db7f84659..8c7324932 100644 --- a/sourcefile/stdlib_sorting_sort_index.fypp.html +++ b/sourcefile/stdlib_sorting_sort_index.fypp.html @@ -704,13 +704,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_specialfunctions.f90.html b/sourcefile/stdlib_specialfunctions.f90.html index 193589c07..5274ce5b2 100644 --- a/sourcefile/stdlib_specialfunctions.f90.html +++ b/sourcefile/stdlib_specialfunctions.f90.html @@ -202,13 +202,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_specialfunctions_gamma.fypp.html b/sourcefile/stdlib_specialfunctions_gamma.fypp.html index 8ac1c8d6d..42c1ba540 100644 --- a/sourcefile/stdlib_specialfunctions_gamma.fypp.html +++ b/sourcefile/stdlib_specialfunctions_gamma.fypp.html @@ -1457,13 +1457,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_specialfunctions_legendre.f90.html b/sourcefile/stdlib_specialfunctions_legendre.f90.html index cc9cdbdc6..cc650612a 100644 --- a/sourcefile/stdlib_specialfunctions_legendre.f90.html +++ b/sourcefile/stdlib_specialfunctions_legendre.f90.html @@ -238,13 +238,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats.fypp.html b/sourcefile/stdlib_stats.fypp.html index 30336d176..6e127f716 100644 --- a/sourcefile/stdlib_stats.fypp.html +++ b/sourcefile/stdlib_stats.fypp.html @@ -810,13 +810,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_corr.fypp.html b/sourcefile/stdlib_stats_corr.fypp.html index 064f35ab1..98ef80004 100644 --- a/sourcefile/stdlib_stats_corr.fypp.html +++ b/sourcefile/stdlib_stats_corr.fypp.html @@ -479,13 +479,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_cov.fypp.html b/sourcefile/stdlib_stats_cov.fypp.html index 021990e44..da2cd39b5 100644 --- a/sourcefile/stdlib_stats_cov.fypp.html +++ b/sourcefile/stdlib_stats_cov.fypp.html @@ -79,7 +79,7 @@

    stdlib_stats_cov.fypp
  • 687 statements + title=" 0.9% of total for source files.">687 statements
  • @@ -466,13 +466,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_distribution_exponential.fypp.html b/sourcefile/stdlib_stats_distribution_exponential.fypp.html index fa032c520..239b3876f 100644 --- a/sourcefile/stdlib_stats_distribution_exponential.fypp.html +++ b/sourcefile/stdlib_stats_distribution_exponential.fypp.html @@ -497,13 +497,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_distribution_normal.fypp.html b/sourcefile/stdlib_stats_distribution_normal.fypp.html index b922cb9a9..4775e9b7d 100644 --- a/sourcefile/stdlib_stats_distribution_normal.fypp.html +++ b/sourcefile/stdlib_stats_distribution_normal.fypp.html @@ -488,13 +488,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_distribution_uniform.fypp.html b/sourcefile/stdlib_stats_distribution_uniform.fypp.html index 8b4cb5aee..0ce1f8a63 100644 --- a/sourcefile/stdlib_stats_distribution_uniform.fypp.html +++ b/sourcefile/stdlib_stats_distribution_uniform.fypp.html @@ -689,13 +689,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_mean.fypp.html b/sourcefile/stdlib_stats_mean.fypp.html index 00e3284e9..5b29cbfd0 100644 --- a/sourcefile/stdlib_stats_mean.fypp.html +++ b/sourcefile/stdlib_stats_mean.fypp.html @@ -337,13 +337,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_median.fypp.html b/sourcefile/stdlib_stats_median.fypp.html index f1464b654..c85d35d0d 100644 --- a/sourcefile/stdlib_stats_median.fypp.html +++ b/sourcefile/stdlib_stats_median.fypp.html @@ -437,13 +437,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_moment.fypp.html b/sourcefile/stdlib_stats_moment.fypp.html index 139699367..d5b60a10c 100644 --- a/sourcefile/stdlib_stats_moment.fypp.html +++ b/sourcefile/stdlib_stats_moment.fypp.html @@ -278,13 +278,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_moment_all.fypp.html b/sourcefile/stdlib_stats_moment_all.fypp.html index 4c0905e1d..f0c2df2ab 100644 --- a/sourcefile/stdlib_stats_moment_all.fypp.html +++ b/sourcefile/stdlib_stats_moment_all.fypp.html @@ -299,13 +299,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_moment_mask.fypp.html b/sourcefile/stdlib_stats_moment_mask.fypp.html index 342981a71..220cd1612 100644 --- a/sourcefile/stdlib_stats_moment_mask.fypp.html +++ b/sourcefile/stdlib_stats_moment_mask.fypp.html @@ -284,13 +284,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_moment_scalar.fypp.html b/sourcefile/stdlib_stats_moment_scalar.fypp.html index 55d0073e6..9f6f3efef 100644 --- a/sourcefile/stdlib_stats_moment_scalar.fypp.html +++ b/sourcefile/stdlib_stats_moment_scalar.fypp.html @@ -278,13 +278,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stats_var.fypp.html b/sourcefile/stdlib_stats_var.fypp.html index be0daff2f..4a19846da 100644 --- a/sourcefile/stdlib_stats_var.fypp.html +++ b/sourcefile/stdlib_stats_var.fypp.html @@ -443,13 +443,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_str2num.fypp.html b/sourcefile/stdlib_str2num.fypp.html index 289f55d95..f9991fa1d 100644 --- a/sourcefile/stdlib_str2num.fypp.html +++ b/sourcefile/stdlib_str2num.fypp.html @@ -772,13 +772,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_string_type.fypp.html b/sourcefile/stdlib_string_type.fypp.html index 0a226ac5c..ee4ab0a2c 100644 --- a/sourcefile/stdlib_string_type.fypp.html +++ b/sourcefile/stdlib_string_type.fypp.html @@ -1418,13 +1418,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_string_type_constructor.fypp.html b/sourcefile/stdlib_string_type_constructor.fypp.html index 23dbd5f42..1a7bc337b 100644 --- a/sourcefile/stdlib_string_type_constructor.fypp.html +++ b/sourcefile/stdlib_string_type_constructor.fypp.html @@ -203,13 +203,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_stringlist_type.f90.html b/sourcefile/stdlib_stringlist_type.f90.html index 4f69242a1..85bdde631 100644 --- a/sourcefile/stdlib_stringlist_type.f90.html +++ b/sourcefile/stdlib_stringlist_type.f90.html @@ -903,13 +903,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_strings.fypp.html b/sourcefile/stdlib_strings.fypp.html index c5682507a..17566afdd 100644 --- a/sourcefile/stdlib_strings.fypp.html +++ b/sourcefile/stdlib_strings.fypp.html @@ -1115,13 +1115,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_strings_to_string.fypp.html b/sourcefile/stdlib_strings_to_string.fypp.html index 575be9160..5668e310c 100644 --- a/sourcefile/stdlib_strings_to_string.fypp.html +++ b/sourcefile/stdlib_strings_to_string.fypp.html @@ -292,13 +292,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/sourcefile/stdlib_version.fypp.html b/sourcefile/stdlib_version.fypp.html index 7f41e1540..11c431d13 100644 --- a/sourcefile/stdlib_version.fypp.html +++ b/sourcefile/stdlib_version.fypp.html @@ -233,13 +233,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/src/stdlib_hashmaps.f90 b/src/stdlib_hashmaps.f90 index 4b3044583..d7da35dea 100644 --- a/src/stdlib_hashmaps.f90 +++ b/src/stdlib_hashmaps.f90 @@ -16,7 +16,24 @@ module stdlib_hashmaps int32, & int64 - use stdlib_hashmap_wrappers + use stdlib_hashmap_wrappers, only: & + copy_key, & + copy_other, & + fibonacci_hash, & + fnv_1_hasher, & + fnv_1a_hasher, & + free_key, & + free_other, & + get, & + hasher_fun, & + operator(==), & + seeded_nmhash32_hasher, & + seeded_nmhash32x_hasher, & + seeded_water_hasher, & + set, & + key_type, & + other_type, & + int_hash implicit none @@ -88,23 +105,52 @@ module stdlib_hashmaps !! Hash function contains - procedure, non_overridable, pass(map) :: calls procedure, non_overridable, pass(map) :: entries procedure, non_overridable, pass(map) :: map_probes procedure, non_overridable, pass(map) :: num_slots procedure, non_overridable, pass(map) :: slots_bits - procedure(get_all_keys), deferred, pass(map) :: get_all_keys - procedure(get_other), deferred, pass(map) :: get_other_data - procedure(init_map), deferred, pass(map) :: init - procedure(key_test), deferred, pass(map) :: key_test - procedure(loading), deferred, pass(map) :: loading - procedure(map_entry), deferred, pass(map) :: map_entry - procedure(rehash_map), deferred, pass(map) :: rehash - procedure(remove_entry), deferred, pass(map) :: remove - procedure(set_other), deferred, pass(map) :: set_other_data - procedure(total_depth), deferred, pass(map) :: total_depth - + procedure(get_all_keys), deferred, pass(map) :: get_all_keys + procedure(init_map), deferred, pass(map) :: init + procedure(loading), deferred, pass(map) :: loading + procedure(rehash_map), deferred, pass(map) :: rehash + procedure(total_depth), deferred, pass(map) :: total_depth + + !! Key_test procedures. + procedure(key_key_test), deferred, pass(map) :: key_key_test + procedure, non_overridable, pass(map) :: int8_key_test + procedure, non_overridable, pass(map) :: int32_key_test + procedure, non_overridable, pass(map) :: char_key_test + generic, public :: key_test => key_key_test, int8_key_test, int32_key_test, char_key_test + + ! Map_entry procedures + procedure(key_map_entry), deferred, pass(map) :: key_map_entry + procedure, non_overridable, pass(map) :: int8_map_entry + procedure, non_overridable, pass(map) :: int32_map_entry + procedure, non_overridable, pass(map) :: char_map_entry + generic, public :: map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry + + ! Get_other_data procedures + procedure(key_get_other_data), deferred, pass(map) :: key_get_other_data + procedure, non_overridable, pass(map) :: int8_get_other_data + procedure, non_overridable, pass(map) :: int32_get_other_data + procedure, non_overridable, pass(map) :: char_get_other_data + generic, public :: get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data + + ! Key_remove_entry procedures + procedure(key_remove_entry), deferred, pass(map) :: key_remove_entry + procedure, non_overridable, pass(map) :: int8_remove_entry + procedure, non_overridable, pass(map) :: int32_remove_entry + procedure, non_overridable, pass(map) :: char_remove_entry + generic, public :: remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry + + ! Set_other_data procedures + procedure(key_set_other_data), deferred, pass(map) :: key_set_other_data + procedure, non_overridable, pass(map) :: int8_set_other_data + procedure, non_overridable, pass(map) :: int32_set_other_data + procedure, non_overridable, pass(map) :: char_set_other_data + generic, public :: set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data + end type hashmap_type @@ -125,7 +171,7 @@ subroutine get_all_keys(map, all_keys) type(key_type), allocatable, intent(out) :: all_keys(:) end subroutine get_all_keys - subroutine get_other( map, key, other, exists ) + subroutine key_get_other_data( map, key, other, exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index @@ -140,7 +186,7 @@ subroutine get_other( map, key, other, exists ) type(key_type), intent(in) :: key type(other_type), intent(out) :: other logical, intent(out), optional :: exists - end subroutine get_other + end subroutine key_get_other_data subroutine init_map( map, & hasher, & @@ -171,7 +217,7 @@ subroutine init_map( map, & integer(int32), intent(out), optional :: status end subroutine init_map - subroutine key_test(map, key, present) + subroutine key_key_test(map, key, present) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map @@ -186,8 +232,9 @@ subroutine key_test(map, key, present) class(hashmap_type), intent(inout) :: map type(key_type), intent(in) :: key logical, intent(out) :: present - end subroutine key_test - + end subroutine key_key_test + + pure function loading( map ) !! Version: Experimental !! @@ -201,7 +248,7 @@ pure function loading( map ) real :: loading end function loading - subroutine map_entry(map, key, other, conflict) + subroutine key_map_entry(map, key, other, conflict) !! Version: Experimental !! !! Inserts an entry into the hash table @@ -212,7 +259,7 @@ subroutine map_entry(map, key, other, conflict) type(key_type), intent(in) :: key type(other_type), intent(in), optional :: other logical, intent(out), optional :: conflict - end subroutine map_entry + end subroutine key_map_entry subroutine rehash_map( map, hasher ) !! Version: Experimental @@ -227,7 +274,7 @@ subroutine rehash_map( map, hasher ) procedure(hasher_fun) :: hasher end subroutine rehash_map - subroutine remove_entry(map, key, existed) ! Chase's delent + subroutine key_remove_entry(map, key, existed) ! Chase's delent !! Version: Experimental !! !! Remove the entry, if any, that has the key @@ -241,9 +288,9 @@ subroutine remove_entry(map, key, existed) ! Chase's delent class(hashmap_type), intent(inout) :: map type(key_type), intent(in) :: key logical, intent(out), optional :: existed - end subroutine remove_entry + end subroutine key_remove_entry - subroutine set_other( map, key, other, exists ) + subroutine key_set_other_data( map, key, other, exists ) !! Version: Experimental !! !! Change the other data associated with the key @@ -260,7 +307,7 @@ subroutine set_other( map, key, other, exists ) type(key_type), intent(in) :: key type(other_type), intent(in) :: other logical, intent(out), optional :: exists - end subroutine set_other + end subroutine key_set_other_data function total_depth( map ) !! Version: Experimental @@ -336,15 +383,15 @@ end function total_depth !! Array of bucket lists Note # slots=size(slots) contains procedure :: get_all_keys => get_all_chaining_keys - procedure :: get_other_data => get_other_chaining_data + procedure :: key_get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: loading => chaining_loading - procedure :: map_entry => map_chain_entry + procedure :: key_map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map - procedure :: remove => remove_chaining_entry - procedure :: set_other_data => set_other_chaining_data + procedure :: key_remove_entry => remove_chaining_entry + procedure :: key_set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth - procedure :: key_test => chaining_key_test + procedure :: key_key_test => chaining_key_test final :: free_chaining_map end type chaining_hashmap_type @@ -587,15 +634,15 @@ end function total_chaining_depth !! Array of indices to the inverse Note # slots=size(slots) contains procedure :: get_all_keys => get_all_open_keys - procedure :: get_other_data => get_other_open_data + procedure :: key_get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: loading => open_loading - procedure :: map_entry => map_open_entry + procedure :: key_map_entry => map_open_entry procedure :: rehash => rehash_open_map - procedure :: remove => remove_open_entry - procedure :: set_other_data => set_other_open_data + procedure :: key_remove_entry => remove_open_entry + procedure :: key_set_other_data => set_other_open_data procedure :: total_depth => total_open_depth - procedure :: key_test => open_key_test + procedure :: key_key_test => open_key_test final :: free_open_map end type open_hashmap_type @@ -770,9 +817,348 @@ end function total_open_depth end interface -contains + + contains + + + subroutine int8_get_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Int8 key generic interface for get_other_data function + + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_get_other_data( key, other, exists ) + + end subroutine int8_get_other_data + + + subroutine int32_get_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Int32 key generic interface for get_other_data function + + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_get_other_data( key, other, exists ) + + end subroutine int32_get_other_data + + + subroutine char_get_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Character key generic interface for get_other_data function + + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + type(other_type), intent(out) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_get_other_data( key, other, exists ) + + end subroutine char_get_other_data + + + subroutine int8_remove_entry(map, value, existed) ! Chase's delent +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! value - the int8 array key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + logical, intent(out), optional :: existed + + type(key_type) :: key + + call set( key, value ) + + call map % key_remove_entry( key, existed ) + + end subroutine int8_remove_entry + + + subroutine int32_remove_entry(map, value, existed) ! Chase's delent +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! key - the key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + logical, intent(out), optional :: existed + + type(key_type) :: key + + call set( key, value ) + + call map % key_remove_entry( key, existed ) + + end subroutine int32_remove_entry + + + subroutine char_remove_entry(map, value, existed) ! Chase's delent +!! Version: Experimental +!! +!! Remove the entry, if any, that has the key +!! Arguments: +!! map - the table from which the entry is to be removed +!! key - the key to an entry +!! existed - a logical flag indicating whether an entry with the key +!! was present in the original map +! + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + logical, intent(out), optional :: existed + + type(key_type) :: key + + call set( key, value ) + + call map % key_remove_entry( key, existed ) + + end subroutine char_remove_entry + + + subroutine int8_map_entry(map, value, other, conflict) + !! Version: Experimental + !! Int8 generic interface for map entry + !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) + !! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + + type(key_type) :: key + + call set( key, value ) + + call map % key_map_entry( key, other, conflict ) + + end subroutine int8_map_entry + + + subroutine int32_map_entry(map, value, other, conflict) +!! Version: Experimental +!! +!! Inserts an entry into the hash table +!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) +!! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + + type(key_type) :: key + + call set( key, value ) + + call map % key_map_entry( key, other, conflict ) + + end subroutine int32_map_entry + + + subroutine char_map_entry(map, value, other, conflict) +!! Version: Experimental +!! +!! Inserts an entry into the hash table +!! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) +!! + class(hashmap_type), intent(inout) :: map + character(len=*), intent(in) :: value + type(other_type), intent(in), optional :: other + logical, intent(out), optional :: conflict + + type(key_type) :: key + + call set( key, value ) + + call map % key_map_entry( key, other, conflict ) + + end subroutine char_map_entry + + + subroutine int8_key_test(map, value, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) +!! +!! Arguments: +!! map - the hash map of interest +!! value - int8 array that is the key to lookup. +!! present - a flag indicating whether key is present in the map +! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + logical, intent(out) :: present + + type(key_type) :: key + + ! Generate key from int8 array. + call set( key, value ) + + ! Call key test procedure. + call map % key_key_test( key, present ) + + end subroutine int8_key_test + + + subroutine int32_key_test(map, value, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) +!! +!! Arguments: +!! map - the hash map of interest +!! value - int32 array that is the key to lookup. +!! present - a flag indicating whether key is present in the map +! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + logical, intent(out) :: present + + type(key_type) :: key + + call set( key, value ) + + call map % key_key_test( key, present ) - pure function calls( map ) + end subroutine int32_key_test + + + subroutine char_key_test(map, value, present) +!! Version: Experimental +!! +!! Returns a logical flag indicating whether KEY exists in the hash map +!! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) +!! +!! Arguments: +!! map - the hash map of interest +!! value - char array that is the key to lookup. +!! present - a flag indicating whether key is present in the map +! + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + logical, intent(out) :: present + + type(key_type) :: key + + call set( key, value ) + + call map % key_key_test( key, present ) + + end subroutine char_key_test + + + subroutine int8_set_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! value - the int8 array key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +!! +! + class(hashmap_type), intent(inout) :: map + integer(int8), intent(in) :: value(:) + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_set_other_data( key, other, exists ) + + end subroutine int8_set_other_data + + + subroutine int32_set_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! value - the int32 array key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +!! +! + class(hashmap_type), intent(inout) :: map + integer(int32), intent(in) :: value(:) + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_set_other_data( key, other, exists ) + + end subroutine int32_set_other_data + + + subroutine char_set_other_data( map, value, other, exists ) +!! Version: Experimental +!! +!! Change the other data associated with the key +!! Arguments: +!! map - the map with the entry of interest +!! value - the char value key to the entry inthe map +!! other - the new data to be associated with the key +!! exists - a logical flag indicating whether the key is already entered +!! in the map +!! +! + class(hashmap_type), intent(inout) :: map + character(*), intent(in) :: value + type(other_type), intent(in) :: other + logical, intent(out), optional :: exists + + type(key_type) :: key + + call set( key, value ) + + call map % key_set_other_data( key, other, exists ) + + end subroutine char_set_other_data + + + pure function calls( map ) !! Version: Experimental !! !! Returns the number of subroutine calls on an open hash map @@ -780,14 +1166,14 @@ pure function calls( map ) !! !! Arguments: !! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_calls) :: calls + class(hashmap_type), intent(in) :: map + integer(int_calls) :: calls - calls = map % call_count + calls = map % call_count - end function calls + end function calls - pure function entries( map ) + pure function entries( map ) !! Version: Experimental !! !! Returns the number of entries in a hash map @@ -795,15 +1181,15 @@ pure function entries( map ) !! !! Arguments: !! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_index) :: entries + class(hashmap_type), intent(in) :: map + integer(int_index) :: entries - entries = map % num_entries + entries = map % num_entries - end function entries + end function entries - pure function map_probes( map ) + pure function map_probes( map ) !! Version: Experimental !! !! Returns the total number of table probes on a hash map @@ -811,15 +1197,15 @@ pure function map_probes( map ) !! !! Arguments: !! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_calls) :: map_probes + class(hashmap_type), intent(in) :: map + integer(int_calls) :: map_probes - map_probes = map % total_probes + map % probe_count + map_probes = map % total_probes + map % probe_count - end function map_probes + end function map_probes - pure function num_slots( map ) + pure function num_slots( map ) !! Version: Experimental !! !! Returns the number of allocated slots in a hash map @@ -827,15 +1213,15 @@ pure function num_slots( map ) !! !! Arguments: !! map - an open hash map - class(hashmap_type), intent(in) :: map - integer(int_index) :: num_slots + class(hashmap_type), intent(in) :: map + integer(int_index) :: num_slots - num_slots = 2**map % nbits + num_slots = 2**map % nbits - end function num_slots + end function num_slots - pure function slots_bits( map ) + pure function slots_bits( map ) !! Version: Experimental !! !! Returns the number of bits used to specify the number of allocated @@ -844,12 +1230,12 @@ pure function slots_bits( map ) !! !! Arguments: !! map - an open hash map - class(hashmap_type), intent(in) :: map - integer :: slots_bits + class(hashmap_type), intent(in) :: map + integer :: slots_bits - slots_bits = map % nbits + slots_bits = map % nbits - end function slots_bits + end function slots_bits end module stdlib_hashmaps diff --git a/tipuesearch/tipuesearch_content.js b/tipuesearch/tipuesearch_content.js index 29aa63ce3..07d843bfc 100644 --- a/tipuesearch/tipuesearch_content.js +++ b/tipuesearch/tipuesearch_content.js @@ -1 +1 @@ -var tipuesearch = {"pages":[{"title":" Fortran-lang/stdlib ","text":"Fortran-lang/stdlib Fortran stdlib API Documentation Goals and Motivation Scope Code of Conduct License Warning This API documentation for the Fortran-lang/stdlib is a work in progress Note Use the navigation bar at the top of the screen to browse modules, procedures, source files, etc.\nThe listings near the bottom of the page are incomplete. Fortran stdlib API Documentation This is the main API documentation landing page generated by FORD .\nThe documentation for comment markup in source code, running FORD and the FORD project file are all maintained on the FORD wiki . Goals and Motivation The Fortran Standard, as published by the ISO (https://wg5-fortran.org/), does\nnot have a Standard Library. The goal of this project is to provide a community\ndriven and agreed upon de facto \"standard\" library for Fortran, called a\nFortran Standard Library ( stdlib ). We have a rigorous process how stdlib is\ndeveloped as documented in our Workflow . stdlib is both a\nspecification and a reference implementation. We are cooperating with the\nFortran Standards Committee (e.g., the effort started at the J3\ncommittee repository) and the plan is to continue working with the Committee in\nthe future (such as in the step 5. in the Workflow document), so\nthat if the Committee wants to standardize some feature already available in stdlib , it would\nbase it on stdlib 's implementation. Scope The goal of the Fortran Standard Library is to achieve the following general scope: Utilities (containers, strings, files, OS/environment integration, unit\n testing & assertions, logging, ...) Algorithms (searching and sorting, merging, ...) Mathematics (linear algebra, sparse matrices, special functions, fast Fourier\n transform, random numbers, statistics, ordinary differential equations,\n numerical integration, optimization, ...) Code of Conduct In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. Please read first this Code of Conduct License The stdlib source code and related files and documentation are distributed under the MIT license . Developer Info fortran-lang/stdlib contributors","tags":"home","loc":"index.html"},{"title":"ansi_code – Fortran-lang/stdlib ","text":"type, public :: ansi_code Container for terminal escape code Source Code type :: ansi_code private !> Style descriptor integer ( i1 ) :: style = - 1_i1 !> Background color descriptor integer ( i1 ) :: bg = - 1_i1 !> Foreground color descriptor integer ( i1 ) :: fg = - 1_i1 end type ansi_code","tags":"","loc":"type/ansi_code.html"},{"title":"logger_type – Fortran-lang/stdlib ","text":"type, public :: logger_type Public derived type ( Specification ) Finalization Procedures final :: final_logger private subroutine final_logger(self) Finalizes the logger_type entity self by flushing the units Arguments Type Intent Optional Attributes Name type( logger_type ), intent(in) :: self Type-Bound Procedures procedure, public, pass(self) :: add_log_file private subroutine add_log_file(self, filename, unit, action, position, status, stat) Opens a formatted sequential access output file, filename using newunit and adds the resulting unit number to self 's log_units array. action , if present, is the action specifier of the open statement, and has the default value of \"write\" . position , if present,\n is the position specifier, and has the default value of \"REWIND\" . status , if present, is the status specifier of the open statement,\n and has the default value of \"REPLACE\" . stat , if present, has the value success if filename could be opened, read_only_error if action is \"read\" , and open_failure otherwise.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self The logger variable to which the file is to be added character(len=*), intent(in) :: filename The name of the file to be added to the logger integer, intent(out), optional :: unit The resulting I/O unit number character(len=*), intent(in), optional :: action The action specifier for the `open`` statement character(len=*), intent(in), optional :: position The position specifier for the open statement character(len=*), intent(in), optional :: status The status specifier for the open statement integer, intent(out), optional :: stat The error status on exit with the possible values\n * success - no errors found\n * read_only_error - file unopened as action1 was \"read\" for an output\n file\n * open_failure - the open` statement failed Example program main\n use stdlib_logger\n ...\n integer :: unit, stat\n ...\n call global_logger % add_log_file( 'error_log.txt', unit, &\n position='asis', stat=stat )\n if ( stat /= success ) then\n error stop 'Unable to open \"error_log.txt\".'\n end if\n ...\n end program main procedure, public, pass(self) :: add_log_unit private subroutine add_log_unit(self, unit, stat) Adds unit to the log file units in log_units . unit must be an open file, of form \"formatted\" , with \"sequential\" access , and an action of \"write\" or \"readwrite\" , otherwise either stat , if present, has a\n value other than success and unit is not entered into log_units ,\n or, if stat is not presecn, processing stops.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self The logger variable to which the I/O unit is to be added integer, intent(in) :: unit The input logical unit number integer, intent(out), optional :: stat An error code with the possible values\n * success - no problems were found\n * non_sequential_error - unit did not have sequential access\n * read_only_error - unit was not writeable\n * unformatted_in_error - unit was an 'unformatted' file\n * unopened_in_error - unit was not opened Example program main\n use stdlib_logger\n ...\n character(256) :: iomsg\n integer :: iostat, unit, stat\n ...\n open( newunit=unit, 'error_log.txt', form='formatted', &\n status='replace', position='rewind', err=999, &\n action='read', iostat=iostat, iomsg=iomsg )\n ...\n call global_logger % add_log_unit( unit, stat )\n select case ( stat )\n ...\n case ( read_only_error )\n error stop 'Unable to write to \"error_log.txt\".'\n ...\n end select\n ...\n 999 error stop 'Unable to open \"error_log.txt\".\n ...\n end program main procedure, public, pass(self) :: configuration private pure subroutine configuration(self, add_blank_line, indent, level, max_width, time_stamp, log_units) Reports the logging configuration of self . The following attributes are\n reported:\n 1. add_blank_line is a logical flag with .true. implying that output\n starts with a blank line, and .false. implying no blank line.\n 2. indent is a logical flag with .true. implying that subsequent columns\n will be indented 4 spaces and .false. implying no indentation.\n 3. level is the lowest level for printing a message\n 4. max_width is the maximum number of columns of output text with max_width == 0 => no bounds on output width.\n 5. time_stamp is a logical flag with .true. implying that the output\n will have a time stamp, and .false. implying that there will be no\n time stamp.\n 6. log_units is an array of the I/O unit numbers to which log output\n will be written.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable whose configuration is being reported logical, intent(out), optional :: add_blank_line A logical flag to add a preceding blank line logical, intent(out), optional :: indent A logical flag to indent subsequent lines integer, intent(out), optional :: level The minimum level for printing a message integer, intent(out), optional :: max_width The maximum number of columns for most outputs logical, intent(out), optional :: time_stamp A logical flag to add a time stamp integer, intent(out), optional, allocatable :: log_units (:) The I/O units used in output Example module example_mod use stdlib_logger ... contains ... subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit ... integer , allocatable :: log_units (:)\n ... call global_logger % configuration ( log_units = log_units ) if ( size ( log_units ) == 0 ) then call add_logger_unit ( unit ) end if .. end subroutine example_sub ... end module example_mod procedure, public, pass(self) :: configure private pure subroutine configure(self, add_blank_line, indent, level, max_width, time_stamp) Configures the logging process for SELF. The following attributes are\n configured:\n 1. add_blank_line is a logical flag with .true. implying that output\n starts with a blank line, and .false. implying no blank line. add_blank_line has a startup value of .false. .\n 2. indent is a logical flag with .true. implying that subsequent lines\n will be indented 4 spaces and .false. implying no indentation. indent has a startup value of .true. .\n 3. level is the lowest level for printing a message\n 4. max_width is the maximum number of columns of output text with max_width == 0 => no bounds on output width. max_width has a startup\n value of 0.\n 5. time_stamp is a logical flag with .true. implying that the output\n will have a time stamp, and .false. implying that there will be no\n time stamp. time_stamp has a startup value of .true. .\n( Specification ) Example program main\n use stdlib_logger\n ...\n call global_logger % configure( indent=.false., max_width=72 )\n ... Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self logical, intent(in), optional :: add_blank_line logical, intent(in), optional :: indent integer, intent(in), optional :: level integer, intent(in), optional :: max_width logical, intent(in), optional :: time_stamp procedure, public, pass(self) :: log_debug private subroutine log_debug(self, message, module, procedure) Writes the string message to self % log_units with optional additional\n text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, and then message is\n written with the prefix 'DEBUG: '. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write ( * , ' ( a ) ' ) \"Enter an integer to select a widget\" read ( * , ' ( i0 ) ' ) selection write ( message , ` ( a , i0 ) ' ) & \"The user selected \" , selection call alogger % log_debug ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' ) ... end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger used to send the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_information character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_information procedure, public, pass(self) :: log_error private subroutine log_error(self, message, module, procedure, stat, errmsg) Writes the string message to self % log_units with optional additional\n text.\n ( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, then message is\n written with the prefix 'ERROR: ', and then if stat or errmsg are present they are written. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( size ) integer , intent ( in ) :: size character ( 128 ) :: errmsg , message integer :: stat allocate ( a ( size ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( message , ` ( a , i0 ) ' ) & \"Allocation of A failed with SIZE = \" , size alogger % call log_error ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' , & stat = stat , & errmsg = errmsg ) end if end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger to be used in logging the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_error character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_error integer, intent(in), optional :: stat The value of the stat specifier returned by a Fortran statement character(len=*), intent(in), optional :: errmsg The value of the errmsg specifier returned by a Fortran statement procedure, public, pass(self) :: log_information private subroutine log_information(self, message, module, procedure) Writes the string message to self % log_units with optional additional\n text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, and then message is\n written with the prefix 'INFO: '. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write ( * , ' ( a ) ' ) \"Enter an integer to select a widget\" read ( * , ' ( i0 ) ' ) selection write ( message , ` ( a , i0 ) ' ) & \"The user selected \" , selection call alogger % log_information ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' ) ... end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger used to send the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_information character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_information procedure, public, pass(self) :: log_io_error private subroutine log_io_error(self, message, module, procedure, iostat, iomsg) Writes the string message to the self % log_units with optional\n additional text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, then message is\n written with a prefix 'I/O ERROR: ', and then if iostat or iomsg are present they are also written. Example program example\n use stdlib_logger\n ...\n character(*), parameter :: filename = 'dummy.txt'\n integer :: iostat, lun\n character(128) :: iomsg\n character(*), parameter :: message = 'Failure in opening \"dummy.txt\".'\n\n open( newunit=lun, file = filename, form='formatted', &\n status='old', iostat=iostat, iomsg=iomsg )\n if ( iostat /= 0 ) then\n call global_logger % log_io_error( message, procedure = 'EXAMPLE', &\n iostat=iostat, iomsg = iomsg )\n error stop 'Error on opening ' // filename\n end if\n ...\nend program example Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable to receivee the message character(len=*), intent(in) :: message A string to be written to LOG_UNIT character(len=*), intent(in), optional :: module The name of the module containing the current invocation of REPORT_ERROR character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of REPORT_ERROR integer, intent(in), optional :: iostat The value of the IOSTAT specifier returned by a Fortran I/O statement character(len=*), intent(in), optional :: iomsg The value of the IOMSG specifier returned by a Fortran I/O statement procedure, public, pass(self) :: log_message private subroutine log_message(self, message, module, procedure, prefix) Writes the string message to the self % log_units with optional\n additional text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, followed by prefix // ': ' if present,\n and then message . Example module example_mod use stdlib_logger ... real , allocatable :: a (:)\n ... contains ... subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write (*, '(a)' ) \"Enter an integer to select a widget\" read (*, '(i0)' ) selection write ( message , `( a , i0 ) ' ) & \"The user selected \", selection call global_logger % log_message( message, & module = ' example_mod' , & procedure = 'example_sub' , & prefix = 'info' ) end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable to receive the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_message character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_message character(len=*), intent(in), optional :: prefix To be prepended to message as prefix // ': ' // message . procedure, public, pass(self) :: log_text_error private subroutine log_text_error(self, line, column, summary, filename, line_number, caret, stat) Sends a message to self % log_units describing an error found\n in a line of text.\n( Specification ) Behavior If time stamps are active first a time stamp is written. Then if filename or line_number or column are present they are written.\n Then line is written. Then the symbol caret is written below line at the column indicated by column . Then summary is written. Example program example\n ...\n character(*), parameter :: filename = 'dummy.txt'\n integer :: col_num, line_num, lun\n character(128) :: line\n character(*), parameter :: message = 'Bad text found.'\n\n open( newunit=lun, file = filename, statu='old', form='formatted' )\n line_num = 0\n do\n read( lun, fmt='(a)', end=900 ) line\n line_num = line_num + 1\n call check_line( line, status, col_num )\n if ( status /= 0 )\n call global_logger % log_text_error( line, col_num, message, &\n filename, line_num )\n error stop 'Error in reading ' // filename\n end if\n ...\n end do 900 continue\n ...\n end program example Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable to receive the message character(len=*), intent(in) :: line The line of text in which the error was found. integer, intent(in) :: column The one's based column in LINE at which the error starts. character(len=*), intent(in) :: summary A brief description of the error. character(len=*), intent(in), optional :: filename The name of the file, if any, in which the error was found. integer, intent(in), optional :: line_number The one's based line number in the file where line was found. character(len=1), intent(in), optional :: caret The symbol used to mark the column wher the error was first detected integer, intent(out), optional :: stat Integer flag that an error has occurred. Has the value success if no\nerror hass occurred, index_invalid_error if column is less than zero or\ngreater than len(line) , and write_failure if any of the write statements has failed. procedure, public, pass(self) :: log_units_assigned private elemental function log_units_assigned(self) Returns the number of units assigned to self % log_units ( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger subject to the inquiry Return Value integer Example module example_mod use stdlib_logger ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( unit , ... ) integer , intent ( in ) :: unit ... integer , allocatable :: log_units (:) ... if ( alogger % log_units_assigned () == 0 ) then call alogger % add_log_unit ( unit ) end if ... end subroutine example_sub ... end module example_mod procedure, public, pass(self) :: log_warning private subroutine log_warning(self, message, module, procedure) Writes the string message to self % log_units with optional additional\n text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, then message is\n written with the prefix 'WARN: '. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( size , stat ) integer , intent ( in ) :: size integer , intent ( out ) :: stat allocate ( a ( size ) ) if ( stat /= 0 ) then write ( message , ` ( a , i0 ) ' ) & \"Allocation of A failed with SIZE = \" , size call alogger % log_warning ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' ) end if end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger to which the message is written character(len=*), intent(in) :: message A string to be written to LOG_UNIT character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_warning character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_warning procedure, public, pass(self) :: remove_log_unit private subroutine remove_log_unit(self, unit, close_unit, stat) Remove the I/O unit from the self % log_units list. If close_unit is\n present and .true. then the corresponding file is closed. If unit is\n not in log_units then nothing is done. If stat is present it, by\n default, has the value success . If closing the unit fails, then if stat is present it has the value close_failure , otherwise processing\n stops with an informative message.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self The logger variable whose unit is to be removed integer, intent(in) :: unit The I/O unit to be removed from self logical, intent(in), optional :: close_unit A logical flag to close the unit while removing it from the SELF list integer, intent(out), optional :: stat An error status with the values\n * success - no problems found\n * close_failure - the close statement for unit failed Example module example_mod use stdlib_logger ... type ( logger_type ) :: alogger contains ... subroutine example_sub ( unit , ... ) integer , intent ( in ) :: unit ... call alogger % remove_log_unit ( unit ) ... end subroutine example_sub ... end module example_mod Source Code type :: logger_type !! version: experimental !! Public derived type ([Specification](../page/specs/stdlib_logger.html#the-derived-type-logger_type)) private logical :: add_blank_line = . false . logical :: indent_lines = . true . integer :: level = information_level integer , allocatable :: log_units (:) integer :: max_width = 0 logical :: time_stamp = . true . integer :: units = 0 contains private procedure , public , pass ( self ) :: add_log_file procedure , public , pass ( self ) :: add_log_unit procedure , public , pass ( self ) :: configuration procedure , public , pass ( self ) :: configure procedure , public , pass ( self ) :: log_debug procedure , public , pass ( self ) :: log_error procedure , public , pass ( self ) :: log_information procedure , public , pass ( self ) :: log_io_error procedure , public , pass ( self ) :: log_message procedure , public , pass ( self ) :: log_text_error procedure , public , pass ( self ) :: log_units_assigned procedure , public , pass ( self ) :: log_warning procedure , public , pass ( self ) :: remove_log_unit final :: final_logger end type logger_type","tags":"","loc":"type/logger_type.html"},{"title":"stringlist_index_type – Fortran-lang/stdlib ","text":"type, public :: stringlist_index_type Source Code type stringlist_index_type private logical :: forward integer :: offset end type stringlist_index_type","tags":"","loc":"type/stringlist_index_type.html"},{"title":"stringlist_type – Fortran-lang/stdlib ","text":"type, public :: stringlist_type Constructor public interface stringlist_type Constructor for stringlist\nReturns an instance of type stringlist_type Specifications private pure function new_stringlist() Constructor with no argument\nReturns a new instance of type stringlist Arguments None Return Value type( stringlist_type ) private pure function new_stringlist_carray(array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: array Return Value type( stringlist_type ) private pure function new_stringlist_sarray(array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: array Return Value type( stringlist_type ) Type-Bound Procedures procedure, public :: clear => clear_list private subroutine clear_list(list) Resets stringlist 'list' to an empy stringlist of len 0\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list generic, public :: get => get_string_idx private pure function get_string_idx_wrap(list, idx) Returns the string present at stringlist_index 'idx' in stringlist 'list'\nReturns string_type instance Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(in) :: list type( stringlist_index_type ), intent(in) :: idx Return Value type( string_type ) generic, public :: insert_at => insert_at_char_idx, insert_at_string_idx, insert_at_stringlist_idx, insert_at_chararray_idx, insert_at_stringarray_idx private subroutine insert_at_char_idx_wrap(list, idx, string) Inserts character scalar 'string' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx character(len=*), intent(in) :: string private subroutine insert_at_string_idx_wrap(list, idx, string) Inserts string 'string' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx type( string_type ), intent(in) :: string private subroutine insert_at_stringlist_idx_wrap(list, idx, slist) Inserts stringlist 'slist' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx type( stringlist_type ), intent(in) :: slist private subroutine insert_at_chararray_idx_wrap(list, idx, carray) Inserts chararray 'carray' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx character(len=*), intent(in), dimension(:) :: carray private subroutine insert_at_stringarray_idx_wrap(list, idx, sarray) Inserts stringarray 'sarray' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx type( string_type ), intent(in), dimension(:) :: sarray procedure, public :: len => length_list private pure function length_list(list) Returns the len (length) of the list\nReturns an integer Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(in) :: list Return Value integer Source Code type stringlist_type private type ( string_type ), dimension (:), allocatable :: stringarray contains private procedure , public :: clear => clear_list procedure , public :: len => length_list procedure :: to_future_at_idxn => convert_to_future_at_idxn procedure :: to_current_idxn => convert_to_current_idxn procedure :: insert_at_char_idx => insert_at_char_idx_wrap procedure :: insert_at_string_idx => insert_at_string_idx_wrap procedure :: insert_at_stringlist_idx => insert_at_stringlist_idx_wrap procedure :: insert_at_chararray_idx => insert_at_chararray_idx_wrap procedure :: insert_at_stringarray_idx => insert_at_stringarray_idx_wrap generic , public :: insert_at => insert_at_char_idx , & insert_at_string_idx , & insert_at_stringlist_idx , & insert_at_chararray_idx , & insert_at_stringarray_idx procedure :: insert_before_string_int => insert_before_string_int_impl procedure :: insert_before_stringlist_int => insert_before_stringlist_int_impl procedure :: insert_before_chararray_int => insert_before_chararray_int_impl procedure :: insert_before_stringarray_int => insert_before_stringarray_int_impl generic :: insert_before => insert_before_string_int , & insert_before_stringlist_int , & insert_before_chararray_int , & insert_before_stringarray_int procedure :: get_string_idx => get_string_idx_wrap generic , public :: get => get_string_idx end type stringlist_type","tags":"","loc":"type/stringlist_type.html"},{"title":"codata_constant_type – Fortran-lang/stdlib ","text":"type, public :: codata_constant_type Derived type for representing a Codata constant.\n( Specification ) Components Type Visibility Attributes Name Initial character(len=64), public :: name real(kind=dp), public :: uncertainty character(len=32), public :: unit real(kind=dp), public :: value Type-Bound Procedures procedure, public :: print private subroutine print(self) Print out the constant's name, value, uncertainty and unit. Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self generic, public :: to_real => to_real_sp , to_real_dp private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp) private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp) procedure, public :: to_real_dp private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp) procedure, public :: to_real_sp private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp)","tags":"","loc":"type/codata_constant_type.html"},{"title":"chaining_hashmap_type – Fortran-lang/stdlib ","text":"type, public, extends( hashmap_type ) :: chaining_hashmap_type Type implementing the chaining_hashmap_type types\n( Specifications ) Finalization Procedures final :: free_chaining_map private interface free_chaining_map() Arguments None Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls private pure function calls(map) Returns the number of subroutine calls on an open hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: entries private pure function entries(map) Returns the number of entries in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: get_all_keys => get_all_chaining_keys interface private module subroutine get_all_chaining_keys(map, all_keys) Returns all the keys contained in a hashmap\nArguments:\n map - an chaining hash map\n all_keys - all the keys contained in a hash map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(in) :: map type( key_type ), intent(out), allocatable :: all_keys (:) procedure, public :: get_other_data => get_other_chaining_data interface private module subroutine get_other_chaining_data(map, key, other, exists) Returns the other data associated with the inverse table index\nArguments:\n map - a chaining hash table\n key - the key associated with a map entry\n other - the other data associated with the key\n exists - a logical flag indicating whether an entry with that key exists Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public :: init => init_chaining_map interface private module subroutine init_chaining_map(map, hasher, slots_bits, status) Routine to allocate an empty map with HASHER as the hash function,\n2 SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited\nto a maximum of 2 MAX_BITS. All fields are initialized.\nArguments:\n map - the chaining hash map to be initialized\n hasher - the hash function to be used to map keys to slots\n slots_bits - the bits of two used to initialize the number of slots\n status - an integer error status flag with the allowed values:\n success - no problems were found\n alloc_fault - map % slots or map % inverse could not be allocated\n array_size_error - slots_bits is less than default_bits or\n greater than max_bits Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(out) :: map procedure( hasher_fun ) :: hasher integer, intent(in), optional :: slots_bits integer(kind=int32), intent(out), optional :: status procedure, public :: key_test => chaining_key_test interface private module subroutine chaining_key_test(map, key, present) Returns a logical flag indicating whether KEY is present in the hash map\nArguments:\n map - the hash map of interest\n key - the key of interest\n present - a logical flag indicating whether key is present in map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out) :: present procedure, public :: loading => chaining_loading interface private pure module function chaining_loading(map) Returns the number of entries relative to slots in a hash map\nArguments:\n map - a chaining hash map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(in) :: map Return Value real procedure, public :: map_entry => map_chain_entry interface private module subroutine map_chain_entry(map, key, other, conflict) map - the hash table of interest\nkey - the key identifying the entry\nother - other data associated with the key\nconflict - logical flag indicating whether the entry key conflicts\n with an existing key Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: map_probes private pure function map_probes(map) Returns the total number of table probes on a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: num_slots private pure function num_slots(map) Returns the number of allocated slots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: rehash => rehash_chaining_map interface private module subroutine rehash_chaining_map(map, hasher) Changes the hashing method of the table entries to that of HASHER.\nArguments:\n map the table to be rehashed\n hasher the hasher function to be used for the table Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map procedure( hasher_fun ) :: hasher procedure, public :: remove => remove_chaining_entry interface private module subroutine remove_chaining_entry(map, key, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out), optional :: existed procedure, public :: set_other_data => set_other_chaining_data interface private module subroutine set_other_chaining_data(map, key, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n key - the key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: slots_bits private pure function slots_bits(map) Returns the number of bits used to specify the number of allocated\nslots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer procedure, public :: total_depth => total_chaining_depth interface private module function total_chaining_depth(map) result(total_depth) Returns the total number of ones based offsets of slot entries from\ntheir slot index for a hash map\nArguments:\n map - an chaining hash map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(in) :: map Return Value integer(kind=int_depth) Source Code type , extends ( hashmap_type ) :: chaining_hashmap_type !! Version: Experimental !! !! Type implementing the `chaining_hashmap_type` types !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_hashmap_type-derived-type)) private type ( chaining_map_entry_pool ), pointer :: cache => null () !! Pool of allocated chaining_map_entry_type objects type ( chaining_map_entry_type ), pointer :: free_list => null () !! free list of map entries type ( chaining_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) type ( chaining_map_entry_ptr ), allocatable :: slots (:) !! Array of bucket lists Note # slots=size(slots) contains procedure :: get_all_keys => get_all_chaining_keys procedure :: get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: loading => chaining_loading procedure :: map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map procedure :: remove => remove_chaining_entry procedure :: set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth procedure :: key_test => chaining_key_test final :: free_chaining_map end type chaining_hashmap_type","tags":"","loc":"type/chaining_hashmap_type.html"},{"title":"hashmap_type – Fortran-lang/stdlib ","text":"type, public :: hashmap_type Type implementing an abstract hash map\n( Specifications ) Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls private pure function calls(map) Returns the number of subroutine calls on an open hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: entries private pure function entries(map) Returns the number of entries in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure(get_all_keys), public, deferred, pass(map) :: get_all_keys subroutine get_all_keys(map, all_keys) Prototype Returns the all keys contained in a hash map\n( Specifications ) Arguments:\n map - a hash map\n all_keys - all the keys contained in a hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map type( key_type ), intent(out), allocatable :: all_keys (:) procedure(get_other), public, deferred, pass(map) :: get_other_data subroutine get_other(map, key, other, exists) Prototype Returns the other data associated with the inverse table index\nArguments:\n map - a hash map\n key - the key associated with a map entry\n other - the other data associated with the key\n exists - a logical flag indicating whether an entry with that key exists Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure(init_map), public, deferred, pass(map) :: init subroutine init_map(map, hasher, slots_bits, status) Prototype Routine to allocate an empty map with HASHER as the hash function,\n2 SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a\nmaximum of 2 MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots),\nmap % inverse elements. All fields are initialized.\nArguments:\n map - the hash maap to be initialized\n hasher - the hash function to be used to map keys to slots\n slots_bits - the number of bits initially used to map to the slots\n status - an integer error status flag with the allowed values:\n success - no problems were found\n alloc_fault - map % slots or map % inverse could not be allocated\n array_size_error - slots_bits or max_bits is less than\n default_bits or greater than strict_max_bits\n real_value_error - load_factor is less than 0.375 or greater than\n 0.875 Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(out) :: map procedure( hasher_fun ) :: hasher integer, intent(in), optional :: slots_bits integer(kind=int32), intent(out), optional :: status procedure(key_test), public, deferred, pass(map) :: key_test subroutine key_test(map, key, present) Prototype Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n key - the key of interest\n present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out) :: present procedure(loading), public, deferred, pass(map) :: loading pure function loading(map) Prototype Returns the number of entries relative to slots in a hash map\n( Specifications ) Arguments:\n map - a hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value real procedure(map_entry), public, deferred, pass(map) :: map_entry subroutine map_entry(map, key, other, conflict) Prototype Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: map_probes private pure function map_probes(map) Returns the total number of table probes on a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: num_slots private pure function num_slots(map) Returns the number of allocated slots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure(rehash_map), public, deferred, pass(map) :: rehash subroutine rehash_map(map, hasher) Prototype Changes the hashing method of the table entries to that of HASHER.\nArguments:\n map the table to be rehashed\n hasher the hasher function to be used for the table Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map procedure( hasher_fun ) :: hasher procedure(remove_entry), public, deferred, pass(map) :: remove subroutine remove_entry(map, key, existed) Prototype Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out), optional :: existed procedure(set_other), public, deferred, pass(map) :: set_other_data subroutine set_other(map, key, other, exists) Prototype Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n key - the key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: slots_bits private pure function slots_bits(map) Returns the number of bits used to specify the number of allocated\nslots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer procedure(total_depth), public, deferred, pass(map) :: total_depth function total_depth(map) Prototype Returns the total number of ones based offsets of slot entriesyy from\ntheir slot index for a hash map\n( Specifications )\nArguments:\n map - a hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int64) Source Code type , abstract :: hashmap_type !! Version: Experimental !! !! Type implementing an abstract hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-hashmap_type-abstract-type)) private integer ( int_calls ) :: call_count = 0 !! Number of calls integer ( int_calls ) :: probe_count = 0 !! Number of probes since last expansion integer ( int_calls ) :: total_probes = 0 !! Cumulative number of probes integer ( int_index ) :: num_entries = 0 !! Number of entries integer ( int_index ) :: num_free = 0 !! Number of elements in the free_list integer ( int32 ) :: nbits = default_bits !! Number of bits used to address the slots procedure ( hasher_fun ), pointer , nopass :: hasher => fnv_1_hasher !! Hash function contains procedure , non_overridable , pass ( map ) :: calls procedure , non_overridable , pass ( map ) :: entries procedure , non_overridable , pass ( map ) :: map_probes procedure , non_overridable , pass ( map ) :: num_slots procedure , non_overridable , pass ( map ) :: slots_bits procedure ( get_all_keys ), deferred , pass ( map ) :: get_all_keys procedure ( get_other ), deferred , pass ( map ) :: get_other_data procedure ( init_map ), deferred , pass ( map ) :: init procedure ( key_test ), deferred , pass ( map ) :: key_test procedure ( loading ), deferred , pass ( map ) :: loading procedure ( map_entry ), deferred , pass ( map ) :: map_entry procedure ( rehash_map ), deferred , pass ( map ) :: rehash procedure ( remove_entry ), deferred , pass ( map ) :: remove procedure ( set_other ), deferred , pass ( map ) :: set_other_data procedure ( total_depth ), deferred , pass ( map ) :: total_depth end type hashmap_type","tags":"","loc":"type/hashmap_type.html"},{"title":"open_hashmap_type – Fortran-lang/stdlib ","text":"type, public, extends( hashmap_type ) :: open_hashmap_type Type implementing an \"open\" hash map Finalization Procedures final :: free_open_map private interface free_open_map() Arguments None Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls private pure function calls(map) Returns the number of subroutine calls on an open hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: entries private pure function entries(map) Returns the number of entries in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: get_all_keys => get_all_open_keys interface private module subroutine get_all_open_keys(map, all_keys) Returns all the keys contained in a hashmap\nArguments:\n map - an open hash map\n all_keys - all the keys contained in a hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(in) :: map type( key_type ), intent(out), allocatable :: all_keys (:) procedure, public :: get_other_data => get_other_open_data interface private module subroutine get_other_open_data(map, key, other, exists) Returns the other data associated with the inverse table index\nArguments:\n map - an open hash table\n key - the key associated with a map entry\n other - the other data associated with the key\n exists - a logical flag indicating whether an entry with that key exists Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public :: init => init_open_map interface private module subroutine init_open_map(map, hasher, slots_bits, status) Routine to allocate an empty map with HASHER as the hash function,\n2 SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a\nmaximum of 2 MAX_BITS. All fields are initialized.\nArguments:\n map - the open hash maap to be initialized\n hasher - the hash function to be used to map keys to slots\n slots_bits - the number of bits used to map to the slots\n status - an integer error status flag with the allowed values:\n success - no problems were found\n alloc_fault - map % slots or map % inverse could not be allocated\n array_size_error - slots_bits is less than default_bitd or\n greater than max_bits Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(out) :: map procedure( hasher_fun ) :: hasher integer, intent(in), optional :: slots_bits integer(kind=int32), intent(out), optional :: status procedure, public :: key_test => open_key_test interface private module subroutine open_key_test(map, key, present) Returns a logical flag indicating whether KEY exists in the hash map\nArguments:\n map - the hash map of interest\n key - the key of interest\n present - a logical flag indicating whether KEY exists in the hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out) :: present procedure, public :: loading => open_loading interface private pure module function open_loading(map) Returns the number of entries relative to slots in a hash map\nArguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(in) :: map Return Value real procedure, public :: map_entry => map_open_entry interface private module subroutine map_open_entry(map, key, other, conflict) Inserts an entry into the hash table\nArguments:\n map - the hash table of interest\n key - the key identifying the entry\n other - other data associated with the key\n conflict - logical flag indicating whether the entry key conflicts\n with an existing key Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: map_probes private pure function map_probes(map) Returns the total number of table probes on a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: num_slots private pure function num_slots(map) Returns the number of allocated slots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: rehash => rehash_open_map interface private module subroutine rehash_open_map(map, hasher) Changes the hashing method of the table entries to that of HASHER.\nArguments:\n map the table to be rehashed\n hasher the hasher function to be used for the table Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map procedure( hasher_fun ) :: hasher procedure, public :: remove => remove_open_entry interface private module subroutine remove_open_entry(map, key, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out), optional :: existed procedure, public :: set_other_data => set_other_open_data interface private module subroutine set_other_open_data(map, key, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n key - the key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: slots_bits private pure function slots_bits(map) Returns the number of bits used to specify the number of allocated\nslots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer procedure, public :: total_depth => total_open_depth interface private module function total_open_depth(map) result(total_depth) Returns the total number of ones based offsets of slot entries from\ntheir slot index for a hash map\nArguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(in) :: map Return Value integer(kind=int64) Source Code type , extends ( hashmap_type ) :: open_hashmap_type !! Version: Experimental !! !! Type implementing an \"open\" hash map private integer ( int_index ) :: index_mask = 2_int_index ** default_bits - 1 !! Mask used in linear addressing type ( open_map_entry_pool ), pointer :: cache => null () !! Pool of allocated open_map_entry_type objects type ( open_map_entry_list ), pointer :: free_list => null () !! free list of map entries type ( open_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) integer ( int_index ), allocatable :: slots (:) !! Array of indices to the inverse Note # slots=size(slots) contains procedure :: get_all_keys => get_all_open_keys procedure :: get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: loading => open_loading procedure :: map_entry => map_open_entry procedure :: rehash => rehash_open_map procedure :: remove => remove_open_entry procedure :: set_other_data => set_other_open_data procedure :: total_depth => total_open_depth procedure :: key_test => open_key_test final :: free_open_map end type open_hashmap_type","tags":"","loc":"type/open_hashmap_type.html"},{"title":"bitset_64 – Fortran-lang/stdlib ","text":"type, public, extends( bitset_type ) :: bitset_64 Type for bitsets with no more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_64 interface private elemental module function all_64(self) result(all) Returns .true. if all bits in self are 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value logical procedure, public, pass(self) :: any => any_64 interface private elemental module function any_64(self) result(any) Returns .true. if any bit in self is 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value logical procedure, public, pass(self) :: bit_count => bit_count_64 interface private elemental module function bit_count_64(self) result(bit_count) Returns the number of non-zero bits in self . Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value integer(kind=bits_kind) procedure, public, pass(self) :: bits public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) generic, public :: clear => clear_bit , clear_range private interface clear_bit_large() Arguments None private interface clear_range_large() Arguments None procedure, public, pass(self) :: clear_bit => clear_bit_64 interface private elemental module subroutine clear_bit_64(self, pos) Sets to zero the bit at pos position in self . If pos is less than\nzero or greater than bits(self)-1 it is ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: clear_range => clear_range_64 interface private pure module subroutine clear_range_64(self, start_pos, stop_pos) Sets to zero all bits from the start_pos to stop_pos positions in self .\nIf stop_pos < start_pos then no bits are modified. Positions outside\nthe range 0 to bits(set)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos generic, public :: flip => flip_bit , flip_range private interface flip_bit_large() Arguments None private interface flip_range_large() Arguments None procedure, public, pass(self) :: flip_bit => flip_bit_64 interface private elemental module subroutine flip_bit_64(self, pos) Flips the bit value at the pos position in self , provided the position is\nvalid. If pos is less than 0 or greater than bits(self)-1 , no value is\nchanged. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: flip_range => flip_range_64 interface private pure module subroutine flip_range_64(self, start_pos, stop_pos) Flips all valid bits from the start_pos to the stop_pos positions in self . If stop_pos < start_pos no bits are flipped. Positions less than\n0 or greater than bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: from_string => from_string_64 interface private module subroutine from_string_64(self, string, status) Initializes the bitset self treating string as a binary literal status may have the values:\n* success - if no problems were found,\n* alloc_fault - if allocation of the bitset failed\n* char_string_too_large_error - if string was too large, or\n* char_string_invalid_error - if string had an invalid character. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status generic, public :: init => init_zero private interface init_zero_large() Arguments None procedure, public, pass(self) :: init_zero => init_zero_64 interface private module subroutine init_zero_64(self, bits, status) Creates the bitset, self , of size bits , with all bits initialized to\nzero. bits must be non-negative. If an error occurs and status is\nabsent then processing stops with an informative stop code. status will have one of the values:\n* success - if no problems were found,\n* alloc_fault - if memory allocation failed\n* array_size_invalid_error - if bits is either negative or larger\n than 64 with self of class bitset_64 . Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self integer(kind=bits_kind), intent(in) :: bits integer, intent(out), optional :: status procedure, public, pass(self) :: input => input_64 interface private module subroutine input_64(self, unit, status) Reads the components of the bitset, self , from the unformatted I/O\nunit, unit , assuming that the components were written using output .\nIf an error occurs and status is absent then processing stops with\nan informative stop code. status has one of the values:\n* success - if no problem was found\n* alloc_fault - if it failed allocating memory for self , or\n* array_size_invalid_error if the bits(self) in unit is negative\n or greater than 64 for a bitset_64 input.\n* read_failure - if it failed during the reads from unit Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self integer, intent(in) :: unit integer, intent(out), optional :: status procedure, public, pass(self) :: none => none_64 interface private elemental module function none_64(self) result(none) Returns .true. if none of the bits in self have the value 1. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value logical procedure, public, pass(self) :: not => not_64 interface private elemental module subroutine not_64(self) Sets the bits in self to their logical complement. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self procedure, public, pass(self) :: output => output_64 interface private module subroutine output_64(self, unit, status) Writes the components of the bitset, self , to the unformatted I/O\nunit, unit , in a unformatted sequence compatible with input . If status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success , or the value write_failure if the write failed. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer, intent(in) :: unit integer, intent(out), optional :: status generic, public :: read_bitset => read_bitset_string , read_bitset_unit private interface read_bitset_string_large() Arguments None private interface read_bitset_unit_large() Arguments None procedure, public, pass(self) :: read_bitset_string => read_bitset_string_64 interface private module subroutine read_bitset_string_64(self, string, status) Uses the bitset literal in the default character string , to define\nthe bitset, self . The literal may be preceded by an an arbitrary\nsequence of blank characters. If status is absent an error results\nin an error stop with an informative stop code. If status is present it has one of the values:\n* success - if no problems occurred,\n* alloc_fault - if allocation of memory for SELF failed,\n* array_size_invalid_error - if bits(self) in string is greater\n than 64 for a bitset_64 ,\n* char_string_invalid_error - if the bitset literal has an invalid\n character,\n* char_string_too_small_error - if the string ends before all the bits\n are read.\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented, Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_64 interface private module subroutine read_bitset_unit_64(self, unit, advance, status) Uses the bitset literal at the current position in the formatted\nfile with I/O unit, unit , to define the bitset, self . The literal\nmay be preceded by an an arbitrary sequence of blank characters.\nIf advance is present it must be either 'YES' or 'NO'. If absent\nit has the default value of 'YES' to determine whether advancing\nI/O occurs. If status is absent an error results in an error stop\nwith an informative stop code. If status is present it has one of\nthe values:\n* success - if no problem occurred,\n* alloc_fault - if allocation of self failed,\n* array_size_invalid_error - if bits(self) in the bitset literal\n is greater than 64 for a bitset_64 ,\n* char_string_invalid_error - if the read of the bitset literal found\n an invalid character,\n* eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal,\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented,\n* read_failure - if a read statement fails, Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status generic, public :: set => set_bit , set_range private interface set_bit_large() Arguments None private interface set_range_large() Arguments None procedure, public, pass(self) :: set_bit => set_bit_64 interface private elemental module subroutine set_bit_64(self, pos) Sets the value at the pos position in self , provided the position is\nvalid. If the position is less than 0 or greater than bits(self)-1 then self is unchanged. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: set_range => set_range_64 interface private pure module subroutine set_range_64(self, start_pos, stop_pos) Sets all valid bits to 1 from the start_pos to the stop_pos positions\nin self . If stop_pos < start_pos no bits are changed. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: test => test_64 interface private elemental module function test_64(self, pos) result(test) Returns .true. if the pos position is set, .false. otherwise. If pos is negative or greater than bits(self)-1 the result is .false. . Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value logical procedure, public, pass(self) :: to_string => to_string_64 interface private module subroutine to_string_64(self, string, status) Represents the value of self as a binary literal in string .\nStatus may have the values success or alloc_fault Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: value => value_64 interface private elemental module function value_64(self, pos) result(value) Returns 1 if the pos position is set, 0 otherwise. If pos is negative\nor greater than bits(set)-1 the result is 0. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value integer generic, public :: write_bitset => write_bitset_string , write_bitset_unit private interface write_bitset_string_large() Arguments None private interface write_bitset_unit_large() Arguments None procedure, public, pass(self) :: write_bitset_string => write_bitset_string_64 interface private module subroutine write_bitset_string_64(self, string, status) Writes a bitset literal to the allocatable default character string ,\nrepresenting the individual bit values in the bitset_64 , self .\nIf status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success , or the value alloc_fault if allocation of\nthe output string failed. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_64 interface private module subroutine write_bitset_unit_64(self, unit, advance, status) Writes a bitset literal to the I/O unit, unit , representing the\nindividual bit values in the bitset, self . By default or if advance is present with the value 'YES', advancing output is used.\nIf advance is present with the value 'NO', then the current record\nis not advanced by the write. If status is absent an error results\nin an error stop with an informative stop code. If status is\npresent it has the default value of success , the value alloc_fault if allocation of the output string failed, or write_failure if the write statement outputting the literal failed. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status Source Code type , extends ( bitset_type ) :: bitset_64 !! Version: experimental !! !! Type for bitsets with no more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private :: block = 0 contains procedure , pass ( self ) :: all => all_64 procedure , pass ( self ) :: any => any_64 procedure , pass ( self ) :: bit_count => bit_count_64 procedure , pass ( self ) :: clear_bit => clear_bit_64 procedure , pass ( self ) :: clear_range => clear_range_64 procedure , pass ( self ) :: flip_bit => flip_bit_64 procedure , pass ( self ) :: flip_range => flip_range_64 procedure , pass ( self ) :: from_string => from_string_64 procedure , pass ( self ) :: init_zero => init_zero_64 procedure , pass ( self ) :: input => input_64 procedure , pass ( self ) :: none => none_64 procedure , pass ( self ) :: not => not_64 procedure , pass ( self ) :: output => output_64 procedure , pass ( self ) :: read_bitset_string => read_bitset_string_64 procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_64 procedure , pass ( self ) :: set_bit => set_bit_64 procedure , pass ( self ) :: set_range => set_range_64 procedure , pass ( self ) :: test => test_64 procedure , pass ( self ) :: to_string => to_string_64 procedure , pass ( self ) :: value => value_64 procedure , pass ( self ) :: write_bitset_string => write_bitset_string_64 procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_64 end type bitset_64","tags":"","loc":"type/bitset_64.html"},{"title":"bitset_large – Fortran-lang/stdlib ","text":"type, public, extends( bitset_type ) :: bitset_large Type for bitsets with more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_large interface private elemental module function all_large(self) result(all) Returns .true. if all bits in self are 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value logical procedure, public, pass(self) :: any => any_large interface private elemental module function any_large(self) result(any) Returns .true. if any bit in self is 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value logical procedure, public, pass(self) :: bit_count => bit_count_large interface private elemental module function bit_count_large(self) result(bit_count) Returns the number of non-zero bits in self . Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value integer(kind=bits_kind) procedure, public, pass(self) :: bits public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) generic, public :: clear => clear_bit , clear_range private interface clear_bit_large() Arguments None private interface clear_range_large() Arguments None procedure, public, pass(self) :: clear_bit => clear_bit_large interface private elemental module subroutine clear_bit_large(self, pos) Sets to zero the bit at pos position in self . If pos is less than\nzero or greater than bits(self)-1 it is ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: clear_range => clear_range_large interface private pure module subroutine clear_range_large(self, start_pos, stop_pos) Sets to zero all bits from the start_pos to stop_pos positions in self .\nIf stop_pos < start_pos then no bits are modified. Positions outside\nthe range 0 to bits(set)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos generic, public :: flip => flip_bit , flip_range private interface flip_bit_large() Arguments None private interface flip_range_large() Arguments None procedure, public, pass(self) :: flip_bit => flip_bit_large interface private elemental module subroutine flip_bit_large(self, pos) Flips the bit value at the pos position in self , provided the position is\nvalid. If pos is less than 0 or greater than bits(self)-1 , no value is\nchanged. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: flip_range => flip_range_large interface private pure module subroutine flip_range_large(self, start_pos, stop_pos) Flips all valid bits from the start_pos to the stop_pos positions in self . If stop_pos < start_pos no bits are flipped. Positions less than\n0 or greater than bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: from_string => from_string_large interface private module subroutine from_string_large(self, string, status) Initializes the bitset self treating string as a binary literal status may have the values:\n* success - if no problems were found,\n* alloc_fault - if allocation of the bitset failed\n* char_string_too_large_error - if string was too large, or\n* char_string_invalid_error - if string had an invalid character. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status generic, public :: init => init_zero private interface init_zero_large() Arguments None procedure, public, pass(self) :: init_zero => init_zero_large interface private module subroutine init_zero_large(self, bits, status) Creates the bitset, self , of size bits , with all bits initialized to\nzero. bits must be non-negative. If an error occurs and status is\nabsent then processing stops with an informative stop code. status will have one of the values;\n* success - if no problems were found,\n* alloc_fault - if memory allocation failed\n* array_size_invalid_error - if bits is either negative or larger\n than 64 with self of class bitset_64 , or Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self integer(kind=bits_kind), intent(in) :: bits integer, intent(out), optional :: status procedure, public, pass(self) :: input => input_large interface private module subroutine input_large(self, unit, status) Reads the components of the bitset, self , from the unformatted I/O\nunit, unit , assuming that the components were written using output .\nIf an error occurs and status is absent then processing stops with\nan informative stop code. status has one of the values:\n* success - if no problem was found\n* alloc_fault - if it failed allocating memory for self , or\n* array_size_invalid_error if the bits(self) in unit is negative\n or greater than 64 for a bitset_64 input.\n* read_failure - if it failed during the reads from unit Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self integer, intent(in) :: unit integer, intent(out), optional :: status procedure, public, pass(self) :: none => none_large interface private elemental module function none_large(self) result(none) Returns .true. if none of the bits in self have the value 1. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value logical procedure, public, pass(self) :: not => not_large interface private elemental module subroutine not_large(self) Sets the bits in self to their logical complement Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self procedure, public, pass(self) :: output => output_large interface private module subroutine output_large(self, unit, status) Writes the components of the bitset, self , to the unformatted I/O\nunit, unit , in a unformatted sequence compatible with input . If status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success , or the value write_failure if the write failed. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer, intent(in) :: unit integer, intent(out), optional :: status generic, public :: read_bitset => read_bitset_string , read_bitset_unit private interface read_bitset_string_large() Arguments None private interface read_bitset_unit_large() Arguments None procedure, public, pass(self) :: read_bitset_string => read_bitset_string_large interface private module subroutine read_bitset_string_large(self, string, status) Uses the bitset literal in the default character string , to define\nthe bitset, self . The literal may be preceded by an an arbitrary\nsequence of blank characters. If status is absent an error results\nin an error stop with an informative stop code. If status is present it has one of the values\n* success - if no problems occurred,\n* alloc_fault - if allocation of memory for SELF failed,\n* array_size_invalid_error - if bits(self) in string is greater\n than 64 for a bitset_64 ,\n* char_string_invalid_error - if the bitset literal has an invalid\n character,\n* char_string_too_small_error - if the string ends before all the bits\n are read.\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented, Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_large interface private module subroutine read_bitset_unit_large(self, unit, advance, status) Uses the bitset literal at the current position in the formatted\nfile with I/O unit, unit , to define the bitset, self . The literal\nmay be preceded by an an arbitrary sequence of blank characters.\nIf advance is present it must be either 'YES' or 'NO'. If absent\nit has the default value of 'YES' to determine whether advancing\nI/O occurs. If status is absent an error results in an error stop\nwith an informative stop code. If status is present it has one of\nthe values:\n* success - if no problem occurred,\n* alloc_fault - if allocation of self failed,\n* array_size_invalid_error - if bits(self) in the bitset literal\n is greater than 64 for a bitset_64 ,\n* char_string_invalid_error - if the read of the bitset literal found\n an invalid character,\n* eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal,\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented,\n* read_failure - if a read statement fails, Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status generic, public :: set => set_bit , set_range private interface set_bit_large() Arguments None private interface set_range_large() Arguments None procedure, public, pass(self) :: set_bit => set_bit_large interface private elemental module subroutine set_bit_large(self, pos) Sets the value at the pos position in self , provided the position is\nvalid. If the position is less than 0 or greater than bits(self)-1 then self is unchanged. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: set_range => set_range_large interface private pure module subroutine set_range_large(self, start_pos, stop_pos) Sets all valid bits to 1 from the start_pos to the stop_pos positions\nin self . If stop_pos < start_pos no bits are changed. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: test => test_large interface private elemental module function test_large(self, pos) result(test) Returns .true. if the pos position is set, .false. otherwise. If pos is negative or greater than bits(self) - 1 the result is .false. . Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value logical procedure, public, pass(self) :: to_string => to_string_large interface private module subroutine to_string_large(self, string, status) Represents the value of self as a binary literal in string Status may have the values success or alloc_fault . Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: value => value_large interface private elemental module function value_large(self, pos) result(value) Returns 1 if the pos position is set, 0 otherwise. If pos is negative\nor greater than bits(set) - 1 the result is 0. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value integer generic, public :: write_bitset => write_bitset_string , write_bitset_unit private interface write_bitset_string_large() Arguments None private interface write_bitset_unit_large() Arguments None procedure, public, pass(self) :: write_bitset_string => write_bitset_string_large interface private module subroutine write_bitset_string_large(self, string, status) Writes a bitset literal to the allocatable default character string ,\nrepresenting the individual bit values in the bitset_large, self .\nIf status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success, or the value alloc_fault` if allocation of\nthe output string failed. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_large interface private module subroutine write_bitset_unit_large(self, unit, advance, status) Writes a bitset literal to the I/O unit, unit , representing the\nindividual bit values in the bitset, self . By default or if advance is present with the value 'YES', advancing output is used.\nIf advance is present with the value 'NO', then the current record\nis not advanced by the write. If status is absent an error results\nin an error stop with an informative stop code. If status is\npresent it has the default value of success , the value alloc_fault if allocation of the output string failed, or write_failure if the write statement outputting the literal failed. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status Source Code type , extends ( bitset_type ) :: bitset_large !! Version: experimental !! !! Type for bitsets with more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private , allocatable :: blocks (:) contains procedure , pass ( self ) :: all => all_large procedure , pass ( self ) :: any => any_large procedure , pass ( self ) :: bit_count => bit_count_large procedure , pass ( self ) :: clear_bit => clear_bit_large procedure , pass ( self ) :: clear_range => clear_range_large procedure , pass ( self ) :: flip_bit => flip_bit_large procedure , pass ( self ) :: flip_range => flip_range_large procedure , pass ( self ) :: from_string => from_string_large procedure , pass ( self ) :: init_zero => init_zero_large procedure , pass ( self ) :: input => input_large procedure , pass ( self ) :: none => none_large procedure , pass ( self ) :: not => not_large procedure , pass ( self ) :: output => output_large procedure , pass ( self ) :: & read_bitset_string => read_bitset_string_large procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_large procedure , pass ( self ) :: set_bit => set_bit_large procedure , pass ( self ) :: set_range => set_range_large procedure , pass ( self ) :: test => test_large procedure , pass ( self ) :: to_string => to_string_large procedure , pass ( self ) :: value => value_large procedure , pass ( self ) :: & write_bitset_string => write_bitset_string_large procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_large end type bitset_large","tags":"","loc":"type/bitset_large.html"},{"title":"bitset_type – Fortran-lang/stdlib ","text":"type, public :: bitset_type Parent type for bitset_64 and bitset_large ( Specification ) Type-Bound Procedures procedure(all_abstract), public, deferred, pass(self) :: all elemental function all_abstract(self) result(all) Prototype Returns .true. if all bits in self are 1, .false. otherwise. Example program example_all use stdlib_bitsets character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if ( bits ( set0 ) /= 33 ) then error stop \"FROM_STRING failed to interpret \" // & 'BITS_ALL' s size properly . \" else if ( .not. set0 % all() ) then error stop \" FROM_STRING failed to interpret \" // & \" BITS_ALL ' s value properly . \" else write(*,*) \" FROM_STRING transferred BITS_ALL properly \" // & \" into set0 . \" end if end program example_all Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value logical procedure(any_abstract), public, deferred, pass(self) :: any elemental function any_abstract(self) result(any) Prototype Returns .true. if any bit in self is 1, .false. otherwise. Example program example_any use stdlib_bitsets character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if ( . not . set0 % any () ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % any () ) then write ( * , * ) \"ANY interpreted SET0's value properly.\" end if end program example_any Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value logical procedure(bit_count_abstract), public, deferred, pass(self) :: bit_count elemental function bit_count_abstract(self) result(bit_count) Prototype Returns the number of non-zero bits in self . Example program example_bit_count use stdlib_bitsets character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % bit_count () == 0 ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % bit_count () == 1 ) then write ( * , * ) \"BIT_COUNT interpreted SET0's value properly.\" end if end program example_bit_count Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) procedure, public, pass(self) :: bits public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) generic, public :: clear => clear_bit , clear_range private interface clear_bit_large() Arguments None private interface clear_range_large() Arguments None procedure(clear_bit_abstract), public, deferred, pass(self) :: clear_bit elemental subroutine clear_bit_abstract(self, pos) Prototype Sets to zero the pos position in self . If pos is less than zero or\n greater than bits(self)-1 it is ignored. Example program example_clear use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( . not . set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is cleared.' call set0 % clear ( 0 , 164 ) if ( set0 % none () ) write ( * , * ) 'All bits are cleared.' end program example_clear Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure(clear_range_abstract), public, deferred, pass(self) :: clear_range pure subroutine clear_range_abstract(self, start_pos, stop_pos) Prototype Sets to zero all bits from the start_pos to stop_pos positions in set .\nIf stop_pos < start_pos then no bits are modified. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos generic, public :: flip => flip_bit , flip_range private interface flip_bit_large() Arguments None private interface flip_range_large() Arguments None procedure(flip_bit_abstract), public, deferred, pass(self) :: flip_bit elemental subroutine flip_bit_abstract(self, pos) Prototype Flips the value at the pos position in self , provided the position is\n valid. If pos is less than 0 or greater than bits(self)-1 , no value is\n changed. Example program example_flip use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % flip ( 165 ) if ( set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is flipped.' call set0 % flip ( 0 , 164 ) if ( set0 % all () ) write ( * , * ) 'All bits are flipped.' end program example_flip Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure(flip_range_abstract), public, deferred, pass(self) :: flip_range pure subroutine flip_range_abstract(self, start_pos, stop_pos) Prototype Flips all valid bits from the start_pos to the stop_pos positions in self . If stop_pos < start_pos no bits are flipped. Positions less than\n0 or greater than bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure(from_string_abstract), public, deferred, pass(self) :: from_string subroutine from_string_abstract(self, string, status) Prototype Initializes the bitset self treating string as a binary literal status may have the values:\n * success - if no problems were found,\n * alloc_fault - if allocation of the bitset failed\n * char_string_too_large_error - if string was too large, or\n * char_string_invalid_error - if string had an invalid character. Example program example_from_string use stdlib_bitsets character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if ( bits ( set0 ) /= 33 ) then error stop \"FROM_STRING failed to interpret \" // & 'BITS_ALL' s size properly . \" else if ( .not. set0 % all() ) then error stop \" FROM_STRING failed to interpret \" // & \" BITS_ALL ' s value properly . \" else write(*,*) \" FROM_STRING transferred BITS_ALL properly \" // & \" into set0 . \" end if end program example_from_string Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status generic, public :: init => init_zero private interface init_zero_large() Arguments None procedure(init_zero_abstract), public, deferred, pass(self) :: init_zero subroutine init_zero_abstract(self, bits, status) Prototype Creates the bitset, self , of size bits , with all bits initialized to\n zero. bits must be non-negative. If an error occurs and status is\n absent then processing stops with an informative stop code. status will have one of the values;\n * success - if no problems were found,\n * alloc_fault - if memory allocation failed\n * array_size_invalid_error - if bits is either negative or larger\n than 64 with self of class bitset_64 , or Example program example_init use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % bits () == 166 ) & write ( * , * ) ` SET0 has the proper size . ' if ( set0 % none() ) write(*,*) ' SET0 is properly initialized . ' end program example_init Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self integer(kind=bits_kind), intent(in) :: bits integer, intent(out), optional :: status procedure(input_abstract), public, deferred, pass(self) :: input subroutine input_abstract(self, unit, status) Prototype Reads the components of the bitset, self , from the unformatted I/O\n unit, unit , assuming that the components were written using output .\n If an error occurs and status is absent then processing stops with\n an informative stop code. status has one of the values:\n * success - if no problem was found\n * alloc_fault - if it failed allocating memory for self , or\n * array_size_invalid_error if the bits(self) in unit is negative\n or greater than 64 for a bitset_64 input.\n * read_failure - if it failed during the reads from unit Example program example_input character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_input Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self integer, intent(in) :: unit integer, intent(out), optional :: status procedure(none_abstract), public, deferred, pass(self) :: none elemental function none_abstract(self) result(none) Prototype Returns .true. if none of the bits in self have the value 1. Example program example_none use stdlib_bitsets character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_large ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % none () ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( . not . set0 % none () ) then write ( * , * ) \"NONE interpreted SET0's value properly.\" end if end program example_none Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value logical procedure(not_abstract), public, deferred, pass(self) :: not elemental subroutine not_abstract(self) Prototype Sets the bits in self to their logical complement Example program example_not use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 155 ) if ( set0 % none () ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % not () if ( set0 % all () ) then write ( * , * ) \"ALL interpreted SET0's value properly.\" end if end program example_not Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self procedure(output_abstract), public, deferred, pass(self) :: output subroutine output_abstract(self, unit, status) Prototype Writes the components of the bitset, self , to the unformatted I/O\n unit, unit , in a unformatted sequence compatible with input . If status is absent an error results in an error stop with an\n informative stop code. If status is present it has the default\n value of success , or the value write_failure if the write failed. Example program example_output character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_output Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer, intent(in) :: unit integer, intent(out), optional :: status generic, public :: read_bitset => read_bitset_string , read_bitset_unit private interface read_bitset_string_large() Arguments None private interface read_bitset_unit_large() Arguments None procedure(read_bitset_string_abstract), public, deferred, pass(self) :: read_bitset_string subroutine read_bitset_string_abstract(self, string, status) Prototype Uses the bitset literal in the default character string , to define\n the bitset, self . The literal may be preceded by an an arbitrary\n sequence of blank characters. If status is absent an error results\n in an error stop with an informative stop code. If status is present it has one of the values\n * success - if no problems occurred,\n * alloc_fault - if allocation of memory for SELF failed,\n * array_size_invalid_error - if bits(self) in string is greater\n than 64 for a bitset_64 ,\n * char_string_invalid_error - if the bitset literal has an invalid\n character,\n * char_string_too_small_error - if the string ends before all the bits\n are read.\n * integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented, Example program example_read_bitset character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_33 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) WRITE_BITSET to READ_BITSET through unit worked . ' end if end program example_read_bitset Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status procedure(read_bitset_unit_abstract), public, deferred, pass(self) :: read_bitset_unit subroutine read_bitset_unit_abstract(self, unit, advance, status) Prototype Uses the bitset literal at the current position in the formatted\nfile with I/O unit, unit , to define the bitset, self . The literal\nmay be preceded by an an arbitrary sequence of blank characters.\nIf advance is present it must be either 'YES' or 'NO'. If absent\nit has the default value of 'YES' to determine whether advancing\nI/O occurs. If status is absent an error results in an error stop\nwith an informative stop code. If status is present it has one of\nthe values:\n* success - if no problem occurred,\n* alloc_fault - if allocation of self failed,\n* array_size_invalid_error - if bits(self) in the bitset literal\n is greater than 64 for a bitset_64 ,\n* char_string_invalid_error - if the read of the bitset literal found\n an invalid character,\n* eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal,\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented,\n* read_failure - if a read statement fails, Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status generic, public :: set => set_bit , set_range private interface set_bit_large() Arguments None private interface set_range_large() Arguments None procedure(set_bit_abstract), public, deferred, pass(self) :: set_bit elemental subroutine set_bit_abstract(self, pos) Prototype Sets the value at the pos position in self , provided the position is\n valid. If the position is less than 0 or greater than bits(self)-1 then self is unchanged. Example program example_set use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % set ( 165 ) if ( set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is set.' call set0 % set ( 0 , 164 ) if ( set0 % all () ) write ( * , * ) 'All bits are set.' end program example_set Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure(set_range_abstract), public, deferred, pass(self) :: set_range pure subroutine set_range_abstract(self, start_pos, stop_pos) Prototype Sets all valid bits to 1 from the start_pos to the stop_pos positions\nin self . If stop_pos < start_pos no bits are changed. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure(test_abstract), public, deferred, pass(self) :: test elemental function test_abstract(self, pos) result(test) Prototype Returns .true. if the pos position is set, .false. otherwise. If pos is negative or greater than bits(self) - 1 the result is .false. . Example program example_test use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( . not . set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is set.' end program example_test Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value logical procedure(to_string_abstract), public, deferred, pass(self) :: to_string subroutine to_string_abstract(self, string, status) Prototype Represents the value of self as a binary literal in string Status may have the values success or alloc_fault . Example program example_to_string use stdlib_bitsets character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 character (:), allocatable :: new_string call set0 % init ( 33 ) call set0 % not () call set0 % to_string ( new_string ) if ( new_string == bits_all ) then write ( * , * ) \"TO_STRING transferred BITS0 properly\" // & \" into NEW_STRING.\" end if end program example_to_string Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure(value_abstract), public, deferred, pass(self) :: value elemental function value_abstract(self, pos) result(value) Prototype Returns 1 if the pos position is set, 0 otherwise. If pos is negative\n or greater than bits(set) - 1 the result is 0. Example program example_value use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( set0 % value ( 165 ) == 0 ) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % value ( 165 ) == 1 ) write ( * , * ) 'Bit 165 is set.' end program example_value Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value integer generic, public :: write_bitset => write_bitset_string , write_bitset_unit private interface write_bitset_string_large() Arguments None private interface write_bitset_unit_large() Arguments None procedure(write_bitset_string_abstract), public, deferred, pass(self) :: write_bitset_string subroutine write_bitset_string_abstract(self, string, status) Prototype Writes a bitset literal to the allocatable default character string ,\n representing the individual bit values in the bitset_type , self .\n If status is absent an error results in an error stop with an\n informative stop code. If status is present it has the default\n value of success , or the value alloc_fault if allocation of\n the output string failed. Example program example_write_bitset character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_33 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) WRITE_BITSET to READ_BITSET through unit worked . ' end if end program example_write_bitset Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure(write_bitset_unit_abstract), public, deferred, pass(self) :: write_bitset_unit subroutine write_bitset_unit_abstract(self, unit, advance, status) Prototype Writes a bitset literal to the I/O unit, unit , representing the\nindividual bit values in the bitset_t , self . If an error occurs then\nprocessing stops with a message to error_unit . By default or if advance is present with the value 'YES', advancing output is used.\nIf advance is present with the value 'NO', then the current record\nis not advanced by the write. If status is absent, an error results\nin an error stop with an informative stop code. If status is\npresent it has the default value of success , the value alloc_fault if allocation of the output string failed, write_failure if the write statement outputting the literal failed. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status Source Code type , abstract :: bitset_type !! version: experimental !! !! Parent type for bitset_64 and bitset_large ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( bits_kind ) :: num_bits = 0_bits_kind contains procedure ( all_abstract ), deferred , pass ( self ) :: all procedure ( any_abstract ), deferred , pass ( self ) :: any procedure ( bit_count_abstract ), deferred , pass ( self ) :: bit_count procedure , pass ( self ) :: bits procedure ( clear_bit_abstract ), deferred , pass ( self ) :: clear_bit procedure ( clear_range_abstract ), deferred , pass ( self ) :: clear_range generic :: clear => clear_bit , clear_range procedure ( flip_bit_abstract ), deferred , pass ( self ) :: flip_bit procedure ( flip_range_abstract ), deferred , pass ( self ) :: flip_range generic :: flip => flip_bit , flip_range procedure ( from_string_abstract ), deferred , pass ( self ) :: from_string procedure ( init_zero_abstract ), deferred , pass ( self ) :: init_zero generic :: init => init_zero procedure ( input_abstract ), deferred , pass ( self ) :: input procedure ( none_abstract ), deferred , pass ( self ) :: none procedure ( not_abstract ), deferred , pass ( self ) :: not procedure ( output_abstract ), deferred , pass ( self ) :: output procedure ( read_bitset_string_abstract ), deferred , pass ( self ) :: & read_bitset_string procedure ( read_bitset_unit_abstract ), deferred , pass ( self ) :: & read_bitset_unit generic :: read_bitset => read_bitset_string , read_bitset_unit procedure ( set_bit_abstract ), deferred , pass ( self ) :: set_bit procedure ( set_range_abstract ), deferred , pass ( self ) :: set_range generic :: set => set_bit , set_range procedure ( test_abstract ), deferred , pass ( self ) :: test procedure ( to_string_abstract ), deferred , pass ( self ) :: to_string procedure ( value_abstract ), deferred , pass ( self ) :: value procedure ( write_bitset_string_abstract ), deferred , pass ( self ) :: & write_bitset_string procedure ( write_bitset_unit_abstract ), deferred , pass ( self ) :: & write_bitset_unit generic :: write_bitset => write_bitset_string , write_bitset_unit end type bitset_type","tags":"","loc":"type/bitset_type.html"},{"title":"linalg_state_type – Fortran-lang/stdlib ","text":"type, public :: linalg_state_type linalg_state_type defines a state return type for a\nlinear algebra routine. State contains a status flag, a comment, and a\nprocedure specifier that can be used to mark where the error happened Components Type Visibility Attributes Name Initial character(len=MSG_LENGTH), public :: message = repeat(' ', MSG_LENGTH) Message associated to the current state integer(kind=ilp), public :: state = LINALG_SUCCESS The current exit state character(len=NAME_LENGTH), public :: where_at = repeat(' ', NAME_LENGTH) Location of the state change Constructor public interface linalg_state_type private pure function new_state(where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: where_at Location integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) private pure function new_state_nowhere(flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) result(new_state) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) Type-Bound Procedures procedure, public :: destroy => state_destroy Cleanup private elemental subroutine state_destroy(this) Cleanup the object Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(inout) :: this procedure, public :: error => state_is_error private elemental function state_is_error(this) Check if the current state is an error state Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value logical(kind=lk) procedure, public :: ok => state_is_ok State properties private elemental function state_is_ok(this) Check if the current state is successful Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value logical(kind=lk) procedure, public :: print => state_print Print error message private pure function state_print(this) result(msg) Produce a nice error string Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value character(len=:), allocatable procedure, public :: print_msg => state_message private pure function state_message(this) result(msg) Formatted message Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value character(len=:), allocatable Source Code type :: linalg_state_type !> The current exit state integer ( ilp ) :: state = LINALG_SUCCESS !> Message associated to the current state character ( len = MSG_LENGTH ) :: message = repeat ( ' ' , MSG_LENGTH ) !> Location of the state change character ( len = NAME_LENGTH ) :: where_at = repeat ( ' ' , NAME_LENGTH ) contains !> Cleanup procedure :: destroy => state_destroy !> Print error message procedure :: print => state_print procedure :: print_msg => state_message !> State properties procedure :: ok => state_is_ok procedure :: error => state_is_error end type linalg_state_type","tags":"","loc":"type/linalg_state_type.html"},{"title":"key_type – Fortran-lang/stdlib ","text":"type, public :: key_type A wrapper type for the key's true type Components Type Visibility Attributes Name Initial integer(kind=int8), public, allocatable :: value (:) Source Code type :: key_type !! Version: Experimental !! !! A wrapper type for the key's true type ! private integer ( int8 ), allocatable :: value (:) end type key_type","tags":"","loc":"type/key_type.html"},{"title":"other_type – Fortran-lang/stdlib ","text":"type, public :: other_type A wrapper type for the other data's true type Components Type Visibility Attributes Name Initial class(*), public, allocatable :: value Source Code type :: other_type !! Version: Experimental !! !! A wrapper type for the other data's true type ! private class ( * ), allocatable :: value end type other_type","tags":"","loc":"type/other_type.html"},{"title":"string_type – Fortran-lang/stdlib ","text":"type, public :: string_type sequence String type holding an arbitrary sequence of characters. Constructor public interface string_type Constructor for new string instances private elemental module function new_string(string) result(new) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: string Return Value type( string_type ) private elemental module function new_string_from_integer_int16(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int32(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int64(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int8(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_logical_lk(val) result(new) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: val Return Value type( string_type ) Source Code type :: string_type ! Use the sequence statement below as a hack to prevent extending this type. ! It is not used for storage association. sequence private character ( len = :), allocatable :: raw end type string_type","tags":"","loc":"type/string_type.html"},{"title":"hasher_fun – Fortran-lang/stdlib","text":"interface Abstract interface to a 64 bit hash function operating on a KEY_TYPE public pure function hasher_fun(key) result(hash_value) Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash)","tags":"","loc":"interface/hasher_fun.html"},{"title":"optval – Fortran-lang/stdlib","text":"public interface optval Fallback value for optional arguments\n( Specification ) Module Procedures private pure elemental function optval_rsp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), optional :: x real(kind=sp), intent(in) :: default Return Value real(kind=sp) private pure elemental function optval_rdp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), optional :: x real(kind=dp), intent(in) :: default Return Value real(kind=dp) private pure elemental function optval_iint8(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), optional :: x integer(kind=int8), intent(in) :: default Return Value integer(kind=int8) private pure elemental function optval_iint16(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in), optional :: x integer(kind=int16), intent(in) :: default Return Value integer(kind=int16) private pure elemental function optval_iint32(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in), optional :: x integer(kind=int32), intent(in) :: default Return Value integer(kind=int32) private pure elemental function optval_iint64(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in), optional :: x integer(kind=int64), intent(in) :: default Return Value integer(kind=int64) private pure elemental function optval_csp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), optional :: x complex(kind=sp), intent(in) :: default Return Value complex(kind=sp) private pure elemental function optval_cdp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), optional :: x complex(kind=dp), intent(in) :: default Return Value complex(kind=dp) private pure elemental function optval_ll1(x, default) result(y) Arguments Type Intent Optional Attributes Name logical, intent(in), optional :: x logical, intent(in) :: default Return Value logical private pure function optval_character(x, default) result(y) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: x character(len=*), intent(in) :: default Return Value character(len=:), allocatable","tags":"","loc":"interface/optval.html"},{"title":"arg_select – Fortran-lang/stdlib","text":"public interface arg_select ( Specification ) Module Procedures private subroutine arg_select_1_iint8_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ).","tags":"","loc":"interface/arg_select.html"},{"title":"select – Fortran-lang/stdlib","text":"public interface select ( Specification ) Module Procedures private subroutine select_1_iint8_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ).","tags":"","loc":"interface/select.html"},{"title":"is_alpha – Fortran-lang/stdlib","text":"public pure function is_alpha(c) Checks whether c is an ASCII letter (A .. Z, a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_alpha.html"},{"title":"is_alphanum – Fortran-lang/stdlib","text":"public pure function is_alphanum(c) Checks whether c is a letter or a number (0 .. 9, a .. z, A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_alphanum.html"},{"title":"is_ascii – Fortran-lang/stdlib","text":"public pure function is_ascii(c) Checks whether or not c is in the ASCII character set -\ni.e. in the range 0 .. 0x7F. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_ascii.html"},{"title":"is_blank – Fortran-lang/stdlib","text":"public pure function is_blank(c) Checks whether or not c is a blank character. That includes the\nonly the space and tab characters Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_blank.html"},{"title":"is_control – Fortran-lang/stdlib","text":"public pure function is_control(c) Checks whether c is a control character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_control.html"},{"title":"is_digit – Fortran-lang/stdlib","text":"public pure function is_digit(c) Checks whether c is a digit (0 .. 9). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_digit.html"},{"title":"is_graphical – Fortran-lang/stdlib","text":"public pure function is_graphical(c) Checks whether or not c is a printable character other than the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_graphical.html"},{"title":"is_hex_digit – Fortran-lang/stdlib","text":"public pure function is_hex_digit(c) Checks whether c is a digit in base 16 (0 .. 9, A .. F, a .. f). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_hex_digit.html"},{"title":"is_lower – Fortran-lang/stdlib","text":"public pure function is_lower(c) Checks whether c is a lowercase ASCII letter (a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_lower.html"},{"title":"is_octal_digit – Fortran-lang/stdlib","text":"public pure function is_octal_digit(c) Checks whether c is a digit in base 8 (0 .. 7). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_octal_digit.html"},{"title":"is_printable – Fortran-lang/stdlib","text":"public pure function is_printable(c) Checks whether or not c is a printable character - including the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_printable.html"},{"title":"is_punctuation – Fortran-lang/stdlib","text":"public pure function is_punctuation(c) Checks whether or not c is a punctuation character. That includes\nall ASCII characters which are not control characters, letters,\ndigits, or whitespace. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_punctuation.html"},{"title":"is_upper – Fortran-lang/stdlib","text":"public pure function is_upper(c) Checks whether c is an uppercase ASCII letter (A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_upper.html"},{"title":"is_white – Fortran-lang/stdlib","text":"public pure function is_white(c) Checks whether or not c is a whitespace character. That includes the\nspace, tab, vertical tab, form feed, carriage return, and linefeed\ncharacters. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_white.html"},{"title":"reverse – Fortran-lang/stdlib","text":"public pure function reverse(string) result(reverse_string) Reverse the character order in the input character variable\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function reverse ( string ) result ( reverse_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: reverse_string integer :: i , n n = len ( string ) do i = 1 , n reverse_string ( n - i + 1 : n - i + 1 ) = string ( i : i ) end do end function reverse","tags":"","loc":"proc/reverse.html"},{"title":"to_lower – Fortran-lang/stdlib","text":"public pure function to_lower(string) result(lower_string) Convert character variable to lower case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_lower ( string ) result ( lower_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: lower_string integer :: i do i = 1 , len ( string ) lower_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_lower","tags":"","loc":"proc/to_lower.html"},{"title":"to_sentence – Fortran-lang/stdlib","text":"public pure function to_sentence(string) result(sentence_string) Converts character sequence to sentence case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_sentence ( string ) result ( sentence_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: sentence_string integer :: i , n n = len ( string ) do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then sentence_string ( i : i ) = char_to_upper ( string ( i : i )) n = i exit else sentence_string ( i : i ) = string ( i : i ) end if end do do i = n + 1 , len ( string ) sentence_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_sentence","tags":"","loc":"proc/to_sentence.html"},{"title":"to_title – Fortran-lang/stdlib","text":"public pure function to_title(string) result(title_string) Converts character sequence to title case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_title ( string ) result ( title_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: title_string integer :: i logical :: capitalize_switch capitalize_switch = . true . do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then if ( capitalize_switch ) then title_string ( i : i ) = char_to_upper ( string ( i : i )) capitalize_switch = . false . else title_string ( i : i ) = char_to_lower ( string ( i : i )) end if else title_string ( i : i ) = string ( i : i ) capitalize_switch = . true . end if end do end function to_title","tags":"","loc":"proc/to_title.html"},{"title":"to_upper – Fortran-lang/stdlib","text":"public pure function to_upper(string) result(upper_string) Convert character variable to upper case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_upper ( string ) result ( upper_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: upper_string integer :: i do i = 1 , len ( string ) upper_string ( i : i ) = char_to_upper ( string ( i : i )) end do end function to_upper","tags":"","loc":"proc/to_upper.html"},{"title":"falseloc – Fortran-lang/stdlib","text":"public pure function falseloc(array, lbound) result(loc) Return the positions of the false elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(.not.array)) Locations of false elements Source Code pure function falseloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of false elements integer :: loc ( count (. not . array )) call logicalloc ( loc , array , . false ., lbound ) end function falseloc","tags":"","loc":"proc/falseloc.html"},{"title":"trueloc – Fortran-lang/stdlib","text":"public pure function trueloc(array, lbound) result(loc) Return the positions of the true elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(array)) Locations of true elements Source Code pure function trueloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of true elements integer :: loc ( count ( array )) call logicalloc ( loc , array , . true ., lbound ) end function trueloc","tags":"","loc":"proc/trueloc.html"},{"title":"operator(+) – Fortran-lang/stdlib","text":"public interface operator(+) Functions private pure module function add(lval, rval) result(code) Add two escape sequences, attributes in the right value override the left value ones. Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: lval First escape code type( ansi_code ), intent(in) :: rval Second escape code Return Value type( ansi_code ) Combined escape code","tags":"","loc":"interface/operator(+).html"},{"title":"operator(//) – Fortran-lang/stdlib","text":"public interface operator(//) Functions private pure module function concat_left(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value character(len=:), allocatable Concatenated string private pure module function concat_left_str(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value type( string_type ) Concatenated string private pure module function concat_right(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence character(len=*), intent(in) :: rval String to add the escape code to Return Value character(len=:), allocatable Concatenated string private pure module function concat_right_str(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence type( string_type ), intent(in) :: rval String to add the escape code to Return Value type( string_type ) Concatenated string","tags":"","loc":"interface/operator(SLASHSLASH).html"},{"title":"to_string – Fortran-lang/stdlib","text":"public interface to_string Functions private pure module function to_string_ansi_code(code) result(str) Transform a color code into an actual ANSI escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Color code to be used Return Value character(len=:), allocatable ANSI escape sequence representing the color code","tags":"","loc":"interface/to_string.html"},{"title":"stdlib_sasum – Fortran-lang/stdlib","text":"public pure function stdlib_sasum(n, sx, incx) SASUM takes the sum of the absolute values.\nuses unrolled loops for increment equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_sasum ( n , sx , incx ) !! SASUM takes the sum of the absolute values. !! uses unrolled loops for increment equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_sasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + abs ( sx ( i )) end do if ( n < 6 ) then stdlib_sasum = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 stemp = stemp + abs ( sx ( i )) + abs ( sx ( i + 1 )) + abs ( sx ( i + 2 )) + abs ( sx ( i + 3 )) + abs ( sx ( i + & 4 )) + abs ( sx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( sx ( i )) end do end if stdlib_sasum = stemp return end function stdlib_sasum","tags":"","loc":"proc/stdlib_sasum.html"},{"title":"stdlib_scasum – Fortran-lang/stdlib","text":"public pure function stdlib_scasum(n, cx, incx) SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a single precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_scasum ( n , cx , incx ) !! SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a single precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do end if stdlib_scasum = stemp return end function stdlib_scasum","tags":"","loc":"proc/stdlib_scasum.html"},{"title":"stdlib_scnrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_scnrm2(n, x, incx) SCNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSCNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure function stdlib_scnrm2 ( n , x , incx ) !! SCNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SCNRM2 := sqrt( x**H*x ) real ( sp ) :: stdlib_scnrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_scnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = sp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_scnrm2 = scl * sqrt ( sumsq ) return end function stdlib_scnrm2","tags":"","loc":"proc/stdlib_scnrm2.html"},{"title":"stdlib_sdot – Fortran-lang/stdlib","text":"public pure function stdlib_sdot(n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_sdot ( n , sx , incx , sy , incy ) !! SDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stemp = zero stdlib_sdot = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + sx ( i ) * sy ( i ) end do if ( n < 5 ) then stdlib_sdot = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 stemp = stemp + sx ( i ) * sy ( i ) + sx ( i + 1 ) * sy ( i + 1 ) + sx ( i + 2 ) * sy ( i + 2 ) + sx ( i + 3 ) * sy ( i + 3 ) + & sx ( i + 4 ) * sy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = stemp + sx ( ix ) * sy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_sdot = stemp return end function stdlib_sdot","tags":"","loc":"proc/stdlib_sdot.html"},{"title":"stdlib_sdsdot – Fortran-lang/stdlib","text":"public pure function stdlib_sdsdot(n, sb, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation.\nReturns S.P. result with dot product accumulated in D.P.\nSDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I INCX) SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N) INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sb real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_sdsdot ( n , sb , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation. !! Returns S.P. result with dot product accumulated in D.P. !! SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sb integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! Local Scalars real ( dp ) :: dsdot integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real dsdot = sb if ( n <= 0 ) then stdlib_sdsdot = dsdot return end if if ( incx == incy . and . incx > 0 ) then ! code for equal and positive increments. ns = n * incx do i = 1 , ns , incx dsdot = dsdot + real ( sx ( i ), KIND = sp ) * real ( sy ( i ), KIND = sp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n dsdot = dsdot + real ( sx ( kx ), KIND = sp ) * real ( sy ( ky ), KIND = sp ) kx = kx + incx ky = ky + incy end do end if stdlib_sdsdot = dsdot return end function stdlib_sdsdot","tags":"","loc":"proc/stdlib_sdsdot.html"},{"title":"stdlib_snrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_snrm2(n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure function stdlib_snrm2 ( n , x , incx ) !! SNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SNRM2 := sqrt( x'*x ). real ( sp ) :: stdlib_snrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_snrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_snrm2 = scl * sqrt ( sumsq ) return end function stdlib_snrm2","tags":"","loc":"proc/stdlib_snrm2.html"},{"title":"stdlib_saxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_saxpy(n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_saxpy ( n , sa , sx , incx , sy , incy ) !! SAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( inout ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( sa == 0.0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sy ( i ) + sa * sx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 sy ( i ) = sy ( i ) + sa * sx ( i ) sy ( i + 1 ) = sy ( i + 1 ) + sa * sx ( i + 1 ) sy ( i + 2 ) = sy ( i + 2 ) + sa * sx ( i + 2 ) sy ( i + 3 ) = sy ( i + 3 ) + sa * sx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sy ( iy ) + sa * sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_saxpy","tags":"","loc":"proc/stdlib_saxpy.html"},{"title":"stdlib_scopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_scopy(n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_scopy ( n , sx , incx , sy , incy ) !! SCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( out ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 sy ( i ) = sx ( i ) sy ( i + 1 ) = sx ( i + 1 ) sy ( i + 2 ) = sx ( i + 2 ) sy ( i + 3 ) = sx ( i + 3 ) sy ( i + 4 ) = sx ( i + 4 ) sy ( i + 5 ) = sx ( i + 5 ) sy ( i + 6 ) = sx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_scopy","tags":"","loc":"proc/stdlib_scopy.html"},{"title":"stdlib_sgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! SGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_sgbmv","tags":"","loc":"proc/stdlib_sgbmv.html"},{"title":"stdlib_sgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_sgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_sgemm","tags":"","loc":"proc/stdlib_sgemm.html"},{"title":"stdlib_sgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! SGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_sgemv","tags":"","loc":"proc/stdlib_sgemv.html"},{"title":"stdlib_sger – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sger(m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_sger ( m , n , alpha , x , incx , y , incy , a , lda ) !! SGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_sger","tags":"","loc":"proc/stdlib_sger.html"},{"title":"stdlib_srot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srot(n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Source Code pure subroutine stdlib_srot ( n , sx , incx , sy , incy , c , s ) !! applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n stemp = c * sx ( i ) + s * sy ( i ) sy ( i ) = c * sy ( i ) - s * sx ( i ) sx ( i ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = c * sx ( ix ) + s * sy ( iy ) sy ( iy ) = c * sy ( iy ) - s * sx ( ix ) sx ( ix ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_srot","tags":"","loc":"proc/stdlib_srot.html"},{"title":"stdlib_srotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srotg(a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s Source Code pure subroutine stdlib_srotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( inout ) :: a , b real ( sp ), intent ( out ) :: c , s ! Local Scalars real ( sp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_srotg","tags":"","loc":"proc/stdlib_srotg.html"},{"title":"stdlib_srotm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srotm(n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) Source Code pure subroutine stdlib_srotm ( n , sx , incx , sy , incy , sparam ) !! SROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}SX^T\\\\SY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of SX are in !! SX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for SY using LY and INCY. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SH_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=-2}. !! See SROTMG for a description of data storage in SPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sparam ( 5 ) real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: sflag , sh11 , sh12 , sh21 , sh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_sp two = 2.0_sp sflag = sparam ( 1 ) if ( n <= 0 . or . ( sflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z * sh12 sy ( i ) = w * sh21 + z * sh22 end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w + z * sh12 sy ( i ) = w * sh21 + z end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z sy ( i ) = - w + sh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z * sh12 sy ( ky ) = w * sh21 + z * sh22 kx = kx + incx ky = ky + incy end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w + z * sh12 sy ( ky ) = w * sh21 + z kx = kx + incx ky = ky + incy end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z sy ( ky ) = - w + sh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_srotm","tags":"","loc":"proc/stdlib_srotm.html"},{"title":"stdlib_srotmg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srotmg(sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) Source Code pure subroutine stdlib_srotmg ( sd1 , sd2 , sx1 , sy1 , sparam ) !! SROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{SD_1}\\cdot SX_1,\\sqrt{SD_2}\\cdot SY_2} \\right]^T. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SD_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=2}. !! Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( inout ) :: sd1 , sd2 , sx1 real ( sp ), intent ( in ) :: sy1 ! Array Arguments real ( sp ), intent ( out ) :: sparam ( 5 ) ! ===================================================================== ! Local Scalars real ( sp ) :: gam , gamsq , one , rgamsq , sflag , sh11 , sh12 , sh21 , sh22 , sp1 , sp2 , sq1 , sq2 ,& stemp , su , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_sp one = 1.0_sp two = 2.0_sp gam = 409 6.0_sp gamsq = 1.67772e7_sp rgamsq = 5.96046e-8_sp if ( sd1 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else ! case-sd1-nonnegative sp2 = sd2 * sy1 if ( sp2 == zero ) then sflag = - two sparam ( 1 ) = sflag return end if ! regular-case.. sp1 = sd1 * sx1 sq2 = sp2 * sy1 sq1 = sp1 * sx1 if ( abs ( sq1 ) > abs ( sq2 )) then sh21 = - sy1 / sx1 sh12 = sp2 / sp1 su = one - sh12 * sh21 if ( su > zero ) then sflag = zero sd1 = sd1 / su sd2 = sd2 / su sx1 = sx1 * su else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero end if else if ( sq2 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else sflag = one sh11 = sp1 / sp2 sh22 = sx1 / sy1 su = one + sh11 * sh22 stemp = sd2 / su sd2 = sd1 / su sd1 = stemp sx1 = sy1 * su end if end if ! procedure..scale-check if ( sd1 /= zero ) then do while (( sd1 <= rgamsq ) . or . ( sd1 >= gamsq )) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( sd1 <= rgamsq ) then sd1 = sd1 * gam ** 2 sx1 = sx1 / gam sh11 = sh11 / gam sh12 = sh12 / gam else sd1 = sd1 / gam ** 2 sx1 = sx1 * gam sh11 = sh11 * gam sh12 = sh12 * gam end if enddo end if if ( sd2 /= zero ) then do while ( ( abs ( sd2 ) <= rgamsq ) . or . ( abs ( sd2 ) >= gamsq ) ) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( abs ( sd2 ) <= rgamsq ) then sd2 = sd2 * gam ** 2 sh21 = sh21 / gam sh22 = sh22 / gam else sd2 = sd2 / gam ** 2 sh21 = sh21 * gam sh22 = sh22 * gam end if end do end if end if if ( sflag < zero ) then sparam ( 2 ) = sh11 sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 sparam ( 5 ) = sh22 else if ( sflag == zero ) then sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 else sparam ( 2 ) = sh11 sparam ( 5 ) = sh22 end if sparam ( 1 ) = sflag return end subroutine stdlib_srotmg","tags":"","loc":"proc/stdlib_srotmg.html"},{"title":"stdlib_ssbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_ssbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! SSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssbmv","tags":"","loc":"proc/stdlib_ssbmv.html"},{"title":"stdlib_sscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sscal(n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_sscal ( n , sa , sx , incx ) !! SSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m sx ( i ) = sa * sx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 sx ( i ) = sa * sx ( i ) sx ( i + 1 ) = sa * sx ( i + 1 ) sx ( i + 2 ) = sa * sx ( i + 2 ) sx ( i + 3 ) = sa * sx ( i + 3 ) sx ( i + 4 ) = sa * sx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx sx ( i ) = sa * sx ( i ) end do end if return end subroutine stdlib_sscal","tags":"","loc":"proc/stdlib_sscal.html"},{"title":"stdlib_sspmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! SSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_sspmv","tags":"","loc":"proc/stdlib_sspmv.html"},{"title":"stdlib_sspr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sspr(uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_sspr ( uplo , n , alpha , x , incx , ap ) !! SSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr","tags":"","loc":"proc/stdlib_sspr.html"},{"title":"stdlib_sspr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sspr2(uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_sspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! SSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr2","tags":"","loc":"proc/stdlib_sspr2.html"},{"title":"stdlib_sswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sswap(n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sswap ( n , sx , incx , sy , incy ) !! SSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp stemp = sx ( i + 1 ) sx ( i + 1 ) = sy ( i + 1 ) sy ( i + 1 ) = stemp stemp = sx ( i + 2 ) sx ( i + 2 ) = sy ( i + 2 ) sy ( i + 2 ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = sx ( ix ) sx ( ix ) = sy ( iy ) sy ( iy ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_sswap","tags":"","loc":"proc/stdlib_sswap.html"},{"title":"stdlib_ssymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_ssymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_ssymm","tags":"","loc":"proc/stdlib_ssymm.html"},{"title":"stdlib_ssymv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_ssymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! SSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssymv","tags":"","loc":"proc/stdlib_ssymv.html"},{"title":"stdlib_ssyr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyr(uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_ssyr ( uplo , n , alpha , x , incx , a , lda ) !! SSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_ssyr","tags":"","loc":"proc/stdlib_ssyr.html"},{"title":"stdlib_ssyr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_ssyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! SSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssyr2","tags":"","loc":"proc/stdlib_ssyr2.html"},{"title":"stdlib_ssyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_ssyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_ssyr2k","tags":"","loc":"proc/stdlib_ssyr2k.html"},{"title":"stdlib_ssyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_ssyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! SSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_ssyrk","tags":"","loc":"proc/stdlib_ssyrk.html"},{"title":"stdlib_stbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stbmv(uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_stbmv","tags":"","loc":"proc/stdlib_stbmv.html"},{"title":"stdlib_stbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stbsv(uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_stbsv","tags":"","loc":"proc/stdlib_stbsv.html"},{"title":"stdlib_stpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stpmv(uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stpmv ( uplo , trans , diag , n , ap , x , incx ) !! STPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpmv","tags":"","loc":"proc/stdlib_stpmv.html"},{"title":"stdlib_stpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stpsv(uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stpsv ( uplo , trans , diag , n , ap , x , incx ) !! STPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpsv","tags":"","loc":"proc/stdlib_stpsv.html"},{"title":"stdlib_strmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_strmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strmm","tags":"","loc":"proc/stdlib_strmm.html"},{"title":"stdlib_strmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strmv(uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_strmv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_strmv","tags":"","loc":"proc/stdlib_strmv.html"},{"title":"stdlib_strsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_strsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strsm","tags":"","loc":"proc/stdlib_strsm.html"},{"title":"stdlib_strsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strsv(uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_strsv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_strsv","tags":"","loc":"proc/stdlib_strsv.html"},{"title":"get_stdlib_version – Fortran-lang/stdlib","text":"public pure subroutine get_stdlib_version(major, minor, patch, string) Getter function to retrieve standard library version Arguments Type Intent Optional Attributes Name integer, intent(out), optional :: major Major version number of the standard library version integer, intent(out), optional :: minor Minor version number of the standard library version integer, intent(out), optional :: patch Patch version number of the standard library version character(len=:), intent(out), optional, allocatable :: string String representation of the standard library version Source Code pure subroutine get_stdlib_version ( major , minor , patch , string ) !> Major version number of the standard library version integer , intent ( out ), optional :: major !> Minor version number of the standard library version integer , intent ( out ), optional :: minor !> Patch version number of the standard library version integer , intent ( out ), optional :: patch !> String representation of the standard library version character ( len = :), allocatable , intent ( out ), optional :: string if ( present ( major )) then major = stdlib_major end if if ( present ( minor )) then minor = stdlib_minor end if if ( present ( patch )) then patch = stdlib_patch end if if ( present ( string )) then string = stdlib_version_string end if end subroutine get_stdlib_version","tags":"","loc":"proc/get_stdlib_version.html"},{"title":"eye – Fortran-lang/stdlib","text":"public pure function eye(dim1, dim2) result(result) Constructs the identity matrix.\n( Specification ) Arguments Type Intent Optional Attributes Name integer, intent(in) :: dim1 integer, intent(in), optional :: dim2 Return Value integer(kind=int8), allocatable, (:,:) Source Code pure function eye ( dim1 , dim2 ) result ( result ) integer , intent ( in ) :: dim1 integer , intent ( in ), optional :: dim2 integer ( int8 ), allocatable :: result (:, :) integer :: dim2_ integer :: i dim2_ = optval ( dim2 , dim1 ) allocate ( result ( dim1 , dim2_ )) result = 0_int8 do i = 1 , min ( dim1 , dim2_ ) result ( i , i ) = 1_int8 end do end function eye","tags":"","loc":"proc/eye.html"},{"title":"cross_product – Fortran-lang/stdlib","text":"public interface cross_product Computes the cross product of two vectors, returning a rank-1 and size-3 array\n( Specification ) Functions private pure module function cross_product_cdp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (3) complex(kind=dp), intent(in) :: b (3) Return Value complex(kind=dp), (3) private pure module function cross_product_csp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (3) complex(kind=sp), intent(in) :: b (3) Return Value complex(kind=sp), (3) private pure module function cross_product_iint16(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (3) integer(kind=int16), intent(in) :: b (3) Return Value integer(kind=int16), (3) private pure module function cross_product_iint32(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (3) integer(kind=int32), intent(in) :: b (3) Return Value integer(kind=int32), (3) private pure module function cross_product_iint64(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (3) integer(kind=int64), intent(in) :: b (3) Return Value integer(kind=int64), (3) private pure module function cross_product_iint8(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (3) integer(kind=int8), intent(in) :: b (3) Return Value integer(kind=int8), (3) private pure module function cross_product_rdp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (3) real(kind=dp), intent(in) :: b (3) Return Value real(kind=dp), (3) private pure module function cross_product_rsp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (3) real(kind=sp), intent(in) :: b (3) Return Value real(kind=sp), (3)","tags":"","loc":"interface/cross_product.html"},{"title":"det – Fortran-lang/stdlib","text":"public interface det Computes the determinant of a square matrix\n ( Specification ) Summary Interface for computing matrix determinant. Description This interface provides methods for computing the determinant of a matrix.\n Supported data types include real and complex . Note The provided functions are intended for square matrices only. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 3 , 3 ), d type ( linalg_state_type ) :: state a = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) ! ... d = det ( a , err = state ) if ( state % ok ()) then print * , 'Success! det=' , d else print * , state % print () endif ! ... Module Procedures private interface stdlib_linalg_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_cdpdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None","tags":"","loc":"interface/det.html"},{"title":"diag – Fortran-lang/stdlib","text":"public interface diag Creates a diagonal array or extract the diagonal elements of an array\n( Specification ) Functions private module function diag_cdp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(v),size(v)) private module function diag_cdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_cdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp), (minval(shape(A))) private module function diag_cdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=dp), (minval(shape(A))-abs(k)) private module function diag_csp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(v),size(v)) private module function diag_csp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_csp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp), (minval(shape(A))) private module function diag_csp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=sp), (minval(shape(A))-abs(k)) private module function diag_iint16(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(v),size(v)) private module function diag_iint16_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int16), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint16_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16), (minval(shape(A))) private module function diag_iint16_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int16), (minval(shape(A))-abs(k)) private module function diag_iint32(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(v),size(v)) private module function diag_iint32_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int32), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint32_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32), (minval(shape(A))) private module function diag_iint32_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int32), (minval(shape(A))-abs(k)) private module function diag_iint64(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(v),size(v)) private module function diag_iint64_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int64), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint64_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64), (minval(shape(A))) private module function diag_iint64_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int64), (minval(shape(A))-abs(k)) private module function diag_iint8(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(v),size(v)) private module function diag_iint8_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int8), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint8_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8), (minval(shape(A))) private module function diag_iint8_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int8), (minval(shape(A))-abs(k)) private module function diag_rdp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(v),size(v)) private module function diag_rdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp), (minval(shape(A))) private module function diag_rdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=dp), (minval(shape(A))-abs(k)) private module function diag_rsp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(v),size(v)) private module function diag_rsp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rsp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp), (minval(shape(A))) private module function diag_rsp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=sp), (minval(shape(A))-abs(k))","tags":"","loc":"interface/diag.html"},{"title":"is_diagonal – Fortran-lang/stdlib","text":"public interface is_diagonal Checks if a matrix (rank-2 array) is diagonal\n( Specification ) Module Procedures private pure function is_diagonal_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_diagonal.html"},{"title":"is_hermitian – Fortran-lang/stdlib","text":"public interface is_hermitian Checks if a matrix (rank-2 array) is Hermitian\n( Specification ) Module Procedures private pure function is_hermitian_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_hermitian.html"},{"title":"is_hessenberg – Fortran-lang/stdlib","text":"public interface is_hessenberg Checks if a matrix (rank-2 array) is Hessenberg\n( Specification ) Module Procedures private function is_hessenberg_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical","tags":"","loc":"interface/is_hessenberg.html"},{"title":"is_skew_symmetric – Fortran-lang/stdlib","text":"public interface is_skew_symmetric Checks if a matrix (rank-2 array) is skew-symmetric\n( Specification ) Module Procedures private pure function is_skew_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_skew_symmetric.html"},{"title":"is_square – Fortran-lang/stdlib","text":"public interface is_square Checks if a matrix (rank-2 array) is square\n( Specification ) Module Procedures private pure function is_square_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_square.html"},{"title":"is_symmetric – Fortran-lang/stdlib","text":"public interface is_symmetric Checks if a matrix (rank-2 array) is symmetric\n( Specification ) Module Procedures private pure function is_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_symmetric.html"},{"title":"is_triangular – Fortran-lang/stdlib","text":"public interface is_triangular Checks if a matrix (rank-2 array) is triangular\n( Specification ) Module Procedures private function is_triangular_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical","tags":"","loc":"interface/is_triangular.html"},{"title":"kronecker_product – Fortran-lang/stdlib","text":"public interface kronecker_product Computes the Kronecker product of two arrays of size M1xN1, and of M2xN2, returning an (M1 M2)x(N1 N2) array\n( Specification ) Functions private pure module function kronecker_product_cdp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) complex(kind=dp), intent(in) :: B (:,:) Return Value complex(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_csp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) complex(kind=sp), intent(in) :: B (:,:) Return Value complex(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint16(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer(kind=int16), intent(in) :: B (:,:) Return Value integer(kind=int16), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint32(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer(kind=int32), intent(in) :: B (:,:) Return Value integer(kind=int32), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint64(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer(kind=int64), intent(in) :: B (:,:) Return Value integer(kind=int64), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint8(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer(kind=int8), intent(in) :: B (:,:) Return Value integer(kind=int8), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rdp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) real(kind=dp), intent(in) :: B (:,:) Return Value real(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rsp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) real(kind=sp), intent(in) :: B (:,:) Return Value real(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2))","tags":"","loc":"interface/kronecker_product.html"},{"title":"lstsq – Fortran-lang/stdlib","text":"public interface lstsq Computes the squares solution to system . \n ( Specification ) Summary Interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system.\n Supported data types include real and complex . Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Functions private module function stdlib_linalg_c_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs]","tags":"","loc":"interface/lstsq.html"},{"title":"lstsq_space – Fortran-lang/stdlib","text":"public interface lstsq_space Computes the integer, real [, complex] working space required by the least-squares solver\n ( Specification ) Description This interface provides sizes of integer, real [, complex] working spaces required by the \n least-squares solver. These sizes can be used to pre-allocated working arrays in case several \n repeated least-squares solutions to a same system are sought. If pre-allocated working arrays \n are provided, no internal allocations will take place. Subroutines private pure module subroutine stdlib_linalg_c_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_c_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays","tags":"","loc":"interface/lstsq_space.html"},{"title":"operator(.det.) – Fortran-lang/stdlib","text":"public interface operator(.det.) Determinant operator of a square matrix\n ( Specification ) Summary Pure operator interface for computing matrix determinant. Description This pure operator interface provides a convenient way to compute the determinant of a matrix.\n Supported data types include real and complex. Note The provided functions are intended for square matrices. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example ! ... real ( sp ) :: matrix ( 3 , 3 ), d matrix = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) d = . det . matrix ! ... Module Procedures private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None","tags":"","loc":"interface/operator(.det.).html"},{"title":"outer_product – Fortran-lang/stdlib","text":"public interface outer_product Computes the outer product of two vectors, returning a rank-2 array\n( Specification ) Functions private pure module function outer_product_cdp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: u (:) complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(u),size(v)) private pure module function outer_product_csp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: u (:) complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(u),size(v)) private pure module function outer_product_iint16(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: u (:) integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(u),size(v)) private pure module function outer_product_iint32(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: u (:) integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(u),size(v)) private pure module function outer_product_iint64(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: u (:) integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(u),size(v)) private pure module function outer_product_iint8(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: u (:) integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(u),size(v)) private pure module function outer_product_rdp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: u (:) real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(u),size(v)) private pure module function outer_product_rsp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: u (:) real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(u),size(v))","tags":"","loc":"interface/outer_product.html"},{"title":"solve – Fortran-lang/stdlib","text":"public interface solve Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Interface for solving a linear system arising from a general matrix. Description This interface provides methods for computing the solution of a linear matrix system.\n Supported data types include real and complex . No assumption is made on the matrix \n structure. \n The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Functions private pure module function stdlib_linalg_c_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_c_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs]","tags":"","loc":"interface/solve.html"},{"title":"solve_lstsq – Fortran-lang/stdlib","text":"public interface solve_lstsq Computes the squares solution to system . \n ( Specification ) Summary Subroutine interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system using \n a subroutine. Supported data types include real and complex . If pre-allocated work spaces \n are provided, no internal memory allocations take place when using this interface. Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Subroutines private module subroutine stdlib_linalg_c_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_c_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop","tags":"","loc":"interface/solve_lstsq.html"},{"title":"solve_lu – Fortran-lang/stdlib","text":"public interface solve_lu Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Subroutine interface for solving a linear system using LU decomposition. Description This interface provides methods for computing the solution of a linear matrix system using\n a subroutine. Supported data types include real and complex . No assumption is made on the matrix \n structure. Preallocated space for the solution vector x is user-provided, and it may be provided\n for the array of pivot indices, pivot . If all pre-allocated work spaces are provided, no internal \n memory allocations take place when using this interface. The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Subroutines private pure module subroutine stdlib_linalg_c_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_c_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop","tags":"","loc":"interface/solve_lu.html"},{"title":"svd – Fortran-lang/stdlib","text":"public interface svd Computes the singular value decomposition of a real or complex 2d matrix.\n ( Specification ) Summary Interface for computing the singular value decomposition of a real or complex 2d matrix. Description This interface provides methods for computing the singular value decomposition of a matrix.\n Supported data types include real and complex . The subroutine returns a real array of \n singular values, and optionally, left- and right- singular vector matrices, U and V . \n For a matrix A with size [m,n], full matrix storage for U and V should be [m,m] and [n,n]. \n It is possible to use partial storage [m,k] and [k,n], k=min(m,n) , choosing full_matrices=.false. . Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ), u ( 2 , 2 ), vt ( 3 , 3 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) call svd ( A , s , u , v ) print * , 'singular values = ' , s Subroutines private module subroutine stdlib_linalg_svd_c(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values complex(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_d(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values real(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_s(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values real(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_z(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values complex(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop","tags":"","loc":"interface/svd.html"},{"title":"svdvals – Fortran-lang/stdlib","text":"public interface svdvals Computes the singular values of a real or complex 2d matrix.\n ( Specification ) Summary Function interface for computing the array of singular values from the singular value decomposition \n of a real or complex 2d matrix. Description This interface provides methods for computing the singular values a 2d matrix.\n Supported data types include real and complex . The function returns a real array of \n singular values, with size [min(m,n)]. Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) s = svdvals ( A ) print * , 'singular values = ' , s Functions private module function stdlib_linalg_svdvals_c(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_d(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_s(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_z(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values","tags":"","loc":"interface/svdvals.html"},{"title":"trace – Fortran-lang/stdlib","text":"public interface trace Computes the trace of a matrix\n( Specification ) Module Procedures private function trace_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp) private function trace_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp) private function trace_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp) private function trace_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp) private function trace_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8) private function trace_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16) private function trace_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32) private function trace_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64)","tags":"","loc":"interface/trace.html"},{"title":"cdf_exp – Fortran-lang/stdlib","text":"public interface cdf_exp Version experimental Exponential Cumulative Distribution Function\n( Specification ) Module Procedures private elemental function cdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function cdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp)","tags":"","loc":"interface/cdf_exp.html"},{"title":"pdf_exp – Fortran-lang/stdlib","text":"public interface pdf_exp Version experimental Exponential Distribution Probability Density Function\n( Specification ) Module Procedures private elemental function pdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function pdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp)","tags":"","loc":"interface/pdf_exp.html"},{"title":"rvs_exp – Fortran-lang/stdlib","text":"public interface rvs_exp Version experimental Exponential Distribution Random Variates\n( Specification ) Module Procedures private impure function rvs_exp_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_exp_rsp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private impure elemental function rvs_exp_rdp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private impure elemental function rvs_exp_csp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda Return Value complex(kind=sp) private impure elemental function rvs_exp_cdp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda Return Value complex(kind=dp) private impure function rvs_exp_array_rsp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_exp_array_rdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_exp_array_csp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_exp_array_cdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"interface/rvs_exp.html"},{"title":"all_close – Fortran-lang/stdlib","text":"public interface all_close Returns a boolean scalar where two arrays are element-wise equal within a tolerance.\n( Specification ) Functions private pure module function all_close_1_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:) complex(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:) complex(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) real(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) real(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) complex(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) complex(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) real(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) real(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:,:) complex(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:,:) complex(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:,:) real(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:,:) real(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical","tags":"","loc":"interface/all_close.html"},{"title":"arange – Fortran-lang/stdlib","text":"public interface arange arange creates a one-dimensional array of the integer/real type \n with fixed-spaced values of given spacing, within a given interval.\n( Specification ) Functions private pure module function arange_i_int16(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in), optional :: end integer(kind=int16), intent(in), optional :: step Return Value integer(kind=int16), allocatable, (:) private pure module function arange_i_int32(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in), optional :: end integer(kind=int32), intent(in), optional :: step Return Value integer(kind=int32), allocatable, (:) private pure module function arange_i_int64(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in), optional :: end integer(kind=int64), intent(in), optional :: step Return Value integer(kind=int64), allocatable, (:) private pure module function arange_i_int8(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in), optional :: end integer(kind=int8), intent(in), optional :: step Return Value integer(kind=int8), allocatable, (:) private pure module function arange_r_dp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in), optional :: end real(kind=dp), intent(in), optional :: step Return Value real(kind=dp), allocatable, (:) private pure module function arange_r_sp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in), optional :: end real(kind=sp), intent(in), optional :: step Return Value real(kind=sp), allocatable, (:)","tags":"","loc":"interface/arange.html"},{"title":"arg – Fortran-lang/stdlib","text":"public interface arg arg computes the phase angle in the interval (-π,π].\n( Specification ) Module Procedures private elemental function arg_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function arg_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp)","tags":"","loc":"interface/arg.html"},{"title":"argd – Fortran-lang/stdlib","text":"public interface argd argd computes the phase angle of degree version in the interval (-180.0,180.0].\n( Specification ) Module Procedures private elemental function argd_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argd_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp)","tags":"","loc":"interface/argd.html"},{"title":"argpi – Fortran-lang/stdlib","text":"public interface argpi argpi computes the phase angle of circular version in the interval (-1.0,1.0].\n( Specification ) Module Procedures private elemental function argpi_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argpi_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp)","tags":"","loc":"interface/argpi.html"},{"title":"clip – Fortran-lang/stdlib","text":"public interface clip Module Procedures private elemental function clip_int8(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: xmin integer(kind=int8), intent(in) :: xmax Return Value integer(kind=int8) private elemental function clip_int16(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: xmin integer(kind=int16), intent(in) :: xmax Return Value integer(kind=int16) private elemental function clip_int32(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: xmin integer(kind=int32), intent(in) :: xmax Return Value integer(kind=int32) private elemental function clip_int64(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: xmin integer(kind=int64), intent(in) :: xmax Return Value integer(kind=int64) private elemental function clip_sp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: xmin real(kind=sp), intent(in) :: xmax Return Value real(kind=sp) private elemental function clip_dp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: xmin real(kind=dp), intent(in) :: xmax Return Value real(kind=dp)","tags":"","loc":"interface/clip.html"},{"title":"diff – Fortran-lang/stdlib","text":"public interface diff Computes differences between adjacent elements of an array.\n( Specification ) Functions private pure module function diff_1_dp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=dp), intent(in), optional :: prepend (:) real(kind=dp), intent(in), optional :: append (:) Return Value real(kind=dp), allocatable, (:) private pure module function diff_1_int16(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int16), intent(in), optional :: prepend (:) integer(kind=int16), intent(in), optional :: append (:) Return Value integer(kind=int16), allocatable, (:) private pure module function diff_1_int32(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int32), intent(in), optional :: prepend (:) integer(kind=int32), intent(in), optional :: append (:) Return Value integer(kind=int32), allocatable, (:) private pure module function diff_1_int64(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int64), intent(in), optional :: prepend (:) integer(kind=int64), intent(in), optional :: append (:) Return Value integer(kind=int64), allocatable, (:) private pure module function diff_1_int8(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int8), intent(in), optional :: prepend (:) integer(kind=int8), intent(in), optional :: append (:) Return Value integer(kind=int8), allocatable, (:) private pure module function diff_1_sp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=sp), intent(in), optional :: prepend (:) real(kind=sp), intent(in), optional :: append (:) Return Value real(kind=sp), allocatable, (:) private pure module function diff_2_dp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=dp), intent(in), optional :: prepend (:,:) real(kind=dp), intent(in), optional :: append (:,:) Return Value real(kind=dp), allocatable, (:,:) private pure module function diff_2_int16(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int16), intent(in), optional :: prepend (:,:) integer(kind=int16), intent(in), optional :: append (:,:) Return Value integer(kind=int16), allocatable, (:,:) private pure module function diff_2_int32(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int32), intent(in), optional :: prepend (:,:) integer(kind=int32), intent(in), optional :: append (:,:) Return Value integer(kind=int32), allocatable, (:,:) private pure module function diff_2_int64(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int64), intent(in), optional :: prepend (:,:) integer(kind=int64), intent(in), optional :: append (:,:) Return Value integer(kind=int64), allocatable, (:,:) private pure module function diff_2_int8(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int8), intent(in), optional :: prepend (:,:) integer(kind=int8), intent(in), optional :: append (:,:) Return Value integer(kind=int8), allocatable, (:,:) private pure module function diff_2_sp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=sp), intent(in), optional :: prepend (:,:) real(kind=sp), intent(in), optional :: append (:,:) Return Value real(kind=sp), allocatable, (:,:)","tags":"","loc":"interface/diff.html"},{"title":"gcd – Fortran-lang/stdlib","text":"public interface gcd Returns the greatest common divisor of two integers\n( Specification ) Version: experimental Module Procedures private elemental function gcd_int8(a, b) result(res) Returns the greatest common divisor of two integers of kind int8\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a integer(kind=int8), intent(in) :: b Return Value integer(kind=int8) private elemental function gcd_int16(a, b) result(res) Returns the greatest common divisor of two integers of kind int16\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a integer(kind=int16), intent(in) :: b Return Value integer(kind=int16) private elemental function gcd_int32(a, b) result(res) Returns the greatest common divisor of two integers of kind int32\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a integer(kind=int32), intent(in) :: b Return Value integer(kind=int32) private elemental function gcd_int64(a, b) result(res) Returns the greatest common divisor of two integers of kind int64\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a integer(kind=int64), intent(in) :: b Return Value integer(kind=int64)","tags":"","loc":"interface/gcd.html"},{"title":"is_close – Fortran-lang/stdlib","text":"public interface is_close Returns a boolean scalar/array where two scalar/arrays are element-wise equal within a tolerance.\n( Specification ) Functions private elemental module function is_close_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a real(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a real(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical","tags":"","loc":"interface/is_close.html"},{"title":"linspace – Fortran-lang/stdlib","text":"public interface linspace Create rank 1 array of linearly spaced elements\n If the number of elements is not specified, create an array with size 100. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is end\n( Specification ) When dealing with integers as the start and end parameters, the return type is always a real(dp) . Functions private pure module function linspace_default_1_cdp_cdp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_csp_csp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint16_iint16(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint32_iint32(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint64_iint64(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint8_iint8(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rdp_rdp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rsp_rsp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_n_1_cdp_cdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function linspace_n_1_csp_csp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function linspace_n_1_iint16_iint16(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint32_iint32(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint64_iint64(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint8_iint8(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rdp_rdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rsp_rsp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0))","tags":"","loc":"interface/linspace.html"},{"title":"logspace – Fortran-lang/stdlib","text":"public interface logspace Create rank 1 array of logarithmically spaced elements from base start to base end.\n If the number of elements is not specified, create an array with size 50. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is base**end. If no base\n is specified, logspace will default to using a base of 10 ( Specification ) Functions private pure module function logspace_1_cdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_cdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_csp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_csp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_default(start, end) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_iint32_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (n) private pure module function logspace_1_iint32_n_cdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_cspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value integer, (max(n,0)) private pure module function logspace_1_iint32_n_rdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_rspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rsp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rsp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0))","tags":"","loc":"interface/logspace.html"},{"title":"meshgrid – Fortran-lang/stdlib","text":"public interface meshgrid Computes a list of coordinate matrices from coordinate vectors.\n( Specification ) Subroutines private module subroutine meshgrid_1_iint16_iint16(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint32_iint32(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint64_iint64(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint8_iint8(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rdp_rdp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rsp_rsp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint16_iint16(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(out) :: xm1 (:,:) integer(kind=int16), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint32_iint32(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(out) :: xm1 (:,:) integer(kind=int32), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint64_iint64(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(out) :: xm1 (:,:) integer(kind=int64), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint8_iint8(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(out) :: xm1 (:,:) integer(kind=int8), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rdp_rdp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(out) :: xm1 (:,:) real(kind=dp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rsp_rsp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(out) :: xm1 (:,:) real(kind=sp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint16_iint16(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(in) :: x3 (:) integer(kind=int16), intent(out) :: xm1 (:,:,:) integer(kind=int16), intent(out) :: xm2 (:,:,:) integer(kind=int16), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint32_iint32(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(in) :: x3 (:) integer(kind=int32), intent(out) :: xm1 (:,:,:) integer(kind=int32), intent(out) :: xm2 (:,:,:) integer(kind=int32), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint64_iint64(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(in) :: x3 (:) integer(kind=int64), intent(out) :: xm1 (:,:,:) integer(kind=int64), intent(out) :: xm2 (:,:,:) integer(kind=int64), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint8_iint8(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(in) :: x3 (:) integer(kind=int8), intent(out) :: xm1 (:,:,:) integer(kind=int8), intent(out) :: xm2 (:,:,:) integer(kind=int8), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rdp_rdp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(in) :: x3 (:) real(kind=dp), intent(out) :: xm1 (:,:,:) real(kind=dp), intent(out) :: xm2 (:,:,:) real(kind=dp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rsp_rsp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(in) :: x3 (:) real(kind=sp), intent(out) :: xm1 (:,:,:) real(kind=sp), intent(out) :: xm2 (:,:,:) real(kind=sp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing","tags":"","loc":"interface/meshgrid.html"},{"title":"open – Fortran-lang/stdlib","text":"public function open(filename, mode, iostat) result(u) Opens a file\n ( Specification ) Behavior To open a file to read: u = open ( \"somefile.txt\" ) ! The default `mode` is \"rt\" u = open ( \"somefile.txt\" , \"r\" ) To open a file to write: u = open ( \"somefile.txt\" , \"w\" ) To append to the end of the file if it exists: u = open ( \"somefile.txt\" , \"a\" ) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename character(len=*), intent(in), optional :: mode integer, intent(out), optional :: iostat Return Value integer Source Code integer function open ( filename , mode , iostat ) result ( u ) !! version: experimental !! !! Opens a file !! ([Specification](../page/specs/stdlib_io.html#description_1)) !! !!##### Behavior !! !! !! To open a file to read: !! !!```fortran !! u = open(\"somefile.txt\") ! The default `mode` is \"rt\" !! u = open(\"somefile.txt\", \"r\") !!``` !! !! To open a file to write: !! !!```fortran !! u = open(\"somefile.txt\", \"w\") !!``` !! !! To append to the end of the file if it exists: !! !!```fortran !! u = open(\"somefile.txt\", \"a\") !!``` character ( * ), intent ( in ) :: filename character ( * ), intent ( in ), optional :: mode integer , intent ( out ), optional :: iostat character ( 3 ) :: mode_ character (:), allocatable :: action_ , position_ , status_ , access_ , form_ mode_ = parse_mode ( optval ( mode , \"\" )) select case ( mode_ ( 1 : 2 )) case ( 'r' ) action_ = 'read' position_ = 'asis' status_ = 'old' case ( 'w' ) action_ = 'write' position_ = 'asis' status_ = 'replace' case ( 'a' ) action_ = 'write' position_ = 'append' status_ = 'old' case ( 'x' ) action_ = 'write' position_ = 'asis' status_ = 'new' case ( 'r+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'old' case ( 'w+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'replace' case ( 'a+' ) action_ = 'readwrite' position_ = 'append' status_ = 'old' case ( 'x+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'new' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 1 : 2 )) end select select case ( mode_ ( 3 : 3 )) case ( 't' ) form_ = 'formatted' case ( 'b' ) form_ = 'unformatted' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 3 : 3 )) end select access_ = 'stream' if ( present ( iostat )) then open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ , & iostat = iostat ) else open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ ) end if end function open","tags":"","loc":"proc/open.html"},{"title":"parse_mode – Fortran-lang/stdlib","text":"public function parse_mode(mode) result(mode_) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: mode Return Value character(len=3) Source Code character ( 3 ) function parse_mode ( mode ) result ( mode_ ) character ( * ), intent ( in ) :: mode integer :: i character (:), allocatable :: a logical :: lfirst ( 3 ) mode_ = 'r t' if ( len_trim ( mode ) == 0 ) return a = trim ( adjustl ( mode )) lfirst = . true . do i = 1 , len ( a ) if ( lfirst ( 1 ) & . and . ( a ( i : i ) == 'r' . or . a ( i : i ) == 'w' . or . a ( i : i ) == 'a' . or . a ( i : i ) == 'x' ) & ) then mode_ ( 1 : 1 ) = a ( i : i ) lfirst ( 1 ) = . false . else if ( lfirst ( 2 ) . and . a ( i : i ) == '+' ) then mode_ ( 2 : 2 ) = a ( i : i ) lfirst ( 2 ) = . false . else if ( lfirst ( 3 ) . and . ( a ( i : i ) == 't' . or . a ( i : i ) == 'b' )) then mode_ ( 3 : 3 ) = a ( i : i ) lfirst ( 3 ) = . false . else if ( a ( i : i ) == ' ' ) then cycle else if ( any (. not . lfirst )) then call error_stop ( \"Wrong mode: \" // trim ( a )) else call error_stop ( \"Wrong character: \" // a ( i : i )) endif end do end function parse_mode","tags":"","loc":"proc/parse_mode.html"},{"title":"getline – Fortran-lang/stdlib","text":"public interface getline Read a whole line from a formatted unit into a string variable Module Procedures private subroutine getline_char(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a deferred length character variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_string(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a string variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_char(line, iostat, iomsg) Read a whole line from the standard input into a deferred length character variable Arguments Type Intent Optional Attributes Name character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_string(line, iostat, iomsg) Read a whole line from the standard input into a string variable Arguments Type Intent Optional Attributes Name type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message","tags":"","loc":"interface/getline.html"},{"title":"loadtxt – Fortran-lang/stdlib","text":"public interface loadtxt Loads a 2D array from a text file\n( Specification ) Module Procedures private subroutine loadtxt_rsp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_rdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint8(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int8), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint16(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int16), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint32(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int32), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint64(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int64), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_csp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_cdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt","tags":"","loc":"interface/loadtxt.html"},{"title":"savetxt – Fortran-lang/stdlib","text":"public interface savetxt Saves a 2D array into a text file\n( Specification ) Module Procedures private subroutine savetxt_rsp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: d (:,:) Example real ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_rdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: d (:,:) Example real ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint8(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: d (:,:) Example integer ( int8 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint16(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: d (:,:) Example integer ( int16 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint32(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: d (:,:) Example integer ( int32 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint64(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: d (:,:) Example integer ( int64 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_csp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: d (:,:) Example complex ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_cdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: d (:,:) Example complex ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data )","tags":"","loc":"interface/savetxt.html"},{"title":"cdf_normal – Fortran-lang/stdlib","text":"public interface cdf_normal Normal Distribution Cumulative Distribution Function\n( Specification ) Module Procedures private elemental function cdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/cdf_normal.html"},{"title":"pdf_normal – Fortran-lang/stdlib","text":"public interface pdf_normal Normal Distribution Probability Density Function\n( Specification ) Module Procedures private elemental function pdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/pdf_normal.html"},{"title":"rvs_normal – Fortran-lang/stdlib","text":"public interface rvs_normal Normal Distribution Random Variates\n( Specification ) Module Procedures private impure function rvs_norm_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_norm_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_norm_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_norm_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_norm_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure function rvs_norm_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_norm_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_norm_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_norm_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"interface/rvs_normal.html"},{"title":"stdlib_cdotc – Fortran-lang/stdlib","text":"public pure function stdlib_cdotc(n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) Source Code pure complex ( sp ) function stdlib_cdotc ( n , cx , incx , cy , incy ) !! CDOTC forms the dot product of two complex vectors !! CDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotc = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( i )) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( ix )) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotc = ctemp return end function stdlib_cdotc","tags":"","loc":"proc/stdlib_cdotc.html"},{"title":"stdlib_cdotu – Fortran-lang/stdlib","text":"public pure function stdlib_cdotu(n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) Source Code pure complex ( sp ) function stdlib_cdotu ( n , cx , incx , cy , incy ) !! CDOTU forms the dot product of two complex vectors !! CDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotu = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + cx ( i ) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + cx ( ix ) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotu = ctemp return end function stdlib_cdotu","tags":"","loc":"proc/stdlib_cdotu.html"},{"title":"stdlib_caxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_caxpy(n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_caxpy ( n , ca , cx , incx , cy , incy ) !! CAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( inout ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_scabs1 ( ca ) == 0.0e+0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cy ( i ) + ca * cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cy ( iy ) + ca * cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_caxpy","tags":"","loc":"proc/stdlib_caxpy.html"},{"title":"stdlib_ccopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ccopy(n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_ccopy ( n , cx , incx , cy , incy ) !! CCOPY copies a vector x to a vector y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( out ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_ccopy","tags":"","loc":"proc/stdlib_ccopy.html"},{"title":"stdlib_cgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_cgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! CGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_cgbmv","tags":"","loc":"proc/stdlib_cgbmv.html"},{"title":"stdlib_cgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_cgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cgemm","tags":"","loc":"proc/stdlib_cgemm.html"},{"title":"stdlib_cgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_cgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! CGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_cgemv","tags":"","loc":"proc/stdlib_cgemv.html"},{"title":"stdlib_cgerc – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgerc(m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgerc","tags":"","loc":"proc/stdlib_cgerc.html"},{"title":"stdlib_cgeru – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgeru(m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgeru","tags":"","loc":"proc/stdlib_cgeru.html"},{"title":"stdlib_chbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_chbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! CHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: conjg , max , min , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chbmv","tags":"","loc":"proc/stdlib_chbmv.html"},{"title":"stdlib_chemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_chemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = sp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_chemm","tags":"","loc":"proc/stdlib_chemm.html"},{"title":"stdlib_chemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_chemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! CHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chemv","tags":"","loc":"proc/stdlib_chemv.html"},{"title":"stdlib_cher – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cher(uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cher ( uplo , n , alpha , x , incx , a , lda ) !! CHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_cher","tags":"","loc":"proc/stdlib_cher.html"},{"title":"stdlib_cher2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cher2(uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! CHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_cher2","tags":"","loc":"proc/stdlib_cher2.html"},{"title":"stdlib_cher2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_cher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha real ( sp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_cher2k","tags":"","loc":"proc/stdlib_cher2k.html"},{"title":"stdlib_cherk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_cherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: cmplx , conjg , max , real ! Local Scalars complex ( sp ) :: temp real ( sp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( i , l ), KIND = sp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( j , l ), KIND = sp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cherk","tags":"","loc":"proc/stdlib_cherk.html"},{"title":"stdlib_chpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_chpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! CHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = sp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_chpmv","tags":"","loc":"proc/stdlib_chpmv.html"},{"title":"stdlib_chpr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chpr(uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_chpr ( uplo , n , alpha , x , incx , ap ) !! CHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr","tags":"","loc":"proc/stdlib_chpr.html"},{"title":"stdlib_chpr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chpr2(uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_chpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! CHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr2","tags":"","loc":"proc/stdlib_chpr2.html"},{"title":"stdlib_crotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_crotg(a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s Source Code pure subroutine stdlib_crotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in SROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by SROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( out ) :: c complex ( sp ), intent ( inout ) :: a complex ( sp ), intent ( in ) :: b complex ( sp ), intent ( out ) :: s ! Local Scalars real ( sp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( sp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( sp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = sp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = sp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_crotg","tags":"","loc":"proc/stdlib_crotg.html"},{"title":"stdlib_cscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cscal(n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_cscal ( n , ca , cx , incx ) !! CSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = ca * cx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = ca * cx ( i ) end do end if return end subroutine stdlib_cscal","tags":"","loc":"proc/stdlib_cscal.html"},{"title":"stdlib_csrot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csrot(n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Source Code pure subroutine stdlib_csrot ( n , cx , incx , cy , incy , c , s ) !! CSROT applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: c , s ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( sp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * cx ( i ) + s * cy ( i ) cy ( i ) = c * cy ( i ) - s * cx ( i ) cx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * cx ( ix ) + s * cy ( iy ) cy ( iy ) = c * cy ( iy ) - s * cx ( ix ) cx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_csrot","tags":"","loc":"proc/stdlib_csrot.html"},{"title":"stdlib_csscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csscal(n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_csscal ( n , sa , cx , incx ) !! CSSCAL scales a complex vector by a real constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: aimag , cmplx , real if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do end if return end subroutine stdlib_csscal","tags":"","loc":"proc/stdlib_csscal.html"},{"title":"stdlib_cswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cswap(n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_cswap ( n , cx , incx , cy , incy ) !! CSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = cx ( i ) cx ( i ) = cy ( i ) cy ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = cx ( ix ) cx ( ix ) = cy ( iy ) cy ( iy ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_cswap","tags":"","loc":"proc/stdlib_cswap.html"},{"title":"stdlib_csymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_csymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_csymm","tags":"","loc":"proc/stdlib_csymm.html"},{"title":"stdlib_csyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_csyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_csyr2k","tags":"","loc":"proc/stdlib_csyr2k.html"},{"title":"stdlib_csyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_csyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_csyrk","tags":"","loc":"proc/stdlib_csyrk.html"},{"title":"stdlib_ctbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctbmv(uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctbmv","tags":"","loc":"proc/stdlib_ctbmv.html"},{"title":"stdlib_ctbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctbsv(uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ctbsv","tags":"","loc":"proc/stdlib_ctbsv.html"},{"title":"stdlib_ctpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctpmv(uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctpmv ( uplo , trans , diag , n , ap , x , incx ) !! CTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpmv","tags":"","loc":"proc/stdlib_ctpmv.html"},{"title":"stdlib_ctpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctpsv(uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctpsv ( uplo , trans , diag , n , ap , x , incx ) !! CTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpsv","tags":"","loc":"proc/stdlib_ctpsv.html"},{"title":"stdlib_ctrmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ctrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ctrmm","tags":"","loc":"proc/stdlib_ctrmm.html"},{"title":"stdlib_ctrmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrmv(uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctrmv","tags":"","loc":"proc/stdlib_ctrmv.html"},{"title":"stdlib_ctrsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ctrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ctrsm","tags":"","loc":"proc/stdlib_ctrsm.html"},{"title":"stdlib_ctrsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrsv(uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ctrsv","tags":"","loc":"proc/stdlib_ctrsv.html"},{"title":"bidx – Fortran-lang/stdlib","text":"public interface bidx Returns an instance of type 'stringlist_index_type' representing backward index Specifications Module Procedures private pure function backward_index(idx) Returns an instance of type 'stringlist_index_type' representing backward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type )","tags":"","loc":"interface/bidx.html"},{"title":"fidx – Fortran-lang/stdlib","text":"public interface fidx Returns an instance of type 'stringlist_index_type' representing forward index Specifications Module Procedures private pure function forward_index(idx) Returns an instance of type 'stringlist_index_type' representing forward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type )","tags":"","loc":"interface/fidx.html"},{"title":"operator(//) – Fortran-lang/stdlib","text":"public interface operator(//) Concatenates stringlist with the input entity\nReturns a new stringlist Specifications Module Procedures private function append_char(lhs, rhs) Appends character scalar 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( stringlist_type ) private function append_string(lhs, rhs) Appends string 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_char(lhs, rhs) Prepends character scalar 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_string(lhs, rhs) Prepends string 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_stringlist(lhs, rhs) Appends stringlist 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_carray(lhs, rhs) Appends chararray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function append_sarray(lhs, rhs) Appends stringarray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function prepend_carray(lhs, rhs) Prepends chararray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_sarray(lhs, rhs) Prepends stringarray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type )","tags":"","loc":"interface/operator(SLASHSLASH)~2.html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Compares stringlist for inequality with the input entity\nReturns a logical Specifications Module Procedures private pure function ineq_stringlist(lhs, rhs) Compares stringlist 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for inequality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for inequality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(SLASH=).html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Compares stringlist for equality with the input entity\nReturns a logical Specifications Module Procedures private pure function eq_stringlist(lhs, rhs) Compares stringlist 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for equality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for equality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(==).html"},{"title":"stringlist_type – Fortran-lang/stdlib","text":"public interface stringlist_type Constructor for stringlist\nReturns an instance of type stringlist_type Specifications Module Procedures private pure function new_stringlist() Constructor with no argument\nReturns a new instance of type stringlist Arguments None Return Value type( stringlist_type ) private pure function new_stringlist_carray(array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: array Return Value type( stringlist_type ) private pure function new_stringlist_sarray(array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: array Return Value type( stringlist_type )","tags":"","loc":"interface/stringlist_type.html"},{"title":"stdlib_dasum – Fortran-lang/stdlib","text":"public pure function stdlib_dasum(n, dx, incx) DASUM takes the sum of the absolute values. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dasum ( n , dx , incx ) !! DASUM takes the sum of the absolute values. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_dasum = zero dtemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + abs ( dx ( i )) end do if ( n < 6 ) then stdlib_dasum = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 dtemp = dtemp + abs ( dx ( i )) + abs ( dx ( i + 1 )) + abs ( dx ( i + 2 )) + abs ( dx ( i + 3 )) + abs ( dx ( i + & 4 )) + abs ( dx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dtemp = dtemp + abs ( dx ( i )) end do end if stdlib_dasum = dtemp return end function stdlib_dasum","tags":"","loc":"proc/stdlib_dasum.html"},{"title":"stdlib_ddot – Fortran-lang/stdlib","text":"public pure function stdlib_ddot(n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_ddot ( n , dx , incx , dy , incy ) !! DDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stdlib_ddot = zero dtemp = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + dx ( i ) * dy ( i ) end do if ( n < 5 ) then stdlib_ddot = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 dtemp = dtemp + dx ( i ) * dy ( i ) + dx ( i + 1 ) * dy ( i + 1 ) + dx ( i + 2 ) * dy ( i + 2 ) + dx ( i + 3 ) * dy ( i + 3 ) + & dx ( i + 4 ) * dy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dtemp + dx ( ix ) * dy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_ddot = dtemp return end function stdlib_ddot","tags":"","loc":"proc/stdlib_ddot.html"},{"title":"stdlib_dnrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_dnrm2(n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure function stdlib_dnrm2 ( n , x , incx ) !! DNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DNRM2 := sqrt( x'*x ) real ( dp ) :: stdlib_dnrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dnrm2 = scl * sqrt ( sumsq ) return end function stdlib_dnrm2","tags":"","loc":"proc/stdlib_dnrm2.html"},{"title":"stdlib_dsdot – Fortran-lang/stdlib","text":"public pure function stdlib_dsdot(n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dsdot ( n , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! authors: ! ======== ! lawson, c. l., (jpl), hanson, r. j., (snla), ! kincaid, d. r., (u. of texas), krogh, f. t., (jpl) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real stdlib_dsdot = zero if ( n <= 0 ) return if ( incx == incy . and . incx > 0 ) then ! code for equal, positive, non-unit increments. ns = n * incx do i = 1 , ns , incx stdlib_dsdot = stdlib_dsdot + real ( sx ( i ), KIND = dp ) * real ( sy ( i ), KIND = dp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n stdlib_dsdot = stdlib_dsdot + real ( sx ( kx ), KIND = dp ) * real ( sy ( ky ), KIND = dp ) kx = kx + incx ky = ky + incy end do end if return end function stdlib_dsdot","tags":"","loc":"proc/stdlib_dsdot.html"},{"title":"stdlib_dzasum – Fortran-lang/stdlib","text":"public pure function stdlib_dzasum(n, zx, incx) DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a double precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dzasum ( n , zx , incx ) !! DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a double precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: stemp integer ( ilp ) :: i , nincx stdlib_dzasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do end if stdlib_dzasum = stemp return end function stdlib_dzasum","tags":"","loc":"proc/stdlib_dzasum.html"},{"title":"stdlib_dznrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_dznrm2(n, x, incx) DZNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDZNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure function stdlib_dznrm2 ( n , x , incx ) !! DZNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DZNRM2 := sqrt( x**H*x ) real ( dp ) :: stdlib_dznrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dznrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = dp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dznrm2 = scl * sqrt ( sumsq ) return end function stdlib_dznrm2","tags":"","loc":"proc/stdlib_dznrm2.html"},{"title":"stdlib_daxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_daxpy(n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_daxpy ( n , da , dx , incx , dy , incy ) !! DAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( inout ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( da == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dy ( i ) + da * dx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 dy ( i ) = dy ( i ) + da * dx ( i ) dy ( i + 1 ) = dy ( i + 1 ) + da * dx ( i + 1 ) dy ( i + 2 ) = dy ( i + 2 ) + da * dx ( i + 2 ) dy ( i + 3 ) = dy ( i + 3 ) + da * dx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dy ( iy ) + da * dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_daxpy","tags":"","loc":"proc/stdlib_daxpy.html"},{"title":"stdlib_dcopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dcopy(n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dcopy ( n , dx , incx , dy , incy ) !! DCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( out ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 dy ( i ) = dx ( i ) dy ( i + 1 ) = dx ( i + 1 ) dy ( i + 2 ) = dx ( i + 2 ) dy ( i + 3 ) = dx ( i + 3 ) dy ( i + 4 ) = dx ( i + 4 ) dy ( i + 5 ) = dx ( i + 5 ) dy ( i + 6 ) = dx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dcopy","tags":"","loc":"proc/stdlib_dcopy.html"},{"title":"stdlib_dgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! DGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_dgbmv","tags":"","loc":"proc/stdlib_dgbmv.html"},{"title":"stdlib_dgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dgemm","tags":"","loc":"proc/stdlib_dgemm.html"},{"title":"stdlib_dgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! DGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_dgemv","tags":"","loc":"proc/stdlib_dgemv.html"},{"title":"stdlib_dger – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dger(m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_dger ( m , n , alpha , x , incx , y , incy , a , lda ) !! DGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_dger","tags":"","loc":"proc/stdlib_dger.html"},{"title":"stdlib_drot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drot(n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s Source Code pure subroutine stdlib_drot ( n , dx , incx , dy , incy , c , s ) !! DROT applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n dtemp = c * dx ( i ) + s * dy ( i ) dy ( i ) = c * dy ( i ) - s * dx ( i ) dx ( i ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = c * dx ( ix ) + s * dy ( iy ) dy ( iy ) = c * dy ( iy ) - s * dx ( ix ) dx ( ix ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_drot","tags":"","loc":"proc/stdlib_drot.html"},{"title":"stdlib_drotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drotg(a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s Source Code pure subroutine stdlib_drotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( inout ) :: a , b real ( dp ), intent ( out ) :: c , s ! Local Scalars real ( dp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_drotg","tags":"","loc":"proc/stdlib_drotg.html"},{"title":"stdlib_drotm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drotm(n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) Source Code pure subroutine stdlib_drotm ( n , dx , incx , dy , incy , dparam ) !! DROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See DROTMG for a description of data storage in DPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dparam ( 5 ) real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_dp two = 2.0_dp dflag = dparam ( 1 ) if ( n <= 0 . or . ( dflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z * dh12 dy ( i ) = w * dh21 + z * dh22 end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w + z * dh12 dy ( i ) = w * dh21 + z end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z dy ( i ) = - w + dh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z * dh12 dy ( ky ) = w * dh21 + z * dh22 kx = kx + incx ky = ky + incy end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w + z * dh12 dy ( ky ) = w * dh21 + z kx = kx + incx ky = ky + incy end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z dy ( ky ) = - w + dh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_drotm","tags":"","loc":"proc/stdlib_drotm.html"},{"title":"stdlib_drotmg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drotmg(dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) Source Code pure subroutine stdlib_drotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) !! DROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( dp ), intent ( in ) :: dy1 ! Array Arguments real ( dp ), intent ( out ) :: dparam ( 5 ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , dp1 , dp2 , dq1 , dq2 , dtemp , du , gam , gamsq , & one , rgamsq , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_dp one = 1.0_dp two = 2.0_dp gam = 409 6.0_dp gamsq = 1677721 6.0_dp rgamsq = 5.9604645e-8_dp if ( dd1 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else ! case-dd1-nonnegative dp2 = dd2 * dy1 if ( dp2 == zero ) then dflag = - two dparam ( 1 ) = dflag return end if ! regular-case.. dp1 = dd1 * dx1 dq2 = dp2 * dy1 dq1 = dp1 * dx1 if ( abs ( dq1 ) > abs ( dq2 )) then dh21 = - dy1 / dx1 dh12 = dp2 / dp1 du = one - dh12 * dh21 if ( du > zero ) then dflag = zero dd1 = dd1 / du dd2 = dd2 / du dx1 = dx1 * du else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero end if else if ( dq2 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else dflag = one dh11 = dp1 / dp2 dh22 = dx1 / dy1 du = one + dh11 * dh22 dtemp = dd2 / du dd2 = dd1 / du dd1 = dtemp dx1 = dy1 * du end if end if ! procedure..scale-check if ( dd1 /= zero ) then do while (( dd1 <= rgamsq ) . or . ( dd1 >= gamsq )) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( dd1 <= rgamsq ) then dd1 = dd1 * gam ** 2 dx1 = dx1 / gam dh11 = dh11 / gam dh12 = dh12 / gam else dd1 = dd1 / gam ** 2 dx1 = dx1 * gam dh11 = dh11 * gam dh12 = dh12 * gam end if enddo end if if ( dd2 /= zero ) then do while ( ( abs ( dd2 ) <= rgamsq ) . or . ( abs ( dd2 ) >= gamsq ) ) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( abs ( dd2 ) <= rgamsq ) then dd2 = dd2 * gam ** 2 dh21 = dh21 / gam dh22 = dh22 / gam else dd2 = dd2 / gam ** 2 dh21 = dh21 * gam dh22 = dh22 * gam end if end do end if end if if ( dflag < zero ) then dparam ( 2 ) = dh11 dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 dparam ( 5 ) = dh22 else if ( dflag == zero ) then dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 else dparam ( 2 ) = dh11 dparam ( 5 ) = dh22 end if dparam ( 1 ) = dflag return end subroutine stdlib_drotmg","tags":"","loc":"proc/stdlib_drotmg.html"},{"title":"stdlib_dsbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! DSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsbmv","tags":"","loc":"proc/stdlib_dsbmv.html"},{"title":"stdlib_dscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dscal(n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dscal ( n , da , dx , incx ) !! DSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dx ( i ) = da * dx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 dx ( i ) = da * dx ( i ) dx ( i + 1 ) = da * dx ( i + 1 ) dx ( i + 2 ) = da * dx ( i + 2 ) dx ( i + 3 ) = da * dx ( i + 3 ) dx ( i + 4 ) = da * dx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dx ( i ) = da * dx ( i ) end do end if return end subroutine stdlib_dscal","tags":"","loc":"proc/stdlib_dscal.html"},{"title":"stdlib_dspmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! DSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_dspmv","tags":"","loc":"proc/stdlib_dspmv.html"},{"title":"stdlib_dspr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dspr(uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_dspr ( uplo , n , alpha , x , incx , ap ) !! DSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr","tags":"","loc":"proc/stdlib_dspr.html"},{"title":"stdlib_dspr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dspr2(uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_dspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! DSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr2","tags":"","loc":"proc/stdlib_dspr2.html"},{"title":"stdlib_dswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dswap(n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dswap ( n , dx , incx , dy , incy ) !! DSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp dtemp = dx ( i + 1 ) dx ( i + 1 ) = dy ( i + 1 ) dy ( i + 1 ) = dtemp dtemp = dx ( i + 2 ) dx ( i + 2 ) = dy ( i + 2 ) dy ( i + 2 ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dx ( ix ) dx ( ix ) = dy ( iy ) dy ( iy ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dswap","tags":"","loc":"proc/stdlib_dswap.html"},{"title":"stdlib_dsymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_dsymm","tags":"","loc":"proc/stdlib_dsymm.html"},{"title":"stdlib_dsymv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! DSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsymv","tags":"","loc":"proc/stdlib_dsymv.html"},{"title":"stdlib_dsyr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyr(uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_dsyr ( uplo , n , alpha , x , incx , a , lda ) !! DSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_dsyr","tags":"","loc":"proc/stdlib_dsyr.html"},{"title":"stdlib_dsyr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_dsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! DSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsyr2","tags":"","loc":"proc/stdlib_dsyr2.html"},{"title":"stdlib_dsyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_dsyr2k","tags":"","loc":"proc/stdlib_dsyr2k.html"},{"title":"stdlib_dsyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! DSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dsyrk","tags":"","loc":"proc/stdlib_dsyrk.html"},{"title":"stdlib_dtbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtbmv(uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtbmv","tags":"","loc":"proc/stdlib_dtbmv.html"},{"title":"stdlib_dtbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtbsv(uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_dtbsv","tags":"","loc":"proc/stdlib_dtbsv.html"},{"title":"stdlib_dtpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtpmv(uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtpmv ( uplo , trans , diag , n , ap , x , incx ) !! DTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpmv","tags":"","loc":"proc/stdlib_dtpmv.html"},{"title":"stdlib_dtpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtpsv(uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtpsv ( uplo , trans , diag , n , ap , x , incx ) !! DTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpsv","tags":"","loc":"proc/stdlib_dtpsv.html"},{"title":"stdlib_dtrmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_dtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrmm","tags":"","loc":"proc/stdlib_dtrmm.html"},{"title":"stdlib_dtrmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrmv(uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtrmv","tags":"","loc":"proc/stdlib_dtrmv.html"},{"title":"stdlib_dtrsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_dtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrsm","tags":"","loc":"proc/stdlib_dtrsm.html"},{"title":"stdlib_dtrsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrsv(uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_dtrsv","tags":"","loc":"proc/stdlib_dtrsv.html"},{"title":"to_num – Fortran-lang/stdlib","text":"public interface to_num Conversion of strings to numbers\n( Specification ) Module Procedures private elemental function to_int8(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int8) Output integer(int8) value private elemental function to_int16(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int16) Output integer(int16) value private elemental function to_int32(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int32) Output integer(int32) value private elemental function to_int64(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int64) Output integer(int64) value private elemental function to_sp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=sp) Output real(sp) value private elemental function to_dp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=dp) Output real(dp) value","tags":"","loc":"interface/to_num.html"},{"title":"to_num_from_stream – Fortran-lang/stdlib","text":"public interface to_num_from_stream Conversion of a stream of values in a string to numbers\n( Specification ) Module Procedures private function to_int8_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int8) Output integer(int8) value private function to_int16_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int16) Output integer(int16) value private function to_int32_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int32) Output integer(int32) value private function to_int64_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int64) Output integer(int64) value private function to_sp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=sp) Output real(sp) value private function to_dp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=dp) Output real(dp) value","tags":"","loc":"interface/to_num_from_stream.html"},{"title":"to_real – Fortran-lang/stdlib","text":"public interface to_real Get the constant value or uncertainty. Module Procedures private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp) private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp)","tags":"","loc":"interface/to_real.html"},{"title":"stdlib_zdotc – Fortran-lang/stdlib","text":"public pure function stdlib_zdotc(n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Source Code pure complex ( dp ) function stdlib_zdotc ( n , zx , incx , zy , incy ) !! ZDOTC forms the dot product of two complex vectors !! ZDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotc = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( i )) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( ix )) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotc = ztemp return end function stdlib_zdotc","tags":"","loc":"proc/stdlib_zdotc.html"},{"title":"stdlib_zdotu – Fortran-lang/stdlib","text":"public pure function stdlib_zdotu(n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Source Code pure complex ( dp ) function stdlib_zdotu ( n , zx , incx , zy , incy ) !! ZDOTU forms the dot product of two complex vectors !! ZDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotu = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + zx ( i ) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + zx ( ix ) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotu = ztemp return end function stdlib_zdotu","tags":"","loc":"proc/stdlib_zdotu.html"},{"title":"stdlib_zaxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zaxpy(n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zaxpy ( n , za , zx , incx , zy , incy ) !! ZAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( inout ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_dcabs1 ( za ) == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zy ( i ) + za * zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zy ( iy ) + za * zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zaxpy","tags":"","loc":"proc/stdlib_zaxpy.html"},{"title":"stdlib_zcopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zcopy(n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zcopy ( n , zx , incx , zy , incy ) !! ZCOPY copies a vector, x, to a vector, y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( out ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zcopy","tags":"","loc":"proc/stdlib_zcopy.html"},{"title":"stdlib_zdrot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zdrot(n, zx, incx, zy, incy, c, s) Applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s Source Code pure subroutine stdlib_zdrot ( n , zx , incx , zy , incy , c , s ) !! Applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: c , s ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( dp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * zx ( i ) + s * zy ( i ) zy ( i ) = c * zy ( i ) - s * zx ( i ) zx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * zx ( ix ) + s * zy ( iy ) zy ( iy ) = c * zy ( iy ) - s * zx ( ix ) zx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zdrot","tags":"","loc":"proc/stdlib_zdrot.html"},{"title":"stdlib_zdscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zdscal(n, da, zx, incx) ZDSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_zdscal ( n , da , zx , incx ) !! ZDSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: cmplx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do end if return end subroutine stdlib_zdscal","tags":"","loc":"proc/stdlib_zdscal.html"},{"title":"stdlib_zgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! ZGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_zgbmv","tags":"","loc":"proc/stdlib_zgbmv.html"},{"title":"stdlib_zgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zgemm","tags":"","loc":"proc/stdlib_zgemm.html"},{"title":"stdlib_zgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_zgemv","tags":"","loc":"proc/stdlib_zgemv.html"},{"title":"stdlib_zgerc – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgerc(m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgerc","tags":"","loc":"proc/stdlib_zgerc.html"},{"title":"stdlib_zgeru – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgeru(m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgeru","tags":"","loc":"proc/stdlib_zgeru.html"},{"title":"stdlib_zhbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zhbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! ZHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: real , conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhbmv","tags":"","loc":"proc/stdlib_zhbmv.html"},{"title":"stdlib_zhemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zhemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = dp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zhemm","tags":"","loc":"proc/stdlib_zhemm.html"},{"title":"stdlib_zhemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zhemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhemv","tags":"","loc":"proc/stdlib_zhemv.html"},{"title":"stdlib_zher – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zher(uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zher ( uplo , n , alpha , x , incx , a , lda ) !! ZHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_zher","tags":"","loc":"proc/stdlib_zher.html"},{"title":"stdlib_zher2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zher2(uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! ZHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zher2","tags":"","loc":"proc/stdlib_zher2.html"},{"title":"stdlib_zher2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha real ( dp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_zher2k","tags":"","loc":"proc/stdlib_zher2k.html"},{"title":"stdlib_zherk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , cmplx , conjg , max ! Local Scalars complex ( dp ) :: temp real ( dp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( i , l ), KIND = dp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( j , l ), KIND = dp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zherk","tags":"","loc":"proc/stdlib_zherk.html"},{"title":"stdlib_zhpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zhpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! ZHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = dp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_zhpmv","tags":"","loc":"proc/stdlib_zhpmv.html"},{"title":"stdlib_zhpr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhpr(uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_zhpr ( uplo , n , alpha , x , incx , ap ) !! ZHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr","tags":"","loc":"proc/stdlib_zhpr.html"},{"title":"stdlib_zhpr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhpr2(uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_zhpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! ZHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr2","tags":"","loc":"proc/stdlib_zhpr2.html"},{"title":"stdlib_zrotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zrotg(a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s Source Code pure subroutine stdlib_zrotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in DROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by DROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( out ) :: c complex ( dp ), intent ( inout ) :: a complex ( dp ), intent ( in ) :: b complex ( dp ), intent ( out ) :: s ! Local Scalars real ( dp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( dp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( dp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = dp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = dp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_zrotg","tags":"","loc":"proc/stdlib_zrotg.html"},{"title":"stdlib_zscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zscal(n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_zscal ( n , za , zx , incx ) !! ZSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = za * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = za * zx ( i ) end do end if return end subroutine stdlib_zscal","tags":"","loc":"proc/stdlib_zscal.html"},{"title":"stdlib_zswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zswap(n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zswap ( n , zx , incx , zy , incy ) !! ZSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = zx ( i ) zx ( i ) = zy ( i ) zy ( i ) = ztemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = zx ( ix ) zx ( ix ) = zy ( iy ) zy ( iy ) = ztemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zswap","tags":"","loc":"proc/stdlib_zswap.html"},{"title":"stdlib_zsymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zsymm","tags":"","loc":"proc/stdlib_zsymm.html"},{"title":"stdlib_zsyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_zsyr2k","tags":"","loc":"proc/stdlib_zsyr2k.html"},{"title":"stdlib_zsyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zsyrk","tags":"","loc":"proc/stdlib_zsyrk.html"},{"title":"stdlib_ztbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztbmv(uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztbmv","tags":"","loc":"proc/stdlib_ztbmv.html"},{"title":"stdlib_ztbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztbsv(uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ztbsv","tags":"","loc":"proc/stdlib_ztbsv.html"},{"title":"stdlib_ztpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztpmv(uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztpmv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpmv","tags":"","loc":"proc/stdlib_ztpmv.html"},{"title":"stdlib_ztpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztpsv(uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztpsv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpsv","tags":"","loc":"proc/stdlib_ztpsv.html"},{"title":"stdlib_ztrmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ztrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ztrmm","tags":"","loc":"proc/stdlib_ztrmm.html"},{"title":"stdlib_ztrmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrmv(uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztrmv","tags":"","loc":"proc/stdlib_ztrmv.html"},{"title":"stdlib_ztrsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ztrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ztrsm","tags":"","loc":"proc/stdlib_ztrsm.html"},{"title":"stdlib_ztrsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrsv(uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ztrsv","tags":"","loc":"proc/stdlib_ztrsv.html"},{"title":"bits – Fortran-lang/stdlib","text":"public elemental function bits(self) Returns the number of bit positions in self . Type Bound bitset_type Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) Source Code elemental function bits ( self ) !! Version: experimental !! !! Returns the number of bit positions in `self`. integer ( bits_kind ) :: bits class ( bitset_type ), intent ( in ) :: self bits = self % num_bits return end function bits","tags":"","loc":"proc/bits.html"},{"title":"error_handler – Fortran-lang/stdlib","text":"public module subroutine error_handler(message, error, status, module, procedure) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: message integer, intent(in) :: error integer, intent(out), optional :: status character(len=*), intent(in), optional :: module character(len=*), intent(in), optional :: procedure Source Code module subroutine error_handler ( message , error , status , & module , procedure ) character ( * ), intent ( in ) :: message integer , intent ( in ) :: error integer , intent ( out ), optional :: status character ( * ), intent ( in ), optional :: module character ( * ), intent ( in ), optional :: procedure end subroutine error_handler","tags":"","loc":"proc/error_handler.html"},{"title":"and – Fortran-lang/stdlib","text":"public interface and Sets the bits in set1 to the bitwise and of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_and use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all none if ( none ( set0 ) ) write ( * , * ) 'Second test of AND worked.' call set1 % not () call and ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of AND worked.' end program example_and Subroutines private elemental module subroutine and_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/and.html"},{"title":"and_not – Fortran-lang/stdlib","text":"public interface and_not Sets the bits in set1 to the bitwise and of the original bits in set1 with the bitwise negation of set2 . The sets must have the same\n number of bits otherwise the result is undefined. ( Specification ) Example program example_and_not use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and_not ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of AND_NOT worked.' call set0 % not () call set1 % not () call and_not ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of AND_NOT worked.' end program example_and_not Subroutines private elemental module subroutine and_not_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_not_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/and_not.html"},{"title":"assignment(=) – Fortran-lang/stdlib","text":"public interface assignment(=) Used to define assignment for bitset_large .\n ( Specification ) Example program example_assignment use stdlib_bitsets logical ( int8 ) :: logical1 ( 64 ) = . true . logical ( int32 ), allocatable :: logical2 (:) type ( bitset_64 ) :: set0 , set1 set0 = logical1 if ( set0 % bits () /= 64 ) then error stop procedure // & ' initialization with logical(int8) failed to set' // & ' the right size.' else if ( . not . set0 % all () ) then error stop procedure // ' initialization with' // & ' logical(int8) failed to set the right values.' else write ( * , * ) 'Initialization with logical(int8) succeeded.' end if set1 = set0 if ( set1 == set0 ) & write ( * , * ) 'Initialization by assignment succeeded' logical2 = set1 if ( all ( logical2 ) ) then write ( * , * ) 'Initialization of logical(int32) succeeded.' end if end program example_assignment Subroutines private pure module subroutine assign_logint16_large(self, logical_vector) Used to define assignment from an array of type logical(int16) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int16), intent(in) :: logical_vector (:) private pure module subroutine assign_logint32_large(self, logical_vector) Used to define assignment from an array of type logical(int32) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int32), intent(in) :: logical_vector (:) private pure module subroutine assign_logint64_large(self, logical_vector) Used to define assignment from an array of type logical(int64) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int64), intent(in) :: logical_vector (:) private pure module subroutine assign_logint8_large(self, logical_vector) Used to define assignment from an array of type logical(int8) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int8), intent(in) :: logical_vector (:) private pure module subroutine logint16_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int16) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int16), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint32_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int32) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int32), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint64_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int64) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int64), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint8_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int8) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int8), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set","tags":"","loc":"interface/assignment(=).html"},{"title":"extract – Fortran-lang/stdlib","text":"public interface extract Creates a new bitset, new , from a range, start_pos to stop_pos , in\n bitset old . If start_pos is greater than stop_pos the new bitset is\n empty. If start_pos is less than zero or stop_pos is greater than bits(old)-1 then if status is present it has the value index_invalid_error and new is undefined, otherwise processing stops\n with an informative message.\n ( Specification ) Example program example_extract use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set0 % set ( 100 , 150 ) call extract ( set1 , set0 , 100 , 150 ) if ( set1 % bits () == 51 ) & write ( * , * ) 'SET1 has the proper size.' if ( set1 % all () ) write ( * , * ) 'SET1 has the proper values.' end program example_extract Subroutines private module subroutine extract_64(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(out) :: new type( bitset_64 ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status private module subroutine extract_large(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: new type( bitset_large ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status","tags":"","loc":"interface/extract.html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Returns .true. if not all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_inequality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 /= set1 . and . set0 /= set2 . and . set1 /= set2 . and . & . not . set0 /= set0 . and . . not . set1 /= set1 . and . . not . & set2 /= set2 ) then write ( * , * ) 'Passed 64 bit inequality tests.' else error stop 'Failed 64 bit inequality tests.' end if end program example_inequality Functions private elemental module function neqv_64(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function neqv_large(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(SLASH=)~2.html"},{"title":"operator(<) – Fortran-lang/stdlib","text":"public interface operator(<) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_lt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 < set1 . and . set1 < set2 . and . set0 < set2 . and . & . not . set0 < set0 . and . . not . set2 < set0 . and . . not . & set2 < set1 ) then write ( * , * ) 'Passed 64 bit less than tests.' else error stop 'Failed 64 bit less than tests.' end if end program example_lt Functions private elemental module function lt_64(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function lt_large(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(lt).html"},{"title":"operator(<=) – Fortran-lang/stdlib","text":"public interface operator(<=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_le use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 <= set1 . and . set1 <= set2 . and . set0 <= set2 . and . & set0 <= set0 . and . set1 <= set1 . and . set2 <= set2 . and . & . not . set1 <= set0 . and . . not . set2 <= set0 . and . . not . & set2 <= set1 ) then write ( * , * ) 'Passed 64 bit less than or equal tests.' else error stop 'Failed 64 bit less than or equal tests.' end if end program example_le Functions private elemental module function le_64(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function le_large(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(lt=).html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Returns .true. if all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_equality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 == set0 . and . set1 == set1 . and . set2 == set2 . and . & . not . set0 == set1 . and . . not . set0 == set2 . and . . not . & set1 == set2 ) then write ( * , * ) 'Passed 64 bit equality tests.' else error stop 'Failed 64 bit equality tests.' end if end program example_equality Functions private elemental module function eqv_64(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function eqv_large(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(==)~2.html"},{"title":"operator(>) – Fortran-lang/stdlib","text":"public interface operator(>) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_gt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 > set0 . and . set2 > set1 . and . set2 > set0 . and . & . not . set0 > set0 . and . . not . set0 > set1 . and . . not . & set1 > set2 ) then write ( * , * ) 'Passed 64 bit greater than tests.' else error stop 'Failed 64 bit greater than tests.' end if end program example_gt Functions private elemental module function gt_64(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function gt_large(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(gt).html"},{"title":"operator(>=) – Fortran-lang/stdlib","text":"public interface operator(>=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_ge use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 >= set0 . and . set2 >= set1 . and . set2 >= set0 . and . & set0 >= set0 . and . set1 >= set1 . and . set2 >= set2 . and . & . not . set0 >= set1 . and . . not . set0 >= set2 . and . . not . & set1 >= set2 ) then write ( * , * ) 'Passed 64 bit greater than or equals tests.' else error stop 'Failed 64 bit greater than or equals tests.' end if end program example_ge Functions private elemental module function ge_64(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function ge_large(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(gt=).html"},{"title":"or – Fortran-lang/stdlib","text":"public interface or Sets the bits in set1 to the bitwise or of the original bits in set1 and set2 . The sets must have the same number of bits otherwise\n the result is undefined.\n ( Specification ) Example program example_or use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call or ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of OR worked.' call set0 % not () call set1 % not () call or ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of OR worked.' end program example_or Subroutines private elemental module subroutine or_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine or_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/or.html"},{"title":"xor – Fortran-lang/stdlib","text":"public interface xor Sets the bits in set1 to the bitwise xor of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_xor use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call xor ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of XOR worked.' call set0 % not () call set1 % not () call xor ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of XOR worked.' end program example_xor Subroutines private elemental module subroutine xor_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine xor_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/xor.html"},{"title":"check – Fortran-lang/stdlib","text":"public subroutine check(condition, msg, code, warn) Checks the value of a logical condition\n ( Specification ) Behavior If condition == .false. and: No other arguments are provided, it stops the program with the default\n message and exit code 1 ; msg is provided, it prints the value of msg ; code is provided, it stops the program with the given exit code; warn is provided and .true. , it doesn't stop the program and prints\n the message. Examples If a /= 5 , stops the program with exit code 1 and prints Check failed. call check ( a == 5 ) As above, but prints a == 5 failed . call check ( a == 5 , msg = 'a == 5 failed.' ) As above, but doesn't stop the program. call check ( a == 5 , msg = 'a == 5 failed.' , warn = . true .) As example #2, but stops the program with exit code 77 call check ( a == 5 , msg = 'a == 5 failed.' , code = 77 ) Arguments Type Intent Optional Attributes Name logical, intent(in) :: condition character(len=*), intent(in), optional :: msg integer, intent(in), optional :: code logical, intent(in), optional :: warn Source Code subroutine check ( condition , msg , code , warn ) !! version: experimental !! !! Checks the value of a logical condition !! ([Specification](../page/specs/stdlib_error.html#description)) !! !!##### Behavior !! !! If `condition == .false.` and: !! !! * No other arguments are provided, it stops the program with the default !! message and exit code `1`; !! * `msg` is provided, it prints the value of `msg`; !! * `code` is provided, it stops the program with the given exit code; !! * `warn` is provided and `.true.`, it doesn't stop the program and prints !! the message. !! !!##### Examples !! !!* If `a /= 5`, stops the program with exit code `1` !! and prints `Check failed.` !!``` fortran !! call check(a == 5) !!``` !! !!* As above, but prints `a == 5 failed`. !!``` fortran !! call check(a == 5, msg='a == 5 failed.') !!``` !! !!* As above, but doesn't stop the program. !!``` fortran !! call check(a == 5, msg='a == 5 failed.', warn=.true.) !!``` !! !!* As example #2, but stops the program with exit code `77` !!``` fortran !! call check(a == 5, msg='a == 5 failed.', code=77) !!``` ! ! Arguments ! --------- logical , intent ( in ) :: condition character ( * ), intent ( in ), optional :: msg integer , intent ( in ), optional :: code logical , intent ( in ), optional :: warn character ( * ), parameter :: msg_default = 'Check failed.' if (. not . condition ) then if ( optval ( warn , . false .)) then write ( stderr , * ) optval ( msg , msg_default ) else call error_stop ( optval ( msg , msg_default ), optval ( code , 1 )) end if end if end subroutine check","tags":"","loc":"proc/check.html"},{"title":"error_stop – Fortran-lang/stdlib","text":"interface public module subroutine error_stop(msg, code) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: msg integer, intent(in), optional :: code Description Provides a call to error stop and allows the user to specify a code and message\n( Specification )","tags":"","loc":"interface/error_stop.html"},{"title":"corr – Fortran-lang/stdlib","text":"public interface corr Pearson correlation of array elements\n( Specification ) Functions private module function corr_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/corr.html"},{"title":"cov – Fortran-lang/stdlib","text":"public interface cov Covariance of array elements\n( Specification ) Functions private module function cov_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/cov.html"},{"title":"mean – Fortran-lang/stdlib","text":"public interface mean Mean of array elements\n( Specification ) Functions private module function mean_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function mean_mask_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function mean_mask_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function mean_mask_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function mean_mask_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function mean_mask_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp)","tags":"","loc":"interface/mean.html"},{"title":"median – Fortran-lang/stdlib","text":"public interface median Median of array elements\n( Specification ) Functions private module function median_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_mask_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_all_mask_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function median_all_mask_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function median_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/median.html"},{"title":"moment – Fortran-lang/stdlib","text":"public interface moment Central moment of array elements\n( Specification ) Functions private module function moment_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_mask_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function moment_mask_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function moment_mask_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function moment_mask_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function moment_mask_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function moment_mask_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function moment_mask_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/moment.html"},{"title":"var – Fortran-lang/stdlib","text":"public interface var Variance of array elements\n( Specification ) Functions private module function var_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp)","tags":"","loc":"interface/var.html"},{"title":"linalg_error_handling – Fortran-lang/stdlib","text":"public pure subroutine linalg_error_handling(ierr, ierr_out) Flow control: on output flag present, return it; otherwise, halt on error Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: ierr type( linalg_state_type ), intent(out), optional :: ierr_out Source Code pure subroutine linalg_error_handling ( ierr , ierr_out ) type ( linalg_state_type ), intent ( in ) :: ierr type ( linalg_state_type ), optional , intent ( out ) :: ierr_out character ( len = :), allocatable :: err_msg if ( present ( ierr_out )) then ! Return error flag ierr_out = ierr elseif ( ierr % error ()) then err_msg = ierr % print () error stop err_msg end if end subroutine linalg_error_handling","tags":"","loc":"proc/linalg_error_handling.html"},{"title":"linalg_state_type – Fortran-lang/stdlib","text":"public interface linalg_state_type Module Procedures private pure function new_state(where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: where_at Location integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) private pure function new_state_nowhere(flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) result(new_state) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type )","tags":"","loc":"interface/linalg_state_type.html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Module Procedures private elemental function state_neq_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_neq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(SLASH=)~3.html"},{"title":"operator(<) – Fortran-lang/stdlib","text":"public interface operator(<) Module Procedures private elemental function state_lt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_lt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(lt)~2.html"},{"title":"operator(<=) – Fortran-lang/stdlib","text":"public interface operator(<=) Module Procedures private elemental function state_le_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_le_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(lt=)~2.html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Comparison operators Module Procedures private elemental function state_eq_flag(err, flag) Compare an error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_eq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(==)~3.html"},{"title":"operator(>) – Fortran-lang/stdlib","text":"public interface operator(>) Module Procedures private elemental function state_gt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_gt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(gt)~2.html"},{"title":"operator(>=) – Fortran-lang/stdlib","text":"public interface operator(>=) Module Procedures private elemental function state_ge_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_ge_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(gt=)~2.html"},{"title":"stdlib_dcabs1 – Fortran-lang/stdlib","text":"public pure function stdlib_dcabs1(z) DCABS1 computes |Re(.)| + |Im(.)| of a double complex number Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dcabs1 ( z ) !! DCABS1 computes |Re(.)| + |Im(.)| of a double complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , real , aimag stdlib_dcabs1 = abs ( real ( z , KIND = dp )) + abs ( aimag ( z )) return end function stdlib_dcabs1","tags":"","loc":"proc/stdlib_dcabs1.html"},{"title":"stdlib_icamax – Fortran-lang/stdlib","text":"public pure function stdlib_icamax(n, cx, incx) ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_icamax ( n , cx , incx ) !! ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix stdlib_icamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_icamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = stdlib_scabs1 ( cx ( 1 )) do i = 2 , n if ( stdlib_scabs1 ( cx ( i )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = stdlib_scabs1 ( cx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_scabs1 ( cx ( ix )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( ix )) end if ix = ix + incx end do end if return end function stdlib_icamax","tags":"","loc":"proc/stdlib_icamax.html"},{"title":"stdlib_idamax – Fortran-lang/stdlib","text":"public pure function stdlib_idamax(n, dx, incx) IDAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_idamax ( n , dx , incx ) !! IDAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_idamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_idamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = abs ( dx ( 1 )) do i = 2 , n if ( abs ( dx ( i )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = abs ( dx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( dx ( ix )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( ix )) end if ix = ix + incx end do end if return end function stdlib_idamax","tags":"","loc":"proc/stdlib_idamax.html"},{"title":"stdlib_isamax – Fortran-lang/stdlib","text":"public pure function stdlib_isamax(n, sx, incx) ISAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_isamax ( n , sx , incx ) !! ISAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_isamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_isamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = abs ( sx ( 1 )) do i = 2 , n if ( abs ( sx ( i )) > smax ) then stdlib_isamax = i smax = abs ( sx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = abs ( sx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( sx ( ix )) > smax ) then stdlib_isamax = i smax = abs ( sx ( ix )) end if ix = ix + incx end do end if return end function stdlib_isamax","tags":"","loc":"proc/stdlib_isamax.html"},{"title":"stdlib_izamax – Fortran-lang/stdlib","text":"public pure function stdlib_izamax(n, zx, incx) IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_izamax ( n , zx , incx ) !! IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix stdlib_izamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_izamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = stdlib_dcabs1 ( zx ( 1 )) do i = 2 , n if ( stdlib_dcabs1 ( zx ( i )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = stdlib_dcabs1 ( zx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_dcabs1 ( zx ( ix )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( ix )) end if ix = ix + incx end do end if return end function stdlib_izamax","tags":"","loc":"proc/stdlib_izamax.html"},{"title":"stdlib_lsame – Fortran-lang/stdlib","text":"public pure function stdlib_lsame(ca, cb) LSAME returns .TRUE. if CA is the same letter as CB regardless of\ncase. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: ca character(len=1), intent(in) :: cb Return Value logical(kind=lk) Source Code pure logical ( lk ) function stdlib_lsame ( ca , cb ) !! LSAME returns .TRUE. if CA is the same letter as CB regardless of !! case. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character , intent ( in ) :: ca , cb ! ===================================================================== ! Intrinsic Functions intrinsic :: ichar ! Local Scalars integer ( ilp ) :: inta , intb , zcode ! test if the characters are equal stdlib_lsame = ca == cb if ( stdlib_lsame ) return ! now test for equivalence if both characters are alphabetic. zcode = ichar ( 'Z' ) ! use 'z' rather than 'a' so that ascii can be detected on prime ! machines, on which ichar returns a value with bit 8 set. ! ichar('a') on prime machines returns 193 which is the same as ! ichar('a') on an ebcdic machine. inta = ichar ( ca ) intb = ichar ( cb ) if ( zcode == 90 . or . zcode == 122 ) then ! ascii is assumed - zcode is the ascii code of either lower or ! upper case 'z'. if ( inta >= 97 . and . inta <= 122 ) inta = inta - 32 if ( intb >= 97 . and . intb <= 122 ) intb = intb - 32 else if ( zcode == 233 . or . zcode == 169 ) then ! ebcdic is assumed - zcode is the ebcdic code of either lower or ! upper case 'z'. if ( inta >= 129 . and . inta <= 137 . or . inta >= 145 . and . inta <= 153 . or . inta >= 162 . and . & inta <= 169 ) inta = inta + 64 if ( intb >= 129 . and . intb <= 137 . or . intb >= 145 . and . intb <= 153 . or . intb >= 162 . and . & intb <= 169 ) intb = intb + 64 else if ( zcode == 218 . or . zcode == 250 ) then ! ascii is assumed, on prime machines - zcode is the ascii code ! plus 128 of either lower or upper case 'z'. if ( inta >= 225 . and . inta <= 250 ) inta = inta - 32 if ( intb >= 225 . and . intb <= 250 ) intb = intb - 32 end if stdlib_lsame = inta == intb ! return end function stdlib_lsame","tags":"","loc":"proc/stdlib_lsame.html"},{"title":"stdlib_scabs1 – Fortran-lang/stdlib","text":"public pure function stdlib_scabs1(z) SCABS1 computes |Re(.)| + |Im(.)| of a complex number Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_scabs1 ( z ) !! SCABS1 computes |Re(.)| + |Im(.)| of a complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scabs1 = abs ( real ( z , KIND = sp )) + abs ( aimag ( z )) return end function stdlib_scabs1","tags":"","loc":"proc/stdlib_scabs1.html"},{"title":"stdlib_xerbla – Fortran-lang/stdlib","text":"public pure subroutine stdlib_xerbla(srname, info) XERBLA is an error handler for the LAPACK routines.\nIt is called by an LAPACK routine if an input parameter has an\ninvalid value. A message is printed and execution stops.\nInstallers may consider modifying the STOP statement in order to\ncall system-specific exception-handling facilities. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: srname integer(kind=ilp), intent(in) :: info Source Code pure subroutine stdlib_xerbla ( srname , info ) !! XERBLA is an error handler for the LAPACK routines. !! It is called by an LAPACK routine if an input parameter has an !! invalid value. A message is printed and execution stops. !! Installers may consider modifying the STOP statement in order to !! call system-specific exception-handling facilities. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character ( len =* ), intent ( in ) :: srname integer ( ilp ), intent ( in ) :: info ! ===================================================================== ! Intrinsic Functions intrinsic :: len_trim ! Executable Statements 9999 format ( ' ** ON ENTRY TO ' , a , ' PARAMETER NUMBER ' , i2 , ' HAD ' , 'AN ILLEGAL VALUE' ) end subroutine stdlib_xerbla","tags":"","loc":"proc/stdlib_xerbla.html"},{"title":"stdlib_xerbla_array – Fortran-lang/stdlib","text":"public pure subroutine stdlib_xerbla_array(srname_array, srname_len, info) XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK\nand BLAS error handler. Rather than taking a Fortran string argument\nas the function's name, XERBLA_ARRAY takes an array of single\ncharacters along with the array's length. XERBLA_ARRAY then copies\nup to 32 characters of that array into a Fortran string and passes\nthat to XERBLA. If called with a non-positive SRNAME_LEN,\nXERBLA_ARRAY will call XERBLA with a string of all blank characters.\nSay some macro or other device makes XERBLA_ARRAY available to C99\nby a name lapack_xerbla and with a common Fortran calling convention.\nThen a C99 program could invoke XERBLA via:\n{\nint flen = strlen( func );\nlapack_xerbla( func ,\n}\nProviding XERBLA_ARRAY is not necessary for intercepting LAPACK\nerrors. XERBLA_ARRAY calls XERBLA. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: srname_array (srname_len) integer(kind=ilp), intent(in) :: srname_len integer(kind=ilp), intent(in) :: info Source Code pure subroutine stdlib_xerbla_array ( srname_array , srname_len , info ) !! XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK !! and BLAS error handler. Rather than taking a Fortran string argument !! as the function's name, XERBLA_ARRAY takes an array of single !! characters along with the array's length. XERBLA_ARRAY then copies !! up to 32 characters of that array into a Fortran string and passes !! that to XERBLA. If called with a non-positive SRNAME_LEN, !! XERBLA_ARRAY will call XERBLA with a string of all blank characters. !! Say some macro or other device makes XERBLA_ARRAY available to C99 !! by a name lapack_xerbla and with a common Fortran calling convention. !! Then a C99 program could invoke XERBLA via: !! { !! int flen = strlen(__func__); !! lapack_xerbla(__func__, !! } !! Providing XERBLA_ARRAY is not necessary for intercepting LAPACK !! errors. XERBLA_ARRAY calls XERBLA. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: srname_len , info ! Array Arguments character ( 1 ), intent ( in ) :: srname_array ( srname_len ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i ! Local Arrays character * 32 srname ! Intrinsic Functions intrinsic :: min , len ! Executable Statements srname = '' do i = 1 , min ( srname_len , len ( srname ) ) srname ( i : i ) = srname_array ( i ) end do call stdlib_xerbla ( srname , info ) return end subroutine stdlib_xerbla_array","tags":"","loc":"proc/stdlib_xerbla_array.html"},{"title":"load_npy – Fortran-lang/stdlib","text":"public interface load_npy Load multidimensional array in npy format\n( Specification ) Subroutines private module subroutine load_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg","tags":"","loc":"interface/load_npy.html"},{"title":"save_npy – Fortran-lang/stdlib","text":"public interface save_npy Save multidimensional array in npy format\n( Specification ) Subroutines private module subroutine save_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg","tags":"","loc":"interface/save_npy.html"},{"title":"dist_rand – Fortran-lang/stdlib","text":"public interface dist_rand Version experimental Generation of random integers with different kinds\n( Specification ) Module Procedures private function dist_rand_iint8(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value integer(kind=int8) private function dist_rand_iint16(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value integer(kind=int16) private function dist_rand_iint32(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value integer(kind=int32) private function dist_rand_iint64(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value integer(kind=int64)","tags":"","loc":"interface/dist_rand.html"},{"title":"random_seed – Fortran-lang/stdlib","text":"public interface random_seed Version experimental Set seed value for random number generator\n( Specification ) Module Procedures private subroutine random_distribution_seed_iint8(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: put integer(kind=int8), intent(out) :: get private subroutine random_distribution_seed_iint16(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: put integer(kind=int16), intent(out) :: get private subroutine random_distribution_seed_iint32(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: put integer(kind=int32), intent(out) :: get private subroutine random_distribution_seed_iint64(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: put integer(kind=int64), intent(out) :: get","tags":"","loc":"interface/random_seed.html"},{"title":"fibonacci_hash – Fortran-lang/stdlib","text":"public elemental function fibonacci_hash(key, nbits) result(sample) Maps the 32 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int32) Source Code elemental function fibonacci_hash ( key , nbits ) result ( sample ) !! Version: experimental !! !! Maps the 32 bit integer `key` to an unsigned integer value with only `nbits` !! bits where `nbits` is less than 32 !! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits)) integer ( int32 ), intent ( in ) :: key integer , intent ( in ) :: nbits integer ( int32 ) :: sample sample = ishft ( key * pow32_over_phi , - 32 + nbits ) end function fibonacci_hash","tags":"","loc":"proc/fibonacci_hash.html"},{"title":"universal_mult_hash – Fortran-lang/stdlib","text":"public elemental function universal_mult_hash(key, seed, nbits) result(sample) Uses the \"random\" odd 32 bit integer seed to map the 32 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer(kind=int32), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int32) Source Code elemental function universal_mult_hash ( key , seed , nbits ) result ( sample ) !! Version: experimental !! !! Uses the \"random\" odd 32 bit integer `seed` to map the 32 bit integer `key` to !! an unsigned integer value with only `nbits` bits where `nbits` is less than 32 !! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits)) integer ( int32 ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer , intent ( in ) :: nbits integer ( int32 ) :: sample sample = ishft ( key * seed , - 32 + nbits ) end function universal_mult_hash","tags":"","loc":"proc/universal_mult_hash.html"},{"title":"odd_random_integer – Fortran-lang/stdlib","text":"public subroutine odd_random_integer(harvest) Returns a 32 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the int32 kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(out) :: harvest Source Code subroutine odd_random_integer ( harvest ) !! Version: experimental !! !! Returns a 32 bit pseudo random integer, `harvest`, distributed uniformly over !! the odd integers of the `int32` kind. !! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-an-odd-integer)) integer ( int32 ), intent ( out ) :: harvest real ( dp ) :: sample call random_number ( sample ) harvest = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) harvest = ishft ( harvest , 1 ) + 1_int32 end subroutine odd_random_integer","tags":"","loc":"proc/odd_random_integer.html"},{"title":"fnv_1_hash – Fortran-lang/stdlib","text":"public interface fnv_1_hash FNV_1 interfaces\n( Specification ) Functions private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1_hash.html"},{"title":"fnv_1a_hash – Fortran-lang/stdlib","text":"public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) Functions private elemental module function character_fnv_1a(key) result(hash_value) FNV_1A hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1a_hash.html"},{"title":"new_nmhash32_seed – Fortran-lang/stdlib","text":"public interface new_nmhash32_seed ( Specification Subroutines private module subroutine new_nmhash32_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed","tags":"","loc":"interface/new_nmhash32_seed.html"},{"title":"new_nmhash32x_seed – Fortran-lang/stdlib","text":"public interface new_nmhash32x_seed ( Specification ) Subroutines private module subroutine new_nmhash32x_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed","tags":"","loc":"interface/new_nmhash32x_seed.html"},{"title":"new_water_hash_seed – Fortran-lang/stdlib","text":"public interface new_water_hash_seed ( Specification ) Subroutines private module subroutine new_water_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed","tags":"","loc":"interface/new_water_hash_seed.html"},{"title":"nmhash32 – Fortran-lang/stdlib","text":"public interface nmhash32 NMHASH32 interfaces\n( Specification ) Functions private elemental module function character_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32)","tags":"","loc":"interface/nmhash32.html"},{"title":"nmhash32x – Fortran-lang/stdlib","text":"public interface nmhash32x NMHASH32X interfaces\n( Specification ) Functions private elemental module function character_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32)","tags":"","loc":"interface/nmhash32x.html"},{"title":"water_hash – Fortran-lang/stdlib","text":"public interface water_hash WATER_HASH interfaces\n( Specification ) Functions private elemental module function character_water_hash(key, seed) result(hash_code) WATER hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int16_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int32_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int64_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int8_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash)","tags":"","loc":"interface/water_hash.html"},{"title":"gauss_legendre – Fortran-lang/stdlib","text":"public interface gauss_legendre Computes Gauss-Legendre quadrature nodes and weights. Subroutines private pure module subroutine gauss_legendre_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2)","tags":"","loc":"interface/gauss_legendre.html"},{"title":"gauss_legendre_lobatto – Fortran-lang/stdlib","text":"public interface gauss_legendre_lobatto Computes Gauss-Legendre-Lobatto quadrature nodes and weights. Subroutines private pure module subroutine gauss_legendre_lobatto_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2)","tags":"","loc":"interface/gauss_legendre_lobatto.html"},{"title":"simps – Fortran-lang/stdlib","text":"public interface simps Integrates sampled values using Simpson's rule\n( Specification ) Functions private pure recursive module function simps_dx_dp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=dp) private pure recursive module function simps_dx_sp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=sp) private recursive module function simps_x_dp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp) private recursive module function simps_x_sp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp)","tags":"","loc":"interface/simps.html"},{"title":"simps_weights – Fortran-lang/stdlib","text":"public interface simps_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) Functions private pure recursive module function simps_weights_dp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp), dimension(size(x)) private pure recursive module function simps_weights_sp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp), dimension(size(x))","tags":"","loc":"interface/simps_weights.html"},{"title":"trapz – Fortran-lang/stdlib","text":"public interface trapz Integrates sampled values using trapezoidal rule\n( Specification ) Functions private pure module function trapz_dx_dp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx Return Value real(kind=dp) private pure module function trapz_dx_sp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx Return Value real(kind=sp) private module function trapz_x_dp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp) private module function trapz_x_sp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp)","tags":"","loc":"interface/trapz.html"},{"title":"trapz_weights – Fortran-lang/stdlib","text":"public interface trapz_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) Functions private pure module function trapz_weights_dp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp), dimension(size(x)) private pure module function trapz_weights_sp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp), dimension(size(x))","tags":"","loc":"interface/trapz_weights.html"},{"title":"fnv_1_hasher – Fortran-lang/stdlib","text":"public pure function fnv_1_hasher(key) Hashes a key with the FNV_1 algorithm\nArguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function fnv_1_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1 algorithm !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1_hasher fnv_1_hasher = fnv_1_hash ( key % value ) end function fnv_1_hasher","tags":"","loc":"proc/fnv_1_hasher.html"},{"title":"fnv_1a_hasher – Fortran-lang/stdlib","text":"public pure function fnv_1a_hasher(key) Hashes a key with the FNV_1a algorithm\n( Specifications ) Arguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function fnv_1a_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1a algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#fnv_1a_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1a_hasher fnv_1a_hasher = fnv_1a_hash ( key % value ) end function fnv_1a_hasher","tags":"","loc":"proc/fnv_1a_hasher.html"},{"title":"seeded_nmhash32_hasher – Fortran-lang/stdlib","text":"public pure function seeded_nmhash32_hasher(key) Hashes a key with the NMHASH32 hash algorithm\n( Specifications ) Arguments:\n key - the key to be hashed\n seed - the seed (unused) for the hashing algorithm Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function seeded_nmhash32_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32 hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32_hasher seeded_nmhash32_hasher = nmhash32 ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32_hasher","tags":"","loc":"proc/seeded_nmhash32_hasher.html"},{"title":"seeded_nmhash32x_hasher – Fortran-lang/stdlib","text":"public pure function seeded_nmhash32x_hasher(key) Hashes a key with the NMHASH32X hash algorithm\n( Specifications )\nArguments:\n key - the key to be hashed\n seed - the seed (unused) for the hashing algorithm Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function seeded_nmhash32x_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32X hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32x_hasher-calculates-a-hash-code-from-a-key)) !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32x_hasher seeded_nmhash32x_hasher = nmhash32x ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32x_hasher","tags":"","loc":"proc/seeded_nmhash32x_hasher.html"},{"title":"seeded_water_hasher – Fortran-lang/stdlib","text":"public pure function seeded_water_hasher(key) Hashes a key with the waterhash algorithm\n( Specifications ) Arguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function seeded_water_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the waterhash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_water_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_water_hasher seeded_water_hasher = water_hash ( key % value , & int ( z 'DEADBEEF1EADBEEF' , int64 ) ) end function seeded_water_hasher","tags":"","loc":"proc/seeded_water_hasher.html"},{"title":"copy_key – Fortran-lang/stdlib","text":"public pure subroutine copy_key(old_key, new_key) Copies the contents of the key, old_key, to the key, new_key\n( Specifications ) Arguments:\n old_key - the input key\n new_key - the output copy of old_key Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: old_key type( key_type ), intent(out) :: new_key Source Code pure subroutine copy_key ( old_key , new_key ) !! Version: Experimental !! !! Copies the contents of the key, old_key, to the key, new_key !! ([Specifications](../page/specs/stdlib_hashmaps.html#copy_key-returns-a-copy-of-the-key)) !! !! Arguments: !! old_key - the input key !! new_key - the output copy of old_key type ( key_type ), intent ( in ) :: old_key type ( key_type ), intent ( out ) :: new_key new_key % value = old_key % value end subroutine copy_key","tags":"","loc":"proc/copy_key.html"},{"title":"copy_other – Fortran-lang/stdlib","text":"public subroutine copy_other(other_in, other_out) Copies the other data, other_in, to the variable, other_out\n( Specifications ) Arguments:\n other_in - the input data\n other_out - the output data Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other_in type( other_type ), intent(out) :: other_out Source Code subroutine copy_other ( other_in , other_out ) !! Version: Experimental !! !! Copies the other data, other_in, to the variable, other_out !! ([Specifications](../page/specs/stdlib_hashmaps.html#copy_other-returns-a-copy-of-the-other-data)) !! !! Arguments: !! other_in - the input data !! other_out - the output data type ( other_type ), intent ( in ) :: other_in type ( other_type ), intent ( out ) :: other_out allocate ( other_out % value , source = other_in % value ) end subroutine copy_other","tags":"","loc":"proc/copy_other.html"},{"title":"free_key – Fortran-lang/stdlib","text":"public subroutine free_key(key) Frees the memory in a key\n( Specifications ) Arguments:\n key - the key Arguments Type Intent Optional Attributes Name type( key_type ), intent(inout) :: key Source Code subroutine free_key ( key ) !! Version: Experimental !! !! Frees the memory in a key !! ([Specifications](../page/specs/stdlib_hashmaps.html#free_key-frees-the-memory-associated-with-a-key)) !! !! Arguments: !! key - the key type ( key_type ), intent ( inout ) :: key if ( allocated ( key % value ) ) deallocate ( key % value ) end subroutine free_key","tags":"","loc":"proc/free_key.html"},{"title":"free_other – Fortran-lang/stdlib","text":"public subroutine free_other(other) Frees the memory in the other data\n( Specifications ) Arguments:\n other - the other data Arguments Type Intent Optional Attributes Name type( other_type ), intent(inout) :: other Source Code subroutine free_other ( other ) !! Version: Experimental !! !! Frees the memory in the other data !! ([Specifications](../page/specs/stdlib_hashmaps.html#free_other-frees-the-memory-associated-with-other-data)) !! !! Arguments: !! other - the other data type ( other_type ), intent ( inout ) :: other if ( allocated ( other % value ) ) deallocate ( other % value ) end subroutine free_other","tags":"","loc":"proc/free_other.html"},{"title":"get – Fortran-lang/stdlib","text":"public interface get Module Procedures private subroutine get_char_key(key, value) Gets the contents of the key as a CHARACTER string\nArguments:\n key - the input key\n value - the contents of key mapped to a CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key character(len=:), intent(out), allocatable :: value private subroutine get_int8_key(key, value) Gets the contents of the key as an INTEGER(INT8) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int8), intent(out), allocatable :: value (:) private pure subroutine get_int32_key(key, value) Gets the contents of the key as an INTEGER(INT32) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int32), intent(out), allocatable :: value (:) private subroutine get_other(other, value) Gets the contents of the other as a CLASS( ) string\nArguments:\n other - the input other data\n value - the contents of other mapped to a CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other class(*), intent(out), allocatable :: value","tags":"","loc":"interface/get.html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Module Procedures private function equal_keys(key1, key2) result(test) Compares two keys for equality\n( Specifications ) Arguments:\n key1 - the first key\n key2 - the second key Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key1 type( key_type ), intent(in) :: key2 Return Value logical","tags":"","loc":"interface/operator(==)~4.html"},{"title":"set – Fortran-lang/stdlib","text":"public interface set Module Procedures private subroutine set_char_key(key, value) Sets the contents of the key from a CHARACTER string\nArguments:\n key - the output key\n value - the input CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key character(len=*), intent(in) :: value private subroutine set_int8_key(key, value) Sets the contents of the key from an INTEGER(INT8) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int8), intent(in) :: value (:) private pure subroutine set_int32_key(key, value) Sets the contents of the key from an INTEGER(INT32) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int32), intent(in) :: value (:) private subroutine set_other(other, value) Sets the contents of the other data from a CLASS( ) variable\nArguments:\n other - the output other data\n value - the input CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(out) :: other class(*), intent(in) :: value","tags":"","loc":"interface/set.html"},{"title":"chomp – Fortran-lang/stdlib","text":"public interface chomp Remove trailing characters in set from string.\nIf no character set is provided trailing whitespace is removed. Version: experimental Module Procedures private pure function chomp_string(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function chomp_char(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable private pure function chomp_set_string_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value type( string_type ) private pure function chomp_set_char_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value character(len=:), allocatable private pure function chomp_substring_string_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value character(len=:), allocatable private pure function chomp_substring_string_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value character(len=:), allocatable","tags":"","loc":"interface/chomp.html"},{"title":"count – Fortran-lang/stdlib","text":"public interface count Returns the number of times substring 'pattern' has appeared in the\ninput string 'string' Specifications Module Procedures private elemental function count_string_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_string_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer","tags":"","loc":"interface/count.html"},{"title":"ends_with – Fortran-lang/stdlib","text":"public interface ends_with Check whether a string ends with substring or not Version: experimental Module Procedures private elemental function ends_with_string_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function ends_with_string_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function ends_with_char_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function ends_with_char_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical","tags":"","loc":"interface/ends_with.html"},{"title":"find – Fortran-lang/stdlib","text":"public interface find Finds the starting index of substring 'pattern' in the input 'string' Specifications Version: experimental Module Procedures private elemental function find_string_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_string_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer","tags":"","loc":"interface/find.html"},{"title":"padl – Fortran-lang/stdlib","text":"public interface padl Left pad the input string Specifications Module Procedures private pure function padl_string_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padl_string_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padl_char_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padl_char_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max)","tags":"","loc":"interface/padl.html"},{"title":"padr – Fortran-lang/stdlib","text":"public interface padr Right pad the input string Specifications Module Procedures private pure function padr_string_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padr_string_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padr_char_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padr_char_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max)","tags":"","loc":"interface/padr.html"},{"title":"replace_all – Fortran-lang/stdlib","text":"public interface replace_all Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nVersion: experimental Module Procedures private pure function replace_all_string_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_string_char_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_char(string, pattern, replacement) result(res) Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable","tags":"","loc":"interface/replace_all.html"},{"title":"slice – Fortran-lang/stdlib","text":"public interface slice Extracts characters from the input string to return a new string Version: experimental Module Procedures private elemental function slice_string(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value type( string_type ) private pure function slice_char(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value character(len=:), allocatable","tags":"","loc":"interface/slice.html"},{"title":"starts_with – Fortran-lang/stdlib","text":"public interface starts_with Check whether a string starts with substring or not Version: experimental Module Procedures private elemental function starts_with_string_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function starts_with_string_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function starts_with_char_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function starts_with_char_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical","tags":"","loc":"interface/starts_with.html"},{"title":"strip – Fortran-lang/stdlib","text":"public interface strip Remove leading and trailing whitespace characters. Version: experimental Module Procedures private pure function strip_string(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function strip_char(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable","tags":"","loc":"interface/strip.html"},{"title":"to_string – Fortran-lang/stdlib","text":"public interface to_string Format or transfer other types as a string.\n( Specification ) Functions private pure module function to_string_1_i_int16(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int32(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int64(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int8(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_l_lk(value) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value Return Value character(len=1) private pure module function to_string_2_i_int16(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int32(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int64(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int8(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_l_lk(value, format) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_c_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_c_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable","tags":"","loc":"interface/to_string~2.html"},{"title":"zfill – Fortran-lang/stdlib","text":"public interface zfill Left pad the input string with zeros. Specifications Module Procedures private pure function zfill_string(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function zfill_char(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max)","tags":"","loc":"interface/zfill.html"},{"title":"dlegendre – Fortran-lang/stdlib","text":"public interface dlegendre First derivative Legendre polynomial Functions private pure elemental module function dlegendre_fp64(n, x) result(dleg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/dlegendre.html"},{"title":"legendre – Fortran-lang/stdlib","text":"public interface legendre Legendre polynomial Functions private pure elemental module function legendre_fp64(n, x) result(leg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/legendre.html"},{"title":"axpy – Fortran-lang/stdlib","text":"public interface axpy AXPY constant times a vector plus a vector. Subroutines public pure subroutine caxpy(n, ca, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine daxpy(n, da, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine saxpy(n, sa, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zaxpy(n, za, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_caxpy (n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_daxpy (n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_saxpy (n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zaxpy (n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/axpy.html"},{"title":"copy – Fortran-lang/stdlib","text":"public interface copy COPY copies a vector x to a vector y. Subroutines public pure subroutine ccopy(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dcopy(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine scopy(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zcopy(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_ccopy (n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dcopy (n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_scopy (n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zcopy (n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/copy.html"},{"title":"dot – Fortran-lang/stdlib","text":"public interface dot DOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Functions public pure function ddot(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function sdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) Module Procedures public pure function stdlib_ddot (n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_sdot (n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp)","tags":"","loc":"interface/dot.html"},{"title":"dotc – Fortran-lang/stdlib","text":"public interface dotc DOTC forms the dot product of two complex vectors\nDOTC = X^H * Y Functions public pure function cdotc(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotc(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Module Procedures public pure function stdlib_cdotc (n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotc (n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp)","tags":"","loc":"interface/dotc.html"},{"title":"dotu – Fortran-lang/stdlib","text":"public interface dotu DOTU forms the dot product of two complex vectors\nDOTU = X^T * Y Functions public pure function cdotu(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotu(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Module Procedures public pure function stdlib_cdotu (n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotu (n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp)","tags":"","loc":"interface/dotu.html"},{"title":"gbmv – Fortran-lang/stdlib","text":"public interface gbmv GBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Subroutines public pure subroutine cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_cgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/gbmv.html"},{"title":"gemm – Fortran-lang/stdlib","text":"public interface gemm GEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Subroutines public pure subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_cgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_sgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/gemm.html"},{"title":"gemv – Fortran-lang/stdlib","text":"public interface gemv GEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Subroutines public pure subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_cgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/gemv.html"},{"title":"ger – Fortran-lang/stdlib","text":"public interface ger GER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Subroutines public pure subroutine dger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine sger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_dger (m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_sger (m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/ger.html"},{"title":"gerc – Fortran-lang/stdlib","text":"public interface gerc GERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Subroutines public pure subroutine cgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cgerc (m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgerc (m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/gerc.html"},{"title":"geru – Fortran-lang/stdlib","text":"public interface geru GERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Subroutines public pure subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cgeru (m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgeru (m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/geru.html"},{"title":"hbmv – Fortran-lang/stdlib","text":"public interface hbmv HBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Subroutines public pure subroutine chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_chbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/hbmv.html"},{"title":"hemm – Fortran-lang/stdlib","text":"public interface hemm HEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Subroutines public pure subroutine chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_chemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/hemm.html"},{"title":"hemv – Fortran-lang/stdlib","text":"public interface hemv HEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Subroutines public pure subroutine chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_chemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/hemv.html"},{"title":"her – Fortran-lang/stdlib","text":"public interface her HER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Subroutines public pure subroutine cher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cher (uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher (uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/her.html"},{"title":"her2 – Fortran-lang/stdlib","text":"public interface her2 HER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Subroutines public pure subroutine cher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cher2 (uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2 (uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/her2.html"},{"title":"her2k – Fortran-lang/stdlib","text":"public interface her2k HER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Subroutines public pure subroutine cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_cher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/her2k.html"},{"title":"herk – Fortran-lang/stdlib","text":"public interface herk HERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Subroutines public pure subroutine cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_cherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/herk.html"},{"title":"hpmv – Fortran-lang/stdlib","text":"public interface hpmv HPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Subroutines public pure subroutine chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_chpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/hpmv.html"},{"title":"hpr – Fortran-lang/stdlib","text":"public interface hpr HPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Subroutines public pure subroutine chpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_chpr (uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr (uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*)","tags":"","loc":"interface/hpr.html"},{"title":"hpr2 – Fortran-lang/stdlib","text":"public interface hpr2 HPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Subroutines public pure subroutine chpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_chpr2 (uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr2 (uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*)","tags":"","loc":"interface/hpr2.html"},{"title":"nrm2 – Fortran-lang/stdlib","text":"public interface nrm2 NRM2 returns the euclidean norm of a vector via the function\nname, so that\nNRM2 := sqrt( x'*x ) Functions public pure function dnrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function snrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Module Procedures public pure function stdlib_dnrm2 (n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_snrm2 (n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp)","tags":"","loc":"interface/nrm2.html"},{"title":"rot – Fortran-lang/stdlib","text":"public interface rot ROT applies a plane rotation. Subroutines public pure subroutine drot(n, dx, incx, dy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine srot(n, sx, incx, sy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Module Procedures public pure subroutine stdlib_drot (n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_srot (n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s","tags":"","loc":"interface/rot.html"},{"title":"rotg – Fortran-lang/stdlib","text":"public interface rotg The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Subroutines public pure subroutine crotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine drotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine srotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine zrotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s Module Procedures public pure subroutine stdlib_crotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine stdlib_drotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine stdlib_srotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine stdlib_zrotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s","tags":"","loc":"interface/rotg.html"},{"title":"rotm – Fortran-lang/stdlib","text":"public interface rotm ROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See ROTMG for a description of data storage in DPARAM. Subroutines public pure subroutine drotm(n, dx, incx, dy, incy, dparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine srotm(n, sx, incx, sy, incy, sparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) Module Procedures public pure subroutine stdlib_drotm (n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine stdlib_srotm (n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5)","tags":"","loc":"interface/rotm.html"},{"title":"rotmg – Fortran-lang/stdlib","text":"public interface rotmg ROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Subroutines public pure subroutine drotmg(dd1, dd2, dx1, dy1, dparam) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine srotmg(sd1, sd2, sx1, sy1, sparam) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) Module Procedures public pure subroutine stdlib_drotmg (dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine stdlib_srotmg (sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5)","tags":"","loc":"interface/rotmg.html"},{"title":"sbmv – Fortran-lang/stdlib","text":"public interface sbmv SBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Subroutines public pure subroutine dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_dsbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/sbmv.html"},{"title":"scal – Fortran-lang/stdlib","text":"public interface scal SCAL scales a vector by a constant. Subroutines public pure subroutine cscal(n, ca, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dscal(n, da, dx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine sscal(n, sa, sx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine zscal(n, za, zx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_cscal (n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dscal (n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_sscal (n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zscal (n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/scal.html"},{"title":"sdot – Fortran-lang/stdlib","text":"public interface sdot Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Functions public pure function dsdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) Module Procedures public pure function stdlib_dsdot (n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp)","tags":"","loc":"interface/sdot.html"},{"title":"spmv – Fortran-lang/stdlib","text":"public interface spmv SPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Subroutines public pure subroutine dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_dspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/spmv.html"},{"title":"spr – Fortran-lang/stdlib","text":"public interface spr SPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Subroutines public pure subroutine dspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_dspr (uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr (uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*)","tags":"","loc":"interface/spr.html"},{"title":"spr2 – Fortran-lang/stdlib","text":"public interface spr2 SPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Subroutines public pure subroutine dspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_dspr2 (uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr2 (uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*)","tags":"","loc":"interface/spr2.html"},{"title":"srot – Fortran-lang/stdlib","text":"public interface srot SROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Subroutines public pure subroutine csrot(n, cx, incx, cy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Module Procedures public pure subroutine stdlib_csrot (n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s","tags":"","loc":"interface/srot.html"},{"title":"sscal – Fortran-lang/stdlib","text":"public interface sscal SSCAL scales a complex vector by a real constant. Subroutines public pure subroutine csscal(n, sa, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_csscal (n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/sscal.html"},{"title":"swap – Fortran-lang/stdlib","text":"public interface swap SWAP interchanges two vectors. Subroutines public pure subroutine cswap(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dswap(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sswap(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zswap(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_cswap (n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dswap (n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sswap (n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zswap (n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/swap.html"},{"title":"symm – Fortran-lang/stdlib","text":"public interface symm SYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Subroutines public pure subroutine csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_csymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/symm.html"},{"title":"symv – Fortran-lang/stdlib","text":"public interface symv SYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Subroutines public pure subroutine dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_dsymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/symv.html"},{"title":"syr – Fortran-lang/stdlib","text":"public interface syr SYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Subroutines public pure subroutine dsyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_dsyr (uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr (uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/syr.html"},{"title":"syr2 – Fortran-lang/stdlib","text":"public interface syr2 SYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Subroutines public pure subroutine dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_dsyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/syr2.html"},{"title":"syr2k – Fortran-lang/stdlib","text":"public interface syr2k SYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Subroutines public pure subroutine csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_csyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/syr2k.html"},{"title":"syrk – Fortran-lang/stdlib","text":"public interface syrk SYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Subroutines public pure subroutine csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_csyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/syrk.html"},{"title":"tbmv – Fortran-lang/stdlib","text":"public interface tbmv TBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Subroutines public pure subroutine ctbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctbmv (uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbmv (uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbmv (uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbmv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tbmv.html"},{"title":"tbsv – Fortran-lang/stdlib","text":"public interface tbsv TBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Subroutines public pure subroutine ctbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctbsv (uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbsv (uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbsv (uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbsv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tbsv.html"},{"title":"tpmv – Fortran-lang/stdlib","text":"public interface tpmv TPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Subroutines public pure subroutine ctpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctpmv (uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpmv (uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpmv (uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpmv (uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tpmv.html"},{"title":"tpsv – Fortran-lang/stdlib","text":"public interface tpsv TPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Subroutines public pure subroutine ctpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctpsv (uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpsv (uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpsv (uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpsv (uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tpsv.html"},{"title":"trmm – Fortran-lang/stdlib","text":"public interface trmm TRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Subroutines public pure subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Module Procedures public pure subroutine stdlib_ctrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb","tags":"","loc":"interface/trmm.html"},{"title":"trmv – Fortran-lang/stdlib","text":"public interface trmv TRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Subroutines public pure subroutine ctrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctrmv (uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrmv (uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strmv (uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrmv (uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/trmv.html"},{"title":"trsm – Fortran-lang/stdlib","text":"public interface trsm TRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Subroutines public pure subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Module Procedures public pure subroutine stdlib_ctrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb","tags":"","loc":"interface/trsm.html"},{"title":"trsv – Fortran-lang/stdlib","text":"public interface trsv TRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Subroutines public pure subroutine ctrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctrsv (uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrsv (uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strsv (uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrsv (uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/trsv.html"},{"title":"cdf_uniform – Fortran-lang/stdlib","text":"public interface cdf_uniform Get uniform distribution cumulative distribution function (cdf) for integer,\nreal and complex variables.\n( Specification ) Module Procedures private elemental function cdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function cdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function cdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function cdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function cdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/cdf_uniform.html"},{"title":"pdf_uniform – Fortran-lang/stdlib","text":"public interface pdf_uniform Get uniform distribution probability density (pdf) for integer, real and\ncomplex variables.\n( Specification ) Module Procedures private elemental function pdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function pdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function pdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function pdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function pdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/pdf_uniform.html"},{"title":"rvs_uniform – Fortran-lang/stdlib","text":"public interface rvs_uniform Get uniformly distributed random variate for integer, real and complex\nvariables.\n( Specification ) Module Procedures private impure elemental function rvs_unif_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_unif_1_iint8(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_1_iint16(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_1_iint32(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_1_iint64(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_1_rsp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_1_rdp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_1_csp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_1_cdp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure elemental function rvs_unif_iint8(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_iint16(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_iint32(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_iint64(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private function rvs_unif_array_iint8(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int8), (array_size) private function rvs_unif_array_iint16(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int16), (array_size) private function rvs_unif_array_iint32(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int32), (array_size) private function rvs_unif_array_iint64(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int64), (array_size) private function rvs_unif_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private function rvs_unif_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private function rvs_unif_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private function rvs_unif_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"interface/rvs_uniform.html"},{"title":"shuffle – Fortran-lang/stdlib","text":"public interface shuffle Fisher-Yates shuffle algorithm for a rank one array of integer, real and\ncomplex variables.\n( Specification ) Module Procedures private function shuffle_iint8(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: list (:) Return Value integer(kind=int8), (size(list)) private function shuffle_iint16(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: list (:) Return Value integer(kind=int16), (size(list)) private function shuffle_iint32(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: list (:) Return Value integer(kind=int32), (size(list)) private function shuffle_iint64(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: list (:) Return Value integer(kind=int64), (size(list)) private function shuffle_rsp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: list (:) Return Value real(kind=sp), (size(list)) private function shuffle_rdp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: list (:) Return Value real(kind=dp), (size(list)) private function shuffle_csp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: list (:) Return Value complex(kind=sp), (size(list)) private function shuffle_cdp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: list (:) Return Value complex(kind=dp), (size(list))","tags":"","loc":"interface/shuffle.html"},{"title":"fibonacci_hash – Fortran-lang/stdlib","text":"public elemental function fibonacci_hash(key, nbits) result(sample) Maps the 64 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 64\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int64) Source Code elemental function fibonacci_hash ( key , nbits ) result ( sample ) !! Version: experimental !! !! Maps the 64 bit integer `key` to an unsigned integer value with only `nbits` !! bits where `nbits` is less than 64 !! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * pow64_over_phi , - 64 + nbits ) end function fibonacci_hash","tags":"","loc":"proc/fibonacci_hash~2.html"},{"title":"universal_mult_hash – Fortran-lang/stdlib","text":"public elemental function universal_mult_hash(key, seed, nbits) result(sample) Uses the \"random\" odd 64 bit integer seed to map the 64 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 64.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer(kind=int64), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int64) Source Code elemental function universal_mult_hash ( key , seed , nbits ) result ( sample ) !! Version: experimental !! !! Uses the \"random\" odd 64 bit integer `seed` to map the 64 bit integer `key` to !! an unsigned integer value with only `nbits` bits where `nbits` is less than 64. !! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * seed , - 64 + nbits ) end function universal_mult_hash","tags":"","loc":"proc/universal_mult_hash~2.html"},{"title":"odd_random_integer – Fortran-lang/stdlib","text":"public subroutine odd_random_integer(harvest) Returns a 64 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the 64 bit kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(out) :: harvest Source Code subroutine odd_random_integer ( harvest ) !! Version: experimental !! !! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over !! the odd integers of the 64 bit kind. !! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-odd-integer)) integer ( int64 ), intent ( out ) :: harvest real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , int32 ) harvest = transfer ( part , harvest ) harvest = ishft ( harvest , 1 ) + 1_int64 end subroutine odd_random_integer","tags":"","loc":"proc/odd_random_integer~2.html"},{"title":"fnv_1_hash – Fortran-lang/stdlib","text":"public interface fnv_1_hash FNV_1 interfaces\n( Specification ) Functions private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1_hash~2.html"},{"title":"fnv_1a_hash – Fortran-lang/stdlib","text":"public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) Functions private elemental module function character_fnv_1a(key) result(hash_code) FNV_1A hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1a_hash~2.html"},{"title":"new_pengy_hash_seed – Fortran-lang/stdlib","text":"interface public module subroutine new_pengy_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed Description Random seed generator for MIR_HASH_STRICT","tags":"","loc":"interface/new_pengy_hash_seed.html"},{"title":"new_spooky_hash_seed – Fortran-lang/stdlib","text":"interface public module subroutine new_spooky_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed (2) Description Random seed generator for SPOOKY_HASH","tags":"","loc":"interface/new_spooky_hash_seed.html"},{"title":"pengy_hash – Fortran-lang/stdlib","text":"public interface pengy_hash PENGY_HASH interfaces\n( Specification ) Functions private elemental module function character_pengy_hash(key, seed) result(hash_code) MIR HASH STRICT function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int16_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int32_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int64_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int8_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64)","tags":"","loc":"interface/pengy_hash.html"},{"title":"spookyHash_128 – Fortran-lang/stdlib","text":"interface public module subroutine spookyHash_128(key, hash_inout) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), target :: key (0:) integer(kind=int_hash), intent(inout) :: hash_inout (2)","tags":"","loc":"interface/spookyhash_128.html"},{"title":"spooky_hash – Fortran-lang/stdlib","text":"public interface spooky_hash SPOOKY_HASH interfaces\n( Specification ) Functions private module function character_spooky_hash(key, seed) result(hash_code) SPOOKY hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int16_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int32_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int64_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int8_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2)","tags":"","loc":"interface/spooky_hash.html"},{"title":"ord_sort – Fortran-lang/stdlib","text":"public interface ord_sort The generic subroutine interface implementing the ORD_SORT algorithm,\na 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 ,\nand insertion sort .\n( Specification ) It is always at worst O(N Ln(N)) in sorting random\ndata, having a performance about 25% slower than SORT on such\ndata, but has much better performance than SORT on partially\nsorted data, having O(N) performance on uniformly non-increasing or\nnon-decreasing data. Subroutines private module subroutine bitset_64_ord_sort(array, work, reverse) bitset_64_ord_sort( array ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) type( bitset_64 ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_ord_sort(array, work, reverse) bitset_large_ord_sort( array ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) type( bitset_large ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine char_ord_sort(array, work, reverse) char_ord_sort( array ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) character(len=len), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine dp_ord_sort(array, work, reverse) dp_ord_sort( array ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) real(kind=dp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int16_ord_sort(array, work, reverse) int16_ord_sort( array ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int16), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int32_ord_sort(array, work, reverse) int32_ord_sort( array ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int32), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int64_ord_sort(array, work, reverse) int64_ord_sort( array ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int64), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int8_ord_sort(array, work, reverse) int8_ord_sort( array ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int8), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine sp_ord_sort(array, work, reverse) sp_ord_sort( array ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) real(kind=sp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine string_type_ord_sort(array, work, reverse) string_type_ord_sort( array ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) type( string_type ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse","tags":"","loc":"interface/ord_sort.html"},{"title":"radix_sort – Fortran-lang/stdlib","text":"public interface radix_sort The generic subroutine interface implementing the LSD radix sort algorithm,\nsee https://en.wikipedia.org/wiki/Radix_sort for more details.\nIt is always O(N) in sorting random data, but need a O(N) buffer.\n( Specification ) Subroutines private module subroutine dp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), dimension(:), target :: array real(kind=dp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int16_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout), dimension(:) :: array integer(kind=int16), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int32_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout), dimension(:) :: array integer(kind=int32), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int64_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout), dimension(:) :: array integer(kind=int64), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int8_radix_sort(array, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout), dimension(:) :: array logical, intent(in), optional :: reverse private module subroutine sp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), dimension(:), target :: array real(kind=sp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse","tags":"","loc":"interface/radix_sort.html"},{"title":"sort – Fortran-lang/stdlib","text":"public interface sort The generic subroutine interface implementing the SORT algorithm, based\non the introsort of David Musser.\n( Specification ) Subroutines private pure module subroutine bitset_64_sort(array, reverse) bitset_64_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine bitset_large_sort(array, reverse) bitset_large_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine char_sort(array, reverse) char_sort( array[, reverse] ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine dp_sort(array, reverse) dp_sort( array[, reverse] ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int16_sort(array, reverse) int16_sort( array[, reverse] ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int32_sort(array, reverse) int32_sort( array[, reverse] ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int64_sort(array, reverse) int64_sort( array[, reverse] ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int8_sort(array, reverse) int8_sort( array[, reverse] ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine sp_sort(array, reverse) sp_sort( array[, reverse] ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine string_type_sort(array, reverse) string_type_sort( array[, reverse] ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse","tags":"","loc":"interface/sort.html"},{"title":"sort_index – Fortran-lang/stdlib","text":"public interface sort_index The generic subroutine interface implementing the SORT_INDEX algorithm,\nbased on the \"Rust\" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159\nbut modified to return an array of indices that would provide a stable\nsort of the rank one ARRAY input.\n( Specification ) The indices by default correspond to a\nnon-decreasing sort, but if the optional argument REVERSE is present\nwith a value of .TRUE. the indices correspond to a non-increasing sort. Subroutines private module subroutine bitset_64_sort_index_default(array, index, work, iwork, reverse) bitset_64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_64_sort_index_low(array, index, work, iwork, reverse) bitset_64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_default(array, index, work, iwork, reverse) bitset_large_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_low(array, index, work, iwork, reverse) bitset_large_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_default(array, index, work, iwork, reverse) char_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_low(array, index, work, iwork, reverse) char_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_default(array, index, work, iwork, reverse) dp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_low(array, index, work, iwork, reverse) dp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_default(array, index, work, iwork, reverse) int16_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_low(array, index, work, iwork, reverse) int16_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_default(array, index, work, iwork, reverse) int32_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_low(array, index, work, iwork, reverse) int32_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_default(array, index, work, iwork, reverse) int64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_low(array, index, work, iwork, reverse) int64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_default(array, index, work, iwork, reverse) int8_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_low(array, index, work, iwork, reverse) int8_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_default(array, index, work, iwork, reverse) sp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_low(array, index, work, iwork, reverse) sp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_default(array, index, work, iwork, reverse) string_type_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_low(array, index, work, iwork, reverse) string_type_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse","tags":"","loc":"interface/sort_index.html"},{"title":"adjustl – Fortran-lang/stdlib","text":"public interface adjustl Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. Module Procedures private elemental function adjustl_string(string) result(adjusted_string) Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/adjustl.html"},{"title":"adjustr – Fortran-lang/stdlib","text":"public interface adjustr Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. Module Procedures private elemental function adjustr_string(string) result(adjusted_string) Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/adjustr.html"},{"title":"assignment(=) – Fortran-lang/stdlib","text":"public interface assignment(=) Assign a character sequence to a string. Module Procedures private elemental subroutine assign_string_char(lhs, rhs) Assign a character sequence to a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: lhs character(len=*), intent(in) :: rhs","tags":"","loc":"interface/assignment(=)~3.html"},{"title":"char – Fortran-lang/stdlib","text":"public interface char Return the character sequence represented by the string. This method is elemental and returns a scalar character value. Module Procedures private pure function char_string(string) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value character(len=len) private elemental function char_string_pos(string, pos) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: pos Return Value character(len=1) private pure function char_string_range(string, start, last) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: start integer, intent(in) :: last Return Value character(len=last)","tags":"","loc":"interface/char.html"},{"title":"iachar – Fortran-lang/stdlib","text":"public interface iachar Code in ASCII collating sequence. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function iachar_string(string) result(ich) Code in ASCII collating sequence. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/iachar.html"},{"title":"ichar – Fortran-lang/stdlib","text":"public interface ichar Character-to-integer conversion function. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function ichar_string(string) result(ich) Character-to-integer conversion function. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/ichar.html"},{"title":"index – Fortran-lang/stdlib","text":"public interface index Position of a substring within a string . Returns the position of the start of the leftmost or rightmost occurrence\nof string substring in string , counting from one. If substring is not\npresent in string , zero is returned. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function index_string_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version both character sequences are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_string_char(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the main character sequence is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_char_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the sub character sequence is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer","tags":"","loc":"interface/index.html"},{"title":"len – Fortran-lang/stdlib","text":"public interface len Returns the length of the character sequence represented by the string. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function len_string(string) result(length) Returns the length of the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/len.html"},{"title":"len_trim – Fortran-lang/stdlib","text":"public interface len_trim Returns the length of the character sequence without trailing spaces\nrepresented by the string. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function len_trim_string(string) result(length) Returns the length of the character sequence without trailing spaces\nrepresented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/len_trim.html"},{"title":"lge – Fortran-lang/stdlib","text":"public interface lge Lexically compare the order of two character sequences being greater equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function lge_string_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lge_string_char(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lge_char_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/lge.html"},{"title":"lgt – Fortran-lang/stdlib","text":"public interface lgt Lexically compare the order of two character sequences being greater,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function lgt_string_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lgt_string_char(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lgt_char_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/lgt.html"},{"title":"lle – Fortran-lang/stdlib","text":"public interface lle Lexically compare the order of two character sequences being less equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function lle_string_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lle_string_char(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lle_char_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/lle.html"},{"title":"llt – Fortran-lang/stdlib","text":"public interface llt Lexically compare the order of two character sequences being less,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function llt_string_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function llt_string_char(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function llt_char_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/llt.html"},{"title":"move – Fortran-lang/stdlib","text":"public interface move Moves the allocated character scalar from 'from' to 'to' Specifications Module Procedures private elemental subroutine move_string_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout), target :: from type( string_type ), intent(inout), target :: to private pure subroutine move_string_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: from character(len=:), intent(out), allocatable :: to private pure subroutine move_char_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from type( string_type ), intent(out) :: to private pure subroutine move_char_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from character(len=:), intent(out), allocatable :: to","tags":"","loc":"interface/move.html"},{"title":"operator(//) – Fortran-lang/stdlib","text":"public interface operator(//) Concatenate two character sequences, the left-hand side, the right-hand side\nor both character sequences can be represented by a string. This operator is elemental and returns a scalar character value. Module Procedures private elemental function concat_string_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_string_char(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_char_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type )","tags":"","loc":"interface/operator(SLASHSLASH)~3.html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Compare two character sequences for inequality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function ne_string_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ne_string_char(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ne_char_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(SLASH=)~4.html"},{"title":"operator(<) – Fortran-lang/stdlib","text":"public interface operator(<) Compare two character sequences for being less, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function lt_string_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lt_string_char(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lt_char_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(lt)~3.html"},{"title":"operator(<=) – Fortran-lang/stdlib","text":"public interface operator(<=) Compare two character sequences for being less than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function le_string_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function le_string_char(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function le_char_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(lt=)~3.html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Compare two character sequences for equality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function eq_string_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function eq_string_char(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function eq_char_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(==)~5.html"},{"title":"operator(>) – Fortran-lang/stdlib","text":"public interface operator(>) Compare two character sequences for being greater, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function gt_string_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function gt_string_char(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function gt_char_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(gt)~3.html"},{"title":"operator(>=) – Fortran-lang/stdlib","text":"public interface operator(>=) Compare two character sequences for being greater than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function ge_string_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ge_string_char(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ge_char_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(gt=)~3.html"},{"title":"read(formatted) – Fortran-lang/stdlib","text":"public interface read(formatted) Read a character sequence from a connected unformatted unit into the string. Module Procedures private subroutine read_formatted(string, unit, iotype, v_list, iostat, iomsg) Read a character sequence from a connected formatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/read(formatted).html"},{"title":"read(unformatted) – Fortran-lang/stdlib","text":"public interface read(unformatted) Read a character sequence from a connected unformatted unit into the string. Module Procedures private subroutine read_unformatted(string, unit, iostat, iomsg) Read a character sequence from a connected unformatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/read(unformatted).html"},{"title":"repeat – Fortran-lang/stdlib","text":"public interface repeat Repeats the character sequence hold by the string by the number of\nspecified copies. This method is elemental and returns a scalar character value. Module Procedures private elemental function repeat_string(string, ncopies) result(repeated_string) Repeats the character sequence hold by the string by the number of\nspecified copies. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: ncopies Return Value type( string_type )","tags":"","loc":"interface/repeat.html"},{"title":"reverse – Fortran-lang/stdlib","text":"public interface reverse Reverses the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nreverse character sequence Module Procedures private elemental function reverse_string(string) result(reversed_string) Reverse the character sequence hold by the input string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/reverse~2.html"},{"title":"scan – Fortran-lang/stdlib","text":"public interface scan Scan a string for the presence of a set of characters. Scans a string for\nany of the characters in a set of characters. If back is either absent or false , this function returns the position\nof the leftmost character of string that is in set . If back is true ,\nthe rightmost position is returned. If no character of set is found in string , the result is zero. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function scan_string_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version both the character sequence and the character set are\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_string_char(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the character sequences is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_char_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the set of characters is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer","tags":"","loc":"interface/scan.html"},{"title":"string_type – Fortran-lang/stdlib","text":"public interface string_type Constructor for new string instances Functions private elemental module function new_string(string) result(new) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: string Return Value type( string_type ) private elemental module function new_string_from_integer_int16(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int32(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int64(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int8(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_logical_lk(val) result(new) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: val Return Value type( string_type )","tags":"","loc":"interface/string_type.html"},{"title":"to_lower – Fortran-lang/stdlib","text":"public interface to_lower Returns the lowercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nlowercase character sequence Module Procedures private elemental function to_lower_string(string) result(lowercase_string) Convert the character sequence hold by the input string to lower case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_lower~2.html"},{"title":"to_sentence – Fortran-lang/stdlib","text":"public interface to_sentence Returns the sentencecase version of the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nsentencecase character sequence Module Procedures private elemental function to_sentence_string(string) result(sentence_string) Convert the character sequence hold by the input string to sentence case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_sentence~2.html"},{"title":"to_title – Fortran-lang/stdlib","text":"public interface to_title Returns the titlecase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\ntitlecase character sequence Module Procedures private elemental function to_title_string(string) result(titlecase_string) Convert the character sequence hold by the input string to title case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_title~2.html"},{"title":"to_upper – Fortran-lang/stdlib","text":"public interface to_upper Returns the uppercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nuppercase character sequence Module Procedures private elemental function to_upper_string(string) result(uppercase_string) Convert the character sequence hold by the input string to upper case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_upper~2.html"},{"title":"trim – Fortran-lang/stdlib","text":"public interface trim Returns the character sequence hold by the string without trailing spaces. This method is elemental and returns a scalar character value. Module Procedures private elemental function trim_string(string) result(trimmed_string) Returns the character sequence hold by the string without trailing spaces. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/trim.html"},{"title":"verify – Fortran-lang/stdlib","text":"public interface verify Scan a string for the absence of a set of characters. Verifies that all\nthe characters in string belong to the set of characters in set. If back is either absent or false , this function returns the position\nof the leftmost character of string that is not in set . If back is true ,\nthe rightmost position is returned. If all characters of string are found\nin set , the result is zero. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function verify_string_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version both the character sequence and\nthe character set are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_string_char(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the character sequences is\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_char_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the set of characters is\nrepresented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer","tags":"","loc":"interface/verify.html"},{"title":"write(formatted) – Fortran-lang/stdlib","text":"public interface write(formatted) Write the character sequence hold by the string to a connected formatted\nunit. Module Procedures private subroutine write_formatted(string, unit, iotype, v_list, iostat, iomsg) Write the character sequence hold by the string to a connected formatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/write(formatted).html"},{"title":"write(unformatted) – Fortran-lang/stdlib","text":"public interface write(unformatted) Write the character sequence hold by the string to a connected unformatted\nunit. Module Procedures private subroutine write_unformatted(string, unit, iostat, iomsg) Write the character sequence hold by the string to a connected unformatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/write(unformatted).html"},{"title":"gamma – Fortran-lang/stdlib","text":"public interface gamma Gamma function for integer and complex numbers Module Procedures private impure elemental function gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value integer(kind=int8) private impure elemental function gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value integer(kind=int16) private impure elemental function gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value integer(kind=int32) private impure elemental function gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value integer(kind=int64) private impure elemental function gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp)","tags":"","loc":"interface/gamma.html"},{"title":"log_factorial – Fortran-lang/stdlib","text":"public interface log_factorial Logarithm of factorial n!, integer variable Module Procedures private impure elemental function l_factorial_iint8(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value real private impure elemental function l_factorial_iint16(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value real private impure elemental function l_factorial_iint32(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value real private impure elemental function l_factorial_iint64(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value real","tags":"","loc":"interface/log_factorial.html"},{"title":"log_gamma – Fortran-lang/stdlib","text":"public interface log_gamma Logarithm of gamma function Module Procedures private impure elemental function l_gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value real private impure elemental function l_gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value real private impure elemental function l_gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value real private impure elemental function l_gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value real private impure elemental function l_gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function l_gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp)","tags":"","loc":"interface/log_gamma.html"},{"title":"log_lower_incomplete_gamma – Fortran-lang/stdlib","text":"public interface log_lower_incomplete_gamma Logarithm of lower incomplete gamma function Module Procedures private impure elemental function l_ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/log_lower_incomplete_gamma.html"},{"title":"log_upper_incomplete_gamma – Fortran-lang/stdlib","text":"public interface log_upper_incomplete_gamma Logarithm of upper incomplete gamma function Module Procedures private impure elemental function l_ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/log_upper_incomplete_gamma.html"},{"title":"lower_incomplete_gamma – Fortran-lang/stdlib","text":"public interface lower_incomplete_gamma Lower incomplete gamma function Module Procedures private impure elemental function ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/lower_incomplete_gamma.html"},{"title":"regularized_gamma_p – Fortran-lang/stdlib","text":"public interface regularized_gamma_p Regularized (normalized) lower incomplete gamma function, P Module Procedures private impure elemental function regamma_p_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/regularized_gamma_p.html"},{"title":"regularized_gamma_q – Fortran-lang/stdlib","text":"public interface regularized_gamma_q Regularized (normalized) upper incomplete gamma function, Q Module Procedures private impure elemental function regamma_q_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/regularized_gamma_q.html"},{"title":"upper_incomplete_gamma – Fortran-lang/stdlib","text":"public interface upper_incomplete_gamma Upper incomplete gamma function Module Procedures private impure elemental function ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/upper_incomplete_gamma.html"},{"title":"stdlib_optval – Fortran-lang/stdlib","text":"Provides a generic function optval , which can be used to\nconveniently implement fallback values for optional arguments\nto subprograms\n( Specification ) If x is an optional parameter of a\nsubprogram, then the expression optval(x, default) inside that\nsubprogram evaluates to x if it is present, otherwise default . It is an error to call optval with a single actual argument. Uses stdlib_kinds Interfaces public interface optval Fallback value for optional arguments\n( Specification ) private pure elemental function optval_rsp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), optional :: x real(kind=sp), intent(in) :: default Return Value real(kind=sp) private pure elemental function optval_rdp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), optional :: x real(kind=dp), intent(in) :: default Return Value real(kind=dp) private pure elemental function optval_iint8(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), optional :: x integer(kind=int8), intent(in) :: default Return Value integer(kind=int8) private pure elemental function optval_iint16(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in), optional :: x integer(kind=int16), intent(in) :: default Return Value integer(kind=int16) private pure elemental function optval_iint32(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in), optional :: x integer(kind=int32), intent(in) :: default Return Value integer(kind=int32) private pure elemental function optval_iint64(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in), optional :: x integer(kind=int64), intent(in) :: default Return Value integer(kind=int64) private pure elemental function optval_csp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), optional :: x complex(kind=sp), intent(in) :: default Return Value complex(kind=sp) private pure elemental function optval_cdp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), optional :: x complex(kind=dp), intent(in) :: default Return Value complex(kind=dp) private pure elemental function optval_ll1(x, default) result(y) Arguments Type Intent Optional Attributes Name logical, intent(in), optional :: x logical, intent(in) :: default Return Value logical private pure function optval_character(x, default) result(y) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: x character(len=*), intent(in) :: default Return Value character(len=:), allocatable","tags":"","loc":"module/stdlib_optval.html"},{"title":"stdlib_selection – Fortran-lang/stdlib","text":"Quickly find the k-th smallest value of an array, or the index of the k-th smallest value.\n( Specification ) Uses stdlib_kinds Interfaces public interface arg_select ( Specification ) private subroutine arg_select_1_iint8_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). public interface select ( Specification ) private subroutine select_1_iint8_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ).","tags":"","loc":"module/stdlib_selection.html"},{"title":"stdlib_ascii – Fortran-lang/stdlib","text":"The stdlib_ascii module provides procedures for handling and manipulating\nintrinsic character variables and constants. The specification of this module is available here . Uses stdlib_kinds Variables Type Visibility Attributes Name Initial character(len=1), public, parameter :: ACK = achar(int(z'06')) Acknowledge character(len=1), public, parameter :: BEL = achar(int(z'07')) Bell character(len=1), public, parameter :: BS = achar(int(z'08')) Backspace character(len=1), public, parameter :: CAN = achar(int(z'18')) Cancel character(len=1), public, parameter :: CR = achar(int(z'0D')) Carriage return character(len=1), public, parameter :: DC1 = achar(int(z'11')) Device control 1 character(len=1), public, parameter :: DC2 = achar(int(z'12')) Device control 2 character(len=1), public, parameter :: DC3 = achar(int(z'13')) Device control 3 character(len=1), public, parameter :: DC4 = achar(int(z'14')) Device control 4 character(len=1), public, parameter :: DEL = achar(int(z'7F')) Delete character(len=1), public, parameter :: DLE = achar(int(z'10')) Data link escape character(len=1), public, parameter :: EM = achar(int(z'19')) End of medium character(len=1), public, parameter :: ENQ = achar(int(z'05')) Enquiry character(len=1), public, parameter :: EOT = achar(int(z'04')) End of transmission character(len=1), public, parameter :: ESC = achar(int(z'1B')) Escape character(len=1), public, parameter :: ETB = achar(int(z'17')) End of transmission block character(len=1), public, parameter :: ETX = achar(int(z'03')) End of text character(len=1), public, parameter :: FF = achar(int(z'0C')) NP form feed, new page character(len=1), public, parameter :: FS = achar(int(z'1C')) File separator character(len=1), public, parameter :: GS = achar(int(z'1D')) Group separator character(len=1), public, parameter :: LF = achar(int(z'0A')) NL line feed, new line character(len=1), public, parameter :: NAK = achar(int(z'15')) Negative acknowledge character(len=1), public, parameter :: NUL = achar(int(z'00')) Null character(len=1), public, parameter :: RS = achar(int(z'1E')) Record separator character(len=1), public, parameter :: SI = achar(int(z'0F')) Shift in character(len=1), public, parameter :: SO = achar(int(z'0E')) Shift out character(len=1), public, parameter :: SOH = achar(int(z'01')) Start of heading character(len=1), public, parameter :: STX = achar(int(z'02')) Start of text character(len=1), public, parameter :: SUB = achar(int(z'1A')) Substitute character(len=1), public, parameter :: SYN = achar(int(z'16')) Synchronous idle character(len=1), public, parameter :: TAB = achar(int(z'09')) Horizontal tab character(len=1), public, parameter :: US = achar(int(z'1F')) Unit separator character(len=1), public, parameter :: VT = achar(int(z'0B')) Vertical tab character(len=*), public, parameter :: digits = hex_digits(1:10) 0 .. 9 character(len=*), public, parameter :: fullhex_digits = \"0123456789ABCDEFabcdef\" 0 .. 9A .. Fa .. f character(len=*), public, parameter :: hex_digits = fullhex_digits(1:16) 0 .. 9A .. F character(len=*), public, parameter :: letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\" A .. Za .. z character(len=*), public, parameter :: lowercase = letters(27:) a .. z character(len=*), public, parameter :: lowerhex_digits = \"0123456789abcdef\" 0 .. 9a .. f character(len=*), public, parameter :: octal_digits = digits(1:8) 0 .. 7 character(len=*), public, parameter :: uppercase = letters(1:26) A .. Z character(len=*), public, parameter :: whitespace = \" \"//TAB//VT//CR//LF//FF ASCII _whitespace Functions public pure function is_alpha (c) Checks whether c is an ASCII letter (A .. Z, a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_alphanum (c) Checks whether c is a letter or a number (0 .. 9, a .. z, A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_ascii (c) Checks whether or not c is in the ASCII character set -\ni.e. in the range 0 .. 0x7F. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_blank (c) Checks whether or not c is a blank character. That includes the\nonly the space and tab characters Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_control (c) Checks whether c is a control character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_digit (c) Checks whether c is a digit (0 .. 9). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_graphical (c) Checks whether or not c is a printable character other than the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_hex_digit (c) Checks whether c is a digit in base 16 (0 .. 9, A .. F, a .. f). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_lower (c) Checks whether c is a lowercase ASCII letter (a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_octal_digit (c) Checks whether c is a digit in base 8 (0 .. 7). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_printable (c) Checks whether or not c is a printable character - including the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_punctuation (c) Checks whether or not c is a punctuation character. That includes\nall ASCII characters which are not control characters, letters,\ndigits, or whitespace. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_upper (c) Checks whether c is an uppercase ASCII letter (A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_white (c) Checks whether or not c is a whitespace character. That includes the\nspace, tab, vertical tab, form feed, carriage return, and linefeed\ncharacters. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function reverse (string) result(reverse_string) Reverse the character order in the input character variable\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_lower (string) result(lower_string) Convert character variable to lower case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_sentence (string) result(sentence_string) Converts character sequence to sentence case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_title (string) result(title_string) Converts character sequence to title case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_upper (string) result(upper_string) Convert character variable to upper case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len)","tags":"","loc":"module/stdlib_ascii.html"},{"title":"stdlib_array – Fortran-lang/stdlib","text":"Module for index manipulation and general array handling The specification of this module is available here . Functions public pure function falseloc (array, lbound) result(loc) License Version experimental Return the positions of the false elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(.not.array)) Locations of false elements public pure function trueloc (array, lbound) result(loc) License Version experimental Return the positions of the true elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(array)) Locations of true elements","tags":"","loc":"module/stdlib_array.html"},{"title":"stdlib_ansi – Fortran-lang/stdlib","text":"Terminal color and style escape sequences Uses stdlib_string_type stdlib_kinds Used by Descendants: stdlib_ansi_operator stdlib_ansi_to_string Variables Type Visibility Attributes Name Initial type( ansi_code ), public, parameter :: bg_color_black = ansi_code(bg=0) Identifier for black background color type( ansi_code ), public, parameter :: bg_color_blue = ansi_code(bg=4) Identifier for blue background color type( ansi_code ), public, parameter :: bg_color_cyan = ansi_code(bg=6) Identifier for cyan background color type( ansi_code ), public, parameter :: bg_color_default = ansi_code(bg=9) Identifier for the default background color type( ansi_code ), public, parameter :: bg_color_green = ansi_code(bg=2) Identifier for green background color type( ansi_code ), public, parameter :: bg_color_magenta = ansi_code(bg=5) Identifier for magenta background color type( ansi_code ), public, parameter :: bg_color_red = ansi_code(bg=1) Identifier for red background color type( ansi_code ), public, parameter :: bg_color_white = ansi_code(bg=7) Identifier for white background color type( ansi_code ), public, parameter :: bg_color_yellow = ansi_code(bg=3) Identifier for yellow background color type( ansi_code ), public, parameter :: fg_color_black = ansi_code(fg=0) Identifier for black foreground color type( ansi_code ), public, parameter :: fg_color_blue = ansi_code(fg=4) Identifier for blue foreground color type( ansi_code ), public, parameter :: fg_color_cyan = ansi_code(fg=6) Identifier for cyan foreground color type( ansi_code ), public, parameter :: fg_color_default = ansi_code(fg=9) Identifier for the default foreground color type( ansi_code ), public, parameter :: fg_color_green = ansi_code(fg=2) Identifier for green foreground color type( ansi_code ), public, parameter :: fg_color_magenta = ansi_code(fg=5) Identifier for magenta foreground color type( ansi_code ), public, parameter :: fg_color_red = ansi_code(fg=1) Identifier for red foreground color type( ansi_code ), public, parameter :: fg_color_white = ansi_code(fg=7) Identifier for white foreground color type( ansi_code ), public, parameter :: fg_color_yellow = ansi_code(fg=3) Identifier for yellow foreground color type( ansi_code ), public, parameter :: style_blink = ansi_code(style=5) Identifier for blink style type( ansi_code ), public, parameter :: style_blink_fast = ansi_code(style=6) Identifier for (fast) blink style type( ansi_code ), public, parameter :: style_bold = ansi_code(style=1) Identifier for bold style type( ansi_code ), public, parameter :: style_dim = ansi_code(style=2) Identifier for dim style type( ansi_code ), public, parameter :: style_hidden = ansi_code(style=8) Identifier for hidden style type( ansi_code ), public, parameter :: style_italic = ansi_code(style=3) Identifier for italic style type( ansi_code ), public, parameter :: style_reset = ansi_code(style=0) Identifier for reset style type( ansi_code ), public, parameter :: style_reverse = ansi_code(style=7) Identifier for reverse style type( ansi_code ), public, parameter :: style_strikethrough = ansi_code(style=9) Identifier for strikethrough style type( ansi_code ), public, parameter :: style_underline = ansi_code(style=4) Identifier for underline style Interfaces public interface operator(+) private pure module function add(lval, rval) result(code) Add two escape sequences, attributes in the right value override the left value ones. Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: lval First escape code type( ansi_code ), intent(in) :: rval Second escape code Return Value type( ansi_code ) Combined escape code public interface operator(//) private pure module function concat_left(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value character(len=:), allocatable Concatenated string private pure module function concat_left_str(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value type( string_type ) Concatenated string private pure module function concat_right(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence character(len=*), intent(in) :: rval String to add the escape code to Return Value character(len=:), allocatable Concatenated string private pure module function concat_right_str(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence type( string_type ), intent(in) :: rval String to add the escape code to Return Value type( string_type ) Concatenated string public interface to_string private pure module function to_string_ansi_code(code) result(str) Transform a color code into an actual ANSI escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Color code to be used Return Value character(len=:), allocatable ANSI escape sequence representing the color code Derived Types type, public :: ansi_code Container for terminal escape code","tags":"","loc":"module/stdlib_ansi.html"},{"title":"stdlib_codata – Fortran-lang/stdlib","text":"Codata Constants - Autogenerated Uses stdlib_kinds stdlib_codata_type Variables Type Visibility Attributes Name Initial type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_ELECTRON_MASS_RATIO = codata_constant_type(\"alpha particle-electron mass ratio\", 7294.29954171_dp, 0.00000017_dp, \"\") alpha particle-electron mass ratio type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS = codata_constant_type(\"alpha particle mass\", 6.6446573450e-27_dp, 0.0000000021e-27_dp, \"kg\") alpha particle mass type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"alpha particle mass energy equivalent\", 5.9719201997e-10_dp, 0.0000000019e-10_dp, \"J\") alpha particle mass energy equivalent type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"alpha particle mass energy equivalent in MeV\", 3727.3794118_dp, 0.0000012_dp, \"MeV\") alpha particle mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS_IN_U = codata_constant_type(\"alpha particle mass in u\", 4.001506179129_dp, 0.000000000062_dp, \"u\") alpha particle mass in u type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MOLAR_MASS = codata_constant_type(\"alpha particle molar mass\", 4.0015061833e-3_dp, 0.0000000012e-3_dp, \"kg mol^-1\") alpha particle molar mass type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_PROTON_MASS_RATIO = codata_constant_type(\"alpha particle-proton mass ratio\", 3.972599690252_dp, 0.000000000070_dp, \"\") alpha particle-proton mass ratio type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_RELATIVE_ATOMIC_MASS = codata_constant_type(\"alpha particle relative atomic mass\", 4.001506179129_dp, 0.000000000062_dp, \"\") alpha particle relative atomic mass type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_RMS_CHARGE_RADIUS = codata_constant_type(\"alpha particle rms charge radius\", 1.6785e-15_dp, 0.0021e-15_dp, \"m\") alpha particle rms charge radius type( codata_constant_type ), public, parameter :: ANGSTROM_STAR = codata_constant_type(\"Angstrom star\", 1.00001495e-10_dp, 0.00000090e-10_dp, \"m\") Angstrom star type( codata_constant_type ), public, parameter :: ATOMIC_MASS_CONSTANT = codata_constant_type(\"atomic mass constant\", 1.66053906892e-27_dp, 0.00000000052e-27_dp, \"kg\") atomic mass constant type( codata_constant_type ), public, parameter :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT = codata_constant_type(\"atomic mass constant energy equivalent\", 1.49241808768e-10_dp, 0.00000000046e-10_dp, \"J\") atomic mass constant energy equivalent type( codata_constant_type ), public, parameter :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"atomic mass constant energy equivalent in MeV\", 931.49410372_dp, 0.00000029_dp, \"MeV\") atomic mass constant energy equivalent in MeV type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"atomic mass unit-electron volt relationship\", 9.3149410372e8_dp, 0.0000000029e8_dp, \"eV\") atomic mass unit-electron volt relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_HARTREE_RELATIONSHIP = codata_constant_type(\"atomic mass unit-hartree relationship\", 3.4231776922e7_dp, 0.0000000011e7_dp, \"E_h\") atomic mass unit-hartree relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_HERTZ_RELATIONSHIP = codata_constant_type(\"atomic mass unit-hertz relationship\", 2.25234272185e23_dp, 0.00000000070e23_dp, \"Hz\") atomic mass unit-hertz relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"atomic mass unit-inverse meter relationship\", 7.5130066209e14_dp, 0.0000000023e14_dp, \"m^-1\") atomic mass unit-inverse meter relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_JOULE_RELATIONSHIP = codata_constant_type(\"atomic mass unit-joule relationship\", 1.49241808768e-10_dp, 0.00000000046e-10_dp, \"J\") atomic mass unit-joule relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_KELVIN_RELATIONSHIP = codata_constant_type(\"atomic mass unit-kelvin relationship\", 1.08095402067e13_dp, 0.00000000034e13_dp, \"K\") atomic mass unit-kelvin relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_KILOGRAM_RELATIONSHIP = codata_constant_type(\"atomic mass unit-kilogram relationship\", 1.66053906892e-27_dp, 0.00000000052e-27_dp, \"kg\") atomic mass unit-kilogram relationship type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_1ST_HYPERPOLARIZABILITY = codata_constant_type(\"atomic unit of 1st hyperpolarizability\", 3.2063612996e-53_dp, 0.0000000015e-53_dp, \"C^3 m^3 J^-2\") atomic unit of 1st hyperpolarizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_2ND_HYPERPOLARIZABILITY = codata_constant_type(\"atomic unit of 2nd hyperpolarizability\", 6.2353799735e-65_dp, 0.0000000039e-65_dp, \"C^4 m^4 J^-3\") atomic unit of 2nd hyperpolarizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ACTION = codata_constant_type(\"atomic unit of action\", 1.054571817e-34_dp, 0.0_dp, \"J s\") atomic unit of action type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_CHARGE = codata_constant_type(\"atomic unit of charge\", 1.602176634e-19_dp, 0.0_dp, \"C\") atomic unit of charge type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_CHARGE_DENSITY = codata_constant_type(\"atomic unit of charge density\", 1.08120238677e12_dp, 0.00000000051e12_dp, \"C m^-3\") atomic unit of charge density type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_CURRENT = codata_constant_type(\"atomic unit of current\", 6.6236182375082e-3_dp, 0.0000000000072e-3_dp, \"A\") atomic unit of current type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_DIPOLE_MOM = codata_constant_type(\"atomic unit of electric dipole mom.\", 8.4783536198e-30_dp, 0.0000000013e-30_dp, \"C m\") atomic unit of electric dipole mom. type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_FIELD = codata_constant_type(\"atomic unit of electric field\", 5.14220675112e11_dp, 0.00000000080e11_dp, \"V m^-1\") atomic unit of electric field type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_FIELD_GRADIENT = codata_constant_type(\"atomic unit of electric field gradient\", 9.7173624424e21_dp, 0.0000000030e21_dp, \"V m^-2\") atomic unit of electric field gradient type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_POLARIZABILITY = codata_constant_type(\"atomic unit of electric polarizability\", 1.64877727212e-41_dp, 0.00000000051e-41_dp, \"C^2 m^2 J^-1\") atomic unit of electric polarizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_POTENTIAL = codata_constant_type(\"atomic unit of electric potential\", 27.211386245981_dp, 0.000000000030_dp, \"V\") atomic unit of electric potential type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_QUADRUPOLE_MOM = codata_constant_type(\"atomic unit of electric quadrupole mom.\", 4.4865515185e-40_dp, 0.0000000014e-40_dp, \"C m^2\") atomic unit of electric quadrupole mom. type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ENERGY = codata_constant_type(\"atomic unit of energy\", 4.3597447222060e-18_dp, 0.0000000000048e-18_dp, \"J\") atomic unit of energy type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_FORCE = codata_constant_type(\"atomic unit of force\", 8.2387235038e-8_dp, 0.0000000013e-8_dp, \"N\") atomic unit of force type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_LENGTH = codata_constant_type(\"atomic unit of length\", 5.29177210544e-11_dp, 0.00000000082e-11_dp, \"m\") atomic unit of length type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MAGNETIZABILITY = codata_constant_type(\"atomic unit of magnetizability\", 7.8910365794e-29_dp, 0.0000000049e-29_dp, \"J T^-2\") atomic unit of magnetizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MAG_DIPOLE_MOM = codata_constant_type(\"atomic unit of mag. dipole mom.\", 1.85480201315e-23_dp, 0.00000000058e-23_dp, \"J T^-1\") atomic unit of mag. dipole mom. type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MAG_FLUX_DENSITY = codata_constant_type(\"atomic unit of mag. flux density\", 2.35051757077e5_dp, 0.00000000073e5_dp, \"T\") atomic unit of mag. flux density type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MASS = codata_constant_type(\"atomic unit of mass\", 9.1093837139e-31_dp, 0.0000000028e-31_dp, \"kg\") atomic unit of mass type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MOMENTUM = codata_constant_type(\"atomic unit of momentum\", 1.99285191545e-24_dp, 0.00000000031e-24_dp, \"kg m s^-1\") atomic unit of momentum type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_PERMITTIVITY = codata_constant_type(\"atomic unit of permittivity\", 1.11265005620e-10_dp, 0.00000000017e-10_dp, \"F m^-1\") atomic unit of permittivity type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_TIME = codata_constant_type(\"atomic unit of time\", 2.4188843265864e-17_dp, 0.0000000000026e-17_dp, \"s\") atomic unit of time type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_VELOCITY = codata_constant_type(\"atomic unit of velocity\", 2.18769126216e6_dp, 0.00000000034e6_dp, \"m s^-1\") atomic unit of velocity type( codata_constant_type ), public, parameter :: AVOGADRO_CONSTANT = codata_constant_type(\"Avogadro constant\", 6.02214076e23_dp, 0.0_dp, \"mol^-1\") Avogadro constant type( codata_constant_type ), public, parameter :: BOHR_MAGNETON = codata_constant_type(\"Bohr magneton\", 9.2740100657e-24_dp, 0.0000000029e-24_dp, \"J T^-1\") Bohr magneton type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_EV_T = codata_constant_type(\"Bohr magneton in eV/T\", 5.7883817982e-5_dp, 0.0000000018e-5_dp, \"eV T^-1\") Bohr magneton in eV/T type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_HZ_T = codata_constant_type(\"Bohr magneton in Hz/T\", 1.39962449171e10_dp, 0.00000000044e10_dp, \"Hz T^-1\") Bohr magneton in Hz/T type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_INVERSE_METER_PER_TESLA = codata_constant_type(\"Bohr magneton in inverse meter per tesla\", 46.686447719_dp, 0.000000015_dp, \"m^-1 T^-1\") Bohr magneton in inverse meter per tesla type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_K_T = codata_constant_type(\"Bohr magneton in K/T\", 0.67171381472_dp, 0.00000000021_dp, \"K T^-1\") Bohr magneton in K/T type( codata_constant_type ), public, parameter :: BOHR_RADIUS = codata_constant_type(\"Bohr radius\", 5.29177210544e-11_dp, 0.00000000082e-11_dp, \"m\") Bohr radius type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT = codata_constant_type(\"Boltzmann constant\", 1.380649e-23_dp, 0.0_dp, \"J K^-1\") Boltzmann constant type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT_IN_EV_K = codata_constant_type(\"Boltzmann constant in eV/K\", 8.617333262e-5_dp, 0.0_dp, \"eV K^-1\") Boltzmann constant in eV/K type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT_IN_HZ_K = codata_constant_type(\"Boltzmann constant in Hz/K\", 2.083661912e10_dp, 0.0_dp, \"Hz K^-1\") Boltzmann constant in Hz/K type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT_IN_INVERSE_METER_PER_KELVIN = codata_constant_type(\"Boltzmann constant in inverse meter per kelvin\", 69.50348004_dp, 0.0_dp, \"m^-1 K^-1\") Boltzmann constant in inverse meter per kelvin type( codata_constant_type ), public, parameter :: CHARACTERISTIC_IMPEDANCE_OF_VACUUM = codata_constant_type(\"characteristic impedance of vacuum\", 376.730313412_dp, 0.000000059_dp, \"ohm\") characteristic impedance of vacuum type( codata_constant_type ), public, parameter :: CLASSICAL_ELECTRON_RADIUS = codata_constant_type(\"classical electron radius\", 2.8179403205e-15_dp, 0.0000000013e-15_dp, \"m\") classical electron radius type( codata_constant_type ), public, parameter :: COMPTON_WAVELENGTH = codata_constant_type(\"Compton wavelength\", 2.42631023538e-12_dp, 0.00000000076e-12_dp, \"m\") Compton wavelength type( codata_constant_type ), public, parameter :: CONDUCTANCE_QUANTUM = codata_constant_type(\"conductance quantum\", 7.748091729e-5_dp, 0.0_dp, \"S\") conductance quantum type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_AMPERE_90 = codata_constant_type(\"conventional value of ampere-90\", 1.00000008887_dp, 0.0_dp, \"A\") conventional value of ampere-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_COULOMB_90 = codata_constant_type(\"conventional value of coulomb-90\", 1.00000008887_dp, 0.0_dp, \"C\") conventional value of coulomb-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_FARAD_90 = codata_constant_type(\"conventional value of farad-90\", 0.99999998220_dp, 0.0_dp, \"F\") conventional value of farad-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_HENRY_90 = codata_constant_type(\"conventional value of henry-90\", 1.00000001779_dp, 0.0_dp, \"H\") conventional value of henry-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_JOSEPHSON_CONSTANT = codata_constant_type(\"conventional value of Josephson constant\", 483597.9e9_dp, 0.0_dp, \"Hz V^-1\") conventional value of Josephson constant type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_OHM_90 = codata_constant_type(\"conventional value of ohm-90\", 1.00000001779_dp, 0.0_dp, \"ohm\") conventional value of ohm-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_VOLT_90 = codata_constant_type(\"conventional value of volt-90\", 1.00000010666_dp, 0.0_dp, \"V\") conventional value of volt-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_VON_KLITZING_CONSTANT = codata_constant_type(\"conventional value of von Klitzing constant\", 25812.807_dp, 0.0_dp, \"ohm\") conventional value of von Klitzing constant type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_WATT_90 = codata_constant_type(\"conventional value of watt-90\", 1.00000019553_dp, 0.0_dp, \"W\") conventional value of watt-90 type( codata_constant_type ), public, parameter :: COPPER_X_UNIT = codata_constant_type(\"Copper x unit\", 1.00207697e-13_dp, 0.00000028e-13_dp, \"m\") Copper x unit type( codata_constant_type ), public, parameter :: DEUTERON_ELECTRON_MAG_MOM_RATIO = codata_constant_type(\"deuteron-electron mag. mom. ratio\", -4.664345550e-4_dp, 0.000000012e-4_dp, \"\") deuteron-electron mag. mom. ratio type( codata_constant_type ), public, parameter :: DEUTERON_ELECTRON_MASS_RATIO = codata_constant_type(\"deuteron-electron mass ratio\", 3670.482967655_dp, 0.000000063_dp, \"\") deuteron-electron mass ratio type( codata_constant_type ), public, parameter :: DEUTERON_G_FACTOR = codata_constant_type(\"deuteron g factor\", 0.8574382335_dp, 0.0000000022_dp, \"\") deuteron g factor type( codata_constant_type ), public, parameter :: DEUTERON_MAG_MOM = codata_constant_type(\"deuteron mag. mom.\", 4.330735087e-27_dp, 0.000000011e-27_dp, \"J T^-1\") deuteron mag. mom. type( codata_constant_type ), public, parameter :: DEUTERON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"deuteron mag. mom. to Bohr magneton ratio\", 4.669754568e-4_dp, 0.000000012e-4_dp, \"\") deuteron mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: DEUTERON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"deuteron mag. mom. to nuclear magneton ratio\", 0.8574382335_dp, 0.0000000022_dp, \"\") deuteron mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: DEUTERON_MASS = codata_constant_type(\"deuteron mass\", 3.3435837768e-27_dp, 0.0000000010e-27_dp, \"kg\") deuteron mass type( codata_constant_type ), public, parameter :: DEUTERON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"deuteron mass energy equivalent\", 3.00506323491e-10_dp, 0.00000000094e-10_dp, \"J\") deuteron mass energy equivalent type( codata_constant_type ), public, parameter :: DEUTERON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"deuteron mass energy equivalent in MeV\", 1875.61294500_dp, 0.00000058_dp, \"MeV\") deuteron mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: DEUTERON_MASS_IN_U = codata_constant_type(\"deuteron mass in u\", 2.013553212544_dp, 0.000000000015_dp, \"u\") deuteron mass in u type( codata_constant_type ), public, parameter :: DEUTERON_MOLAR_MASS = codata_constant_type(\"deuteron molar mass\", 2.01355321466e-3_dp, 0.00000000063e-3_dp, \"kg mol^-1\") deuteron molar mass type( codata_constant_type ), public, parameter :: DEUTERON_NEUTRON_MAG_MOM_RATIO = codata_constant_type(\"deuteron-neutron mag. mom. ratio\", -0.44820652_dp, 0.00000011_dp, \"\") deuteron-neutron mag. mom. ratio type( codata_constant_type ), public, parameter :: DEUTERON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"deuteron-proton mag. mom. ratio\", 0.30701220930_dp, 0.00000000079_dp, \"\") deuteron-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: DEUTERON_PROTON_MASS_RATIO = codata_constant_type(\"deuteron-proton mass ratio\", 1.9990075012699_dp, 0.0000000000084_dp, \"\") deuteron-proton mass ratio type( codata_constant_type ), public, parameter :: DEUTERON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"deuteron relative atomic mass\", 2.013553212544_dp, 0.000000000015_dp, \"\") deuteron relative atomic mass type( codata_constant_type ), public, parameter :: DEUTERON_RMS_CHARGE_RADIUS = codata_constant_type(\"deuteron rms charge radius\", 2.12778e-15_dp, 0.00027e-15_dp, \"m\") deuteron rms charge radius type( codata_constant_type ), public, parameter :: ELECTRON_CHARGE_TO_MASS_QUOTIENT = codata_constant_type(\"electron charge to mass quotient\", -1.75882000838e11_dp, 0.00000000055e11_dp, \"C kg^-1\") electron charge to mass quotient type( codata_constant_type ), public, parameter :: ELECTRON_DEUTERON_MAG_MOM_RATIO = codata_constant_type(\"electron-deuteron mag. mom. ratio\", -2143.9234921_dp, 0.0000056_dp, \"\") electron-deuteron mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_DEUTERON_MASS_RATIO = codata_constant_type(\"electron-deuteron mass ratio\", 2.724437107629e-4_dp, 0.000000000047e-4_dp, \"\") electron-deuteron mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_GYROMAG_RATIO = codata_constant_type(\"electron gyromag. ratio\", 1.76085962784e11_dp, 0.00000000055e11_dp, \"s^-1 T^-1\") electron gyromag. ratio type( codata_constant_type ), public, parameter :: ELECTRON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"electron gyromag. ratio in MHz/T\", 28024.9513861_dp, 0.0000087_dp, \"MHz T^-1\") electron gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: ELECTRON_G_FACTOR = codata_constant_type(\"electron g factor\", -2.00231930436092_dp, 0.00000000000036_dp, \"\") electron g factor type( codata_constant_type ), public, parameter :: ELECTRON_HELION_MASS_RATIO = codata_constant_type(\"electron-helion mass ratio\", 1.819543074649e-4_dp, 0.000000000053e-4_dp, \"\") electron-helion mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM = codata_constant_type(\"electron mag. mom.\", -9.2847646917e-24_dp, 0.0000000029e-24_dp, \"J T^-1\") electron mag. mom. type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM_ANOMALY = codata_constant_type(\"electron mag. mom. anomaly\", 1.15965218046e-3_dp, 0.00000000018e-3_dp, \"\") electron mag. mom. anomaly type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"electron mag. mom. to Bohr magneton ratio\", -1.00115965218046_dp, 0.00000000000018_dp, \"\") electron mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"electron mag. mom. to nuclear magneton ratio\", -1838.281971877_dp, 0.000000032_dp, \"\") electron mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: ELECTRON_MASS = codata_constant_type(\"electron mass\", 9.1093837139e-31_dp, 0.0000000028e-31_dp, \"kg\") electron mass type( codata_constant_type ), public, parameter :: ELECTRON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"electron mass energy equivalent\", 8.1871057880e-14_dp, 0.0000000026e-14_dp, \"J\") electron mass energy equivalent type( codata_constant_type ), public, parameter :: ELECTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"electron mass energy equivalent in MeV\", 0.51099895069_dp, 0.00000000016_dp, \"MeV\") electron mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: ELECTRON_MASS_IN_U = codata_constant_type(\"electron mass in u\", 5.485799090441e-4_dp, 0.000000000097e-4_dp, \"u\") electron mass in u type( codata_constant_type ), public, parameter :: ELECTRON_MOLAR_MASS = codata_constant_type(\"electron molar mass\", 5.4857990962e-7_dp, 0.0000000017e-7_dp, \"kg mol^-1\") electron molar mass type( codata_constant_type ), public, parameter :: ELECTRON_MUON_MAG_MOM_RATIO = codata_constant_type(\"electron-muon mag. mom. ratio\", 206.7669881_dp, 0.0000046_dp, \"\") electron-muon mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_MUON_MASS_RATIO = codata_constant_type(\"electron-muon mass ratio\", 4.83633170e-3_dp, 0.00000011e-3_dp, \"\") electron-muon mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_NEUTRON_MAG_MOM_RATIO = codata_constant_type(\"electron-neutron mag. mom. ratio\", 960.92048_dp, 0.00023_dp, \"\") electron-neutron mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_NEUTRON_MASS_RATIO = codata_constant_type(\"electron-neutron mass ratio\", 5.4386734416e-4_dp, 0.0000000022e-4_dp, \"\") electron-neutron mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"electron-proton mag. mom. ratio\", -658.21068789_dp, 0.00000019_dp, \"\") electron-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_PROTON_MASS_RATIO = codata_constant_type(\"electron-proton mass ratio\", 5.446170214889e-4_dp, 0.000000000094e-4_dp, \"\") electron-proton mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"electron relative atomic mass\", 5.485799090441e-4_dp, 0.000000000097e-4_dp, \"\") electron relative atomic mass type( codata_constant_type ), public, parameter :: ELECTRON_TAU_MASS_RATIO = codata_constant_type(\"electron-tau mass ratio\", 2.87585e-4_dp, 0.00019e-4_dp, \"\") electron-tau mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_TO_ALPHA_PARTICLE_MASS_RATIO = codata_constant_type(\"electron to alpha particle mass ratio\", 1.370933554733e-4_dp, 0.000000000032e-4_dp, \"\") electron to alpha particle mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_TO_SHIELDED_HELION_MAG_MOM_RATIO = codata_constant_type(\"electron to shielded helion mag. mom. ratio\", 864.05823986_dp, 0.00000070_dp, \"\") electron to shielded helion mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = codata_constant_type(\"electron to shielded proton mag. mom. ratio\", -658.2275856_dp, 0.0000027_dp, \"\") electron to shielded proton mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_TRITON_MASS_RATIO = codata_constant_type(\"electron-triton mass ratio\", 1.819200062327e-4_dp, 0.000000000068e-4_dp, \"\") electron-triton mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_VOLT = codata_constant_type(\"electron volt\", 1.602176634e-19_dp, 0.0_dp, \"J\") electron volt type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"electron volt-atomic mass unit relationship\", 1.07354410083e-9_dp, 0.00000000033e-9_dp, \"u\") electron volt-atomic mass unit relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_HARTREE_RELATIONSHIP = codata_constant_type(\"electron volt-hartree relationship\", 3.6749322175665e-2_dp, 0.0000000000040e-2_dp, \"E_h\") electron volt-hartree relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_HERTZ_RELATIONSHIP = codata_constant_type(\"electron volt-hertz relationship\", 2.417989242e14_dp, 0.0_dp, \"Hz\") electron volt-hertz relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"electron volt-inverse meter relationship\", 8.065543937e5_dp, 0.0_dp, \"m^-1\") electron volt-inverse meter relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_JOULE_RELATIONSHIP = codata_constant_type(\"electron volt-joule relationship\", 1.602176634e-19_dp, 0.0_dp, \"J\") electron volt-joule relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_KELVIN_RELATIONSHIP = codata_constant_type(\"electron volt-kelvin relationship\", 1.160451812e4_dp, 0.0_dp, \"K\") electron volt-kelvin relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_KILOGRAM_RELATIONSHIP = codata_constant_type(\"electron volt-kilogram relationship\", 1.782661921e-36_dp, 0.0_dp, \"kg\") electron volt-kilogram relationship type( codata_constant_type ), public, parameter :: ELEMENTARY_CHARGE = codata_constant_type(\"elementary charge\", 1.602176634e-19_dp, 0.0_dp, \"C\") elementary charge type( codata_constant_type ), public, parameter :: ELEMENTARY_CHARGE_OVER_H_BAR = codata_constant_type(\"elementary charge over h-bar\", 1.519267447e15_dp, 0.0_dp, \"A J^-1\") elementary charge over h-bar type( codata_constant_type ), public, parameter :: FARADAY_CONSTANT = codata_constant_type(\"Faraday constant\", 96485.33212_dp, 0.0_dp, \"C mol^-1\") Faraday constant type( codata_constant_type ), public, parameter :: FERMI_COUPLING_CONSTANT = codata_constant_type(\"Fermi coupling constant\", 1.1663787e-5_dp, 0.0000006e-5_dp, \"GeV^-2\") Fermi coupling constant type( codata_constant_type ), public, parameter :: FINE_STRUCTURE_CONSTANT = codata_constant_type(\"fine-structure constant\", 7.2973525643e-3_dp, 0.0000000011e-3_dp, \"\") fine-structure constant type( codata_constant_type ), public, parameter :: FIRST_RADIATION_CONSTANT = codata_constant_type(\"first radiation constant\", 3.741771852e-16_dp, 0.0_dp, \"W m^2\") first radiation constant type( codata_constant_type ), public, parameter :: FIRST_RADIATION_CONSTANT_FOR_SPECTRAL_RADIANCE = codata_constant_type(\"first radiation constant for spectral radiance\", 1.191042972e-16_dp, 0.0_dp, \"W m^2 sr^-1\") first radiation constant for spectral radiance type( codata_constant_type ), public, parameter :: HARTREE_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"hartree-atomic mass unit relationship\", 2.92126231797e-8_dp, 0.00000000091e-8_dp, \"u\") hartree-atomic mass unit relationship type( codata_constant_type ), public, parameter :: HARTREE_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"hartree-electron volt relationship\", 27.211386245981_dp, 0.000000000030_dp, \"eV\") hartree-electron volt relationship type( codata_constant_type ), public, parameter :: HARTREE_ENERGY = codata_constant_type(\"Hartree energy\", 4.3597447222060e-18_dp, 0.0000000000048e-18_dp, \"J\") Hartree energy type( codata_constant_type ), public, parameter :: HARTREE_ENERGY_IN_EV = codata_constant_type(\"Hartree energy in eV\", 27.211386245981_dp, 0.000000000030_dp, \"eV\") Hartree energy in eV type( codata_constant_type ), public, parameter :: HARTREE_HERTZ_RELATIONSHIP = codata_constant_type(\"hartree-hertz relationship\", 6.5796839204999e15_dp, 0.0000000000072e15_dp, \"Hz\") hartree-hertz relationship type( codata_constant_type ), public, parameter :: HARTREE_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"hartree-inverse meter relationship\", 2.1947463136314e7_dp, 0.0000000000024e7_dp, \"m^-1\") hartree-inverse meter relationship type( codata_constant_type ), public, parameter :: HARTREE_JOULE_RELATIONSHIP = codata_constant_type(\"hartree-joule relationship\", 4.3597447222060e-18_dp, 0.0000000000048e-18_dp, \"J\") hartree-joule relationship type( codata_constant_type ), public, parameter :: HARTREE_KELVIN_RELATIONSHIP = codata_constant_type(\"hartree-kelvin relationship\", 3.1577502480398e5_dp, 0.0000000000034e5_dp, \"K\") hartree-kelvin relationship type( codata_constant_type ), public, parameter :: HARTREE_KILOGRAM_RELATIONSHIP = codata_constant_type(\"hartree-kilogram relationship\", 4.8508702095419e-35_dp, 0.0000000000053e-35_dp, \"kg\") hartree-kilogram relationship type( codata_constant_type ), public, parameter :: HELION_ELECTRON_MASS_RATIO = codata_constant_type(\"helion-electron mass ratio\", 5495.88527984_dp, 0.00000016_dp, \"\") helion-electron mass ratio type( codata_constant_type ), public, parameter :: HELION_G_FACTOR = codata_constant_type(\"helion g factor\", -4.2552506995_dp, 0.0000000034_dp, \"\") helion g factor type( codata_constant_type ), public, parameter :: HELION_MAG_MOM = codata_constant_type(\"helion mag. mom.\", -1.07461755198e-26_dp, 0.00000000093e-26_dp, \"J T^-1\") helion mag. mom. type( codata_constant_type ), public, parameter :: HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"helion mag. mom. to Bohr magneton ratio\", -1.15874098083e-3_dp, 0.00000000094e-3_dp, \"\") helion mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"helion mag. mom. to nuclear magneton ratio\", -2.1276253498_dp, 0.0000000017_dp, \"\") helion mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: HELION_MASS = codata_constant_type(\"helion mass\", 5.0064127862e-27_dp, 0.0000000016e-27_dp, \"kg\") helion mass type( codata_constant_type ), public, parameter :: HELION_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"helion mass energy equivalent\", 4.4995394185e-10_dp, 0.0000000014e-10_dp, \"J\") helion mass energy equivalent type( codata_constant_type ), public, parameter :: HELION_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"helion mass energy equivalent in MeV\", 2808.39161112_dp, 0.00000088_dp, \"MeV\") helion mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: HELION_MASS_IN_U = codata_constant_type(\"helion mass in u\", 3.014932246932_dp, 0.000000000074_dp, \"u\") helion mass in u type( codata_constant_type ), public, parameter :: HELION_MOLAR_MASS = codata_constant_type(\"helion molar mass\", 3.01493225010e-3_dp, 0.00000000094e-3_dp, \"kg mol^-1\") helion molar mass type( codata_constant_type ), public, parameter :: HELION_PROTON_MASS_RATIO = codata_constant_type(\"helion-proton mass ratio\", 2.993152671552_dp, 0.000000000070_dp, \"\") helion-proton mass ratio type( codata_constant_type ), public, parameter :: HELION_RELATIVE_ATOMIC_MASS = codata_constant_type(\"helion relative atomic mass\", 3.014932246932_dp, 0.000000000074_dp, \"\") helion relative atomic mass type( codata_constant_type ), public, parameter :: HELION_SHIELDING_SHIFT = codata_constant_type(\"helion shielding shift\", 5.9967029e-5_dp, 0.0000023e-5_dp, \"\") helion shielding shift type( codata_constant_type ), public, parameter :: HERTZ_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"hertz-atomic mass unit relationship\", 4.4398216590e-24_dp, 0.0000000014e-24_dp, \"u\") hertz-atomic mass unit relationship type( codata_constant_type ), public, parameter :: HERTZ_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"hertz-electron volt relationship\", 4.135667696e-15_dp, 0.0_dp, \"eV\") hertz-electron volt relationship type( codata_constant_type ), public, parameter :: HERTZ_HARTREE_RELATIONSHIP = codata_constant_type(\"hertz-hartree relationship\", 1.5198298460574e-16_dp, 0.0000000000017e-16_dp, \"E_h\") hertz-hartree relationship type( codata_constant_type ), public, parameter :: HERTZ_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"hertz-inverse meter relationship\", 3.335640951e-9_dp, 0.0_dp, \"m^-1\") hertz-inverse meter relationship type( codata_constant_type ), public, parameter :: HERTZ_JOULE_RELATIONSHIP = codata_constant_type(\"hertz-joule relationship\", 6.62607015e-34_dp, 0.0_dp, \"J\") hertz-joule relationship type( codata_constant_type ), public, parameter :: HERTZ_KELVIN_RELATIONSHIP = codata_constant_type(\"hertz-kelvin relationship\", 4.799243073e-11_dp, 0.0_dp, \"K\") hertz-kelvin relationship type( codata_constant_type ), public, parameter :: HERTZ_KILOGRAM_RELATIONSHIP = codata_constant_type(\"hertz-kilogram relationship\", 7.372497323e-51_dp, 0.0_dp, \"kg\") hertz-kilogram relationship type( codata_constant_type ), public, parameter :: HYPERFINE_TRANSITION_FREQUENCY_OF_CS_133 = codata_constant_type(\"hyperfine transition frequency of Cs-133\", 9192631770_dp, 0.0_dp, \"Hz\") hyperfine transition frequency of Cs-133 type( codata_constant_type ), public, parameter :: INVERSE_FINE_STRUCTURE_CONSTANT = codata_constant_type(\"inverse fine-structure constant\", 137.035999177_dp, 0.000000021_dp, \"\") inverse fine-structure constant type( codata_constant_type ), public, parameter :: INVERSE_METER_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"inverse meter-atomic mass unit relationship\", 1.33102504824e-15_dp, 0.00000000041e-15_dp, \"u\") inverse meter-atomic mass unit relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"inverse meter-electron volt relationship\", 1.239841984e-6_dp, 0.0_dp, \"eV\") inverse meter-electron volt relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_HARTREE_RELATIONSHIP = codata_constant_type(\"inverse meter-hartree relationship\", 4.5563352529132e-8_dp, 0.0000000000050e-8_dp, \"E_h\") inverse meter-hartree relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_HERTZ_RELATIONSHIP = codata_constant_type(\"inverse meter-hertz relationship\", 299792458_dp, 0.0_dp, \"Hz\") inverse meter-hertz relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_JOULE_RELATIONSHIP = codata_constant_type(\"inverse meter-joule relationship\", 1.986445857e-25_dp, 0.0_dp, \"J\") inverse meter-joule relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_KELVIN_RELATIONSHIP = codata_constant_type(\"inverse meter-kelvin relationship\", 1.438776877e-2_dp, 0.0_dp, \"K\") inverse meter-kelvin relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_KILOGRAM_RELATIONSHIP = codata_constant_type(\"inverse meter-kilogram relationship\", 2.210219094e-42_dp, 0.0_dp, \"kg\") inverse meter-kilogram relationship type( codata_constant_type ), public, parameter :: INVERSE_OF_CONDUCTANCE_QUANTUM = codata_constant_type(\"inverse of conductance quantum\", 12906.40372_dp, 0.0_dp, \"ohm\") inverse of conductance quantum type( codata_constant_type ), public, parameter :: JOSEPHSON_CONSTANT = codata_constant_type(\"Josephson constant\", 483597.8484e9_dp, 0.0_dp, \"Hz V^-1\") Josephson constant type( codata_constant_type ), public, parameter :: JOULE_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"joule-atomic mass unit relationship\", 6.7005352471e9_dp, 0.0000000021e9_dp, \"u\") joule-atomic mass unit relationship type( codata_constant_type ), public, parameter :: JOULE_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"joule-electron volt relationship\", 6.241509074e18_dp, 0.0_dp, \"eV\") joule-electron volt relationship type( codata_constant_type ), public, parameter :: JOULE_HARTREE_RELATIONSHIP = codata_constant_type(\"joule-hartree relationship\", 2.2937122783969e17_dp, 0.0000000000025e17_dp, \"E_h\") joule-hartree relationship type( codata_constant_type ), public, parameter :: JOULE_HERTZ_RELATIONSHIP = codata_constant_type(\"joule-hertz relationship\", 1.509190179e33_dp, 0.0_dp, \"Hz\") joule-hertz relationship type( codata_constant_type ), public, parameter :: JOULE_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"joule-inverse meter relationship\", 5.034116567e24_dp, 0.0_dp, \"m^-1\") joule-inverse meter relationship type( codata_constant_type ), public, parameter :: JOULE_KELVIN_RELATIONSHIP = codata_constant_type(\"joule-kelvin relationship\", 7.242970516e22_dp, 0.0_dp, \"K\") joule-kelvin relationship type( codata_constant_type ), public, parameter :: JOULE_KILOGRAM_RELATIONSHIP = codata_constant_type(\"joule-kilogram relationship\", 1.112650056e-17_dp, 0.0_dp, \"kg\") joule-kilogram relationship type( codata_constant_type ), public, parameter :: KELVIN_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"kelvin-atomic mass unit relationship\", 9.2510872884e-14_dp, 0.0000000029e-14_dp, \"u\") kelvin-atomic mass unit relationship type( codata_constant_type ), public, parameter :: KELVIN_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"kelvin-electron volt relationship\", 8.617333262e-5_dp, 0.0_dp, \"eV\") kelvin-electron volt relationship type( codata_constant_type ), public, parameter :: KELVIN_HARTREE_RELATIONSHIP = codata_constant_type(\"kelvin-hartree relationship\", 3.1668115634564e-6_dp, 0.0000000000035e-6_dp, \"E_h\") kelvin-hartree relationship type( codata_constant_type ), public, parameter :: KELVIN_HERTZ_RELATIONSHIP = codata_constant_type(\"kelvin-hertz relationship\", 2.083661912e10_dp, 0.0_dp, \"Hz\") kelvin-hertz relationship type( codata_constant_type ), public, parameter :: KELVIN_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"kelvin-inverse meter relationship\", 69.50348004_dp, 0.0_dp, \"m^-1\") kelvin-inverse meter relationship type( codata_constant_type ), public, parameter :: KELVIN_JOULE_RELATIONSHIP = codata_constant_type(\"kelvin-joule relationship\", 1.380649e-23_dp, 0.0_dp, \"J\") kelvin-joule relationship type( codata_constant_type ), public, parameter :: KELVIN_KILOGRAM_RELATIONSHIP = codata_constant_type(\"kelvin-kilogram relationship\", 1.536179187e-40_dp, 0.0_dp, \"kg\") kelvin-kilogram relationship type( codata_constant_type ), public, parameter :: KILOGRAM_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"kilogram-atomic mass unit relationship\", 6.0221407537e26_dp, 0.0000000019e26_dp, \"u\") kilogram-atomic mass unit relationship type( codata_constant_type ), public, parameter :: KILOGRAM_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"kilogram-electron volt relationship\", 5.609588603e35_dp, 0.0_dp, \"eV\") kilogram-electron volt relationship type( codata_constant_type ), public, parameter :: KILOGRAM_HARTREE_RELATIONSHIP = codata_constant_type(\"kilogram-hartree relationship\", 2.0614857887415e34_dp, 0.0000000000022e34_dp, \"E_h\") kilogram-hartree relationship type( codata_constant_type ), public, parameter :: KILOGRAM_HERTZ_RELATIONSHIP = codata_constant_type(\"kilogram-hertz relationship\", 1.356392489e50_dp, 0.0_dp, \"Hz\") kilogram-hertz relationship type( codata_constant_type ), public, parameter :: KILOGRAM_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"kilogram-inverse meter relationship\", 4.524438335e41_dp, 0.0_dp, \"m^-1\") kilogram-inverse meter relationship type( codata_constant_type ), public, parameter :: KILOGRAM_JOULE_RELATIONSHIP = codata_constant_type(\"kilogram-joule relationship\", 8.987551787e16_dp, 0.0_dp, \"J\") kilogram-joule relationship type( codata_constant_type ), public, parameter :: KILOGRAM_KELVIN_RELATIONSHIP = codata_constant_type(\"kilogram-kelvin relationship\", 6.509657260e39_dp, 0.0_dp, \"K\") kilogram-kelvin relationship type( codata_constant_type ), public, parameter :: LATTICE_PARAMETER_OF_SILICON = codata_constant_type(\"lattice parameter of silicon\", 5.431020511e-10_dp, 0.000000089e-10_dp, \"m\") lattice parameter of silicon type( codata_constant_type ), public, parameter :: LATTICE_SPACING_OF_IDEAL_SI_220 = codata_constant_type(\"lattice spacing of ideal Si (220)\", 1.920155716e-10_dp, 0.000000032e-10_dp, \"m\") lattice spacing of ideal Si (220) type( codata_constant_type ), public, parameter :: LOSCHMIDT_CONSTANT_273_15_K_100_KPA = codata_constant_type(\"Loschmidt constant (273.15 K, 100 kPa)\", 2.651645804e25_dp, 0.0_dp, \"m^-3\") Loschmidt constant (273.15 K, 100 kPa) type( codata_constant_type ), public, parameter :: LOSCHMIDT_CONSTANT_273_15_K_101_325_KPA = codata_constant_type(\"Loschmidt constant (273.15 K, 101.325 kPa)\", 2.686780111e25_dp, 0.0_dp, \"m^-3\") Loschmidt constant (273.15 K, 101.325 kPa) type( codata_constant_type ), public, parameter :: LUMINOUS_EFFICACY = codata_constant_type(\"luminous efficacy\", 683_dp, 0.0_dp, \"lm W^-1\") luminous efficacy type( codata_constant_type ), public, parameter :: MAG_FLUX_QUANTUM = codata_constant_type(\"mag. flux quantum\", 2.067833848e-15_dp, 0.0_dp, \"Wb\") mag. flux quantum type( codata_constant_type ), public, parameter :: MOLAR_GAS_CONSTANT = codata_constant_type(\"molar gas constant\", 8.314462618_dp, 0.0_dp, \"J mol^-1 K^-1\") molar gas constant type( codata_constant_type ), public, parameter :: MOLAR_MASS_CONSTANT = codata_constant_type(\"molar mass constant\", 1.00000000105e-3_dp, 0.00000000031e-3_dp, \"kg mol^-1\") molar mass constant type( codata_constant_type ), public, parameter :: MOLAR_MASS_OF_CARBON_12 = codata_constant_type(\"molar mass of carbon-12\", 12.0000000126e-3_dp, 0.0000000037e-3_dp, \"kg mol^-1\") molar mass of carbon-12 type( codata_constant_type ), public, parameter :: MOLAR_PLANCK_CONSTANT = codata_constant_type(\"molar Planck constant\", 3.990312712e-10_dp, 0.0_dp, \"J Hz^-1 mol^-1\") molar Planck constant type( codata_constant_type ), public, parameter :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_100_KPA = codata_constant_type(\"molar volume of ideal gas (273.15 K, 100 kPa)\", 22.71095464e-3_dp, 0.0_dp, \"m^3 mol^-1\") molar volume of ideal gas (273.15 K, 100 kPa) type( codata_constant_type ), public, parameter :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA = codata_constant_type(\"molar volume of ideal gas (273.15 K, 101.325 kPa)\", 22.41396954e-3_dp, 0.0_dp, \"m^3 mol^-1\") molar volume of ideal gas (273.15 K, 101.325 kPa) type( codata_constant_type ), public, parameter :: MOLAR_VOLUME_OF_SILICON = codata_constant_type(\"molar volume of silicon\", 1.205883199e-5_dp, 0.000000060e-5_dp, \"m^3 mol^-1\") molar volume of silicon type( codata_constant_type ), public, parameter :: MOLYBDENUM_X_UNIT = codata_constant_type(\"Molybdenum x unit\", 1.00209952e-13_dp, 0.00000053e-13_dp, \"m\") Molybdenum x unit type( codata_constant_type ), public, parameter :: MUON_COMPTON_WAVELENGTH = codata_constant_type(\"muon Compton wavelength\", 1.173444110e-14_dp, 0.000000026e-14_dp, \"m\") muon Compton wavelength type( codata_constant_type ), public, parameter :: MUON_ELECTRON_MASS_RATIO = codata_constant_type(\"muon-electron mass ratio\", 206.7682827_dp, 0.0000046_dp, \"\") muon-electron mass ratio type( codata_constant_type ), public, parameter :: MUON_G_FACTOR = codata_constant_type(\"muon g factor\", -2.00233184123_dp, 0.00000000082_dp, \"\") muon g factor type( codata_constant_type ), public, parameter :: MUON_MAG_MOM = codata_constant_type(\"muon mag. mom.\", -4.49044830e-26_dp, 0.00000010e-26_dp, \"J T^-1\") muon mag. mom. type( codata_constant_type ), public, parameter :: MUON_MAG_MOM_ANOMALY = codata_constant_type(\"muon mag. mom. anomaly\", 1.16592062e-3_dp, 0.00000041e-3_dp, \"\") muon mag. mom. anomaly type( codata_constant_type ), public, parameter :: MUON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"muon mag. mom. to Bohr magneton ratio\", -4.84197048e-3_dp, 0.00000011e-3_dp, \"\") muon mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: MUON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"muon mag. mom. to nuclear magneton ratio\", -8.89059704_dp, 0.00000020_dp, \"\") muon mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: MUON_MASS = codata_constant_type(\"muon mass\", 1.883531627e-28_dp, 0.000000042e-28_dp, \"kg\") muon mass type( codata_constant_type ), public, parameter :: MUON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"muon mass energy equivalent\", 1.692833804e-11_dp, 0.000000038e-11_dp, \"J\") muon mass energy equivalent type( codata_constant_type ), public, parameter :: MUON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"muon mass energy equivalent in MeV\", 105.6583755_dp, 0.0000023_dp, \"MeV\") muon mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: MUON_MASS_IN_U = codata_constant_type(\"muon mass in u\", 0.1134289257_dp, 0.0000000025_dp, \"u\") muon mass in u type( codata_constant_type ), public, parameter :: MUON_MOLAR_MASS = codata_constant_type(\"muon molar mass\", 1.134289258e-4_dp, 0.000000025e-4_dp, \"kg mol^-1\") muon molar mass type( codata_constant_type ), public, parameter :: MUON_NEUTRON_MASS_RATIO = codata_constant_type(\"muon-neutron mass ratio\", 0.1124545168_dp, 0.0000000025_dp, \"\") muon-neutron mass ratio type( codata_constant_type ), public, parameter :: MUON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"muon-proton mag. mom. ratio\", -3.183345146_dp, 0.000000071_dp, \"\") muon-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: MUON_PROTON_MASS_RATIO = codata_constant_type(\"muon-proton mass ratio\", 0.1126095262_dp, 0.0000000025_dp, \"\") muon-proton mass ratio type( codata_constant_type ), public, parameter :: MUON_TAU_MASS_RATIO = codata_constant_type(\"muon-tau mass ratio\", 5.94635e-2_dp, 0.00040e-2_dp, \"\") muon-tau mass ratio type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ACTION = codata_constant_type(\"natural unit of action\", 1.054571817e-34_dp, 0.0_dp, \"J s\") natural unit of action type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ACTION_IN_EV_S = codata_constant_type(\"natural unit of action in eV s\", 6.582119569e-16_dp, 0.0_dp, \"eV s\") natural unit of action in eV s type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ENERGY = codata_constant_type(\"natural unit of energy\", 8.1871057880e-14_dp, 0.0000000026e-14_dp, \"J\") natural unit of energy type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ENERGY_IN_MEV = codata_constant_type(\"natural unit of energy in MeV\", 0.51099895069_dp, 0.00000000016_dp, \"MeV\") natural unit of energy in MeV type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_LENGTH = codata_constant_type(\"natural unit of length\", 3.8615926744e-13_dp, 0.0000000012e-13_dp, \"m\") natural unit of length type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_MASS = codata_constant_type(\"natural unit of mass\", 9.1093837139e-31_dp, 0.0000000028e-31_dp, \"kg\") natural unit of mass type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_MOMENTUM = codata_constant_type(\"natural unit of momentum\", 2.73092453446e-22_dp, 0.00000000085e-22_dp, \"kg m s^-1\") natural unit of momentum type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_MOMENTUM_IN_MEV_C = codata_constant_type(\"natural unit of momentum in MeV/c\", 0.51099895069_dp, 0.00000000016_dp, \"MeV/c\") natural unit of momentum in MeV/c type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_TIME = codata_constant_type(\"natural unit of time\", 1.28808866644e-21_dp, 0.00000000040e-21_dp, \"s\") natural unit of time type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_VELOCITY = codata_constant_type(\"natural unit of velocity\", 299792458_dp, 0.0_dp, \"m s^-1\") natural unit of velocity type( codata_constant_type ), public, parameter :: NEUTRON_COMPTON_WAVELENGTH = codata_constant_type(\"neutron Compton wavelength\", 1.31959090382e-15_dp, 0.00000000067e-15_dp, \"m\") neutron Compton wavelength type( codata_constant_type ), public, parameter :: NEUTRON_ELECTRON_MAG_MOM_RATIO = codata_constant_type(\"neutron-electron mag. mom. ratio\", 1.04066884e-3_dp, 0.00000024e-3_dp, \"\") neutron-electron mag. mom. ratio type( codata_constant_type ), public, parameter :: NEUTRON_ELECTRON_MASS_RATIO = codata_constant_type(\"neutron-electron mass ratio\", 1838.68366200_dp, 0.00000074_dp, \"\") neutron-electron mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_GYROMAG_RATIO = codata_constant_type(\"neutron gyromag. ratio\", 1.83247174e8_dp, 0.00000043e8_dp, \"s^-1 T^-1\") neutron gyromag. ratio type( codata_constant_type ), public, parameter :: NEUTRON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"neutron gyromag. ratio in MHz/T\", 29.1646935_dp, 0.0000069_dp, \"MHz T^-1\") neutron gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: NEUTRON_G_FACTOR = codata_constant_type(\"neutron g factor\", -3.82608552_dp, 0.00000090_dp, \"\") neutron g factor type( codata_constant_type ), public, parameter :: NEUTRON_MAG_MOM = codata_constant_type(\"neutron mag. mom.\", -9.6623653e-27_dp, 0.0000023e-27_dp, \"J T^-1\") neutron mag. mom. type( codata_constant_type ), public, parameter :: NEUTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"neutron mag. mom. to Bohr magneton ratio\", -1.04187565e-3_dp, 0.00000025e-3_dp, \"\") neutron mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: NEUTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"neutron mag. mom. to nuclear magneton ratio\", -1.91304276_dp, 0.00000045_dp, \"\") neutron mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: NEUTRON_MASS = codata_constant_type(\"neutron mass\", 1.67492750056e-27_dp, 0.00000000085e-27_dp, \"kg\") neutron mass type( codata_constant_type ), public, parameter :: NEUTRON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"neutron mass energy equivalent\", 1.50534976514e-10_dp, 0.00000000076e-10_dp, \"J\") neutron mass energy equivalent type( codata_constant_type ), public, parameter :: NEUTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"neutron mass energy equivalent in MeV\", 939.56542194_dp, 0.00000048_dp, \"MeV\") neutron mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: NEUTRON_MASS_IN_U = codata_constant_type(\"neutron mass in u\", 1.00866491606_dp, 0.00000000040_dp, \"u\") neutron mass in u type( codata_constant_type ), public, parameter :: NEUTRON_MOLAR_MASS = codata_constant_type(\"neutron molar mass\", 1.00866491712e-3_dp, 0.00000000051e-3_dp, \"kg mol^-1\") neutron molar mass type( codata_constant_type ), public, parameter :: NEUTRON_MUON_MASS_RATIO = codata_constant_type(\"neutron-muon mass ratio\", 8.89248408_dp, 0.00000020_dp, \"\") neutron-muon mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"neutron-proton mag. mom. ratio\", -0.68497935_dp, 0.00000016_dp, \"\") neutron-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE = codata_constant_type(\"neutron-proton mass difference\", 2.30557461e-30_dp, 0.00000067e-30_dp, \"kg\") neutron-proton mass difference type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT = codata_constant_type(\"neutron-proton mass difference energy equivalent\", 2.07214712e-13_dp, 0.00000060e-13_dp, \"J\") neutron-proton mass difference energy equivalent type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"neutron-proton mass difference energy equivalent in MeV\", 1.29333251_dp, 0.00000038_dp, \"MeV\") neutron-proton mass difference energy equivalent in MeV type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE_IN_U = codata_constant_type(\"neutron-proton mass difference in u\", 1.38844948e-3_dp, 0.00000040e-3_dp, \"u\") neutron-proton mass difference in u type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_RATIO = codata_constant_type(\"neutron-proton mass ratio\", 1.00137841946_dp, 0.00000000040_dp, \"\") neutron-proton mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"neutron relative atomic mass\", 1.00866491606_dp, 0.00000000040_dp, \"\") neutron relative atomic mass type( codata_constant_type ), public, parameter :: NEUTRON_TAU_MASS_RATIO = codata_constant_type(\"neutron-tau mass ratio\", 0.528779_dp, 0.000036_dp, \"\") neutron-tau mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = codata_constant_type(\"neutron to shielded proton mag. mom. ratio\", -0.68499694_dp, 0.00000016_dp, \"\") neutron to shielded proton mag. mom. ratio type( codata_constant_type ), public, parameter :: NEWTONIAN_CONSTANT_OF_GRAVITATION = codata_constant_type(\"Newtonian constant of gravitation\", 6.67430e-11_dp, 0.00015e-11_dp, \"m^3 kg^-1 s^-2\") Newtonian constant of gravitation type( codata_constant_type ), public, parameter :: NEWTONIAN_CONSTANT_OF_GRAVITATION_OVER_H_BAR_C = codata_constant_type(\"Newtonian constant of gravitation over h-bar c\", 6.70883e-39_dp, 0.00015e-39_dp, \"(GeV/c^2)^-2\") Newtonian constant of gravitation over h-bar c type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON = codata_constant_type(\"nuclear magneton\", 5.0507837393e-27_dp, 0.0000000016e-27_dp, \"J T^-1\") nuclear magneton type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_EV_T = codata_constant_type(\"nuclear magneton in eV/T\", 3.15245125417e-8_dp, 0.00000000098e-8_dp, \"eV T^-1\") nuclear magneton in eV/T type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_INVERSE_METER_PER_TESLA = codata_constant_type(\"nuclear magneton in inverse meter per tesla\", 2.54262341009e-2_dp, 0.00000000079e-2_dp, \"m^-1 T^-1\") nuclear magneton in inverse meter per tesla type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_K_T = codata_constant_type(\"nuclear magneton in K/T\", 3.6582677706e-4_dp, 0.0000000011e-4_dp, \"K T^-1\") nuclear magneton in K/T type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_MHZ_T = codata_constant_type(\"nuclear magneton in MHz/T\", 7.6225932188_dp, 0.0000000024_dp, \"MHz T^-1\") nuclear magneton in MHz/T type( codata_constant_type ), public, parameter :: PLANCK_CONSTANT = codata_constant_type(\"Planck constant\", 6.62607015e-34_dp, 0.0_dp, \"J Hz^-1\") Planck constant type( codata_constant_type ), public, parameter :: PLANCK_CONSTANT_IN_EV_HZ = codata_constant_type(\"Planck constant in eV/Hz\", 4.135667696e-15_dp, 0.0_dp, \"eV Hz^-1\") Planck constant in eV/Hz type( codata_constant_type ), public, parameter :: PLANCK_LENGTH = codata_constant_type(\"Planck length\", 1.616255e-35_dp, 0.000018e-35_dp, \"m\") Planck length type( codata_constant_type ), public, parameter :: PLANCK_MASS = codata_constant_type(\"Planck mass\", 2.176434e-8_dp, 0.000024e-8_dp, \"kg\") Planck mass type( codata_constant_type ), public, parameter :: PLANCK_MASS_ENERGY_EQUIVALENT_IN_GEV = codata_constant_type(\"Planck mass energy equivalent in GeV\", 1.220890e19_dp, 0.000014e19_dp, \"GeV\") Planck mass energy equivalent in GeV type( codata_constant_type ), public, parameter :: PLANCK_TEMPERATURE = codata_constant_type(\"Planck temperature\", 1.416784e32_dp, 0.000016e32_dp, \"K\") Planck temperature type( codata_constant_type ), public, parameter :: PLANCK_TIME = codata_constant_type(\"Planck time\", 5.391247e-44_dp, 0.000060e-44_dp, \"s\") Planck time type( codata_constant_type ), public, parameter :: PROTON_CHARGE_TO_MASS_QUOTIENT = codata_constant_type(\"proton charge to mass quotient\", 9.5788331430e7_dp, 0.0000000030e7_dp, \"C kg^-1\") proton charge to mass quotient type( codata_constant_type ), public, parameter :: PROTON_COMPTON_WAVELENGTH = codata_constant_type(\"proton Compton wavelength\", 1.32140985360e-15_dp, 0.00000000041e-15_dp, \"m\") proton Compton wavelength type( codata_constant_type ), public, parameter :: PROTON_ELECTRON_MASS_RATIO = codata_constant_type(\"proton-electron mass ratio\", 1836.152673426_dp, 0.000000032_dp, \"\") proton-electron mass ratio type( codata_constant_type ), public, parameter :: PROTON_GYROMAG_RATIO = codata_constant_type(\"proton gyromag. ratio\", 2.6752218708e8_dp, 0.0000000011e8_dp, \"s^-1 T^-1\") proton gyromag. ratio type( codata_constant_type ), public, parameter :: PROTON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"proton gyromag. ratio in MHz/T\", 42.577478461_dp, 0.000000018_dp, \"MHz T^-1\") proton gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: PROTON_G_FACTOR = codata_constant_type(\"proton g factor\", 5.5856946893_dp, 0.0000000016_dp, \"\") proton g factor type( codata_constant_type ), public, parameter :: PROTON_MAG_MOM = codata_constant_type(\"proton mag. mom.\", 1.41060679545e-26_dp, 0.00000000060e-26_dp, \"J T^-1\") proton mag. mom. type( codata_constant_type ), public, parameter :: PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"proton mag. mom. to Bohr magneton ratio\", 1.52103220230e-3_dp, 0.00000000045e-3_dp, \"\") proton mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"proton mag. mom. to nuclear magneton ratio\", 2.79284734463_dp, 0.00000000082_dp, \"\") proton mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: PROTON_MAG_SHIELDING_CORRECTION = codata_constant_type(\"proton mag. shielding correction\", 2.56715e-5_dp, 0.00041e-5_dp, \"\") proton mag. shielding correction type( codata_constant_type ), public, parameter :: PROTON_MASS = codata_constant_type(\"proton mass\", 1.67262192595e-27_dp, 0.00000000052e-27_dp, \"kg\") proton mass type( codata_constant_type ), public, parameter :: PROTON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"proton mass energy equivalent\", 1.50327761802e-10_dp, 0.00000000047e-10_dp, \"J\") proton mass energy equivalent type( codata_constant_type ), public, parameter :: PROTON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"proton mass energy equivalent in MeV\", 938.27208943_dp, 0.00000029_dp, \"MeV\") proton mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: PROTON_MASS_IN_U = codata_constant_type(\"proton mass in u\", 1.0072764665789_dp, 0.0000000000083_dp, \"u\") proton mass in u type( codata_constant_type ), public, parameter :: PROTON_MOLAR_MASS = codata_constant_type(\"proton molar mass\", 1.00727646764e-3_dp, 0.00000000031e-3_dp, \"kg mol^-1\") proton molar mass type( codata_constant_type ), public, parameter :: PROTON_MUON_MASS_RATIO = codata_constant_type(\"proton-muon mass ratio\", 8.88024338_dp, 0.00000020_dp, \"\") proton-muon mass ratio type( codata_constant_type ), public, parameter :: PROTON_NEUTRON_MAG_MOM_RATIO = codata_constant_type(\"proton-neutron mag. mom. ratio\", -1.45989802_dp, 0.00000034_dp, \"\") proton-neutron mag. mom. ratio type( codata_constant_type ), public, parameter :: PROTON_NEUTRON_MASS_RATIO = codata_constant_type(\"proton-neutron mass ratio\", 0.99862347797_dp, 0.00000000040_dp, \"\") proton-neutron mass ratio type( codata_constant_type ), public, parameter :: PROTON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"proton relative atomic mass\", 1.0072764665789_dp, 0.0000000000083_dp, \"\") proton relative atomic mass type( codata_constant_type ), public, parameter :: PROTON_RMS_CHARGE_RADIUS = codata_constant_type(\"proton rms charge radius\", 8.4075e-16_dp, 0.0064e-16_dp, \"m\") proton rms charge radius type( codata_constant_type ), public, parameter :: PROTON_TAU_MASS_RATIO = codata_constant_type(\"proton-tau mass ratio\", 0.528051_dp, 0.000036_dp, \"\") proton-tau mass ratio type( codata_constant_type ), public, parameter :: QUANTUM_OF_CIRCULATION = codata_constant_type(\"quantum of circulation\", 3.6369475467e-4_dp, 0.0000000011e-4_dp, \"m^2 s^-1\") quantum of circulation type( codata_constant_type ), public, parameter :: QUANTUM_OF_CIRCULATION_TIMES_2 = codata_constant_type(\"quantum of circulation times 2\", 7.2738950934e-4_dp, 0.0000000023e-4_dp, \"m^2 s^-1\") quantum of circulation times 2 type( codata_constant_type ), public, parameter :: REDUCED_COMPTON_WAVELENGTH = codata_constant_type(\"reduced Compton wavelength\", 3.8615926744e-13_dp, 0.0000000012e-13_dp, \"m\") reduced Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_MUON_COMPTON_WAVELENGTH = codata_constant_type(\"reduced muon Compton wavelength\", 1.867594306e-15_dp, 0.000000042e-15_dp, \"m\") reduced muon Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_NEUTRON_COMPTON_WAVELENGTH = codata_constant_type(\"reduced neutron Compton wavelength\", 2.1001941520e-16_dp, 0.0000000011e-16_dp, \"m\") reduced neutron Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_PLANCK_CONSTANT = codata_constant_type(\"reduced Planck constant\", 1.054571817e-34_dp, 0.0_dp, \"J s\") reduced Planck constant type( codata_constant_type ), public, parameter :: REDUCED_PLANCK_CONSTANT_IN_EV_S = codata_constant_type(\"reduced Planck constant in eV s\", 6.582119569e-16_dp, 0.0_dp, \"eV s\") reduced Planck constant in eV s type( codata_constant_type ), public, parameter :: REDUCED_PLANCK_CONSTANT_TIMES_C_IN_MEV_FM = codata_constant_type(\"reduced Planck constant times c in MeV fm\", 197.3269804_dp, 0.0_dp, \"MeV fm\") reduced Planck constant times c in MeV fm type( codata_constant_type ), public, parameter :: REDUCED_PROTON_COMPTON_WAVELENGTH = codata_constant_type(\"reduced proton Compton wavelength\", 2.10308910051e-16_dp, 0.00000000066e-16_dp, \"m\") reduced proton Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_TAU_COMPTON_WAVELENGTH = codata_constant_type(\"reduced tau Compton wavelength\", 1.110538e-16_dp, 0.000075e-16_dp, \"m\") reduced tau Compton wavelength type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT = codata_constant_type(\"Rydberg constant\", 10973731.568157_dp, 0.000012_dp, \"m^-1\") Rydberg constant type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT_TIMES_C_IN_HZ = codata_constant_type(\"Rydberg constant times c in Hz\", 3.2898419602500e15_dp, 0.0000000000036e15_dp, \"Hz\") Rydberg constant times c in Hz type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT_TIMES_HC_IN_EV = codata_constant_type(\"Rydberg constant times hc in eV\", 13.605693122990_dp, 0.000000000015_dp, \"eV\") Rydberg constant times hc in eV type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT_TIMES_HC_IN_J = codata_constant_type(\"Rydberg constant times hc in J\", 2.1798723611030e-18_dp, 0.0000000000024e-18_dp, \"J\") Rydberg constant times hc in J type( codata_constant_type ), public, parameter :: SACKUR_TETRODE_CONSTANT_1_K_100_KPA = codata_constant_type(\"Sackur-Tetrode constant (1 K, 100 kPa)\", -1.15170753496_dp, 0.00000000047_dp, \"\") Sackur-Tetrode constant (1 K, 100 kPa) type( codata_constant_type ), public, parameter :: SACKUR_TETRODE_CONSTANT_1_K_101_325_KPA = codata_constant_type(\"Sackur-Tetrode constant (1 K, 101.325 kPa)\", -1.16487052149_dp, 0.00000000047_dp, \"\") Sackur-Tetrode constant (1 K, 101.325 kPa) type( codata_constant_type ), public, parameter :: SECOND_RADIATION_CONSTANT = codata_constant_type(\"second radiation constant\", 1.438776877e-2_dp, 0.0_dp, \"m K\") second radiation constant type( codata_constant_type ), public, parameter :: SHIELDED_HELION_GYROMAG_RATIO = codata_constant_type(\"shielded helion gyromag. ratio\", 2.0378946078e8_dp, 0.0000000018e8_dp, \"s^-1 T^-1\") shielded helion gyromag. ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"shielded helion gyromag. ratio in MHz/T\", 32.434100033_dp, 0.000000028_dp, \"MHz T^-1\") shielded helion gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: SHIELDED_HELION_MAG_MOM = codata_constant_type(\"shielded helion mag. mom.\", -1.07455311035e-26_dp, 0.00000000093e-26_dp, \"J T^-1\") shielded helion mag. mom. type( codata_constant_type ), public, parameter :: SHIELDED_HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"shielded helion mag. mom. to Bohr magneton ratio\", -1.15867149457e-3_dp, 0.00000000094e-3_dp, \"\") shielded helion mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"shielded helion mag. mom. to nuclear magneton ratio\", -2.1274977624_dp, 0.0000000017_dp, \"\") shielded helion mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_TO_PROTON_MAG_MOM_RATIO = codata_constant_type(\"shielded helion to proton mag. mom. ratio\", -0.76176657721_dp, 0.00000000066_dp, \"\") shielded helion to proton mag. mom. ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_TO_SHIELDED_PROTON_MAG_MOM_RATIO = codata_constant_type(\"shielded helion to shielded proton mag. mom. ratio\", -0.7617861334_dp, 0.0000000031_dp, \"\") shielded helion to shielded proton mag. mom. ratio type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_GYROMAG_RATIO = codata_constant_type(\"shielded proton gyromag. ratio\", 2.675153194e8_dp, 0.000000011e8_dp, \"s^-1 T^-1\") shielded proton gyromag. ratio type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"shielded proton gyromag. ratio in MHz/T\", 42.57638543_dp, 0.00000017_dp, \"MHz T^-1\") shielded proton gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_MAG_MOM = codata_constant_type(\"shielded proton mag. mom.\", 1.4105705830e-26_dp, 0.0000000058e-26_dp, \"J T^-1\") shielded proton mag. mom. type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"shielded proton mag. mom. to Bohr magneton ratio\", 1.5209931551e-3_dp, 0.0000000062e-3_dp, \"\") shielded proton mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"shielded proton mag. mom. to nuclear magneton ratio\", 2.792775648_dp, 0.000000011_dp, \"\") shielded proton mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: SHIELDING_DIFFERENCE_OF_D_AND_P_IN_HD = codata_constant_type(\"shielding difference of d and p in HD\", 1.98770e-8_dp, 0.00010e-8_dp, \"\") shielding difference of d and p in HD type( codata_constant_type ), public, parameter :: SHIELDING_DIFFERENCE_OF_T_AND_P_IN_HT = codata_constant_type(\"shielding difference of t and p in HT\", 2.39450e-8_dp, 0.00020e-8_dp, \"\") shielding difference of t and p in HT type( codata_constant_type ), public, parameter :: SPEED_OF_LIGHT_IN_VACUUM = codata_constant_type(\"speed of light in vacuum\", 299792458_dp, 0.0_dp, \"m s^-1\") speed of light in vacuum type( codata_constant_type ), public, parameter :: STANDARD_ACCELERATION_OF_GRAVITY = codata_constant_type(\"standard acceleration of gravity\", 9.80665_dp, 0.0_dp, \"m s^-2\") standard acceleration of gravity type( codata_constant_type ), public, parameter :: STANDARD_ATMOSPHERE = codata_constant_type(\"standard atmosphere\", 101325_dp, 0.0_dp, \"Pa\") standard atmosphere type( codata_constant_type ), public, parameter :: STANDARD_STATE_PRESSURE = codata_constant_type(\"standard-state pressure\", 100000_dp, 0.0_dp, \"Pa\") standard-state pressure type( codata_constant_type ), public, parameter :: STEFAN_BOLTZMANN_CONSTANT = codata_constant_type(\"Stefan-Boltzmann constant\", 5.670374419e-8_dp, 0.0_dp, \"W m^-2 K^-4\") Stefan-Boltzmann constant type( codata_constant_type ), public, parameter :: TAU_COMPTON_WAVELENGTH = codata_constant_type(\"tau Compton wavelength\", 6.97771e-16_dp, 0.00047e-16_dp, \"m\") tau Compton wavelength type( codata_constant_type ), public, parameter :: TAU_ELECTRON_MASS_RATIO = codata_constant_type(\"tau-electron mass ratio\", 3477.23_dp, 0.23_dp, \"\") tau-electron mass ratio type( codata_constant_type ), public, parameter :: TAU_ENERGY_EQUIVALENT = codata_constant_type(\"tau energy equivalent\", 1776.86_dp, 0.12_dp, \"MeV\") tau energy equivalent type( codata_constant_type ), public, parameter :: TAU_MASS = codata_constant_type(\"tau mass\", 3.16754e-27_dp, 0.00021e-27_dp, \"kg\") tau mass type( codata_constant_type ), public, parameter :: TAU_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"tau mass energy equivalent\", 2.84684e-10_dp, 0.00019e-10_dp, \"J\") tau mass energy equivalent type( codata_constant_type ), public, parameter :: TAU_MASS_IN_U = codata_constant_type(\"tau mass in u\", 1.90754_dp, 0.00013_dp, \"u\") tau mass in u type( codata_constant_type ), public, parameter :: TAU_MOLAR_MASS = codata_constant_type(\"tau molar mass\", 1.90754e-3_dp, 0.00013e-3_dp, \"kg mol^-1\") tau molar mass type( codata_constant_type ), public, parameter :: TAU_MUON_MASS_RATIO = codata_constant_type(\"tau-muon mass ratio\", 16.8170_dp, 0.0011_dp, \"\") tau-muon mass ratio type( codata_constant_type ), public, parameter :: TAU_NEUTRON_MASS_RATIO = codata_constant_type(\"tau-neutron mass ratio\", 1.89115_dp, 0.00013_dp, \"\") tau-neutron mass ratio type( codata_constant_type ), public, parameter :: TAU_PROTON_MASS_RATIO = codata_constant_type(\"tau-proton mass ratio\", 1.89376_dp, 0.00013_dp, \"\") tau-proton mass ratio type( codata_constant_type ), public, parameter :: THOMSON_CROSS_SECTION = codata_constant_type(\"Thomson cross section\", 6.6524587051e-29_dp, 0.0000000062e-29_dp, \"m^2\") Thomson cross section type( codata_constant_type ), public, parameter :: TRITON_ELECTRON_MASS_RATIO = codata_constant_type(\"triton-electron mass ratio\", 5496.92153551_dp, 0.00000021_dp, \"\") triton-electron mass ratio type( codata_constant_type ), public, parameter :: TRITON_G_FACTOR = codata_constant_type(\"triton g factor\", 5.957924930_dp, 0.000000012_dp, \"\") triton g factor type( codata_constant_type ), public, parameter :: TRITON_MAG_MOM = codata_constant_type(\"triton mag. mom.\", 1.5046095178e-26_dp, 0.0000000030e-26_dp, \"J T^-1\") triton mag. mom. type( codata_constant_type ), public, parameter :: TRITON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"triton mag. mom. to Bohr magneton ratio\", 1.6223936648e-3_dp, 0.0000000032e-3_dp, \"\") triton mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: TRITON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"triton mag. mom. to nuclear magneton ratio\", 2.9789624650_dp, 0.0000000059_dp, \"\") triton mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: TRITON_MASS = codata_constant_type(\"triton mass\", 5.0073567512e-27_dp, 0.0000000016e-27_dp, \"kg\") triton mass type( codata_constant_type ), public, parameter :: TRITON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"triton mass energy equivalent\", 4.5003878119e-10_dp, 0.0000000014e-10_dp, \"J\") triton mass energy equivalent type( codata_constant_type ), public, parameter :: TRITON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"triton mass energy equivalent in MeV\", 2808.92113668_dp, 0.00000088_dp, \"MeV\") triton mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: TRITON_MASS_IN_U = codata_constant_type(\"triton mass in u\", 3.01550071597_dp, 0.00000000010_dp, \"u\") triton mass in u type( codata_constant_type ), public, parameter :: TRITON_MOLAR_MASS = codata_constant_type(\"triton molar mass\", 3.01550071913e-3_dp, 0.00000000094e-3_dp, \"kg mol^-1\") triton molar mass type( codata_constant_type ), public, parameter :: TRITON_PROTON_MASS_RATIO = codata_constant_type(\"triton-proton mass ratio\", 2.99371703403_dp, 0.00000000010_dp, \"\") triton-proton mass ratio type( codata_constant_type ), public, parameter :: TRITON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"triton relative atomic mass\", 3.01550071597_dp, 0.00000000010_dp, \"\") triton relative atomic mass type( codata_constant_type ), public, parameter :: TRITON_TO_PROTON_MAG_MOM_RATIO = codata_constant_type(\"triton to proton mag. mom. ratio\", 1.0666399189_dp, 0.0000000021_dp, \"\") triton to proton mag. mom. ratio type( codata_constant_type ), public, parameter :: UNIFIED_ATOMIC_MASS_UNIT = codata_constant_type(\"unified atomic mass unit\", 1.66053906892e-27_dp, 0.00000000052e-27_dp, \"kg\") unified atomic mass unit type( codata_constant_type ), public, parameter :: VACUUM_ELECTRIC_PERMITTIVITY = codata_constant_type(\"vacuum electric permittivity\", 8.8541878188e-12_dp, 0.0000000014e-12_dp, \"F m^-1\") vacuum electric permittivity type( codata_constant_type ), public, parameter :: VACUUM_MAG_PERMEABILITY = codata_constant_type(\"vacuum mag. permeability\", 1.25663706127e-6_dp, 0.00000000020e-6_dp, \"N A^-2\") vacuum mag. permeability type( codata_constant_type ), public, parameter :: VON_KLITZING_CONSTANT = codata_constant_type(\"von Klitzing constant\", 25812.80745_dp, 0.0_dp, \"ohm\") von Klitzing constant type( codata_constant_type ), public, parameter :: WEAK_MIXING_ANGLE = codata_constant_type(\"weak mixing angle\", 0.22305_dp, 0.00023_dp, \"\") weak mixing angle type( codata_constant_type ), public, parameter :: WIEN_FREQUENCY_DISPLACEMENT_LAW_CONSTANT = codata_constant_type(\"Wien frequency displacement law constant\", 5.878925757e10_dp, 0.0_dp, \"Hz K^-1\") Wien frequency displacement law constant type( codata_constant_type ), public, parameter :: WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT = codata_constant_type(\"Wien wavelength displacement law constant\", 2.897771955e-3_dp, 0.0_dp, \"m K\") Wien wavelength displacement law constant type( codata_constant_type ), public, parameter :: W_TO_Z_MASS_RATIO = codata_constant_type(\"W to Z mass ratio\", 0.88145_dp, 0.00013_dp, \"\") W to Z mass ratio integer(kind=int32), public, parameter :: YEAR = 2022 Year of release.","tags":"","loc":"module/stdlib_codata.html"},{"title":"stdlib_linalg_blas_s – Fortran-lang/stdlib","text":"Uses stdlib_linalg_constants stdlib_linalg_blas_aux Functions public pure function stdlib_sasum (n, sx, incx) SASUM takes the sum of the absolute values.\nuses unrolled loops for increment equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_scasum (n, cx, incx) SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a single precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_scnrm2 (n, x, incx) SCNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSCNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_sdot (n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public pure function stdlib_sdsdot (n, sb, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation.\nReturns S.P. result with dot product accumulated in D.P.\nSDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I INCX) SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N) INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sb real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public pure function stdlib_snrm2 (n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Subroutines public pure subroutine stdlib_saxpy (n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_scopy (n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sger (m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_srot (n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_srotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine stdlib_srotm (n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) public pure subroutine stdlib_srotmg (sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) public pure subroutine stdlib_ssbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sscal (n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_sspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sspr (uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr2 (uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_sswap (n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssyr (uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_stbmv (uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbsv (uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpmv (uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpsv (uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strmv (uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strsv (uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_s.html"},{"title":"stdlib_version – Fortran-lang/stdlib","text":"Version information on stdlib Variables Type Visibility Attributes Name Initial integer, public, parameter :: stdlib_version_compact = stdlib_major*10000+stdlib_minor*100+stdlib_patch Compact numeric representation of the standard library version character(len=*), public, parameter :: stdlib_version_string = \"0.0.0\" String representation of the standard library version Subroutines public pure subroutine get_stdlib_version (major, minor, patch, string) Getter function to retrieve standard library version Arguments Type Intent Optional Attributes Name integer, intent(out), optional :: major Major version number of the standard library version integer, intent(out), optional :: minor Minor version number of the standard library version integer, intent(out), optional :: patch Patch version number of the standard library version character(len=:), intent(out), optional, allocatable :: string String representation of the standard library version","tags":"","loc":"module/stdlib_version.html"},{"title":"stdlib_linalg – Fortran-lang/stdlib","text":"Provides a support for various linear algebra procedures\n ( Specification ) Uses stdlib_linalg_state stdlib_linalg_constants stdlib_optval stdlib_kinds stdlib_error Used by Descendants: stdlib_linalg_cross_product stdlib_linalg_determinant stdlib_linalg_diag stdlib_linalg_kronecker stdlib_linalg_least_squares stdlib_linalg_outer_product stdlib_linalg_solve stdlib_linalg_svd Interfaces public interface cross_product Computes the cross product of two vectors, returning a rank-1 and size-3 array\n( Specification ) private pure module function cross_product_cdp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (3) complex(kind=dp), intent(in) :: b (3) Return Value complex(kind=dp), (3) private pure module function cross_product_csp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (3) complex(kind=sp), intent(in) :: b (3) Return Value complex(kind=sp), (3) private pure module function cross_product_iint16(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (3) integer(kind=int16), intent(in) :: b (3) Return Value integer(kind=int16), (3) private pure module function cross_product_iint32(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (3) integer(kind=int32), intent(in) :: b (3) Return Value integer(kind=int32), (3) private pure module function cross_product_iint64(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (3) integer(kind=int64), intent(in) :: b (3) Return Value integer(kind=int64), (3) private pure module function cross_product_iint8(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (3) integer(kind=int8), intent(in) :: b (3) Return Value integer(kind=int8), (3) private pure module function cross_product_rdp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (3) real(kind=dp), intent(in) :: b (3) Return Value real(kind=dp), (3) private pure module function cross_product_rsp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (3) real(kind=sp), intent(in) :: b (3) Return Value real(kind=sp), (3) public interface det Computes the determinant of a square matrix\n ( Specification ) Summary Interface for computing matrix determinant. Description This interface provides methods for computing the determinant of a matrix.\n Supported data types include real and complex . Note The provided functions are intended for square matrices only. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 3 , 3 ), d type ( linalg_state_type ) :: state a = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) ! ... d = det ( a , err = state ) if ( state % ok ()) then print * , 'Success! det=' , d else print * , state % print () endif ! ... private interface stdlib_linalg_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_cdpdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None public interface diag Creates a diagonal array or extract the diagonal elements of an array\n( Specification ) private module function diag_cdp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(v),size(v)) private module function diag_cdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_cdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp), (minval(shape(A))) private module function diag_cdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=dp), (minval(shape(A))-abs(k)) private module function diag_csp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(v),size(v)) private module function diag_csp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_csp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp), (minval(shape(A))) private module function diag_csp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=sp), (minval(shape(A))-abs(k)) private module function diag_iint16(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(v),size(v)) private module function diag_iint16_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int16), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint16_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16), (minval(shape(A))) private module function diag_iint16_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int16), (minval(shape(A))-abs(k)) private module function diag_iint32(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(v),size(v)) private module function diag_iint32_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int32), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint32_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32), (minval(shape(A))) private module function diag_iint32_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int32), (minval(shape(A))-abs(k)) private module function diag_iint64(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(v),size(v)) private module function diag_iint64_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int64), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint64_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64), (minval(shape(A))) private module function diag_iint64_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int64), (minval(shape(A))-abs(k)) private module function diag_iint8(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(v),size(v)) private module function diag_iint8_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int8), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint8_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8), (minval(shape(A))) private module function diag_iint8_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int8), (minval(shape(A))-abs(k)) private module function diag_rdp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(v),size(v)) private module function diag_rdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp), (minval(shape(A))) private module function diag_rdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=dp), (minval(shape(A))-abs(k)) private module function diag_rsp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(v),size(v)) private module function diag_rsp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rsp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp), (minval(shape(A))) private module function diag_rsp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=sp), (minval(shape(A))-abs(k)) public interface is_diagonal Checks if a matrix (rank-2 array) is diagonal\n( Specification ) private pure function is_diagonal_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_hermitian Checks if a matrix (rank-2 array) is Hermitian\n( Specification ) private pure function is_hermitian_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_hessenberg Checks if a matrix (rank-2 array) is Hessenberg\n( Specification ) private function is_hessenberg_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical public interface is_skew_symmetric Checks if a matrix (rank-2 array) is skew-symmetric\n( Specification ) private pure function is_skew_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_square Checks if a matrix (rank-2 array) is square\n( Specification ) private pure function is_square_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_symmetric Checks if a matrix (rank-2 array) is symmetric\n( Specification ) private pure function is_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_triangular Checks if a matrix (rank-2 array) is triangular\n( Specification ) private function is_triangular_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical public interface kronecker_product Computes the Kronecker product of two arrays of size M1xN1, and of M2xN2, returning an (M1 M2)x(N1 N2) array\n( Specification ) private pure module function kronecker_product_cdp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) complex(kind=dp), intent(in) :: B (:,:) Return Value complex(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_csp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) complex(kind=sp), intent(in) :: B (:,:) Return Value complex(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint16(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer(kind=int16), intent(in) :: B (:,:) Return Value integer(kind=int16), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint32(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer(kind=int32), intent(in) :: B (:,:) Return Value integer(kind=int32), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint64(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer(kind=int64), intent(in) :: B (:,:) Return Value integer(kind=int64), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint8(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer(kind=int8), intent(in) :: B (:,:) Return Value integer(kind=int8), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rdp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) real(kind=dp), intent(in) :: B (:,:) Return Value real(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rsp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) real(kind=sp), intent(in) :: B (:,:) Return Value real(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) public interface lstsq Computes the squares solution to system . \n ( Specification ) Summary Interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system.\n Supported data types include real and complex . Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private module function stdlib_linalg_c_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] public interface lstsq_space Computes the integer, real [, complex] working space required by the least-squares solver\n ( Specification ) Description This interface provides sizes of integer, real [, complex] working spaces required by the \n least-squares solver. These sizes can be used to pre-allocated working arrays in case several \n repeated least-squares solutions to a same system are sought. If pre-allocated working arrays \n are provided, no internal allocations will take place. private pure module subroutine stdlib_linalg_c_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_c_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays public interface operator(.det.) Determinant operator of a square matrix\n ( Specification ) Summary Pure operator interface for computing matrix determinant. Description This pure operator interface provides a convenient way to compute the determinant of a matrix.\n Supported data types include real and complex. Note The provided functions are intended for square matrices. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example ! ... real ( sp ) :: matrix ( 3 , 3 ), d matrix = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) d = . det . matrix ! ... private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None public interface outer_product Computes the outer product of two vectors, returning a rank-2 array\n( Specification ) private pure module function outer_product_cdp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: u (:) complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(u),size(v)) private pure module function outer_product_csp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: u (:) complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(u),size(v)) private pure module function outer_product_iint16(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: u (:) integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(u),size(v)) private pure module function outer_product_iint32(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: u (:) integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(u),size(v)) private pure module function outer_product_iint64(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: u (:) integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(u),size(v)) private pure module function outer_product_iint8(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: u (:) integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(u),size(v)) private pure module function outer_product_rdp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: u (:) real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(u),size(v)) private pure module function outer_product_rsp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: u (:) real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(u),size(v)) public interface solve Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Interface for solving a linear system arising from a general matrix. Description This interface provides methods for computing the solution of a linear matrix system.\n Supported data types include real and complex . No assumption is made on the matrix \n structure. \n The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private pure module function stdlib_linalg_c_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_c_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] public interface solve_lstsq Computes the squares solution to system . \n ( Specification ) Summary Subroutine interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system using \n a subroutine. Supported data types include real and complex . If pre-allocated work spaces \n are provided, no internal memory allocations take place when using this interface. Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private module subroutine stdlib_linalg_c_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_c_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop public interface solve_lu Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Subroutine interface for solving a linear system using LU decomposition. Description This interface provides methods for computing the solution of a linear matrix system using\n a subroutine. Supported data types include real and complex . No assumption is made on the matrix \n structure. Preallocated space for the solution vector x is user-provided, and it may be provided\n for the array of pivot indices, pivot . If all pre-allocated work spaces are provided, no internal \n memory allocations take place when using this interface. The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private pure module subroutine stdlib_linalg_c_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_c_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop public interface svd Computes the singular value decomposition of a real or complex 2d matrix.\n ( Specification ) Summary Interface for computing the singular value decomposition of a real or complex 2d matrix. Description This interface provides methods for computing the singular value decomposition of a matrix.\n Supported data types include real and complex . The subroutine returns a real array of \n singular values, and optionally, left- and right- singular vector matrices, U and V . \n For a matrix A with size [m,n], full matrix storage for U and V should be [m,m] and [n,n]. \n It is possible to use partial storage [m,k] and [k,n], k=min(m,n) , choosing full_matrices=.false. . Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ), u ( 2 , 2 ), vt ( 3 , 3 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) call svd ( A , s , u , v ) print * , 'singular values = ' , s private module subroutine stdlib_linalg_svd_c(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values complex(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_d(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values real(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_s(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values real(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_z(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values complex(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop public interface svdvals Computes the singular values of a real or complex 2d matrix.\n ( Specification ) Summary Function interface for computing the array of singular values from the singular value decomposition \n of a real or complex 2d matrix. Description This interface provides methods for computing the singular values a 2d matrix.\n Supported data types include real and complex . The function returns a real array of \n singular values, with size [min(m,n)]. Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) s = svdvals ( A ) print * , 'singular values = ' , s private module function stdlib_linalg_svdvals_c(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_d(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_s(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_z(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values public interface trace Computes the trace of a matrix\n( Specification ) private function trace_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp) private function trace_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp) private function trace_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp) private function trace_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp) private function trace_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8) private function trace_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16) private function trace_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32) private function trace_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64) Functions public pure function eye (dim1, dim2) result(result) License Version experimental Constructs the identity matrix.\n( Specification ) Arguments Type Intent Optional Attributes Name integer, intent(in) :: dim1 integer, intent(in), optional :: dim2 Return Value integer(kind=int8), allocatable, (:,:)","tags":"","loc":"module/stdlib_linalg.html"},{"title":"stdlib_stats_distribution_exponential – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_stats_distribution_uniform stdlib_kinds stdlib_random Interfaces public interface cdf_exp Version experimental Exponential Cumulative Distribution Function\n( Specification ) private elemental function cdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function cdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp) public interface pdf_exp Version experimental Exponential Distribution Probability Density Function\n( Specification ) private elemental function pdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function pdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp) public interface rvs_exp Version experimental Exponential Distribution Random Variates\n( Specification ) private impure function rvs_exp_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_exp_rsp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private impure elemental function rvs_exp_rdp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private impure elemental function rvs_exp_csp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda Return Value complex(kind=sp) private impure elemental function rvs_exp_cdp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda Return Value complex(kind=dp) private impure function rvs_exp_array_rsp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_exp_array_rdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_exp_array_csp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_exp_array_cdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"module/stdlib_stats_distribution_exponential.html"},{"title":"stdlib_math – Fortran-lang/stdlib","text":"Uses stdlib_kinds stdlib_optval Used by Descendants: stdlib_math_all_close stdlib_math_arange stdlib_math_diff stdlib_math_is_close stdlib_math_linspace stdlib_math_logspace stdlib_math_meshgrid Variables Type Visibility Attributes Name Initial integer, public, parameter :: DEFAULT_LINSPACE_LENGTH = 100 integer, public, parameter :: DEFAULT_LOGSPACE_BASE = 10 integer, public, parameter :: DEFAULT_LOGSPACE_LENGTH = 50 real(kind=dp), public, parameter :: EULERS_NUMBER_DP = exp(1.0_dp) real(kind=sp), public, parameter :: EULERS_NUMBER_SP = exp(1.0_sp) integer, public, parameter :: stdlib_meshgrid_ij = 1 Values for optional argument indexing of meshgrid integer, public, parameter :: stdlib_meshgrid_xy = 0 Values for optional argument indexing of meshgrid Interfaces public interface all_close Returns a boolean scalar where two arrays are element-wise equal within a tolerance.\n( Specification ) private pure module function all_close_1_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:) complex(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:) complex(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) real(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) real(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) complex(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) complex(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) real(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) real(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:,:) complex(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:,:) complex(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:,:) real(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:,:) real(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical public interface arange arange creates a one-dimensional array of the integer/real type \n with fixed-spaced values of given spacing, within a given interval.\n( Specification ) private pure module function arange_i_int16(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in), optional :: end integer(kind=int16), intent(in), optional :: step Return Value integer(kind=int16), allocatable, (:) private pure module function arange_i_int32(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in), optional :: end integer(kind=int32), intent(in), optional :: step Return Value integer(kind=int32), allocatable, (:) private pure module function arange_i_int64(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in), optional :: end integer(kind=int64), intent(in), optional :: step Return Value integer(kind=int64), allocatable, (:) private pure module function arange_i_int8(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in), optional :: end integer(kind=int8), intent(in), optional :: step Return Value integer(kind=int8), allocatable, (:) private pure module function arange_r_dp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in), optional :: end real(kind=dp), intent(in), optional :: step Return Value real(kind=dp), allocatable, (:) private pure module function arange_r_sp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in), optional :: end real(kind=sp), intent(in), optional :: step Return Value real(kind=sp), allocatable, (:) public interface arg arg computes the phase angle in the interval (-π,π].\n( Specification ) private elemental function arg_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function arg_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public interface argd argd computes the phase angle of degree version in the interval (-180.0,180.0].\n( Specification ) private elemental function argd_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argd_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public interface argpi argpi computes the phase angle of circular version in the interval (-1.0,1.0].\n( Specification ) private elemental function argpi_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argpi_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public interface clip private elemental function clip_int8(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: xmin integer(kind=int8), intent(in) :: xmax Return Value integer(kind=int8) private elemental function clip_int16(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: xmin integer(kind=int16), intent(in) :: xmax Return Value integer(kind=int16) private elemental function clip_int32(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: xmin integer(kind=int32), intent(in) :: xmax Return Value integer(kind=int32) private elemental function clip_int64(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: xmin integer(kind=int64), intent(in) :: xmax Return Value integer(kind=int64) private elemental function clip_sp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: xmin real(kind=sp), intent(in) :: xmax Return Value real(kind=sp) private elemental function clip_dp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: xmin real(kind=dp), intent(in) :: xmax Return Value real(kind=dp) public interface diff Computes differences between adjacent elements of an array.\n( Specification ) private pure module function diff_1_dp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=dp), intent(in), optional :: prepend (:) real(kind=dp), intent(in), optional :: append (:) Return Value real(kind=dp), allocatable, (:) private pure module function diff_1_int16(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int16), intent(in), optional :: prepend (:) integer(kind=int16), intent(in), optional :: append (:) Return Value integer(kind=int16), allocatable, (:) private pure module function diff_1_int32(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int32), intent(in), optional :: prepend (:) integer(kind=int32), intent(in), optional :: append (:) Return Value integer(kind=int32), allocatable, (:) private pure module function diff_1_int64(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int64), intent(in), optional :: prepend (:) integer(kind=int64), intent(in), optional :: append (:) Return Value integer(kind=int64), allocatable, (:) private pure module function diff_1_int8(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int8), intent(in), optional :: prepend (:) integer(kind=int8), intent(in), optional :: append (:) Return Value integer(kind=int8), allocatable, (:) private pure module function diff_1_sp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=sp), intent(in), optional :: prepend (:) real(kind=sp), intent(in), optional :: append (:) Return Value real(kind=sp), allocatable, (:) private pure module function diff_2_dp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=dp), intent(in), optional :: prepend (:,:) real(kind=dp), intent(in), optional :: append (:,:) Return Value real(kind=dp), allocatable, (:,:) private pure module function diff_2_int16(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int16), intent(in), optional :: prepend (:,:) integer(kind=int16), intent(in), optional :: append (:,:) Return Value integer(kind=int16), allocatable, (:,:) private pure module function diff_2_int32(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int32), intent(in), optional :: prepend (:,:) integer(kind=int32), intent(in), optional :: append (:,:) Return Value integer(kind=int32), allocatable, (:,:) private pure module function diff_2_int64(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int64), intent(in), optional :: prepend (:,:) integer(kind=int64), intent(in), optional :: append (:,:) Return Value integer(kind=int64), allocatable, (:,:) private pure module function diff_2_int8(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int8), intent(in), optional :: prepend (:,:) integer(kind=int8), intent(in), optional :: append (:,:) Return Value integer(kind=int8), allocatable, (:,:) private pure module function diff_2_sp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=sp), intent(in), optional :: prepend (:,:) real(kind=sp), intent(in), optional :: append (:,:) Return Value real(kind=sp), allocatable, (:,:) public interface gcd Returns the greatest common divisor of two integers\n( Specification ) Version: experimental private elemental function gcd_int8(a, b) result(res) Returns the greatest common divisor of two integers of kind int8\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a integer(kind=int8), intent(in) :: b Return Value integer(kind=int8) private elemental function gcd_int16(a, b) result(res) Returns the greatest common divisor of two integers of kind int16\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a integer(kind=int16), intent(in) :: b Return Value integer(kind=int16) private elemental function gcd_int32(a, b) result(res) Returns the greatest common divisor of two integers of kind int32\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a integer(kind=int32), intent(in) :: b Return Value integer(kind=int32) private elemental function gcd_int64(a, b) result(res) Returns the greatest common divisor of two integers of kind int64\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a integer(kind=int64), intent(in) :: b Return Value integer(kind=int64) public interface is_close Returns a boolean scalar/array where two scalar/arrays are element-wise equal within a tolerance.\n( Specification ) private elemental module function is_close_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a real(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a real(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical public interface linspace Create rank 1 array of linearly spaced elements\n If the number of elements is not specified, create an array with size 100. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is end\n( Specification ) When dealing with integers as the start and end parameters, the return type is always a real(dp) . private pure module function linspace_default_1_cdp_cdp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_csp_csp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint16_iint16(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint32_iint32(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint64_iint64(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint8_iint8(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rdp_rdp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rsp_rsp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_n_1_cdp_cdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function linspace_n_1_csp_csp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function linspace_n_1_iint16_iint16(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint32_iint32(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint64_iint64(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint8_iint8(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rdp_rdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rsp_rsp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0)) public interface logspace Create rank 1 array of logarithmically spaced elements from base start to base end.\n If the number of elements is not specified, create an array with size 50. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is base**end. If no base\n is specified, logspace will default to using a base of 10 ( Specification ) private pure module function logspace_1_cdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_cdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_csp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_csp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_default(start, end) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_iint32_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (n) private pure module function logspace_1_iint32_n_cdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_cspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value integer, (max(n,0)) private pure module function logspace_1_iint32_n_rdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_rspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rsp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rsp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) public interface meshgrid Computes a list of coordinate matrices from coordinate vectors.\n( Specification ) private module subroutine meshgrid_1_iint16_iint16(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint32_iint32(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint64_iint64(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint8_iint8(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rdp_rdp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rsp_rsp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint16_iint16(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(out) :: xm1 (:,:) integer(kind=int16), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint32_iint32(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(out) :: xm1 (:,:) integer(kind=int32), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint64_iint64(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(out) :: xm1 (:,:) integer(kind=int64), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint8_iint8(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(out) :: xm1 (:,:) integer(kind=int8), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rdp_rdp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(out) :: xm1 (:,:) real(kind=dp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rsp_rsp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(out) :: xm1 (:,:) real(kind=sp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint16_iint16(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(in) :: x3 (:) integer(kind=int16), intent(out) :: xm1 (:,:,:) integer(kind=int16), intent(out) :: xm2 (:,:,:) integer(kind=int16), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint32_iint32(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(in) :: x3 (:) integer(kind=int32), intent(out) :: xm1 (:,:,:) integer(kind=int32), intent(out) :: xm2 (:,:,:) integer(kind=int32), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint64_iint64(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(in) :: x3 (:) integer(kind=int64), intent(out) :: xm1 (:,:,:) integer(kind=int64), intent(out) :: xm2 (:,:,:) integer(kind=int64), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint8_iint8(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(in) :: x3 (:) integer(kind=int8), intent(out) :: xm1 (:,:,:) integer(kind=int8), intent(out) :: xm2 (:,:,:) integer(kind=int8), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rdp_rdp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(in) :: x3 (:) real(kind=dp), intent(out) :: xm1 (:,:,:) real(kind=dp), intent(out) :: xm2 (:,:,:) real(kind=dp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rsp_rsp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(in) :: x3 (:) real(kind=sp), intent(out) :: xm1 (:,:,:) real(kind=sp), intent(out) :: xm2 (:,:,:) real(kind=sp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing","tags":"","loc":"module/stdlib_math.html"},{"title":"stdlib_linalg_constants – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_kinds Variables Type Visibility Attributes Name Initial integer, public, parameter :: ilp = int32","tags":"","loc":"module/stdlib_linalg_constants.html"},{"title":"stdlib_io – Fortran-lang/stdlib","text":"Provides a support for file handling\n( Specification ) Uses iso_fortran_env stdlib_string_type stdlib_optval stdlib_kinds stdlib_ascii stdlib_error Variables Type Visibility Attributes Name Initial character(len=*), public, parameter :: FMT_COMPLEX_DP = '(es24.16e3,1x,es24.16e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_COMPLEX_QP = '(es44.35e4,1x,es44.35e4)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_COMPLEX_SP = '(es15.8e2,1x,es15.8e2)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_COMPLEX_XDP = '(es26.18e3,1x,es26.18e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_INT = '(i0)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_DP = '(es24.16e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_QP = '(es44.35e4)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_SP = '(es15.8e2)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_XDP = '(es26.18e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers Interfaces public interface getline Read a whole line from a formatted unit into a string variable private subroutine getline_char(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a deferred length character variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_string(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a string variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_char(line, iostat, iomsg) Read a whole line from the standard input into a deferred length character variable Arguments Type Intent Optional Attributes Name character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_string(line, iostat, iomsg) Read a whole line from the standard input into a string variable Arguments Type Intent Optional Attributes Name type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message public interface loadtxt Loads a 2D array from a text file\n( Specification ) private subroutine loadtxt_rsp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_rdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint8(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int8), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint16(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int16), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint32(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int32), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint64(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int64), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_csp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_cdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt public interface savetxt Saves a 2D array into a text file\n( Specification ) private subroutine savetxt_rsp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: d (:,:) Example real ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_rdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: d (:,:) Example real ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint8(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: d (:,:) Example integer ( int8 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint16(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: d (:,:) Example integer ( int16 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint32(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: d (:,:) Example integer ( int32 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint64(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: d (:,:) Example integer ( int64 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_csp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: d (:,:) Example complex ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_cdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: d (:,:) Example complex ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) Functions public function open (filename, mode, iostat) result(u) License Version experimental Opens a file\n ( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename character(len=*), intent(in), optional :: mode integer, intent(out), optional :: iostat Return Value integer public function parse_mode (mode) result(mode_) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: mode Return Value character(len=3)","tags":"","loc":"module/stdlib_io.html"},{"title":"stdlib_stats_distribution_normal – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_stats_distribution_uniform stdlib_kinds stdlib_random Interfaces public interface cdf_normal Normal Distribution Cumulative Distribution Function\n( Specification ) private elemental function cdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface pdf_normal Normal Distribution Probability Density Function\n( Specification ) private elemental function pdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface rvs_normal Normal Distribution Random Variates\n( Specification ) private impure function rvs_norm_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_norm_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_norm_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_norm_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_norm_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure function rvs_norm_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_norm_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_norm_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_norm_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"module/stdlib_stats_distribution_normal.html"},{"title":"stdlib_logger – Fortran-lang/stdlib","text":"Module stdlib_logger This module defines a derived type, procedures, a variable, and\n constants to be used for logging information and reporting errors\n in Fortran applications.\n( Specification ) The derived type, logger_type , is to be used to define variables to\n serve as both local and global loggers. A logger directs its messages\n to selected I/O units so the user has a record (a log) of major events.\n For each entity of logger_type the reports go to a list of I/O units\n represented by the private internal array, log_units . If log_units is\n empty then output by default goes to output_unit . Otherwise reports\n go to output_unit only if it has been explicitly added to log_units .\n Each entity of type logger_type also maintains an internal state\n controlling the formatting of output. The procedures are as follows. The logical function log_units_assigned returns the number of I/O units in log_units . The\n subroutines add_log_file and add_log_unit include the specified file\n in log_units . remove_log_units removes the specified logical unit from\n the log_units array and optionally closes the file. configure configures the details of the logging process. configuration reports the details of that configuration. The subroutines log_error , log_information , log_io_error , log_message , log_text_error , and log_warning send messages to the log units. The variable global_logger of type logger_type can be used\n as a default global logger anywhere in the source code. The constants are used to report errors by some of the subroutines\n in their optional stat arguments. The constants are as follows. success indicates that no error has occurred. close_failure indicates that a close statement for an I/O unit failed. index_invalid_error indicates that column was invalid for\n the given line . open_failure indicates that an open statement\n failed. read_only_error indicates that an output unit did not have a \"write\" or \"readwrite\" action. non_sequential_error indicates\n that the unit did not have sequential access. unformatted_in_error indicates that the unit did not have a form of \"formatted\" . unopened_in_error indicates that the unit was not opened. write_failure indicates that at least one of the writes to log_units failed. public constants used as error flags\n Variable of type logger_type to be used as a global logger Uses stdlib_ascii iso_fortran_env stdlib_optval Variables Type Visibility Attributes Name Initial integer, public, parameter :: all_level = -10+min(debug_level, information_level, warning_level, error_level, io_error_level, text_error_level) integer, public, parameter :: close_failure = 1 integer, public, parameter :: debug_level = 10 integer, public, parameter :: error_level = 40 type( logger_type ), public :: global_logger integer, public, parameter :: index_invalid_error = 2 integer, public, parameter :: information_level = 20 integer, public, parameter :: io_error_level = 40 integer, public, parameter :: non_sequential_error = 3 integer, public, parameter :: none_level = 10+max(debug_level, information_level, warning_level, error_level, io_error_level, text_error_level) integer, public, parameter :: open_failure = 4 integer, public, parameter :: read_only_error = 5 integer, public, parameter :: success = 0 integer, public, parameter :: text_error_level = 50 integer, public, parameter :: unformatted_in_error = 6 integer, public, parameter :: unopened_in_error = 7 integer, public, parameter :: warning_level = 30 integer, public, parameter :: write_failure = 8 Derived Types type, public :: logger_type Public derived type ( Specification ) Finalizations Procedures final :: final_logger Type-Bound Procedures procedure, public, pass(self) :: add_log_file procedure, public, pass(self) :: add_log_unit procedure, public, pass(self) :: configuration procedure, public, pass(self) :: configure procedure, public, pass(self) :: log_debug procedure, public, pass(self) :: log_error procedure, public, pass(self) :: log_information procedure, public, pass(self) :: log_io_error procedure, public, pass(self) :: log_message procedure, public, pass(self) :: log_text_error procedure, public, pass(self) :: log_units_assigned procedure, public, pass(self) :: log_warning procedure, public, pass(self) :: remove_log_unit","tags":"","loc":"module/stdlib_logger.html"},{"title":"stdlib_constants – Fortran-lang/stdlib","text":"Constants\n( Specification ) Uses stdlib_codata stdlib_kinds Variables Type Visibility Attributes Name Initial real(kind=dp), public, parameter :: Avogadro = AVOGADRO_CONSTANT%value Avogadro constant real(kind=dp), public, parameter :: Boltzmann = BOLTZMANN_CONSTANT%value Boltzmann constant real(kind=dp), public, parameter :: G = NEWTONIAN_CONSTANT_OF_GRAVITATION%value Newtonian constant of gravitation real(kind=dp), public, parameter :: N_A = AVOGADRO_CONSTANT%value Avogadro constant real(kind=dp), public, parameter :: PI_dp = acos(-1.0_dp) PI real(kind=sp), public, parameter :: PI_sp = acos(-1.0_sp) PI real(kind=dp), public, parameter :: Planck = PLANCK_CONSTANT%value Planck constant real(kind=dp), public, parameter :: R = MOLAR_GAS_CONSTANT%value Molar gas constant real(kind=dp), public, parameter :: Rydberg = RYDBERG_CONSTANT%value Rydberg constant real(kind=dp), public, parameter :: Stefan_Boltzmann = STEFAN_BOLTZMANN_CONSTANT%value Stefan-Boltzmann constant real(kind=dp), public, parameter :: Wien = WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT%value Wien wavelength displacement law constant real(kind=dp), public, parameter :: alpha = FINE_STRUCTURE_CONSTANT%value Fine structure constant real(kind=dp), public, parameter :: c = SPEED_OF_LIGHT_IN_VACUUM%value Speed of light in vacuum real(kind=dp), public, parameter :: e = ELEMENTARY_CHARGE%value Elementary charge real(kind=dp), public, parameter :: epsilon_0 = VACUUM_ELECTRIC_PERMITTIVITY%value vacuum mag. permeability real(kind=dp), public, parameter :: fine_structure = FINE_STRUCTURE_CONSTANT%value Fine structure constant real(kind=dp), public, parameter :: g2 = STANDARD_ACCELERATION_OF_GRAVITY%value Standard acceleration of gravity real(kind=dp), public, parameter :: gas_constant = MOLAR_GAS_CONSTANT%value Molar gas constant real(kind=dp), public, parameter :: gravitation_constant = NEWTONIAN_CONSTANT_OF_GRAVITATION%value Newtonian constant of gravitation real(kind=dp), public, parameter :: h = PLANCK_CONSTANT%value Planck constant real(kind=dp), public, parameter :: hbar = PLANCK_CONSTANT%value/PI_dp Reduced Planck constant real(kind=dp), public, parameter :: k = BOLTZMANN_CONSTANT%value Boltzmann constant real(kind=dp), public, parameter :: m_e = ELECTRON_MASS%value Electron mass real(kind=dp), public, parameter :: m_n = NEUTRON_MASS%value Neutron mass real(kind=dp), public, parameter :: m_p = PROTON_MASS%value Proton mass real(kind=dp), public, parameter :: m_u = ATOMIC_MASS_CONSTANT%value Atomic mass constant real(kind=dp), public, parameter :: mu_0 = VACUUM_MAG_PERMEABILITY%value vacuum mag. permeability real(kind=dp), public, parameter :: sigma = STEFAN_BOLTZMANN_CONSTANT%value Stefan-Boltzmann constant real(kind=dp), public, parameter :: speed_of_light = SPEED_OF_LIGHT_IN_VACUUM%value Speed of light in vacuum real(kind=dp), public, parameter :: u = ATOMIC_MASS_CONSTANT%value Atomic mass constant","tags":"","loc":"module/stdlib_constants.html"},{"title":"stdlib_linalg_blas_c – Fortran-lang/stdlib","text":"Uses stdlib_linalg_constants stdlib_linalg_blas_aux stdlib_linalg_blas_s Functions public pure function stdlib_cdotc (n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_cdotu (n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) Subroutines public pure subroutine stdlib_caxpy (n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ccopy (n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgerc (m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cgeru (m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_chbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_chemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cher (uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher2 (uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_chpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chpr (uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_chpr2 (uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_crotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine stdlib_cscal (n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_csrot (n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_csscal (n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_cswap (n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_csymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ctbmv (uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctbsv (uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpmv (uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpsv (uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrmv (uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrsv (uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_c.html"},{"title":"stdlib_stringlist_type – Fortran-lang/stdlib","text":"Uses stdlib_string_type stdlib_math Variables Type Visibility Attributes Name Initial type( stringlist_index_type ), public, parameter :: list_head = stringlist_index_type(.true., 1) type( stringlist_index_type ), public, parameter :: list_tail = stringlist_index_type(.false., 1) Interfaces public interface bidx Returns an instance of type 'stringlist_index_type' representing backward index Specifications private pure function backward_index(idx) Returns an instance of type 'stringlist_index_type' representing backward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type ) public interface fidx Returns an instance of type 'stringlist_index_type' representing forward index Specifications private pure function forward_index(idx) Returns an instance of type 'stringlist_index_type' representing forward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type ) public interface operator(//) Concatenates stringlist with the input entity\nReturns a new stringlist Specifications private function append_char(lhs, rhs) Appends character scalar 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( stringlist_type ) private function append_string(lhs, rhs) Appends string 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_char(lhs, rhs) Prepends character scalar 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_string(lhs, rhs) Prepends string 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_stringlist(lhs, rhs) Appends stringlist 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_carray(lhs, rhs) Appends chararray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function append_sarray(lhs, rhs) Appends stringarray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function prepend_carray(lhs, rhs) Prepends chararray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_sarray(lhs, rhs) Prepends stringarray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) public interface operator(/=) Compares stringlist for inequality with the input entity\nReturns a logical Specifications private pure function ineq_stringlist(lhs, rhs) Compares stringlist 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for inequality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for inequality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical public interface operator(==) Compares stringlist for equality with the input entity\nReturns a logical Specifications private pure function eq_stringlist(lhs, rhs) Compares stringlist 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for equality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for equality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical public interface stringlist_type Constructor for stringlist\nReturns an instance of type stringlist_type Specifications private pure function new_stringlist() Constructor with no argument\nReturns a new instance of type stringlist Arguments None Return Value type( stringlist_type ) private pure function new_stringlist_carray(array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: array Return Value type( stringlist_type ) private pure function new_stringlist_sarray(array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: array Return Value type( stringlist_type ) Derived Types type, public :: stringlist_index_type type, public :: stringlist_type Constructor Constructor for stringlist\nReturns an instance of type stringlist_type Specifications private\n\n pure\n function new_stringlist () Constructor with no argument\nReturns a new instance of type stringlist private\n\n pure\n function new_stringlist_carray (array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist private\n\n pure\n function new_stringlist_sarray (array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Type-Bound Procedures procedure, public :: clear => clear_list generic, public :: get => get_string_idx generic, public :: insert_at => insert_at_char_idx, insert_at_string_idx, insert_at_stringlist_idx, insert_at_chararray_idx, insert_at_stringarray_idx procedure, public :: len => length_list","tags":"","loc":"module/stdlib_stringlist_type.html"},{"title":"stdlib_linalg_blas_d – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_c stdlib_linalg_constants stdlib_linalg_blas_aux stdlib_linalg_blas_s Functions public pure function stdlib_dasum (n, dx, incx) DASUM takes the sum of the absolute values. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_ddot (n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_dnrm2 (n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_dsdot (n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_dzasum (n, zx, incx) DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a double precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_dznrm2 (n, x, incx) DZNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDZNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Subroutines public pure subroutine stdlib_daxpy (n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dcopy (n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dger (m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_drot (n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_drotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine stdlib_drotm (n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine stdlib_drotmg (dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine stdlib_dsbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dscal (n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dspr (uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_dspr2 (uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_dswap (n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsyr (uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dtbmv (uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbsv (uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpmv (uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpsv (uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrmv (uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrsv (uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_d.html"},{"title":"stdlib_str2num – Fortran-lang/stdlib","text":"The stdlib_str2num module provides procedures and interfaces for conversion\nof characters to numerical types. Currently supported: integer and real .\n( Specification ) This code was modified from https://github.com/jalvesz/Fortran-String-to-Num by Alves Jose\nAnd was possible thanks to all the discussions in this thread https://fortran-lang.discourse.group/t/faster-string-to-double/ Known precisions limits of current proposal :\nConversion to double precision is exact up to epsilon(0.0_dp)\n example: input : 123456.78901234567890123456789012345678901234567890+2 formatted read : 12345678.90123457 to_num : 12345678.90123457 difference abs : 0.1862645149230957E-08 difference rel : 0.1508742584455759E-13% Conversion to quadruple precision can deviate at about 200*epsilon(0.0_qp)\n example: input : 0.140129846432481707092372958328991613128026194187651577175706828388979108268586060148663818836212158203125E-443 formatted read : 0.140129846432481707092372958328991608E-443 to_num : 0.140129846432481707092372958328996233E-443 difference abs : 0.4625E-475 difference rel : 0.3300E-029% Uses ieee_arithmetic stdlib_kinds Interfaces public interface to_num Conversion of strings to numbers\n( Specification ) private elemental function to_int8(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int8) Output integer(int8) value private elemental function to_int16(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int16) Output integer(int16) value private elemental function to_int32(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int32) Output integer(int32) value private elemental function to_int64(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int64) Output integer(int64) value private elemental function to_sp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=sp) Output real(sp) value private elemental function to_dp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=dp) Output real(dp) value public interface to_num_from_stream Conversion of a stream of values in a string to numbers\n( Specification ) private function to_int8_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int8) Output integer(int8) value private function to_int16_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int16) Output integer(int16) value private function to_int32_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int32) Output integer(int32) value private function to_int64_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int64) Output integer(int64) value private function to_sp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=sp) Output real(sp) value private function to_dp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=dp) Output real(dp) value","tags":"","loc":"module/stdlib_str2num.html"},{"title":"stdlib_codata_type – Fortran-lang/stdlib","text":"Codata constant type\n( Specification ) Uses stdlib_optval stdlib_kinds stdlib_io Interfaces public interface to_real Get the constant value or uncertainty. private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp) private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp) Derived Types type, public :: codata_constant_type Derived type for representing a Codata constant.\n( Specification ) Components Type Visibility Attributes Name Initial character(len=64), public :: name real(kind=dp), public :: uncertainty character(len=32), public :: unit real(kind=dp), public :: value Type-Bound Procedures procedure, public :: print generic, public :: to_real => to_real_sp , to_real_dp procedure, public :: to_real_dp procedure, public :: to_real_sp","tags":"","loc":"module/stdlib_codata_type.html"},{"title":"stdlib_hashmaps – Fortran-lang/stdlib","text":"Public data_types\nValues that parameterize David Chase's empirical SLOT expansion code\nAPI for the chaining_hashmap_type API for the open_hashmap_type Uses stdlib_hashmap_wrappers stdlib_kinds iso_fortran_env Used by Descendants: stdlib_hashmap_chaining stdlib_hashmap_open Variables Type Visibility Attributes Name Initial integer, public, parameter :: alloc_fault = 1 integer, public, parameter :: array_size_error = 2 integer, public, parameter :: default_bits = 6 KIND values used to parameterixe the hash map and its procedures integer, public, parameter :: int_calls = int64 Error codes returned by the hash map procedures integer, public, parameter :: int_depth = int64 Error codes returned by the hash map procedures integer, public, parameter :: int_index = int32 Error codes returned by the hash map procedures integer, public, parameter :: int_probes = int64 Error codes returned by the hash map procedures real, public, parameter :: load_factor = 0.5625 The size of the pools of allocated map entries integer, public, parameter :: max_bits = 30 KIND values used to parameterixe the hash map and its procedures integer, public, parameter :: success = 0 Derived Types type, public, extends( hashmap_type ) :: chaining_hashmap_type Type implementing the chaining_hashmap_type types\n( Specifications ) Finalizations Procedures final :: free_chaining_map Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls procedure, public, non_overridable, pass(map) :: entries procedure, public :: get_all_keys => get_all_chaining_keys procedure, public :: get_other_data => get_other_chaining_data procedure, public :: init => init_chaining_map procedure, public :: key_test => chaining_key_test procedure, public :: loading => chaining_loading procedure, public :: map_entry => map_chain_entry procedure, public, non_overridable, pass(map) :: map_probes procedure, public, non_overridable, pass(map) :: num_slots procedure, public :: rehash => rehash_chaining_map procedure, public :: remove => remove_chaining_entry procedure, public :: set_other_data => set_other_chaining_data procedure, public, non_overridable, pass(map) :: slots_bits procedure, public :: total_depth => total_chaining_depth type, public :: hashmap_type Type implementing an abstract hash map\n( Specifications ) Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls procedure, public, non_overridable, pass(map) :: entries procedure(get_all_keys), public, deferred, pass(map) :: get_all_keys procedure(get_other), public, deferred, pass(map) :: get_other_data procedure(init_map), public, deferred, pass(map) :: init procedure(key_test), public, deferred, pass(map) :: key_test procedure(loading), public, deferred, pass(map) :: loading procedure(map_entry), public, deferred, pass(map) :: map_entry procedure, public, non_overridable, pass(map) :: map_probes procedure, public, non_overridable, pass(map) :: num_slots procedure(rehash_map), public, deferred, pass(map) :: rehash procedure(remove_entry), public, deferred, pass(map) :: remove procedure(set_other), public, deferred, pass(map) :: set_other_data procedure, public, non_overridable, pass(map) :: slots_bits procedure(total_depth), public, deferred, pass(map) :: total_depth type, public, extends( hashmap_type ) :: open_hashmap_type Type implementing an \"open\" hash map Finalizations Procedures final :: free_open_map Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls procedure, public, non_overridable, pass(map) :: entries procedure, public :: get_all_keys => get_all_open_keys procedure, public :: get_other_data => get_other_open_data procedure, public :: init => init_open_map procedure, public :: key_test => open_key_test procedure, public :: loading => open_loading procedure, public :: map_entry => map_open_entry procedure, public, non_overridable, pass(map) :: map_probes procedure, public, non_overridable, pass(map) :: num_slots procedure, public :: rehash => rehash_open_map procedure, public :: remove => remove_open_entry procedure, public :: set_other_data => set_other_open_data procedure, public, non_overridable, pass(map) :: slots_bits procedure, public :: total_depth => total_open_depth","tags":"","loc":"module/stdlib_hashmaps.html"},{"title":"stdlib_linalg_blas_z – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_d stdlib_linalg_constants stdlib_linalg_blas_aux stdlib_linalg_blas_c stdlib_linalg_blas_s Functions public pure function stdlib_zdotc (n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public pure function stdlib_zdotu (n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Subroutines public pure subroutine stdlib_zaxpy (n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zcopy (n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zdrot (n, zx, incx, zy, incy, c, s) Applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_zdscal (n, da, zx, incx) ZDSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgerc (m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgeru (m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zhbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zher (uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2 (uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhpr (uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr2 (uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_zrotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s public pure subroutine stdlib_zscal (n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zswap (n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ztbmv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbsv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpmv (uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpsv (uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrmv (uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrsv (uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_z.html"},{"title":"stdlib_bitsets – Fortran-lang/stdlib","text":"Implements zero based bitsets of size up to huge(0_int32) .\n The current code uses 64 bit integers to store the bits and uses all 64 bits.\n The code assumes two's complement integers, and treats negative integers as\n having the sign bit set.\n( Specification ) Public procedures Uses stdlib_kinds iso_fortran_env stdlib_optval Used by Descendants: stdlib_bitsets_64 stdlib_bitsets_large Variables Type Visibility Attributes Name Initial integer, public, parameter :: alloc_fault = 1 Error flag indicating a memory allocation failure integer, public, parameter :: array_size_invalid_error = 2 Error flag indicating an invalid bits value integer, public, parameter :: char_string_invalid_error = 3 Error flag indicating an invalid character string integer, public, parameter :: char_string_too_large_error = 4 Error flag indicating a too large character string integer, public, parameter :: char_string_too_small_error = 5 Error flag indicating a too small character string integer, public, parameter :: eof_failure = 6 Error flag indicating unexpected End-of-File on a READ integer, public, parameter :: index_invalid_error = 7 Error flag indicating an invalid index integer, public, parameter :: integer_overflow_error = 8 Error flag indicating integer overflow integer, public, parameter :: max_digits = 10 integer(kind=bits_kind), public, parameter :: overflow_bits = 2_bits_kind**30/5 integer, public, parameter :: read_failure = 9 Error flag indicating failure of a READ statement integer, public, parameter :: success = 0 Error flag indicating no errors integer, public, parameter :: write_failure = 10 Error flag indicating a failure on a WRITE statement Interfaces public interface and Sets the bits in set1 to the bitwise and of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_and use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all none if ( none ( set0 ) ) write ( * , * ) 'Second test of AND worked.' call set1 % not () call and ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of AND worked.' end program example_and private elemental module subroutine and_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 public interface and_not Sets the bits in set1 to the bitwise and of the original bits in set1 with the bitwise negation of set2 . The sets must have the same\n number of bits otherwise the result is undefined. ( Specification ) Example program example_and_not use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and_not ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of AND_NOT worked.' call set0 % not () call set1 % not () call and_not ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of AND_NOT worked.' end program example_and_not private elemental module subroutine and_not_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_not_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 public interface assignment(=) Used to define assignment for bitset_large .\n ( Specification ) Example program example_assignment use stdlib_bitsets logical ( int8 ) :: logical1 ( 64 ) = . true . logical ( int32 ), allocatable :: logical2 (:) type ( bitset_64 ) :: set0 , set1 set0 = logical1 if ( set0 % bits () /= 64 ) then error stop procedure // & ' initialization with logical(int8) failed to set' // & ' the right size.' else if ( . not . set0 % all () ) then error stop procedure // ' initialization with' // & ' logical(int8) failed to set the right values.' else write ( * , * ) 'Initialization with logical(int8) succeeded.' end if set1 = set0 if ( set1 == set0 ) & write ( * , * ) 'Initialization by assignment succeeded' logical2 = set1 if ( all ( logical2 ) ) then write ( * , * ) 'Initialization of logical(int32) succeeded.' end if end program example_assignment private pure module subroutine assign_logint16_large(self, logical_vector) Used to define assignment from an array of type logical(int16) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int16), intent(in) :: logical_vector (:) private pure module subroutine assign_logint32_large(self, logical_vector) Used to define assignment from an array of type logical(int32) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int32), intent(in) :: logical_vector (:) private pure module subroutine assign_logint64_large(self, logical_vector) Used to define assignment from an array of type logical(int64) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int64), intent(in) :: logical_vector (:) private pure module subroutine assign_logint8_large(self, logical_vector) Used to define assignment from an array of type logical(int8) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int8), intent(in) :: logical_vector (:) private pure module subroutine logint16_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int16) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int16), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint32_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int32) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int32), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint64_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int64) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int64), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint8_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int8) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int8), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set public interface extract Creates a new bitset, new , from a range, start_pos to stop_pos , in\n bitset old . If start_pos is greater than stop_pos the new bitset is\n empty. If start_pos is less than zero or stop_pos is greater than bits(old)-1 then if status is present it has the value index_invalid_error and new is undefined, otherwise processing stops\n with an informative message.\n ( Specification ) Example program example_extract use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set0 % set ( 100 , 150 ) call extract ( set1 , set0 , 100 , 150 ) if ( set1 % bits () == 51 ) & write ( * , * ) 'SET1 has the proper size.' if ( set1 % all () ) write ( * , * ) 'SET1 has the proper values.' end program example_extract private module subroutine extract_64(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(out) :: new type( bitset_64 ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status private module subroutine extract_large(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: new type( bitset_large ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status public interface operator(/=) Returns .true. if not all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_inequality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 /= set1 . and . set0 /= set2 . and . set1 /= set2 . and . & . not . set0 /= set0 . and . . not . set1 /= set1 . and . . not . & set2 /= set2 ) then write ( * , * ) 'Passed 64 bit inequality tests.' else error stop 'Failed 64 bit inequality tests.' end if end program example_inequality private elemental module function neqv_64(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function neqv_large(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(<) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_lt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 < set1 . and . set1 < set2 . and . set0 < set2 . and . & . not . set0 < set0 . and . . not . set2 < set0 . and . . not . & set2 < set1 ) then write ( * , * ) 'Passed 64 bit less than tests.' else error stop 'Failed 64 bit less than tests.' end if end program example_lt private elemental module function lt_64(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function lt_large(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(<=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_le use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 <= set1 . and . set1 <= set2 . and . set0 <= set2 . and . & set0 <= set0 . and . set1 <= set1 . and . set2 <= set2 . and . & . not . set1 <= set0 . and . . not . set2 <= set0 . and . . not . & set2 <= set1 ) then write ( * , * ) 'Passed 64 bit less than or equal tests.' else error stop 'Failed 64 bit less than or equal tests.' end if end program example_le private elemental module function le_64(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function le_large(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(==) Returns .true. if all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_equality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 == set0 . and . set1 == set1 . and . set2 == set2 . and . & . not . set0 == set1 . and . . not . set0 == set2 . and . . not . & set1 == set2 ) then write ( * , * ) 'Passed 64 bit equality tests.' else error stop 'Failed 64 bit equality tests.' end if end program example_equality private elemental module function eqv_64(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function eqv_large(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(>) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_gt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 > set0 . and . set2 > set1 . and . set2 > set0 . and . & . not . set0 > set0 . and . . not . set0 > set1 . and . . not . & set1 > set2 ) then write ( * , * ) 'Passed 64 bit greater than tests.' else error stop 'Failed 64 bit greater than tests.' end if end program example_gt private elemental module function gt_64(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function gt_large(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(>=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_ge use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 >= set0 . and . set2 >= set1 . and . set2 >= set0 . and . & set0 >= set0 . and . set1 >= set1 . and . set2 >= set2 . and . & . not . set0 >= set1 . and . . not . set0 >= set2 . and . . not . & set1 >= set2 ) then write ( * , * ) 'Passed 64 bit greater than or equals tests.' else error stop 'Failed 64 bit greater than or equals tests.' end if end program example_ge private elemental module function ge_64(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function ge_large(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface or Sets the bits in set1 to the bitwise or of the original bits in set1 and set2 . The sets must have the same number of bits otherwise\n the result is undefined.\n ( Specification ) Example program example_or use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call or ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of OR worked.' call set0 % not () call set1 % not () call or ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of OR worked.' end program example_or private elemental module subroutine or_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine or_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 public interface xor Sets the bits in set1 to the bitwise xor of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_xor use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call xor ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of XOR worked.' call set0 % not () call set1 % not () call xor ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of XOR worked.' end program example_xor private elemental module subroutine xor_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine xor_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 Derived Types type, public, extends( bitset_type ) :: bitset_64 Type for bitsets with no more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_64 procedure, public, pass(self) :: any => any_64 procedure, public, pass(self) :: bit_count => bit_count_64 procedure, public, pass(self) :: bits generic, public :: clear => clear_bit , clear_range procedure, public, pass(self) :: clear_bit => clear_bit_64 procedure, public, pass(self) :: clear_range => clear_range_64 generic, public :: flip => flip_bit , flip_range procedure, public, pass(self) :: flip_bit => flip_bit_64 procedure, public, pass(self) :: flip_range => flip_range_64 procedure, public, pass(self) :: from_string => from_string_64 generic, public :: init => init_zero procedure, public, pass(self) :: init_zero => init_zero_64 procedure, public, pass(self) :: input => input_64 procedure, public, pass(self) :: none => none_64 procedure, public, pass(self) :: not => not_64 procedure, public, pass(self) :: output => output_64 generic, public :: read_bitset => read_bitset_string , read_bitset_unit procedure, public, pass(self) :: read_bitset_string => read_bitset_string_64 procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_64 generic, public :: set => set_bit , set_range procedure, public, pass(self) :: set_bit => set_bit_64 procedure, public, pass(self) :: set_range => set_range_64 procedure, public, pass(self) :: test => test_64 procedure, public, pass(self) :: to_string => to_string_64 procedure, public, pass(self) :: value => value_64 generic, public :: write_bitset => write_bitset_string , write_bitset_unit procedure, public, pass(self) :: write_bitset_string => write_bitset_string_64 procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_64 type, public, extends( bitset_type ) :: bitset_large Type for bitsets with more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_large procedure, public, pass(self) :: any => any_large procedure, public, pass(self) :: bit_count => bit_count_large procedure, public, pass(self) :: bits generic, public :: clear => clear_bit , clear_range procedure, public, pass(self) :: clear_bit => clear_bit_large procedure, public, pass(self) :: clear_range => clear_range_large generic, public :: flip => flip_bit , flip_range procedure, public, pass(self) :: flip_bit => flip_bit_large procedure, public, pass(self) :: flip_range => flip_range_large procedure, public, pass(self) :: from_string => from_string_large generic, public :: init => init_zero procedure, public, pass(self) :: init_zero => init_zero_large procedure, public, pass(self) :: input => input_large procedure, public, pass(self) :: none => none_large procedure, public, pass(self) :: not => not_large procedure, public, pass(self) :: output => output_large generic, public :: read_bitset => read_bitset_string , read_bitset_unit procedure, public, pass(self) :: read_bitset_string => read_bitset_string_large procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_large generic, public :: set => set_bit , set_range procedure, public, pass(self) :: set_bit => set_bit_large procedure, public, pass(self) :: set_range => set_range_large procedure, public, pass(self) :: test => test_large procedure, public, pass(self) :: to_string => to_string_large procedure, public, pass(self) :: value => value_large generic, public :: write_bitset => write_bitset_string , write_bitset_unit procedure, public, pass(self) :: write_bitset_string => write_bitset_string_large procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_large type, public :: bitset_type Parent type for bitset_64 and bitset_large ( Specification ) Type-Bound Procedures procedure(all_abstract), public, deferred, pass(self) :: all procedure(any_abstract), public, deferred, pass(self) :: any procedure(bit_count_abstract), public, deferred, pass(self) :: bit_count procedure, public, pass(self) :: bits generic, public :: clear => clear_bit , clear_range procedure(clear_bit_abstract), public, deferred, pass(self) :: clear_bit procedure(clear_range_abstract), public, deferred, pass(self) :: clear_range generic, public :: flip => flip_bit , flip_range procedure(flip_bit_abstract), public, deferred, pass(self) :: flip_bit procedure(flip_range_abstract), public, deferred, pass(self) :: flip_range procedure(from_string_abstract), public, deferred, pass(self) :: from_string generic, public :: init => init_zero procedure(init_zero_abstract), public, deferred, pass(self) :: init_zero procedure(input_abstract), public, deferred, pass(self) :: input procedure(none_abstract), public, deferred, pass(self) :: none procedure(not_abstract), public, deferred, pass(self) :: not procedure(output_abstract), public, deferred, pass(self) :: output generic, public :: read_bitset => read_bitset_string , read_bitset_unit procedure(read_bitset_string_abstract), public, deferred, pass(self) :: read_bitset_string procedure(read_bitset_unit_abstract), public, deferred, pass(self) :: read_bitset_unit generic, public :: set => set_bit , set_range procedure(set_bit_abstract), public, deferred, pass(self) :: set_bit procedure(set_range_abstract), public, deferred, pass(self) :: set_range procedure(test_abstract), public, deferred, pass(self) :: test procedure(to_string_abstract), public, deferred, pass(self) :: to_string procedure(value_abstract), public, deferred, pass(self) :: value generic, public :: write_bitset => write_bitset_string , write_bitset_unit procedure(write_bitset_string_abstract), public, deferred, pass(self) :: write_bitset_string procedure(write_bitset_unit_abstract), public, deferred, pass(self) :: write_bitset_unit Functions public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) Subroutines public module subroutine error_handler (message, error, status, module, procedure) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: message integer, intent(in) :: error integer, intent(out), optional :: status character(len=*), intent(in), optional :: module character(len=*), intent(in), optional :: procedure","tags":"","loc":"module/stdlib_bitsets.html"},{"title":"stdlib_error – Fortran-lang/stdlib","text":"Provides support for catching and handling errors\n( Specification ) Uses iso_fortran_env stdlib_optval Used by Descendants: f08estop f18estop Interfaces interface public module subroutine error_stop(msg, code) Provides a call to error stop and allows the user to specify a code and message\n( Specification ) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: msg integer, intent(in), optional :: code Subroutines public subroutine check (condition, msg, code, warn) License Version experimental Checks the value of a logical condition\n ( Specification ) Read more… Arguments Type Intent Optional Attributes Name logical, intent(in) :: condition character(len=*), intent(in), optional :: msg integer, intent(in), optional :: code logical, intent(in), optional :: warn","tags":"","loc":"module/stdlib_error.html"},{"title":"stdlib_stats – Fortran-lang/stdlib","text":"Provides support for various statistical methods. This includes currently\ndescriptive statistics\n( Specification ) Uses stdlib_kinds Used by Descendants: stdlib_stats_cov stdlib_stats_mean stdlib_stats_median stdlib_stats_moment stdlib_stats_moment_all stdlib_stats_moment_mask stdlib_stats_moment_scalar stdlib_stats_var stdlib_stats_corr Interfaces public interface corr Pearson correlation of array elements\n( Specification ) private module function corr_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface cov Covariance of array elements\n( Specification ) private module function cov_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface mean Mean of array elements\n( Specification ) private module function mean_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function mean_mask_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function mean_mask_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function mean_mask_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function mean_mask_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function mean_mask_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) public interface median Median of array elements\n( Specification ) private module function median_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_mask_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_all_mask_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function median_all_mask_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function median_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface moment Central moment of array elements\n( Specification ) private module function moment_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_mask_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function moment_mask_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function moment_mask_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function moment_mask_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function moment_mask_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function moment_mask_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function moment_mask_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface var Variance of array elements\n( Specification ) private module function var_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp)","tags":"","loc":"module/stdlib_stats.html"},{"title":"stdlib_linalg_state – Fortran-lang/stdlib","text":"Provides a state/error handling derived type for advanced error handling of\nBLAS/LAPACK based linear algebra procedures. All procedures are pure.\n( Specification )\nVersion: experimental A fixed-storage state variable for error handling of linear algebra routines Version: experimental Error state handling: if the user requested the error state variable on\noutput, just return it to the user. Otherwise, halt the program on error. Version: experimental Interfaces for comparison operators of error states with integer flags Uses stdlib_kinds stdlib_linalg_constants stdlib_io Variables Type Visibility Attributes Name Initial integer(kind=ilp), public, parameter :: LINALG_ERROR = -2_ilp integer(kind=ilp), public, parameter :: LINALG_INTERNAL_ERROR = -3_ilp integer(kind=ilp), public, parameter :: LINALG_SUCCESS = 0_ilp State return types integer(kind=ilp), public, parameter :: LINALG_VALUE_ERROR = -1_ilp Interfaces public interface linalg_state_type private pure function new_state(where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: where_at Location integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) private pure function new_state_nowhere(flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) result(new_state) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) public interface operator(/=) private elemental function state_neq_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_neq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(<) private elemental function state_lt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_lt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(<=) private elemental function state_le_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_le_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(==) Comparison operators private elemental function state_eq_flag(err, flag) Compare an error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_eq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(>) private elemental function state_gt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_gt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(>=) private elemental function state_ge_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_ge_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) Derived Types type, public :: linalg_state_type linalg_state_type defines a state return type for a\nlinear algebra routine. State contains a status flag, a comment, and a\nprocedure specifier that can be used to mark where the error happened Components Type Visibility Attributes Name Initial character(len=MSG_LENGTH), public :: message = repeat(' ', MSG_LENGTH) Message associated to the current state integer(kind=ilp), public :: state = LINALG_SUCCESS The current exit state character(len=NAME_LENGTH), public :: where_at = repeat(' ', NAME_LENGTH) Location of the state change Constructor private\n\n pure\n function new_state (where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location private\n\n pure\n function new_state_nowhere (flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Type-Bound Procedures procedure, public :: destroy => state_destroy ../../ Cleanup procedure, public :: error => state_is_error procedure, public :: ok => state_is_ok ../../ State properties procedure, public :: print => state_print ../../ Print error message procedure, public :: print_msg => state_message Subroutines public pure subroutine linalg_error_handling (ierr, ierr_out) Flow control: on output flag present, return it; otherwise, halt on error Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: ierr type( linalg_state_type ), intent(out), optional :: ierr_out","tags":"","loc":"module/stdlib_linalg_state.html"},{"title":"stdlib_linalg_blas_aux – Fortran-lang/stdlib","text":"Uses stdlib_linalg_constants Functions public pure function stdlib_dcabs1 (z) DCABS1 computes |Re(.)| + |Im(.)| of a double complex number Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public pure function stdlib_icamax (n, cx, incx) ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_idamax (n, dx, incx) IDAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_isamax (n, sx, incx) ISAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_izamax (n, zx, incx) IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_lsame (ca, cb) LSAME returns .TRUE. if CA is the same letter as CB regardless of\ncase. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: ca character(len=1), intent(in) :: cb Return Value logical(kind=lk) public pure function stdlib_scabs1 (z) SCABS1 computes |Re(.)| + |Im(.)| of a complex number Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) Subroutines public pure subroutine stdlib_xerbla (srname, info) XERBLA is an error handler for the LAPACK routines.\nIt is called by an LAPACK routine if an input parameter has an\ninvalid value. A message is printed and execution stops.\nInstallers may consider modifying the STOP statement in order to\ncall system-specific exception-handling facilities. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: srname integer(kind=ilp), intent(in) :: info public pure subroutine stdlib_xerbla_array (srname_array, srname_len, info) XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK\nand BLAS error handler. Rather than taking a Fortran string argument\nas the function's name, XERBLA_ARRAY takes an array of single\ncharacters along with the array's length. XERBLA_ARRAY then copies\nup to 32 characters of that array into a Fortran string and passes\nthat to XERBLA. If called with a non-positive SRNAME_LEN,\nXERBLA_ARRAY will call XERBLA with a string of all blank characters.\nSay some macro or other device makes XERBLA_ARRAY available to C99\nby a name lapack_xerbla and with a common Fortran calling convention.\nThen a C99 program could invoke XERBLA via:\n{\nint flen = strlen( func );\nlapack_xerbla( func ,\n}\nProviding XERBLA_ARRAY is not necessary for intercepting LAPACK\nerrors. XERBLA_ARRAY calls XERBLA. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: srname_array (srname_len) integer(kind=ilp), intent(in) :: srname_len integer(kind=ilp), intent(in) :: info","tags":"","loc":"module/stdlib_linalg_blas_aux.html"},{"title":"stdlib_kinds – Fortran-lang/stdlib","text":"The specification of this module is available here . Uses iso_fortran_env iso_c_binding Variables Type Visibility Attributes Name Initial integer, public, parameter :: dp = selected_real_kind(15) Double precision real numbers integer, public, parameter :: lk = kind(.true.) Default logical kind parameter integer, public, parameter :: qp = -1 Quadruple precision real numbers integer, public, parameter :: sp = selected_real_kind(6) Single precision real numbers integer, public, parameter :: xdp = -1 Extended double precision real numbers","tags":"","loc":"module/stdlib_kinds.html"},{"title":"stdlib_io_npy – Fortran-lang/stdlib","text":"Description of the npy format taken from\n https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html Format Version 1.0 The first 6 bytes are a magic string: exactly \\x93NUMPY. The next 1 byte is an unsigned byte:\n the major version number of the file format, e.g. \\x01. The next 1 byte is an unsigned byte:\n the minor version number of the file format, e.g. \\x00.\n Note: the version of the file format is not tied to the version of the numpy package. The next 2 bytes form a little-endian unsigned short int:\n the length of the header data HEADER_LEN. The next HEADER_LEN bytes form the header data describing the array’s format.\n It is an ASCII string which contains a Python literal expression of a dictionary.\n It is terminated by a newline (\\n) and padded with spaces (\\x20) to make the total\n of len(magic string) + 2 + len(length) + HEADER_LEN be evenly divisible by 64 for\n alignment purposes. The dictionary contains three keys: “descr”: dtype.descr\n An object that can be passed as an argument to the numpy.dtype constructor\n to create the array’s dtype. “fortran_order”: bool\n Whether the array data is Fortran-contiguous or not. Since Fortran-contiguous\n arrays are a common form of non-C-contiguity, we allow them to be written directly\n to disk for efficiency. “shape”: tuple of int\n The shape of the array. For repeatability and readability, the dictionary keys are sorted in alphabetic order.\n This is for convenience only. A writer SHOULD implement this if possible. A reader MUST\n NOT depend on this. Following the header comes the array data. If the dtype contains Python objects\n (i.e. dtype.hasobject is True), then the data is a Python pickle of the array.\n Otherwise the data is the contiguous (either C- or Fortran-, depending on fortran_order)\n bytes of the array. Consumers can figure out the number of bytes by multiplying the\n number of elements given by the shape (noting that shape=() means there is 1 element)\n by dtype.itemsize. Format Version 2.0 The version 1.0 format only allowed the array header to have a total size of 65535 bytes.\n This can be exceeded by structured arrays with a large number of columns.\n The version 2.0 format extends the header size to 4 GiB. numpy.save will automatically\n save in 2.0 format if the data requires it, else it will always use the more compatible\n 1.0 format. The description of the fourth element of the header therefore has become:\n “The next 4 bytes form a little-endian unsigned int: the length of the header data\n HEADER_LEN.” Format Version 3.0 This version replaces the ASCII string (which in practice was latin1) with a\n utf8-encoded string, so supports structured types with any unicode field names. Uses stdlib_kinds Used by Descendants: stdlib_io_npy_load stdlib_io_npy_save Interfaces public interface load_npy Load multidimensional array in npy format\n( Specification ) private module subroutine load_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg public interface save_npy Save multidimensional array in npy format\n( Specification ) private module subroutine save_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg","tags":"","loc":"module/stdlib_io_npy.html"},{"title":"stdlib_random – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_kinds stdlib_optval Interfaces public interface dist_rand Version experimental Generation of random integers with different kinds\n( Specification ) private function dist_rand_iint8(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value integer(kind=int8) private function dist_rand_iint16(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value integer(kind=int16) private function dist_rand_iint32(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value integer(kind=int32) private function dist_rand_iint64(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value integer(kind=int64) public interface random_seed Version experimental Set seed value for random number generator\n( Specification ) private subroutine random_distribution_seed_iint8(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: put integer(kind=int8), intent(out) :: get private subroutine random_distribution_seed_iint16(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: put integer(kind=int16), intent(out) :: get private subroutine random_distribution_seed_iint32(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: put integer(kind=int32), intent(out) :: get private subroutine random_distribution_seed_iint64(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: put integer(kind=int64), intent(out) :: get","tags":"","loc":"module/stdlib_random.html"},{"title":"stdlib_hash_32bit – Fortran-lang/stdlib","text":"Uses stdlib_kinds iso_fortran_env Used by Descendants: stdlib_hash_32bit_fnv stdlib_hash_32bit_nm stdlib_hash_32bit_water Variables Type Visibility Attributes Name Initial integer, public, parameter :: int_hash = int32 The number of bits in the output hash logical, public, parameter :: little_endian = (1==transfer([1_int8, 0_int8], 0_int16)) Interfaces public interface fnv_1_hash FNV_1 interfaces\n( Specification ) private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) private elemental module function character_fnv_1a(key) result(hash_value) FNV_1A hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) public interface new_nmhash32_seed ( Specification private module subroutine new_nmhash32_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed public interface new_nmhash32x_seed ( Specification ) private module subroutine new_nmhash32x_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed public interface new_water_hash_seed ( Specification ) private module subroutine new_water_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed public interface nmhash32 NMHASH32 interfaces\n( Specification ) private elemental module function character_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) public interface nmhash32x NMHASH32X interfaces\n( Specification ) private elemental module function character_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) public interface water_hash WATER_HASH interfaces\n( Specification ) private elemental module function character_water_hash(key, seed) result(hash_code) WATER hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int16_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int32_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int64_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int8_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) Functions public elemental function fibonacci_hash (key, nbits) result(sample) License Version experimental Maps the 32 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int32) public elemental function universal_mult_hash (key, seed, nbits) result(sample) License Version experimental Uses the \"random\" odd 32 bit integer seed to map the 32 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer(kind=int32), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int32) Subroutines public subroutine odd_random_integer (harvest) License Version experimental Returns a 32 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the int32 kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(out) :: harvest","tags":"","loc":"module/stdlib_hash_32bit.html"},{"title":"stdlib_quadrature – Fortran-lang/stdlib","text":"( Specification ) Uses stdlib_kinds Used by Descendants: stdlib_quadrature_gauss stdlib_quadrature_simps stdlib_quadrature_trapz Interfaces public interface gauss_legendre Computes Gauss-Legendre quadrature nodes and weights. private pure module subroutine gauss_legendre_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2) public interface gauss_legendre_lobatto Computes Gauss-Legendre-Lobatto quadrature nodes and weights. private pure module subroutine gauss_legendre_lobatto_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2) public interface simps Integrates sampled values using Simpson's rule\n( Specification ) private pure recursive module function simps_dx_dp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=dp) private pure recursive module function simps_dx_sp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=sp) private recursive module function simps_x_dp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp) private recursive module function simps_x_sp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp) public interface simps_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) private pure recursive module function simps_weights_dp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp), dimension(size(x)) private pure recursive module function simps_weights_sp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp), dimension(size(x)) public interface trapz Integrates sampled values using trapezoidal rule\n( Specification ) private pure module function trapz_dx_dp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx Return Value real(kind=dp) private pure module function trapz_dx_sp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx Return Value real(kind=sp) private module function trapz_x_dp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp) private module function trapz_x_sp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp) public interface trapz_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) private pure module function trapz_weights_dp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp), dimension(size(x)) private pure module function trapz_weights_sp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp), dimension(size(x))","tags":"","loc":"module/stdlib_quadrature.html"},{"title":"stdlib_hashmap_wrappers – Fortran-lang/stdlib","text":"Public procedures\nPublic types\nPublic integers Uses stdlib_hash_32bit stdlib_kinds iso_fortran_env Interfaces public interface get private subroutine get_char_key(key, value) Gets the contents of the key as a CHARACTER string\nArguments:\n key - the input key\n value - the contents of key mapped to a CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key character(len=:), intent(out), allocatable :: value private subroutine get_int8_key(key, value) Gets the contents of the key as an INTEGER(INT8) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int8), intent(out), allocatable :: value (:) private pure subroutine get_int32_key(key, value) Gets the contents of the key as an INTEGER(INT32) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int32), intent(out), allocatable :: value (:) private subroutine get_other(other, value) Gets the contents of the other as a CLASS( ) string\nArguments:\n other - the input other data\n value - the contents of other mapped to a CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other class(*), intent(out), allocatable :: value public interface operator(==) private function equal_keys(key1, key2) result(test) Compares two keys for equality\n( Specifications ) Arguments:\n key1 - the first key\n key2 - the second key Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key1 type( key_type ), intent(in) :: key2 Return Value logical public interface set private subroutine set_char_key(key, value) Sets the contents of the key from a CHARACTER string\nArguments:\n key - the output key\n value - the input CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key character(len=*), intent(in) :: value private subroutine set_int8_key(key, value) Sets the contents of the key from an INTEGER(INT8) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int8), intent(in) :: value (:) private pure subroutine set_int32_key(key, value) Sets the contents of the key from an INTEGER(INT32) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int32), intent(in) :: value (:) private subroutine set_other(other, value) Sets the contents of the other data from a CLASS( ) variable\nArguments:\n other - the output other data\n value - the input CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(out) :: other class(*), intent(in) :: value Abstract Interfaces abstract interface Abstract interface to a 64 bit hash function operating on a KEY_TYPE public pure function hasher_fun(key) result(hash_value) Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Derived Types type, public :: key_type A wrapper type for the key's true type Components Type Visibility Attributes Name Initial integer(kind=int8), public, allocatable :: value (:) type, public :: other_type A wrapper type for the other data's true type Components Type Visibility Attributes Name Initial class(*), public, allocatable :: value Functions public pure function fnv_1_hasher (key) License Version Experimental Hashes a key with the FNV_1 algorithm\nArguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function fnv_1a_hasher (key) License Version Experimental Hashes a key with the FNV_1a algorithm\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function seeded_nmhash32_hasher (key) License Version Experimental Hashes a key with the NMHASH32 hash algorithm\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function seeded_nmhash32x_hasher (key) License Version Experimental Hashes a key with the NMHASH32X hash algorithm\n( Specifications )\nArguments:\n key - the key to be hashed\n seed - the seed (unused) for the hashing algorithm Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function seeded_water_hasher (key) License Version Experimental Hashes a key with the waterhash algorithm\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Subroutines public pure subroutine copy_key (old_key, new_key) License Version Experimental Copies the contents of the key, old_key, to the key, new_key\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: old_key type( key_type ), intent(out) :: new_key public subroutine copy_other (other_in, other_out) License Version Experimental Copies the other data, other_in, to the variable, other_out\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other_in type( other_type ), intent(out) :: other_out public subroutine free_key (key) License Version Experimental Frees the memory in a key\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(inout) :: key public subroutine free_other (other) License Version Experimental Frees the memory in the other data\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( other_type ), intent(inout) :: other","tags":"","loc":"module/stdlib_hashmap_wrappers.html"},{"title":"stdlib_strings – Fortran-lang/stdlib","text":"This module implements basic string handling routines. The specification of this module is available here . Uses stdlib_ascii stdlib_string_type stdlib_kinds stdlib_optval Used by Descendants: stdlib_strings_to_string Interfaces public interface chomp Remove trailing characters in set from string.\nIf no character set is provided trailing whitespace is removed. Version: experimental private pure function chomp_string(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function chomp_char(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable private pure function chomp_set_string_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value type( string_type ) private pure function chomp_set_char_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value character(len=:), allocatable private pure function chomp_substring_string_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value character(len=:), allocatable private pure function chomp_substring_string_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value character(len=:), allocatable public interface count Returns the number of times substring 'pattern' has appeared in the\ninput string 'string' Specifications private elemental function count_string_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_string_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer public interface ends_with Check whether a string ends with substring or not Version: experimental private elemental function ends_with_string_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function ends_with_string_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function ends_with_char_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function ends_with_char_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical public interface find Finds the starting index of substring 'pattern' in the input 'string' Specifications Version: experimental private elemental function find_string_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_string_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer public interface padl Left pad the input string Specifications private pure function padl_string_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padl_string_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padl_char_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padl_char_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max) public interface padr Right pad the input string Specifications private pure function padr_string_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padr_string_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padr_char_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padr_char_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max) public interface replace_all Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nVersion: experimental private pure function replace_all_string_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_string_char_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_char(string, pattern, replacement) result(res) Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable public interface slice Extracts characters from the input string to return a new string Version: experimental private elemental function slice_string(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value type( string_type ) private pure function slice_char(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value character(len=:), allocatable public interface starts_with Check whether a string starts with substring or not Version: experimental private elemental function starts_with_string_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function starts_with_string_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function starts_with_char_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function starts_with_char_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical public interface strip Remove leading and trailing whitespace characters. Version: experimental private pure function strip_string(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function strip_char(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable public interface to_string Format or transfer other types as a string.\n( Specification ) private pure module function to_string_1_i_int16(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int32(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int64(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int8(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_l_lk(value) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value Return Value character(len=1) private pure module function to_string_2_i_int16(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int32(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int64(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int8(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_l_lk(value, format) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_c_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_c_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable public interface zfill Left pad the input string with zeros. Specifications private pure function zfill_string(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function zfill_char(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max)","tags":"","loc":"module/stdlib_strings.html"},{"title":"stdlib_specialfunctions – Fortran-lang/stdlib","text":"Uses stdlib_kinds Used by Descendants: stdlib_specialfunctions_legendre Interfaces public interface dlegendre First derivative Legendre polynomial private pure elemental module function dlegendre_fp64(n, x) result(dleg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface legendre Legendre polynomial private pure elemental module function legendre_fp64(n, x) result(leg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"module/stdlib_specialfunctions.html"},{"title":"stdlib_linalg_blas – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_d stdlib_linalg_constants stdlib_linalg_blas_aux stdlib_linalg_blas_c stdlib_linalg_blas_z stdlib_linalg_blas_s Interfaces public interface axpy AXPY constant times a vector plus a vector. public pure subroutine caxpy(n, ca, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine daxpy(n, da, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine saxpy(n, sa, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zaxpy(n, za, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_caxpy (n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_daxpy (n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_saxpy (n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zaxpy (n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public interface copy COPY copies a vector x to a vector y. public pure subroutine ccopy(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dcopy(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine scopy(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zcopy(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ccopy (n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dcopy (n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_scopy (n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zcopy (n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy public interface dot DOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. public pure function ddot(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function sdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public pure function stdlib_ddot (n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_sdot (n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public interface dotc DOTC forms the dot product of two complex vectors\nDOTC = X^H * Y public pure function cdotc(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotc(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public pure function stdlib_cdotc (n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotc (n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public interface dotu DOTU forms the dot product of two complex vectors\nDOTU = X^T * Y public pure function cdotu(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotu(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public pure function stdlib_cdotu (n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotu (n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public interface gbmv GBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. public pure subroutine cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface gemm GEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. public pure subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_sgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface gemv GEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. public pure subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface ger GER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. public pure subroutine dger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine sger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dger (m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_sger (m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface gerc GERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. public pure subroutine cgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cgerc (m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgerc (m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface geru GERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. public pure subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cgeru (m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgeru (m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface hbmv HBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. public pure subroutine chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface hemm HEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. public pure subroutine chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_chemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface hemv HEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. public pure subroutine chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface her HER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. public pure subroutine cher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher (uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher (uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface her2 HER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. public pure subroutine cher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher2 (uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2 (uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface her2k HER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. public pure subroutine cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface herk HERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. public pure subroutine cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface hpmv HPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. public pure subroutine chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface hpr HPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. public pure subroutine chpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_chpr (uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr (uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) public interface hpr2 HPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. public pure subroutine chpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_chpr2 (uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr2 (uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) public interface nrm2 NRM2 returns the euclidean norm of a vector via the function\nname, so that\nNRM2 := sqrt( x'*x ) public pure function dnrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function snrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_dnrm2 (n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_snrm2 (n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public interface rot ROT applies a plane rotation. public pure subroutine drot(n, dx, incx, dy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine srot(n, sx, incx, sy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_drot (n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_srot (n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public interface rotg The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. public pure subroutine crotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine drotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine srotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine zrotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s public pure subroutine stdlib_crotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine stdlib_drotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine stdlib_srotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine stdlib_zrotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s public interface rotm ROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See ROTMG for a description of data storage in DPARAM. public pure subroutine drotm(n, dx, incx, dy, incy, dparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine srotm(n, sx, incx, sy, incy, sparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) public pure subroutine stdlib_drotm (n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine stdlib_srotm (n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) public interface rotmg ROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. public pure subroutine drotmg(dd1, dd2, dx1, dy1, dparam) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine srotmg(sd1, sd2, sx1, sy1, sparam) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) public pure subroutine stdlib_drotmg (dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine stdlib_srotmg (sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) public interface sbmv SBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. public pure subroutine dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface scal SCAL scales a vector by a constant. public pure subroutine cscal(n, ca, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dscal(n, da, dx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine sscal(n, sa, sx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine zscal(n, za, zx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_cscal (n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dscal (n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_sscal (n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zscal (n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public interface sdot Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. public pure function dsdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_dsdot (n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public interface spmv SPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. public pure subroutine dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface spr SPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. public pure subroutine dspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_dspr (uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr (uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) public interface spr2 SPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. public pure subroutine dspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_dspr2 (uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr2 (uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) public interface srot SROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. public pure subroutine csrot(n, cx, incx, cy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_csrot (n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public interface sscal SSCAL scales a complex vector by a real constant. public pure subroutine csscal(n, sa, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_csscal (n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public interface swap SWAP interchanges two vectors. public pure subroutine cswap(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dswap(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sswap(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zswap(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cswap (n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dswap (n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sswap (n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zswap (n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public interface symm SYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. public pure subroutine csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface symv SYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. public pure subroutine dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface syr SYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. public pure subroutine dsyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr (uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr (uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface syr2 SYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. public pure subroutine dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface syr2k SYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. public pure subroutine csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface syrk SYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. public pure subroutine csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface tbmv TBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. public pure subroutine ctbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctbmv (uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbmv (uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbmv (uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbmv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface tbsv TBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. public pure subroutine ctbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctbsv (uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbsv (uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbsv (uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbsv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface tpmv TPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. public pure subroutine ctpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpmv (uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpmv (uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpmv (uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpmv (uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface tpsv TPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. public pure subroutine ctpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpsv (uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpsv (uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpsv (uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpsv (uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface trmm TRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. public pure subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public interface trmv TRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. public pure subroutine ctrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrmv (uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrmv (uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strmv (uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrmv (uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface trsm TRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. public pure subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public interface trsv TRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. public pure subroutine ctrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrsv (uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrsv (uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strsv (uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrsv (uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas.html"},{"title":"stdlib_stats_distribution_uniform – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_kinds stdlib_random Interfaces public interface cdf_uniform Get uniform distribution cumulative distribution function (cdf) for integer,\nreal and complex variables.\n( Specification ) private elemental function cdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function cdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function cdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function cdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function cdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface pdf_uniform Get uniform distribution probability density (pdf) for integer, real and\ncomplex variables.\n( Specification ) private elemental function pdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function pdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function pdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function pdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function pdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface rvs_uniform Get uniformly distributed random variate for integer, real and complex\nvariables.\n( Specification ) private impure elemental function rvs_unif_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_unif_1_iint8(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_1_iint16(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_1_iint32(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_1_iint64(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_1_rsp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_1_rdp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_1_csp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_1_cdp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure elemental function rvs_unif_iint8(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_iint16(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_iint32(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_iint64(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private function rvs_unif_array_iint8(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int8), (array_size) private function rvs_unif_array_iint16(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int16), (array_size) private function rvs_unif_array_iint32(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int32), (array_size) private function rvs_unif_array_iint64(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int64), (array_size) private function rvs_unif_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private function rvs_unif_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private function rvs_unif_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private function rvs_unif_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size) public interface shuffle Fisher-Yates shuffle algorithm for a rank one array of integer, real and\ncomplex variables.\n( Specification ) private function shuffle_iint8(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: list (:) Return Value integer(kind=int8), (size(list)) private function shuffle_iint16(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: list (:) Return Value integer(kind=int16), (size(list)) private function shuffle_iint32(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: list (:) Return Value integer(kind=int32), (size(list)) private function shuffle_iint64(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: list (:) Return Value integer(kind=int64), (size(list)) private function shuffle_rsp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: list (:) Return Value real(kind=sp), (size(list)) private function shuffle_rdp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: list (:) Return Value real(kind=dp), (size(list)) private function shuffle_csp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: list (:) Return Value complex(kind=sp), (size(list)) private function shuffle_cdp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: list (:) Return Value complex(kind=dp), (size(list))","tags":"","loc":"module/stdlib_stats_distribution_uniform.html"},{"title":"stdlib_hash_64bit – Fortran-lang/stdlib","text":"Uses stdlib_kinds iso_fortran_env Used by Descendants: stdlib_hash_64bit_fnv stdlib_hash_64bit_pengy stdlib_hash_64bit_spookyv2 Variables Type Visibility Attributes Name Initial integer, public, parameter :: bits_char = character_storage_size integer, public, parameter :: bits_int16 = bit_size(0_int16) integer, public, parameter :: bits_int32 = bit_size(0_int32) integer, public, parameter :: bits_int64 = bit_size(0_int64) integer, public, parameter :: bits_int8 = bit_size(0_int8) integer, public, parameter :: bytes_char = bits_char/bits_int8 integer, public, parameter :: bytes_int16 = bits_int16/bits_int8 integer, public, parameter :: bytes_int32 = bits_int32/bits_int8 integer, public, parameter :: bytes_int64 = bits_int64/bits_int8 integer, public, parameter :: bytes_int8 = bits_int8/bits_int8 integer, public, parameter :: int_hash = int64 The number of bits in the output hash logical, public, parameter :: little_endian = (1==transfer([1_int8, 0_int8], 0_int16)) Interfaces public interface fnv_1_hash FNV_1 interfaces\n( Specification ) private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) private elemental module function character_fnv_1a(key) result(hash_code) FNV_1A hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) interface public module subroutine new_pengy_hash_seed(seed) Random seed generator for MIR_HASH_STRICT Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed interface public module subroutine new_spooky_hash_seed(seed) Random seed generator for SPOOKY_HASH Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed (2) public interface pengy_hash PENGY_HASH interfaces\n( Specification ) private elemental module function character_pengy_hash(key, seed) result(hash_code) MIR HASH STRICT function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int16_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int32_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int64_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int8_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) interface public module subroutine spookyHash_128(key, hash_inout) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), target :: key (0:) integer(kind=int_hash), intent(inout) :: hash_inout (2) public interface spooky_hash SPOOKY_HASH interfaces\n( Specification ) private module function character_spooky_hash(key, seed) result(hash_code) SPOOKY hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int16_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int32_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int64_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int8_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) Functions public elemental function fibonacci_hash (key, nbits) result(sample) License Version experimental Maps the 64 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 64\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int64) public elemental function universal_mult_hash (key, seed, nbits) result(sample) License Version experimental Uses the \"random\" odd 64 bit integer seed to map the 64 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 64.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer(kind=int64), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int64) Subroutines public subroutine odd_random_integer (harvest) License Version experimental Returns a 64 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the 64 bit kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(out) :: harvest","tags":"","loc":"module/stdlib_hash_64bit.html"},{"title":"stdlib_sorting – Fortran-lang/stdlib","text":"This module implements overloaded sorting subroutines named ORD_SORT , SORT_INDEX , and SORT , that each can be used to sort four kinds\n of INTEGER arrays, three kinds of REAL arrays, character(len=*) arrays,\n and arrays of type(string_type) .\n ( Specification ) By default sorting is in order of \n increasing value, but there is an option to sort in decreasing order. \n All the subroutines have worst case run time performance of O(N Ln(N)) , \n but on largely sorted data ORD_SORT and SORT_INDEX can have a run time \n performance of O(N) . ORD_SORT is a translation of the \"Rust\" sort sorting algorithm in slice.rs :\n https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs\n which in turn is inspired by the timsort algorithm of Tim Peters,\n http://svn.python.org/projects/python/trunk/Objects/listsort.txt. ORD_SORT is a hybrid stable comparison algorithm combining merge sort ,\n and insertion sort . It is always at worst O(N Ln(N)) in sorting random\n data, having a performance about 25% slower than SORT on such\n data, but has much better performance than SORT on partially\n sorted data, having O(N) performance on uniformly non-increasing or\n non-decreasing data. SORT_INDEX is a modification of ORD_SORT so that in addition to\n sorting the input array, it returns the indices that map to a\n stable sort of the original array. These indices are\n intended to be used to sort data that is correlated with the input\n array, e.g., different arrays in a database, different columns of a\n rank 2 array, different elements of a derived type. It is less\n efficient than ORD_SORT at sorting a simple array. SORT uses the INTROSORT sorting algorithm of David Musser,\n http://www.cs.rpi.edu/~musser/gp/introsort.ps. introsort is a hybrid\n unstable comparison algorithm combining quicksort , insertion sort , and heap sort . While this algorithm is always O(N Ln(N)) it is relatively\n fast on randomly ordered data, but inconsistent in performance on partly\n sorted data, sometimes having merge sort performance, sometimes having\n better than quicksort performance. UNORD_SOORT is about 25%\n more efficient than ORD_SORT at sorting purely random data, but af an\n order of Ln(N) less efficient at sorting partially sorted data. Version: experimental The generic subroutine implementing the ORD_SORT algorithm to return\n an input array with its elements sorted in order of (non-)decreasing\n value. Its use has the syntax: call ord_sort( array[, work, reverse] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) , real(real128) , character(*) , type(string_type) , type(bitset_64) , type(bitset_large) . If both the \n type of array is real and at least one of the elements is a NaN , then the ordering of the result is undefined. Otherwise it \n is defined to be the original elements in non-decreasing order. work (optional): shall be a rank 1 array of the same type as array , and shall have at least size(array)/2 elements. It is an intent(out) argument to be used as \"scratch\" memory\n for internal record keeping. If associated with an array in static\n storage, its use can significantly reduce the stack memory requirements\n for the code. Its value on return is undefined. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in stable\n order. Otherwise index will sort array in order of non-decreasing\n values in stable order. Example ... ! Read arrays from sorted files call read_sorted_file ( 'dummy_file1' , array1 ) call read_sorted_file ( 'dummy_file2' , array2 ) ! Concatenate the arrays allocate ( array ( size ( array1 ) + size ( array2 ) ) ) array ( 1 : size ( array1 ) ) = array1 (:) array ( size ( array1 ) + 1 : size ( array1 ) + size ( array2 ) ) = array2 (:) ! Sort the resulting array call ord_sort ( array , work ) ! Process the sorted array call array_search ( array , values ) ... Version: experimental The generic subroutine implementing the SORT algorithm to return\n an input array with its elements sorted in order of (non-)decreasing\n value. Its use has the syntax: call sort( array[, reverse] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) , real(real128) , character(*) , type(string_type) , type(bitset_64) , type(bitset_large) . If both the type\n of array is real and at least one of the elements is a NaN , then\n the ordering of the result is undefined. Otherwise it is defined to be the\n original elements in non-decreasing order. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in unstable\n order. Otherwise index will sort array in order of non-decreasing\n values in unstable order. Example ... ! Read random data from a file call read_file ( 'dummy_file' , array ) ! Sort the random data call sort ( array ) ! Process the sorted data call array_search ( array , values ) ... Version: experimental The generic subroutine implementing the LSD radix sort algorithm to return\n an input array with its elements sorted in order of (non-)decreasing\n value. Its use has the syntax: call radix_sort( array[, work, reverse] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) .\n If both the type of array is real and at least one of the\n elements is a NaN , then the ordering of the result is undefined.\n Otherwise it is defined to be the original elements in\n non-decreasing order. Especially, -0.0 is lesser than 0.0. work (optional): shall be a rank 1 array of the same type as array , and shall have at least size(array) elements. It is an intent(inout) argument to be used as buffer. Its value on return is\n undefined. If it is not present, radix_sort will allocate a\n buffer for use, and deallocate it before return. If you do several\n similar radix_sort s, reusing the work array is a good parctice.\n This argument is not present for int8_radix_sort because it use\n counting sort, so no buffer is needed. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in stable\n order. Otherwise index will sort array in order of non-decreasing\n values in stable order. Example ... ! Read random data from a file call read_file ( 'dummy_file' , array ) ! Sort the random data call radix_sort ( array ) ... Version: experimental The generic subroutine implementing the SORT_INDEX algorithm to\n return an index array whose elements would sort the input array in the\n desired direction. It is primarily intended to be used to sort a\n derived type array based on the values of a component of the array.\n Its use has the syntax: call sort_index( array, index[, work, iwork, reverse ] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) , real(real128) , character(*) , type(string_type) , type(bitset_64) , type(bitset_large) . If both the \n type of array is real and at least one of the elements is a NaN , \n then the ordering of the array and index results is undefined. \n Otherwise it is defined to be as specified by reverse. index: a rank 1 array of sorting indices. It is an intent(out) argument of the type integer(int_index) . Its size shall be the\n same as array . On return, if defined, its elements would\n sort the input array in the direction specified by reverse . work (optional): shall be a rank 1 array of the same type as array , and shall have at least size(array)/2 elements. It is an intent(out) argument to be used as \"scratch\" memory\n for internal record keeping. If associated with an array in static\n storage, its use can significantly reduce the stack memory requirements\n for the code. Its value on return is undefined. iwork (optional): shall be a rank 1 integer array of kind int_index ,\n and shall have at least size(array)/2 elements. It is an intent(out) argument to be used as \"scratch\" memory\n for internal record keeping. If associated with an array in static\n storage, its use can significantly reduce the stack memory requirements\n for the code. Its value on return is undefined. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then index will sort array in order of non-increasing values in stable\n order. Otherwise index will sort array in order of non-decreasing\n values in stable order. Examples Sorting a related rank one array: subroutine sort_related_data ( a , b , work , index , iwork ) ! Sort `b` in terms or its related array `a` integer , intent ( inout ) :: a (:) integer ( int32 ), intent ( inout ) :: b (:) ! The same size as a integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Find the indices to sort a call sort_index ( a , index ( 1 : size ( a )),& work ( 1 : size ( a ) / 2 ), iwork ( 1 : size ( a ) / 2 )) ! Sort b based on the sorting of a b (:) = b ( index ( 1 : size ( a )) ) end subroutine sort_related_data Sorting a rank 2 array based on the data in a column subroutine sort_related_data ( array , column , work , index , iwork ) ! Sort `a_data` in terms or its component `a` integer , intent ( inout ) :: a (:,:) integer ( int32 ), intent ( in ) :: column integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) integer , allocatable :: dummy (:) integer :: i allocate ( dummy ( size ( a , dim = 1 ))) ! Extract a component of `a_data` dummy (:) = a (:, column ) ! Find the indices to sort the column call sort_index ( dummy , index ( 1 : size ( dummy )),& work ( 1 : size ( dummy ) / 2 ), iwork ( 1 : size ( dummy ) / 2 )) ! Sort a based on the sorting of its column do i = 1 , size ( a , dim = 2 ) a (:, i ) = a ( index ( 1 : size ( a , dim = 1 )), i ) end do end subroutine sort_related_data Sorting an array of a derived type based on the dsta in one component subroutine sort_a_data ( a_data , a , work , index , iwork ) ! Sort `a_data` in terms or its component `a` type ( a_type ), intent ( inout ) :: a_data (:) integer ( int32 ), intent ( inout ) :: a (:) integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Extract a component of `a_data` a ( 1 : size ( a_data )) = a_data (:) % a ! Find the indices to sort the component call sort_index ( a ( 1 : size ( a_data )), index ( 1 : size ( a_data )),& work ( 1 : size ( a_data ) / 2 ), iwork ( 1 : size ( a_data ) / 2 )) ! Sort a_data based on the sorting of that component a_data (:) = a_data ( index ( 1 : size ( a_data )) ) end subroutine sort_a_data Uses stdlib_string_type stdlib_kinds stdlib_bitsets stdlib_optval Used by Descendants: stdlib_sorting_ord_sort stdlib_sorting_radix_sort stdlib_sorting_sort stdlib_sorting_sort_index Variables Type Visibility Attributes Name Initial integer, public, parameter :: int_index = int64 Integer kind for indexing integer, public, parameter :: int_index_low = int32 Integer kind for indexing using less than huge(1_int32) values Interfaces public interface ord_sort The generic subroutine interface implementing the ORD_SORT algorithm,\na 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 ,\nand insertion sort .\n( Specification ) It is always at worst O(N Ln(N)) in sorting random\ndata, having a performance about 25% slower than SORT on such\ndata, but has much better performance than SORT on partially\nsorted data, having O(N) performance on uniformly non-increasing or\nnon-decreasing data. private module subroutine bitset_64_ord_sort(array, work, reverse) bitset_64_ord_sort( array ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) type( bitset_64 ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_ord_sort(array, work, reverse) bitset_large_ord_sort( array ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) type( bitset_large ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine char_ord_sort(array, work, reverse) char_ord_sort( array ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) character(len=len), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine dp_ord_sort(array, work, reverse) dp_ord_sort( array ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) real(kind=dp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int16_ord_sort(array, work, reverse) int16_ord_sort( array ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int16), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int32_ord_sort(array, work, reverse) int32_ord_sort( array ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int32), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int64_ord_sort(array, work, reverse) int64_ord_sort( array ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int64), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int8_ord_sort(array, work, reverse) int8_ord_sort( array ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int8), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine sp_ord_sort(array, work, reverse) sp_ord_sort( array ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) real(kind=sp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine string_type_ord_sort(array, work, reverse) string_type_ord_sort( array ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) type( string_type ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse public interface radix_sort The generic subroutine interface implementing the LSD radix sort algorithm,\nsee https://en.wikipedia.org/wiki/Radix_sort for more details.\nIt is always O(N) in sorting random data, but need a O(N) buffer.\n( Specification ) private module subroutine dp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), dimension(:), target :: array real(kind=dp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int16_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout), dimension(:) :: array integer(kind=int16), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int32_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout), dimension(:) :: array integer(kind=int32), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int64_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout), dimension(:) :: array integer(kind=int64), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int8_radix_sort(array, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout), dimension(:) :: array logical, intent(in), optional :: reverse private module subroutine sp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), dimension(:), target :: array real(kind=sp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse public interface sort The generic subroutine interface implementing the SORT algorithm, based\non the introsort of David Musser.\n( Specification ) private pure module subroutine bitset_64_sort(array, reverse) bitset_64_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine bitset_large_sort(array, reverse) bitset_large_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine char_sort(array, reverse) char_sort( array[, reverse] ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine dp_sort(array, reverse) dp_sort( array[, reverse] ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int16_sort(array, reverse) int16_sort( array[, reverse] ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int32_sort(array, reverse) int32_sort( array[, reverse] ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int64_sort(array, reverse) int64_sort( array[, reverse] ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int8_sort(array, reverse) int8_sort( array[, reverse] ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine sp_sort(array, reverse) sp_sort( array[, reverse] ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine string_type_sort(array, reverse) string_type_sort( array[, reverse] ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse public interface sort_index The generic subroutine interface implementing the SORT_INDEX algorithm,\nbased on the \"Rust\" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159\nbut modified to return an array of indices that would provide a stable\nsort of the rank one ARRAY input.\n( Specification ) The indices by default correspond to a\nnon-decreasing sort, but if the optional argument REVERSE is present\nwith a value of .TRUE. the indices correspond to a non-increasing sort. private module subroutine bitset_64_sort_index_default(array, index, work, iwork, reverse) bitset_64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_64_sort_index_low(array, index, work, iwork, reverse) bitset_64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_default(array, index, work, iwork, reverse) bitset_large_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_low(array, index, work, iwork, reverse) bitset_large_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_default(array, index, work, iwork, reverse) char_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_low(array, index, work, iwork, reverse) char_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_default(array, index, work, iwork, reverse) dp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_low(array, index, work, iwork, reverse) dp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_default(array, index, work, iwork, reverse) int16_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_low(array, index, work, iwork, reverse) int16_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_default(array, index, work, iwork, reverse) int32_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_low(array, index, work, iwork, reverse) int32_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_default(array, index, work, iwork, reverse) int64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_low(array, index, work, iwork, reverse) int64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_default(array, index, work, iwork, reverse) int8_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_low(array, index, work, iwork, reverse) int8_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_default(array, index, work, iwork, reverse) sp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_low(array, index, work, iwork, reverse) sp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_default(array, index, work, iwork, reverse) string_type_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_low(array, index, work, iwork, reverse) string_type_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse","tags":"","loc":"module/stdlib_sorting.html"},{"title":"stdlib_string_type – Fortran-lang/stdlib","text":"Implementation of a string type to hold an arbitrary sequence of characters. This module provides string type compatible with all Fortran instrinsic character\nprocedures as well as overloaded operators for working with character variables. A string type can be easily constructed by creating a new instance from a\ncharacter variable or literal by invoking its constructor or by assigning it\nto a string type. Generally, the string type behaves similar to a deferred\nlength character in most regards but adds memory access safety. The specification of this module is available here . Uses stdlib_ascii stdlib_kinds stdlib_optval Used by Descendants: stdlib_string_type_constructor Interfaces public interface adjustl Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. private elemental function adjustl_string(string) result(adjusted_string) Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface adjustr Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. private elemental function adjustr_string(string) result(adjusted_string) Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface assignment(=) Assign a character sequence to a string. private elemental subroutine assign_string_char(lhs, rhs) Assign a character sequence to a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: lhs character(len=*), intent(in) :: rhs public interface char Return the character sequence represented by the string. This method is elemental and returns a scalar character value. private pure function char_string(string) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value character(len=len) private elemental function char_string_pos(string, pos) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: pos Return Value character(len=1) private pure function char_string_range(string, start, last) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: start integer, intent(in) :: last Return Value character(len=last) public interface iachar Code in ASCII collating sequence. This method is elemental and returns a default integer scalar value. private elemental function iachar_string(string) result(ich) Code in ASCII collating sequence. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface ichar Character-to-integer conversion function. This method is elemental and returns a default integer scalar value. private elemental function ichar_string(string) result(ich) Character-to-integer conversion function. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface index Position of a substring within a string . Returns the position of the start of the leftmost or rightmost occurrence\nof string substring in string , counting from one. If substring is not\npresent in string , zero is returned. This method is elemental and returns a default integer scalar value. private elemental function index_string_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version both character sequences are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_string_char(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the main character sequence is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_char_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the sub character sequence is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer public interface len Returns the length of the character sequence represented by the string. This method is elemental and returns a default integer scalar value. private elemental function len_string(string) result(length) Returns the length of the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface len_trim Returns the length of the character sequence without trailing spaces\nrepresented by the string. This method is elemental and returns a default integer scalar value. private elemental function len_trim_string(string) result(length) Returns the length of the character sequence without trailing spaces\nrepresented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface lge Lexically compare the order of two character sequences being greater equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function lge_string_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lge_string_char(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lge_char_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface lgt Lexically compare the order of two character sequences being greater,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function lgt_string_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lgt_string_char(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lgt_char_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface lle Lexically compare the order of two character sequences being less equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function lle_string_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lle_string_char(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lle_char_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface llt Lexically compare the order of two character sequences being less,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function llt_string_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function llt_string_char(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function llt_char_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface move Moves the allocated character scalar from 'from' to 'to' Specifications private elemental subroutine move_string_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout), target :: from type( string_type ), intent(inout), target :: to private pure subroutine move_string_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: from character(len=:), intent(out), allocatable :: to private pure subroutine move_char_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from type( string_type ), intent(out) :: to private pure subroutine move_char_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from character(len=:), intent(out), allocatable :: to public interface operator(//) Concatenate two character sequences, the left-hand side, the right-hand side\nor both character sequences can be represented by a string. This operator is elemental and returns a scalar character value. private elemental function concat_string_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_string_char(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_char_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type ) public interface operator(/=) Compare two character sequences for inequality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function ne_string_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ne_string_char(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ne_char_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(<) Compare two character sequences for being less, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function lt_string_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lt_string_char(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lt_char_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(<=) Compare two character sequences for being less than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function le_string_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function le_string_char(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function le_char_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(==) Compare two character sequences for equality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function eq_string_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function eq_string_char(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function eq_char_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(>) Compare two character sequences for being greater, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function gt_string_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function gt_string_char(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function gt_char_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(>=) Compare two character sequences for being greater than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function ge_string_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ge_string_char(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ge_char_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface read(formatted) Read a character sequence from a connected unformatted unit into the string. private subroutine read_formatted(string, unit, iotype, v_list, iostat, iomsg) Read a character sequence from a connected formatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg public interface read(unformatted) Read a character sequence from a connected unformatted unit into the string. private subroutine read_unformatted(string, unit, iostat, iomsg) Read a character sequence from a connected unformatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg public interface repeat Repeats the character sequence hold by the string by the number of\nspecified copies. This method is elemental and returns a scalar character value. private elemental function repeat_string(string, ncopies) result(repeated_string) Repeats the character sequence hold by the string by the number of\nspecified copies. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: ncopies Return Value type( string_type ) public interface reverse Reverses the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nreverse character sequence private elemental function reverse_string(string) result(reversed_string) Reverse the character sequence hold by the input string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface scan Scan a string for the presence of a set of characters. Scans a string for\nany of the characters in a set of characters. If back is either absent or false , this function returns the position\nof the leftmost character of string that is in set . If back is true ,\nthe rightmost position is returned. If no character of set is found in string , the result is zero. This method is elemental and returns a default integer scalar value. private elemental function scan_string_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version both the character sequence and the character set are\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_string_char(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the character sequences is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_char_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the set of characters is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer public interface string_type Constructor for new string instances private elemental module function new_string(string) result(new) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: string Return Value type( string_type ) private elemental module function new_string_from_integer_int16(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int32(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int64(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int8(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_logical_lk(val) result(new) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: val Return Value type( string_type ) public interface to_lower Returns the lowercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nlowercase character sequence private elemental function to_lower_string(string) result(lowercase_string) Convert the character sequence hold by the input string to lower case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface to_sentence Returns the sentencecase version of the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nsentencecase character sequence private elemental function to_sentence_string(string) result(sentence_string) Convert the character sequence hold by the input string to sentence case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface to_title Returns the titlecase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\ntitlecase character sequence private elemental function to_title_string(string) result(titlecase_string) Convert the character sequence hold by the input string to title case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface to_upper Returns the uppercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nuppercase character sequence private elemental function to_upper_string(string) result(uppercase_string) Convert the character sequence hold by the input string to upper case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface trim Returns the character sequence hold by the string without trailing spaces. This method is elemental and returns a scalar character value. private elemental function trim_string(string) result(trimmed_string) Returns the character sequence hold by the string without trailing spaces. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface verify Scan a string for the absence of a set of characters. Verifies that all\nthe characters in string belong to the set of characters in set. If back is either absent or false , this function returns the position\nof the leftmost character of string that is not in set . If back is true ,\nthe rightmost position is returned. If all characters of string are found\nin set , the result is zero. This method is elemental and returns a default integer scalar value. private elemental function verify_string_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version both the character sequence and\nthe character set are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_string_char(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the character sequences is\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_char_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the set of characters is\nrepresented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer public interface write(formatted) Write the character sequence hold by the string to a connected formatted\nunit. private subroutine write_formatted(string, unit, iotype, v_list, iostat, iomsg) Write the character sequence hold by the string to a connected formatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg public interface write(unformatted) Write the character sequence hold by the string to a connected unformatted\nunit. private subroutine write_unformatted(string, unit, iostat, iomsg) Write the character sequence hold by the string to a connected unformatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg Derived Types type, public, sequence  :: string_type String type holding an arbitrary sequence of characters. Constructor Constructor for new string instances private\n\n elemental, module\n function new_string (string) private\n\n elemental, module\n function new_string_from_integer_int16 (val) private\n\n elemental, module\n function new_string_from_integer_int32 (val) private\n\n elemental, module\n function new_string_from_integer_int64 (val) private\n\n elemental, module\n function new_string_from_integer_int8 (val) private\n\n elemental, module\n function new_string_from_logical_lk (val)","tags":"","loc":"module/stdlib_string_type.html"},{"title":"stdlib_specialfunctions_gamma – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_kinds iso_fortran_env Interfaces public interface gamma Gamma function for integer and complex numbers private impure elemental function gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value integer(kind=int8) private impure elemental function gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value integer(kind=int16) private impure elemental function gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value integer(kind=int32) private impure elemental function gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value integer(kind=int64) private impure elemental function gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp) public interface log_factorial Logarithm of factorial n!, integer variable private impure elemental function l_factorial_iint8(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value real private impure elemental function l_factorial_iint16(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value real private impure elemental function l_factorial_iint32(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value real private impure elemental function l_factorial_iint64(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value real public interface log_gamma Logarithm of gamma function private impure elemental function l_gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value real private impure elemental function l_gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value real private impure elemental function l_gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value real private impure elemental function l_gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value real private impure elemental function l_gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function l_gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp) public interface log_lower_incomplete_gamma Logarithm of lower incomplete gamma function private impure elemental function l_ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface log_upper_incomplete_gamma Logarithm of upper incomplete gamma function private impure elemental function l_ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface lower_incomplete_gamma Lower incomplete gamma function private impure elemental function ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface regularized_gamma_p Regularized (normalized) lower incomplete gamma function, P private impure elemental function regamma_p_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface regularized_gamma_q Regularized (normalized) upper incomplete gamma function, Q private impure elemental function regamma_q_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface upper_incomplete_gamma Upper incomplete gamma function private impure elemental function ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"module/stdlib_specialfunctions_gamma.html"},{"title":"f18estop – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_error","tags":"","loc":"module/f18estop.html"},{"title":"stdlib_linalg_cross_product – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_cross_product.html"},{"title":"stdlib_math_diff – Fortran-lang/stdlib","text":"Inspired by original code (MIT license) written in 2016 by Keurfon Luu (keurfonluu@outlook.com)\nhttps://github.com/keurfonluu/Forlab Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_diff.html"},{"title":"stdlib_linalg_solve – Fortran-lang/stdlib","text":"Solve linear system Ax=b Uses stdlib_linalg_lapack stdlib_linalg_state stdlib_linalg_constants Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_solve.html"},{"title":"stdlib_bitsets_64 – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_bitsets","tags":"","loc":"module/stdlib_bitsets_64.html"},{"title":"stdlib_stats_moment – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment.html"},{"title":"stdlib_math_meshgrid – Fortran-lang/stdlib","text":"Uses stdlib_error Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_meshgrid.html"},{"title":"stdlib_linalg_outer_product – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_outer_product.html"},{"title":"stdlib_math_linspace – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_linspace.html"},{"title":"stdlib_hashmap_open – Fortran-lang/stdlib","text":"Uses stdlib_hashmap_wrappers iso_fortran_env Ancestors: stdlib_hashmaps","tags":"","loc":"module/stdlib_hashmap_open.html"},{"title":"stdlib_stats_moment_scalar – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment_scalar.html"},{"title":"stdlib_hash_32bit_nm – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_32bit","tags":"","loc":"module/stdlib_hash_32bit_nm.html"},{"title":"stdlib_stats_var – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_var.html"},{"title":"stdlib_strings_to_string – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_strings","tags":"","loc":"module/stdlib_strings_to_string.html"},{"title":"stdlib_linalg_determinant – Fortran-lang/stdlib","text":"Determinant of a rectangular matrix Uses stdlib_linalg_lapack stdlib_linalg_state stdlib_linalg_constants Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_determinant.html"},{"title":"stdlib_hash_32bit_fnv – Fortran-lang/stdlib","text":"An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt\nNoll, and Kiem-Phong-Vo,\nhttps://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function Uses Ancestors: stdlib_hash_32bit","tags":"","loc":"module/stdlib_hash_32bit_fnv.html"},{"title":"f08estop – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_error","tags":"","loc":"module/f08estop.html"},{"title":"stdlib_stats_moment_all – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment_all.html"},{"title":"stdlib_io_npy_load – Fortran-lang/stdlib","text":"Implementation of loading npy files into multidimensional arrays Uses stdlib_strings stdlib_error Ancestors: stdlib_io_npy","tags":"","loc":"module/stdlib_io_npy_load.html"},{"title":"stdlib_math_all_close – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_all_close.html"},{"title":"stdlib_ansi_to_string – Fortran-lang/stdlib","text":"Implementation of the conversion to enumerator and identifier types to strings Uses Ancestors: stdlib_ansi","tags":"","loc":"module/stdlib_ansi_to_string.html"},{"title":"stdlib_stats_cov – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_cov.html"},{"title":"stdlib_sorting_ord_sort – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_ord_sort.html"},{"title":"stdlib_math_is_close – Fortran-lang/stdlib","text":"Uses ieee_arithmetic Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_is_close.html"},{"title":"stdlib_ansi_operator – Fortran-lang/stdlib","text":"Implementation of the conversion to enumerator and identifier types to strings Uses stdlib_string_type Ancestors: stdlib_ansi","tags":"","loc":"module/stdlib_ansi_operator.html"},{"title":"stdlib_stats_median – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_selection stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_median.html"},{"title":"stdlib_string_type_constructor – Fortran-lang/stdlib","text":"Uses stdlib_strings Ancestors: stdlib_string_type","tags":"","loc":"module/stdlib_string_type_constructor.html"},{"title":"stdlib_specialfunctions_legendre – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_specialfunctions","tags":"","loc":"module/stdlib_specialfunctions_legendre.html"},{"title":"stdlib_quadrature_trapz – Fortran-lang/stdlib","text":"Uses stdlib_error Ancestors: stdlib_quadrature","tags":"","loc":"module/stdlib_quadrature_trapz.html"},{"title":"stdlib_sorting_sort_index – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_sort_index.html"},{"title":"stdlib_linalg_diag – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_diag.html"},{"title":"stdlib_sorting_radix_sort – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_radix_sort.html"},{"title":"stdlib_linalg_kronecker – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_kronecker.html"},{"title":"stdlib_math_logspace – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_logspace.html"},{"title":"stdlib_linalg_svd – Fortran-lang/stdlib","text":"Singular-Value Decomposition Uses stdlib_linalg_lapack stdlib_linalg_state stdlib_linalg_constants Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_svd.html"},{"title":"stdlib_bitsets_large – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_bitsets","tags":"","loc":"module/stdlib_bitsets_large.html"},{"title":"stdlib_hash_64bit_fnv – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_64bit","tags":"","loc":"module/stdlib_hash_64bit_fnv.html"},{"title":"stdlib_hash_32bit_water – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_32bit","tags":"","loc":"module/stdlib_hash_32bit_water.html"},{"title":"stdlib_sorting_sort – Fortran-lang/stdlib","text":"This submodule implements the overloaded sorting subroutine SORT that can be used to sort four kinds of INTEGER arrays and three kinds\nof REAL arrays. Sorting is in order of increasing value, with the worst\ncase run time performance of O(N Ln(N)) . SORT uses the INTROSORT sorting algorithm of David Musser,\nhttp://www.cs.rpi.edu/~musser/gp/introsort.ps. introsort is a hybrid\nunstable comparison algorithm combining quicksort , insertion sort , and heap sort . While this algorithm is always O(N Ln(N)) it is relatively\nfast on randomly ordered data, but inconsistent in performance on partly\nsorted data, sometimes having merge sort performance, sometimes having\nbetter than quicksort performance. Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_sort.html"},{"title":"stdlib_io_npy_save – Fortran-lang/stdlib","text":"Implementation of saving multidimensional arrays to npy files Uses stdlib_strings stdlib_error Ancestors: stdlib_io_npy","tags":"","loc":"module/stdlib_io_npy_save.html"},{"title":"stdlib_hash_64bit_pengy – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_64bit","tags":"","loc":"module/stdlib_hash_64bit_pengy.html"},{"title":"stdlib_stats_mean – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_mean.html"},{"title":"stdlib_linalg_least_squares – Fortran-lang/stdlib","text":"Least-squares solution to Ax=b Uses stdlib_linalg_lapack stdlib_linalg_state stdlib_linalg_constants Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_least_squares.html"},{"title":"stdlib_hash_64bit_spookyv2 – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_64bit","tags":"","loc":"module/stdlib_hash_64bit_spookyv2.html"},{"title":"stdlib_stats_corr – Fortran-lang/stdlib","text":"Uses stdlib_linalg ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_corr.html"},{"title":"stdlib_quadrature_gauss – Fortran-lang/stdlib","text":"Uses stdlib_specialfunctions Ancestors: stdlib_quadrature","tags":"","loc":"module/stdlib_quadrature_gauss.html"},{"title":"stdlib_hashmap_chaining – Fortran-lang/stdlib","text":"Implements a simple separate chaining hash map. Uses Ancestors: stdlib_hashmaps","tags":"","loc":"module/stdlib_hashmap_chaining.html"},{"title":"stdlib_math_arange – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_arange.html"},{"title":"stdlib_stats_moment_mask – Fortran-lang/stdlib","text":"Uses ieee_arithmetic stdlib_error stdlib_optval Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment_mask.html"},{"title":"stdlib_quadrature_simps – Fortran-lang/stdlib","text":"Uses stdlib_error Ancestors: stdlib_quadrature","tags":"","loc":"module/stdlib_quadrature_simps.html"},{"title":"f18estop.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_error ) f18estop implicit none contains module procedure error_stop ! Aborts the program with nonzero exit code ! ! The \"stop \" statement generally has return code 0. ! To allow non-zero return code termination with character message, ! error_stop() uses the statement \"error stop\", which by default ! has exit code 1 and prints the message to stderr. ! An optional integer return code \"code\" may be specified. ! ! Example ! ------- ! ! call error_stop(\"Invalid argument\") if ( present ( code )) then write ( stderr , * ) msg error stop code else error stop msg endif end procedure end submodule f18estop","tags":"","loc":"sourcefile/f18estop.f90.html"},{"title":"stdlib_optval.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES + & & [( 'l1' , 'logical' )] module stdlib_optval !! !! Provides a generic function `optval`, which can be used to !! conveniently implement fallback values for optional arguments !! to subprograms !! ([Specification](../page/specs/stdlib_optval.html)) !! !! If `x` is an `optional` parameter of a !! subprogram, then the expression `optval(x, default)` inside that !! subprogram evaluates to `x` if it is present, otherwise `default`. !! !! It is an error to call `optval` with a single actual argument. !! use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 implicit none private public :: optval interface optval !! version: experimental !! !! Fallback value for optional arguments !! ([Specification](../page/specs/stdlib_optval.html#description)) # : for k1 , t1 in KINDS_TYPES module procedure optval_$ { t1 [ 0 ] }{ k1 }$ # : endfor module procedure optval_character ! TODO: differentiate ascii & ucs char kinds end interface optval contains # : for k1 , t1 in KINDS_TYPES pure elemental function optval_$ { t1 [ 0 ] }{ k1 }$ ( x , default ) result ( y ) ${ t1 }$ , intent ( in ), optional :: x ${ t1 }$ , intent ( in ) :: default ${ t1 }$ :: y if ( present ( x )) then y = x else y = default end if end function optval_$ { t1 [ 0 ] }{ k1 }$ # : endfor ! Cannot be made elemental pure function optval_character ( x , default ) result ( y ) character ( len =* ), intent ( in ), optional :: x character ( len =* ), intent ( in ) :: default character ( len = :), allocatable :: y if ( present ( x )) then y = x else y = default end if end function optval_character end module stdlib_optval","tags":"","loc":"sourcefile/stdlib_optval.fypp.html"},{"title":"stdlib_linalg_cross_product.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_cross_product implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES pure module function cross_product_$ { t1 [ 0 ] }{ k1 }$ ( a , b ) result ( res ) ${ t1 }$ , intent ( in ) :: a ( 3 ), b ( 3 ) ${ t1 }$ :: res ( 3 ) res ( 1 ) = a ( 2 ) * b ( 3 ) - a ( 3 ) * b ( 2 ) res ( 2 ) = a ( 3 ) * b ( 1 ) - a ( 1 ) * b ( 3 ) res ( 3 ) = a ( 1 ) * b ( 2 ) - a ( 2 ) * b ( 1 ) end function cross_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_linalg_cross_product.fypp.html"},{"title":"stdlib_math_diff.fypp – Fortran-lang/stdlib","text":"Source Code !> Inspired by original code (MIT license) written in 2016 by Keurfon Luu (keurfonluu@outlook.com) !> https://github.com/keurfonluu/Forlab #:include \"common.fypp\" #:set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_math ) stdlib_math_diff implicit none contains !> `diff` computes differences of adjacent elements of an array. # : for k1 , t1 in RI_KINDS_TYPES pure module function diff_1_$ { k1 }$ ( x , n , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ), optional :: n ${ t1 }$ , intent ( in ), optional :: prepend (:), append (:) ${ t1 }$ , allocatable :: y (:) integer :: size_prepend , size_append , size_x , size_work integer :: n_ , i n_ = optval ( n , 1 ) if ( n_ <= 0 ) then y = x return end if size_prepend = 0 size_append = 0 if ( present ( prepend )) size_prepend = size ( prepend ) if ( present ( append )) size_append = size ( append ) size_x = size ( x ) size_work = size_x + size_prepend + size_append if ( size_work <= n_ ) then allocate ( y ( 0 )) return end if !> Use a quick exit for the common case, to avoid memory allocation. if ( size_prepend == 0 . and . size_append == 0 . and . n_ == 1 ) then y = x ( 2 :) - x ( 1 : size_x - 1 ) return end if block ${ t1 }$ :: work ( size_work ) if ( size_prepend > 0 ) work (: size_prepend ) = prepend work ( size_prepend + 1 : size_prepend + size_x ) = x if ( size_append > 0 ) work ( size_prepend + size_x + 1 :) = append do i = 1 , n_ work ( 1 : size_work - i ) = work ( 2 : size_work - i + 1 ) - work ( 1 : size_work - i ) end do y = work ( 1 : size_work - n_ ) end block end function diff_1_$ { k1 }$ pure module function diff_2_$ { k1 }$ ( x , n , dim , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ), optional :: n , dim ${ t1 }$ , intent ( in ), optional :: prepend (:, :), append (:, :) ${ t1 }$ , allocatable :: y (:, :) integer :: size_prepend , size_append , size_x , size_work integer :: n_ , dim_ , i n_ = optval ( n , 1 ) if ( n_ <= 0 ) then y = x return end if size_prepend = 0 size_append = 0 if ( present ( dim )) then if ( dim == 1 . or . dim == 2 ) then dim_ = dim else dim_ = 1 end if else dim_ = 1 end if if ( present ( prepend )) size_prepend = size ( prepend , dim_ ) if ( present ( append )) size_append = size ( append , dim_ ) size_x = size ( x , dim_ ) size_work = size_x + size_prepend + size_append if ( size_work <= n_ ) then allocate ( y ( 0 , 0 )) return end if !> Use a quick exit for the common case, to avoid memory allocation. if ( size_prepend == 0 . and . size_append == 0 . and . n_ == 1 ) then if ( dim_ == 1 ) then y = x ( 2 :, :) - x ( 1 : size_x - 1 , :) elseif ( dim_ == 2 ) then y = x (:, 2 :) - x (:, 1 : size_x - 1 ) end if return end if if ( dim_ == 1 ) then block ${ t1 }$ :: work ( size_work , size ( x , 2 )) if ( size_prepend > 0 ) work ( 1 : size_prepend , :) = prepend work ( size_prepend + 1 : size_x + size_prepend , :) = x if ( size_append > 0 ) work ( size_x + size_prepend + 1 :, :) = append do i = 1 , n_ work ( 1 : size_work - i , :) = work ( 2 : size_work - i + 1 , :) - work ( 1 : size_work - i , :) end do y = work ( 1 : size_work - n_ , :) end block elseif ( dim_ == 2 ) then block ${ t1 }$ :: work ( size ( x , 1 ), size_work ) if ( size_prepend > 0 ) work (:, 1 : size_prepend ) = prepend work (:, size_prepend + 1 : size_x + size_prepend ) = x if ( size_append > 0 ) work (:, size_x + size_prepend + 1 :) = append do i = 1 , n_ work (:, 1 : size_work - i ) = work (:, 2 : size_work - i + 1 ) - work (:, 1 : size_work - i ) end do y = work (:, 1 : size_work - n_ ) end block end if end function diff_2_$ { k1 }$ # : endfor end submodule stdlib_math_diff","tags":"","loc":"sourcefile/stdlib_math_diff.fypp.html"},{"title":"stdlib_selection.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" ! Specify kinds/types for the input array in select and arg_select #:set ARRAY_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES ! The index arrays are of all INT_KINDS_TYPES module stdlib_selection !! Quickly find the k-th smallest value of an array, or the index of the k-th smallest value. !! ([Specification](../page/specs/stdlib_selection.html)) ! ! This code was modified from the \"Coretran\" implementation \"quickSelect\" by ! Leon Foks, https://github.com/leonfoks/coretran/tree/HEAD/src/sorting ! ! Leon Foks gave permission to release this code under stdlib's MIT license. ! (https://github.com/fortran-lang/stdlib/pull/500#commitcomment-57418593) ! use stdlib_kinds implicit none private public :: select , arg_select interface select !! version: experimental !! ([Specification](..//page/specs/stdlib_selection.html#select-find-the-k-th-smallest-value-in-an-input-array)) # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"select\" , 1 , arraytype , arraykind , intkind ) module procedure ${ name }$ # : endfor # : endfor end interface interface arg_select !! version: experimental !! ([Specification](..//page/specs/stdlib_selection.html#arg_select-find-the-index-of-the-k-th-smallest-value-in-an-input-array)) # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"arg_select\" , 1 , arraytype , arraykind , intkind ) module procedure ${ name }$ # : endfor # : endfor end interface contains # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"select\" , 1 , arraytype , arraykind , intkind ) subroutine ${ name }$ ( a , k , kth_smallest , left , right ) !! select - select the k-th smallest entry in a(:). !! !! Partly derived from the \"Coretran\" implementation of !! quickSelect by Leon Foks, https://github.com/leonfoks/coretran !! ${ arraytype }$ , intent ( inout ) :: a (:) !! Array in which we seek the k-th smallest entry. !! On output it will be partially sorted such that !! `all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a)))` !! is true. ${ inttype }$ , intent ( in ) :: k !! We want the k-th smallest entry. E.G. `k=1` leads to !! `kth_smallest=min(a)`, and `k=size(a)` leads to !! `kth_smallest=max(a)` ${ arraytype }$ , intent ( out ) :: kth_smallest !! On output contains the k-th smallest value of `a(:)` ${ inttype }$ , intent ( in ), optional :: left , right !! If we know that: !! the k-th smallest entry of `a` is in `a(left:right)` !! and also that: !! `maxval(a(1:(left-1))) <= minval(a(left:right))` !! and: !! `maxval(a(left:right))) <= minval(a((right+1):size(a)))` !! then one or both bounds can be specified to narrow the search. !! The constraints are available if we have previously called the !! subroutine with different `k` (because of how `a(:)` becomes !! partially sorted, see documentation for `a(:)`). ${ inttype }$ :: l , r , mid , iPivot integer , parameter :: ip = ${ intkind }$ l = 1_ip if ( present ( left )) l = left r = size ( a , kind = ip ) if ( present ( right )) r = right if ( l > r . or . l < 1_ip . or . r > size ( a , kind = ip ) & . or . k < l . or . k > r & !i.e. if k is not in the interval [l; r] ) then error stop \"select must have 1 <= left <= k <= right <= size(a)\" ; end if searchk : do mid = l + (( r - l ) / 2_ip ) ! Avoid (l+r)/2 which can cause overflow call medianOf3 ( a , l , mid , r ) call swap ( a ( l ), a ( mid )) call partition ( a , l , r , iPivot ) if ( iPivot < k ) then l = iPivot + 1_ip elseif ( iPivot > k ) then r = iPivot - 1_ip elseif ( iPivot == k ) then kth_smallest = a ( k ) return end if end do searchk contains pure subroutine swap ( a , b ) ${ arraytype }$ , intent ( inout ) :: a , b ${ arraytype }$ :: tmp tmp = a ; a = b ; b = tmp end subroutine pure subroutine medianOf3 ( a , left , mid , right ) ${ arraytype }$ , intent ( inout ) :: a (:) ${ inttype }$ , intent ( in ) :: left , mid , right if ( a ( right ) < a ( left )) call swap ( a ( right ), a ( left )) if ( a ( mid ) < a ( left )) call swap ( a ( mid ) , a ( left )) if ( a ( right ) < a ( mid ) ) call swap ( a ( mid ) , a ( right )) end subroutine pure subroutine partition ( array , left , right , iPivot ) ${ arraytype }$ , intent ( inout ) :: array (:) ${ inttype }$ , intent ( in ) :: left , right ${ inttype }$ , intent ( out ) :: iPivot ${ inttype }$ :: lo , hi ${ arraytype }$ :: pivot pivot = array ( left ) lo = left hi = right do while ( lo <= hi ) do while ( array ( hi ) > pivot ) hi = hi - 1_ip end do inner_lohi : do while ( lo <= hi ) if ( array ( lo ) > pivot ) exit inner_lohi lo = lo + 1_ip end do inner_lohi if ( lo <= hi ) then call swap ( array ( lo ), array ( hi )) lo = lo + 1_ip hi = hi - 1_ip end if end do call swap ( array ( left ), array ( hi )) iPivot = hi end subroutine end subroutine # : endfor # : endfor # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"arg_select\" , 1 , arraytype , arraykind , intkind ) subroutine ${ name }$ ( a , indx , k , kth_smallest , left , right ) !! arg_select - find the index of the k-th smallest entry in `a(:)` !! !! Partly derived from the \"Coretran\" implementation of !! quickSelect by Leon Foks, https://github.com/leonfoks/coretran !! ${ arraytype }$ , intent ( in ) :: a (:) !! Array in which we seek the k-th smallest entry. ${ inttype }$ , intent ( inout ) :: indx (:) !! Array of indices into `a(:)`. Must contain each integer !! from `1:size(a)` exactly once. On output it will be partially !! sorted such that !! `all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND. !! all( a(indx(k)) <= a(indx( (k+1):size(a) )) )`. ${ inttype }$ , intent ( in ) :: k !! We want index of the k-th smallest entry. E.G. `k=1` leads to !! `a(kth_smallest) = min(a)`, and `k=size(a)` leads to !! `a(kth_smallest) = max(a)` ${ inttype }$ , intent ( out ) :: kth_smallest !! On output contains the index with the k-th smallest value of `a(:)` ${ inttype }$ , intent ( in ), optional :: left , right !! If we know that: !! the k-th smallest entry of `a` is in `a(indx(left:right))` !! and also that: !! `maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right)))` !! and: !! `maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a))))` !! then one or both bounds can be specified to reduce the search !! time. These constraints are available if we have previously !! called the subroutine with a different `k` (due to the way that !! `indx(:)` becomes partially sorted, see documentation for `indx(:)`). ${ inttype }$ :: l , r , mid , iPivot integer , parameter :: ip = ${ intkind }$ l = 1_ip if ( present ( left )) l = left r = size ( a , kind = ip ) if ( present ( right )) r = right if ( size ( a ) /= size ( indx )) then error stop \"arg_select must have size(a) == size(indx)\" end if if ( l > r . or . l < 1_ip . or . r > size ( a , kind = ip ) & . or . k < l . or . k > r & !i.e. if k is not in the interval [l; r] ) then error stop \"arg_select must have 1 <= left <= k <= right <= size(a)\" ; end if searchk : do mid = l + (( r - l ) / 2_ip ) ! Avoid (l+r)/2 which can cause overflow call arg_medianOf3 ( a , indx , l , mid , r ) call swap ( indx ( l ), indx ( mid )) call arg_partition ( a , indx , l , r , iPivot ) if ( iPivot < k ) then l = iPivot + 1_ip elseif ( iPivot > k ) then r = iPivot - 1_ip elseif ( iPivot == k ) then kth_smallest = indx ( k ) return end if end do searchk contains pure subroutine swap ( a , b ) ${ inttype }$ , intent ( inout ) :: a , b ${ inttype }$ :: tmp tmp = a ; a = b ; b = tmp end subroutine pure subroutine arg_medianOf3 ( a , indx , left , mid , right ) ${ arraytype }$ , intent ( in ) :: a (:) ${ inttype }$ , intent ( inout ) :: indx (:) ${ inttype }$ , intent ( in ) :: left , mid , right if ( a ( indx ( right )) < a ( indx ( left ))) call swap ( indx ( right ), indx ( left )) if ( a ( indx ( mid )) < a ( indx ( left ))) call swap ( indx ( mid ) , indx ( left )) if ( a ( indx ( right )) < a ( indx ( mid )) ) call swap ( indx ( mid ) , indx ( right )) end subroutine pure subroutine arg_partition ( array , indx , left , right , iPivot ) ${ arraytype }$ , intent ( in ) :: array (:) ${ inttype }$ , intent ( inout ) :: indx (:) ${ inttype }$ , intent ( in ) :: left , right ${ inttype }$ , intent ( out ) :: iPivot ${ inttype }$ :: lo , hi ${ arraytype }$ :: pivot pivot = array ( indx ( left )) lo = left hi = right do while ( lo <= hi ) do while ( array ( indx ( hi )) > pivot ) hi = hi - 1_ip end do inner_lohi : do while ( lo <= hi ) if ( array ( indx ( lo )) > pivot ) exit inner_lohi lo = lo + 1_ip end do inner_lohi if ( lo <= hi ) then call swap ( indx ( lo ), indx ( hi )) lo = lo + 1_ip hi = hi - 1_ip end if end do call swap ( indx ( left ), indx ( hi )) iPivot = hi end subroutine end subroutine # : endfor # : endfor end module","tags":"","loc":"sourcefile/stdlib_selection.fypp.html"},{"title":"stdlib_linalg_solve.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set RHS_SUFFIX = [\"one\",\"many\"] #:set RHS_SYMBOL = [ranksuffix(r) for r in [1,2]] #:set RHS_EMPTY = [emptyranksuffix(r) for r in [1,2]] #:set ALL_RHS = list(zip(RHS_SYMBOL,RHS_SUFFIX,RHS_EMPTY)) submodule ( stdlib_linalg ) stdlib_linalg_solve !! Solve linear system Ax=b use stdlib_linalg_constants use stdlib_linalg_lapack , only : gesv use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR implicit none ( type , external ) character ( * ), parameter :: this = 'solve' contains elemental subroutine handle_gesv_info ( info , lda , n , nrhs , err ) integer ( ilp ), intent ( in ) :: info , lda , n , nrhs type ( linalg_state_type ), intent ( out ) :: err ! Process output select case ( info ) case ( 0 ) ! Success case ( - 1 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid problem size n=' , n ) case ( - 2 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid rhs size n=' , nrhs ) case ( - 4 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix size a=' ,[ lda , n ]) case ( - 7 ) err = linalg_state_type ( this , LINALG_ERROR , 'invalid matrix size a=' ,[ lda , n ]) case ( 1 :) err = linalg_state_type ( this , LINALG_ERROR , 'singular matrix' ) case default err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select end subroutine handle_gesv_info # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" ! Compute the solution to a real system of linear equations A * X = B module function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ ( a , b , overwrite_a , err ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ ! Initialize solution shape from the rhs array allocate ( x , mold = b ) call stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( a , b , x , overwrite_a = overwrite_a , err = err ) end function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ !> Compute the solution to a real system of linear equations A * X = B (pure interface) pure module function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ ( a , b ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ ! Local variables ${ rt }$ , allocatable :: amat (:,:) ! Copy `a` so it can be intent(in) allocate ( amat , source = a ) ! Initialize solution shape from the rhs array allocate ( x , mold = b ) call stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( amat , b , x , overwrite_a = . true .) end function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ !> Compute the solution to a real system of linear equations A * X = B (pure interface) pure module subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( a , b , x , pivot , overwrite_a , err ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] Storage array for the diagonal pivot indices integer ( ilp ), optional , intent ( inout ), target :: pivot (:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err ! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: lda , n , ldb , ldx , nrhsx , nrhs , info , npiv integer ( ilp ), pointer :: ipiv (:) logical ( lk ) :: copy_a ${ rt }$ , pointer :: xmat (:,:), amat (:,:) ! Problem sizes lda = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) ldb = size ( b , 1 , kind = ilp ) nrhs = size ( b , kind = ilp ) / ldb ldx = size ( x , 1 , kind = ilp ) nrhsx = size ( x , kind = ilp ) / ldx ! Has a pre-allocated pivots storage array been provided? if ( present ( pivot )) then ipiv => pivot else allocate ( ipiv ( n )) endif npiv = size ( ipiv , kind = ilp ) ! Can A be overwritten? By default, do not overwrite if ( present ( overwrite_a )) then copy_a = . not . overwrite_a else copy_a = . true . _ lk endif if ( any ([ lda , n , ldb ] < 1 ) . or . any ([ lda , ldb , ldx ] /= n ) . or . nrhsx /= nrhs . or . npiv /= n ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid sizes: a=' ,[ lda , n ], & 'b=' ,[ ldb , nrhs ], ' x=' ,[ ldx , nrhsx ], & 'pivot=' , n ) call linalg_error_handling ( err0 , err ) return end if ! Initialize a matrix temporary if ( copy_a ) then allocate ( amat ( lda , n ), source = a ) else amat => a endif ! Initialize solution with the rhs x = b xmat ( 1 : n , 1 : nrhs ) => x ! Solve system call gesv ( n , nrhs , amat , lda , ipiv , xmat , ldb , info ) ! Process output call handle_gesv_info ( info , lda , n , nrhs , err0 ) if ( copy_a ) deallocate ( amat ) if (. not . present ( pivot )) deallocate ( ipiv ) ! Process output and return call linalg_error_handling ( err0 , err ) end subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ # : endif # : endfor # : endfor end submodule stdlib_linalg_solve","tags":"","loc":"sourcefile/stdlib_linalg_solve.fypp.html"},{"title":"stdlib_bitsets_64.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_bitsets ) stdlib_bitsets_64 implicit none contains elemental module function all_64 ( self ) result ( all ) ! Returns .TRUE. if all bits in SELF are 1, .FALSE. otherwise. logical :: all class ( bitset_64 ), intent ( in ) :: self intrinsic :: btest integer ( bits_kind ) :: pos do pos = 0 , self % num_bits - 1 if ( . not . btest ( self % block , pos ) ) then all = . false . return end if end do all = . true . end function all_64 elemental module subroutine and_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise AND of the original bits in SET1 ! and SET2. It is required that SET1 have the same number of bits as ! SET2 otherwise the result is undefined. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 ! The set2 extent includes the entire extent of set1. ! The (zeroed) region past the end of set1 is unaffected by ! the iand. set1 % block = iand ( set1 % block , & set2 % block ) end subroutine and_64 elemental module subroutine and_not_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise and of the original bits in SET1 ! with the bitwise negation of SET2. SET1 and SET2 must have the same ! number of bits otherwise the result is undefined. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 ! The not with iand means that the zero'ed regions past the end of each set ! do not interact with the in set regions set1 % block = iand ( set1 % block , not ( set2 % block ) ) end subroutine and_not_64 elemental module function any_64 ( self ) result ( any ) ! Returns .TRUE. if any bit in SELF is 1, .FALSE. otherwise. logical :: any class ( bitset_64 ), intent ( in ) :: self if ( self % block /= 0 ) then any = . true . return else any = . false . end if end function any_64 # : for k1 in INT_KINDS module subroutine assign_log$ { k1 }$_ 64 ( self , logical_vector ) ! Used to define assignment from an array of type logical for bitset_64 type ( bitset_64 ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) integer ( bits_kind ) :: log_size integer ( bits_kind ) :: index log_size = size ( logical_vector , kind = bits_kind ) if ( log_size > 64 ) then error stop module_name // ' % ' // 'ASSIGNMENT' // \" has \" // & \"SIZE(LOGICAL_VECTOR) > 64 with assignment to a BITSET_64.\" end if self % num_bits = log_size self % block = 0 do index = 0 , log_size - 1 if ( logical_vector ( index + 1 ) ) then self % block = ibset ( self % block , index ) end if end do end subroutine assign_log$ { k1 }$_ 64 pure module subroutine log ${ k1 }$_ assign_64 ( logical_vector , set ) ! Used to define assignment to an array of type logical for bitset_64 logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_64 ), intent ( in ) :: set integer ( bits_kind ) :: index allocate ( logical_vector ( set % num_bits ) ) do index = 0 , set % num_bits - 1 if ( set % value ( index ) == 1 ) then logical_vector ( index + 1 ) = . true . else logical_vector ( index + 1 ) = . false . end if end do end subroutine log ${ k1 }$_ assign_64 # : endfor elemental module function bit_count_64 ( self ) result ( bit_count ) ! Returns the number of non-zero bits in SELF. integer ( bits_kind ) :: bit_count class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ) :: pos bit_count = 0 do pos = 0 , self % num_bits - 1 if ( btest ( self % block , pos ) ) bit_count = bit_count + 1 end do end function bit_count_64 elemental module subroutine clear_bit_64 ( self , pos ) ! ! Sets to zero the POS position in SELF. If POS is less than zero or ! greater than BITS(SELF)-1 it is ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . OR . ( pos > self % num_bits - 1 ) ) & return self % block = ibclr ( self % block , pos ) end subroutine clear_bit_64 pure module subroutine clear_range_64 ( self , start_pos , stop_pos ) ! ! Sets to zero all bits from the START_POS to STOP_POS positions in SELF. ! If STOP_POS < START_POS then no bits are modified. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: true_first , true_last true_first = max ( 0_bits_kind , start_pos ) true_last = min ( self % num_bits - 1 , stop_pos ) if ( true_last < true_first ) return call mvbits ( all_zeros , & true_first , & true_last - true_first + 1 , & self % block , & true_first ) end subroutine clear_range_64 elemental module function eqv_64 ( set1 , set2 ) result ( eqv ) ! ! Returns .TRUE. if all bits in SET1 and SET2 have the same value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: eqv type ( bitset_64 ), intent ( in ) :: set1 , set2 eqv = set1 % block == set2 % block end function eqv_64 module subroutine extract_64 ( new , old , start_pos , stop_pos , status ) ! Creates a new bitset, NEW, from a range, START_POS to STOP_POS, in bitset ! OLD. If START_POS is greater than STOP_POS the new bitset is empty. ! If START_POS is less than zero or STOP_POS is greater than BITS(OLD)-1 ! then if STATUS is present it has the value INDEX_INVALID_ERROR, ! otherwise processing stops with an informative message. type ( bitset_64 ), intent ( out ) :: new type ( bitset_64 ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits , i , k character ( * ), parameter :: procedure = 'EXTRACT' if ( start_pos < 0 ) then call error_handler ( 'had a START_POS less than 0.' , & index_invalid_error , status , & module_name , procedure ) return end if if ( stop_pos >= old % num_bits ) then call error_handler ( 'had a STOP_POS greater than BITS(OLD)-1.' , & index_invalid_error , status , & module_name , procedure ) return end if bits = stop_pos - start_pos + 1 if ( bits <= 0 ) then new % num_bits = 0 new % block = 0 return else new % num_bits = bits do i = 0 , bits - 1 k = start_pos + i if ( btest ( old % block , k ) ) & new % block = ibset ( new % block , i ) end do end if if ( present ( status ) ) status = success end subroutine extract_64 elemental module subroutine flip_bit_64 ( self , pos ) ! ! Flips the value at the POS position in SELF, provided the position is ! valid. If POS is less than 0 or greater than BITS(SELF)-1, no value is ! changed. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . OR . pos > self % num_bits - 1 ) return if ( btest ( self % block , pos ) ) then self % block = ibclr ( self % block , pos ) else self % block = ibset ( self % block , pos ) end if end subroutine flip_bit_64 pure module subroutine flip_range_64 ( self , start_pos , stop_pos ) ! ! Flips all valid bits from the START_POS to the STOP_POS positions in ! SELF. If STOP_POS < START_POS no bits are flipped. Positions less than ! 0 or greater than BITS(SELF)-1 are ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: end_bit , start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) call mvbits ( not ( self % block ), & start_bit , & end_bit - start_bit + 1 , & self % block , & start_bit ) end subroutine flip_range_64 module subroutine from_string_64 ( self , string , status ) ! Initializes the bitset `self` treating `string` as a binary literal ! `status` may have the values: ! `success` - if no problems were found, ! `alloc_fault` - if allocation of the bitset failed ! `char_string_too_large_error` - if `string` was too large, or ! `char_string_invalid_error` - if string had an invalid character. class ( bitset_64 ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'FROM_STRING' integer ( int64 ) :: bit integer ( int64 ) :: bits character ( 1 ) :: char bits = len ( string , kind = int64 ) if ( bits > 64 ) then call error_handler ( 'STRING was too long for a ' // & 'BITSET_64 SELF.' , & char_string_too_large_error , status , & module_name , procedure ) return end if self % num_bits = bits do bit = 1 , bits char = string ( bit : bit ) if ( char == '0' ) then call self % clear ( int ( bits - bit , kind = bits_kind ) ) else if ( char == '1' ) then call self % set ( int ( bits - bit , kind = bits_kind ) ) else call error_handler ( 'STRING had a character other than ' // & '0 or 1.' , & char_string_invalid_error , status , & module_name , procedure ) return end if end do if ( present ( status ) ) status = success end subroutine from_string_64 elemental module function ge_64 ( set1 , set2 ) result ( ge ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: ge type ( bitset_64 ), intent ( in ) :: set1 , set2 ge = bge ( set1 % block , set2 % block ) end function ge_64 elemental module function gt_64 ( set1 , set2 ) result ( gt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: gt type ( bitset_64 ), intent ( in ) :: set1 , set2 gt = bgt ( set1 % block , set2 % block ) end function gt_64 module subroutine init_zero_64 ( self , bits , status ) ! ! Creates the bitset, `self`, of size `bits`, with all bits initialized to ! zero. `bits` must be non-negative. If an error occurs and `status` is ! absent then processing stops with an informative stop code. `status` ! will have one of the values: ! * `success` - if no problems were found, ! * `array_size_invalid_error` - if `bits` is either negative or larger ! than 64 with `self` of class `bitset_64`, or ! * `alloc_fault` - if memory allocation failed ! class ( bitset_64 ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = \"INIT\" if ( bits < 0 ) then call error_handler ( 'BITS had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if if ( bits > 64 ) then call error_handler ( 'BITS had a value greater than 64.' , & array_size_invalid_error , status , & module_name , procedure ) return end if self % num_bits = bits self % block = all_zeros if ( present ( status ) ) status = success end subroutine init_zero_64 module subroutine input_64 ( self , unit , status ) ! ! Reads the components of the bitset, `self`, from the unformatted I/O ! unit, `unit`, assuming that the components were written using `output`. ! If an error occurs and `status` is absent then processing stops with ! an informative stop code. `status` has one of the values: ! * `success` - if no problem was found ! * `alloc_fault` - if it failed during allocation of memory for `self`, or ! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative ! or greater than 64 for a `bitset_64` input. ! * `read_failure` - if it failed during the reads from `unit` ! class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = 'INPUT' integer :: stat read ( unit , iostat = ierr , iomsg = message ) bits if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( bits < 0 ) then call error_handler ( 'BITS in UNIT had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if if ( bits > 64 ) then call error_handler ( 'BITS in UNIT had a value greater than 64.' , & array_size_invalid_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'Allocation failure for SELF.' , & alloc_fault , status , module_name , procedure ) return end if if ( bits < 1 ) return read ( unit , iostat = ierr , iomsg = message ) self % block if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( present ( status ) ) status = success end subroutine input_64 elemental module function le_64 ( set1 , set2 ) result ( le ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: le type ( bitset_64 ), intent ( in ) :: set1 , set2 le = ble ( set1 % block , set2 % block ) end function le_64 elemental module function lt_64 ( set1 , set2 ) result ( lt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: lt type ( bitset_64 ), intent ( in ) :: set1 , set2 lt = blt ( set1 % block , set2 % block ) end function lt_64 elemental module function neqv_64 ( set1 , set2 ) result ( neqv ) ! ! Returns .TRUE. if all bits in SET1 and SET2 have the same value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: neqv type ( bitset_64 ), intent ( in ) :: set1 , set2 neqv = set1 % block /= set2 % block end function neqv_64 elemental module function none_64 ( self ) result ( none ) ! ! Returns .TRUE. if none of the bits in SELF have the value 1. ! logical :: none class ( bitset_64 ), intent ( in ) :: self none = . true . if ( self % block /= 0 ) then none = . false . return end if end function none_64 elemental module subroutine not_64 ( self ) ! ! Sets the bits in SELF to their logical complement ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ) :: bit if ( self % num_bits == 0 ) return do bit = 0 , self % num_bits - 1 if ( btest ( self % block , bit ) ) then self % block = ibclr ( self % block , bit ) else self % block = ibset ( self % block , bit ) end if end do end subroutine not_64 elemental module subroutine or_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise OR of the original bits in SET1 ! and SET2. If SET1 has fewer bits than SET2 then the additional bits ! in SET2 are ignored. If SET1 has more bits than SET2, then the ! absent SET2 bits are treated as if present with zero value. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 if ( set1 % num_bits >= set2 % num_bits ) then set1 % block = ior ( set1 % block , & set2 % block ) else ! The set1 extent ends before set2 => set2 bits must not affect bits in ! set1 beyond its extent => set those bits to zero while keeping proper ! values of other bits in set2 set1 % block = & ior ( set1 % block , & ibits ( set2 % block , & 0 , & set1 % num_bits ) ) end if end subroutine or_64 module subroutine output_64 ( self , unit , status ) ! ! Writes the components of the bitset, SELF, to the unformatted I/O ! unit, UNIT, in a unformatted sequence compatible with INPUT. If ! STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value WRITE_FAILURE if the write failed. ! class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"OUTPUT\" write ( unit , iostat = ierr , iomsg = message ) self % num_bits if ( ierr /= 0 ) go to 999 if ( self % num_bits < 1 ) return write ( unit , iostat = ierr , iomsg = message ) self % block if ( ierr /= 0 ) go to 999 return 999 call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) end subroutine output_64 module subroutine read_bitset_string_64 ( self , string , status ) ! ! Uses the bitset literal in the default character `string`, to define ! the bitset, `self`. The literal may be preceded by an an arbitrary ! sequence of blank characters. If `status` is absent an error results ! in an error stop with an informative stop code. If `status` ! is present it has one of the values ! * `success` - if no problems occurred, ! * `alloc_fault` - if allocation of memory for SELF failed, ! * `array_size_invalid_error - if `bits(self)` in `string` is greater ! than 64 for a `bitset_64`, ! * `char_string_invalid_error` - if the bitset literal has an invalid ! character, ! * `char_string_too_small_error - if the string ends before all the bits ! are read. ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! class ( bitset_64 ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits integer ( bits_kind ) :: digits , pos character ( * ), parameter :: procedure = \"READ_BITSET\" integer :: stat pos = 1 find_start : do pos = 1 , len ( string ) if ( string ( pos : pos ) /= ' ' ) exit end do find_start if ( pos > len ( string ) - 8 ) go to 999 if ( string ( pos : pos ) /= 's' . AND . string ( pos : pos ) /= 'S' ) go to 999 pos = pos + 1 bits = 0 digits = 0 do select case ( iachar ( string ( pos : pos ) ) ) case ( ia0 : ia9 ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) & go to 996 if ( digits > max_digits ) go to 996 bits = bits * 10 + iachar ( string ( pos : pos ) ) - ia0 if ( bits < 0 ) go to 996 case ( iachar ( 'b' ), iachar ( 'B' )) exit case default go to 999 end select pos = pos + 1 end do if ( bits > 64 ) then call error_handler ( 'BITS in STRING was greater than 64.' , & char_string_too_large_error , status , & module_name , procedure ) return end if if ( bits + pos > len ( string ) ) then call error_handler ( 'STRING was too small for the number of ' // & 'bits specified by STRING.' , & char_string_too_small_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'There was an allocation fault for SELF.' , & alloc_fault , status , module_name , procedure ) return end if pos = pos + 1 bit = bits - 1 do if ( string ( pos : pos ) == '0' ) then call self % clear ( bit ) ! this may not be needed else if ( string ( pos : pos ) == '1' ) then call self % set ( bit ) else go to 999 end if pos = pos + 1 bit = bit - 1 if ( bit < 0 ) exit end do if ( present ( status ) ) status = success return 996 call error_handler ( 'There was an integer overflow in reading' // & 'size of bitset literal from UNIT' , & integer_overflow_error , status , & module_name , procedure ) return 999 call error_handler ( 'There was an invalid character in STRING' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_string_64 module subroutine read_bitset_unit_64 ( self , unit , advance , status ) ! ! Uses the bitset literal at the current position in the formatted ! file with I/O unit, `unit`, to define the bitset, `self`. The literal ! may be preceded by an arbitrary sequence of blank characters. ! If `advance` is present it must be either 'YES' or 'NO'. If absent ! it has the default value of 'YES' to determine whether advancing ! I/O occurs. If `status` is absent an error results in an error stop ! with an informative stop code. If `status` is present it has one of ! the values: ! * `success` - if no problem occurred, ! * `alloc_fault` - if allocation of `self` failed, ! * `array_size_invalid_error` - if `bits(self)` in the bitset literal ! is greater than 64 for a `bitset_64`. ! * `char_string_invalid_error` - if the read of the bitset literal found ! an invalid character, ! * `eof_failure` - if a `read` statement reaches an end-of-file before ! completing the read of the bitset literal, ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! * `read_failure` - if a `read` statement fails, ! class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits , digits integer :: ierr character ( len = 128 ) :: message character ( * ), parameter :: procedure = \"READ_BITSET\" character ( len = 1 ) :: char do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char select case ( char ) case ( ' ' ) cycle case ( 's' , 'S' ) exit case default go to 999 end select end do bits = 0 digits = 0 do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 998 , & end = 999 , & iostat = ierr , & iomsg = message ) char if ( char == 'b' . or . char == 'B' ) exit select case ( char ) case ( '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) & go to 996 if ( digits > max_digits ) go to 996 bits = 10 * bits + iachar ( char ) - iachar ( '0' ) if ( bits < 0 ) go to 996 case default go to 999 end select end do if ( bits < 0 . OR . digits == 0 . OR . digits > max_digits ) go to 999 if ( bits > 64 ) then call error_handler ( 'BITS in UNIT was greater than 64.' , & array_size_invalid_error , status , & module_name , procedure ) return end if call self % init ( bits ) do bit = 1 , bits - 1 read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if end do read ( unit , & advance = optval ( advance , 'YES' ), & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if if ( present ( status ) ) status = success return 996 call error_handler ( 'Integer overflow in reading size of ' // & 'bitset literal from UNIT.' , & read_failure , status , module_name , procedure ) return 997 call error_handler ( 'Failure on read of UNIT.' , & read_failure , status , module_name , procedure ) return 998 call error_handler ( 'End of File of UNIT before finishing a ' // & 'bitset literal.' , & eof_failure , status , module_name , procedure ) return 999 call error_handler ( 'Invalid character in bitset literal in UNIT ' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_unit_64 elemental module subroutine set_bit_64 ( self , pos ) ! ! Sets the value at the POS position in SELF, provided the position is ! valid. If the position is less than 0 or greater than BITS(SELF)-1 ! then SELF is unchanged. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( block_kind ) :: dummy if ( pos < 0 . OR . pos > self % num_bits - 1 ) return dummy = ibset ( self % block , pos ) self % block = dummy end subroutine set_bit_64 pure module subroutine set_range_64 ( self , start_pos , stop_pos ) ! ! Sets all valid bits to 1 from the START_POS to the STOP_POS positions ! in SELF. If STOP_POA < START_POS no bits are changed. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: end_bit , start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) if ( end_bit < start_bit ) return ! FIRST and LAST are in the same block call mvbits ( all_ones , & start_bit , & end_bit - start_bit + 1 , & self % block , & start_bit ) end subroutine set_range_64 elemental module function test_64 ( self , pos ) result ( test ) ! ! Returns .TRUE. if the POS position is set, .FALSE. otherwise. If POS ! is negative or greater than BITS(SELF) - 1 the result is .FALSE.. ! logical :: test class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . or . pos >= self % num_bits ) then test = . false . else test = btest ( self % block , pos ) end if end function test_64 module subroutine to_string_64 ( self , string , status ) ! ! Represents the value of SELF as a binary literal in STRING ! Status may have the values SUCCESS or ALLOC_FAULT ! class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'TO_STRING' integer :: bit , bit_count , pos , stat bit_count = self % num_bits allocate ( character ( len = bit_count ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if do bit = 0 , bit_count - 1 pos = bit_count - bit if ( btest ( self % block , bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success end subroutine to_string_64 elemental module function value_64 ( self , pos ) result ( value ) ! ! Returns 1 if the POS position is set, 0 otherwise. If POS is negative ! or greater than BITS(SELF) - 1 the result is 0. ! integer :: value class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . or . pos >= self % num_bits ) then value = 0 else if ( btest ( self % block , pos ) ) then value = 1 else value = 0 end if end if end function value_64 module subroutine write_bitset_string_64 ( self , string , status ) ! ! Writes a bitset literal to the allocatable default character STRING, ! representing the individual bit values in the bitset_t, SELF. ! If STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value ALLOC_FAULT if allocation of ! the output string failed. ! class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , & bit_count , & count_digits , & pos integer :: stat character ( * ), parameter :: procedure = 'WRITE_BITSET' bit_count = bits ( self ) call digit_count ( self % num_bits , count_digits ) allocate ( character ( len = count_digits + bit_count + 2 ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if write ( string , \"('S', i0)\" ) self % num_bits string ( count_digits + 2 : count_digits + 2 ) = \"B\" do bit = 0 , bit_count - 1 pos = count_digits + 2 + bit_count - bit if ( btest ( self % block , bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success contains subroutine digit_count ( bits , digits ) integer ( bits_kind ), intent ( in ) :: bits integer ( bits_kind ), intent ( out ) :: digits integer ( bits_kind ) :: factor factor = bits if ( factor <= 0 ) then digits = 1 return end if do digits = 1 , 127 factor = factor / 10 if ( factor == 0 ) return end do end subroutine digit_count end subroutine write_bitset_string_64 module subroutine write_bitset_unit_64 ( self , unit , advance , status ) ! ! Writes a bitset literal to the I/O unit, UNIT, representing the ! individual bit values in the bitset_t, SELF. By default or if ! ADVANCE is present with the value 'YES', advancing output is used. ! If ADVANCE is present with the value 'NO', then the current record ! is not advanced by the write. If STATUS is absent an error results ! in an error stop with an informative stop code. If STATUS is ! present it has the default value of SUCCESS, the value ! ALLOC_FAULT if allocation of the output string failed, or ! WRITE_FAILURE if the WRITE statement outputting the literal failed. ! class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer :: ierr character (:), allocatable :: string character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"WRITE_BITSET\" call self % write_bitset ( string , status ) if ( present ( status ) ) then if ( status /= success ) return end if write ( unit , & FMT = '(A)' , & advance = optval ( advance , 'YES' ), & iostat = ierr , & iomsg = message ) & string if ( ierr /= 0 ) then call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) return endif end subroutine write_bitset_unit_64 elemental module subroutine xor_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise XOR of the original bits in SET1 ! and SET2. SET1 and SET2 must have the same number of bits otherwise ! the result is undefined. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 set1 % block = ieor ( set1 % block , & set2 % block ) end subroutine xor_64 end submodule stdlib_bitsets_64","tags":"","loc":"sourcefile/stdlib_bitsets_64.fypp.html"},{"title":"stdlib_ascii.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" !> The `stdlib_ascii` module provides procedures for handling and manipulating !> intrinsic character variables and constants. !> !> The specification of this module is available [here](../page/specs/stdlib_ascii.html). module stdlib_ascii use stdlib_kinds , only : int8 , int16 , int32 , int64 , lk , c_bool implicit none private ! Character validation functions public :: is_alpha , is_alphanum public :: is_digit , is_hex_digit , is_octal_digit public :: is_control , is_white , is_blank public :: is_ascii , is_punctuation public :: is_graphical , is_printable public :: is_lower , is_upper ! Character conversion functions public :: to_lower , to_upper , to_title , to_sentence , reverse ! All control characters in the ASCII table (see www.asciitable.com). character ( len = 1 ), public , parameter :: NUL = achar ( int ( z '00' )) !! Null character ( len = 1 ), public , parameter :: SOH = achar ( int ( z '01' )) !! Start of heading character ( len = 1 ), public , parameter :: STX = achar ( int ( z '02' )) !! Start of text character ( len = 1 ), public , parameter :: ETX = achar ( int ( z '03' )) !! End of text character ( len = 1 ), public , parameter :: EOT = achar ( int ( z '04' )) !! End of transmission character ( len = 1 ), public , parameter :: ENQ = achar ( int ( z '05' )) !! Enquiry character ( len = 1 ), public , parameter :: ACK = achar ( int ( z '06' )) !! Acknowledge character ( len = 1 ), public , parameter :: BEL = achar ( int ( z '07' )) !! Bell character ( len = 1 ), public , parameter :: BS = achar ( int ( z '08' )) !! Backspace character ( len = 1 ), public , parameter :: TAB = achar ( int ( z '09' )) !! Horizontal tab character ( len = 1 ), public , parameter :: LF = achar ( int ( z '0A' )) !! NL line feed, new line character ( len = 1 ), public , parameter :: VT = achar ( int ( z '0B' )) !! Vertical tab character ( len = 1 ), public , parameter :: FF = achar ( int ( z '0C' )) !! NP form feed, new page character ( len = 1 ), public , parameter :: CR = achar ( int ( z '0D' )) !! Carriage return character ( len = 1 ), public , parameter :: SO = achar ( int ( z '0E' )) !! Shift out character ( len = 1 ), public , parameter :: SI = achar ( int ( z '0F' )) !! Shift in character ( len = 1 ), public , parameter :: DLE = achar ( int ( z '10' )) !! Data link escape character ( len = 1 ), public , parameter :: DC1 = achar ( int ( z '11' )) !! Device control 1 character ( len = 1 ), public , parameter :: DC2 = achar ( int ( z '12' )) !! Device control 2 character ( len = 1 ), public , parameter :: DC3 = achar ( int ( z '13' )) !! Device control 3 character ( len = 1 ), public , parameter :: DC4 = achar ( int ( z '14' )) !! Device control 4 character ( len = 1 ), public , parameter :: NAK = achar ( int ( z '15' )) !! Negative acknowledge character ( len = 1 ), public , parameter :: SYN = achar ( int ( z '16' )) !! Synchronous idle character ( len = 1 ), public , parameter :: ETB = achar ( int ( z '17' )) !! End of transmission block character ( len = 1 ), public , parameter :: CAN = achar ( int ( z '18' )) !! Cancel character ( len = 1 ), public , parameter :: EM = achar ( int ( z '19' )) !! End of medium character ( len = 1 ), public , parameter :: SUB = achar ( int ( z '1A' )) !! Substitute character ( len = 1 ), public , parameter :: ESC = achar ( int ( z '1B' )) !! Escape character ( len = 1 ), public , parameter :: FS = achar ( int ( z '1C' )) !! File separator character ( len = 1 ), public , parameter :: GS = achar ( int ( z '1D' )) !! Group separator character ( len = 1 ), public , parameter :: RS = achar ( int ( z '1E' )) !! Record separator character ( len = 1 ), public , parameter :: US = achar ( int ( z '1F' )) !! Unit separator character ( len = 1 ), public , parameter :: DEL = achar ( int ( z '7F' )) !! Delete ! Constant character sequences character ( len =* ), public , parameter :: fullhex_digits = \"0123456789ABCDEFabcdef\" !! 0 .. 9A .. Fa .. f character ( len =* ), public , parameter :: hex_digits = fullhex_digits ( 1 : 16 ) !! 0 .. 9A .. F character ( len =* ), public , parameter :: lowerhex_digits = \"0123456789abcdef\" !! 0 .. 9a .. f character ( len =* ), public , parameter :: digits = hex_digits ( 1 : 10 ) !! 0 .. 9 character ( len =* ), public , parameter :: octal_digits = digits ( 1 : 8 ) !! 0 .. 7 character ( len =* ), public , parameter :: letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\" !! A .. Za .. z character ( len =* ), public , parameter :: uppercase = letters ( 1 : 26 ) !! A .. Z character ( len =* ), public , parameter :: lowercase = letters ( 27 :) !! a .. z character ( len =* ), public , parameter :: whitespace = \" \" // TAB // VT // CR // LF // FF !! ASCII _whitespace !> Returns a new character sequence which is the lower case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_lower module procedure :: to_lower end interface to_lower !> Returns a new character sequence which is the upper case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_upper module procedure :: to_upper end interface to_upper !> Returns a new character sequence which is the title case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_title module procedure :: to_title end interface to_title !> Returns a new character sequence which is the sentence case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_sentence module procedure :: to_sentence end interface to_sentence !> Returns a new character sequence which is reverse of !> the input charater sequence !> This method is pure and returns a character sequence interface reverse module procedure :: reverse end interface reverse contains !> Checks whether `c` is an ASCII letter (A .. Z, a .. z). pure logical function is_alpha ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_alpha = ( c >= 'A' . and . c <= 'Z' ) . or . ( c >= 'a' . and . c <= 'z' ) end function !> Checks whether `c` is a letter or a number (0 .. 9, a .. z, A .. Z). pure logical function is_alphanum ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_alphanum = ( c >= '0' . and . c <= '9' ) . or . ( c >= 'a' . and . c <= 'z' ) & . or . ( c >= 'A' . and . c <= 'Z' ) end function !> Checks whether or not `c` is in the ASCII character set - !> i.e. in the range 0 .. 0x7F. pure logical function is_ascii ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_ascii = iachar ( c ) <= int ( z '7F' ) end function !> Checks whether `c` is a control character. pure logical function is_control ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) is_control = ic < int ( z '20' ) . or . ic == int ( z '7F' ) end function !> Checks whether `c` is a digit (0 .. 9). pure logical function is_digit ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_digit = ( '0' <= c ) . and . ( c <= '9' ) end function !> Checks whether `c` is a digit in base 8 (0 .. 7). pure logical function is_octal_digit ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_octal_digit = ( c >= '0' ) . and . ( c <= '7' ); end function !> Checks whether `c` is a digit in base 16 (0 .. 9, A .. F, a .. f). pure logical function is_hex_digit ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_hex_digit = ( c >= '0' . and . c <= '9' ) . or . ( c >= 'a' . and . c <= 'f' ) & . or . ( c >= 'A' . and . c <= 'F' ) end function !> Checks whether or not `c` is a punctuation character. That includes !> all ASCII characters which are not control characters, letters, !> digits, or whitespace. pure logical function is_punctuation ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) ! '~' '!' is_punctuation = ( ic <= int ( z '7E' )) . and . ( ic >= int ( z '21' )) . and . & (. not . is_alphanum ( c )) end function !> Checks whether or not `c` is a printable character other than the !> space character. pure logical function is_graphical ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) !The character is graphical if it's between '!' and '~' in the ASCII table, !that is: printable but not a space is_graphical = ( int ( z '21' ) <= ic ) . and . ( ic <= int ( z '7E' )) end function !> Checks whether or not `c` is a printable character - including the !> space character. pure logical function is_printable ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) !The character is printable if it's between ' ' and '~' in the ASCII table is_printable = ic >= iachar ( ' ' ) . and . ic <= int ( z '7E' ) end function !> Checks whether `c` is a lowercase ASCII letter (a .. z). pure logical function is_lower ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) is_lower = ic >= iachar ( 'a' ) . and . ic <= iachar ( 'z' ) end function !> Checks whether `c` is an uppercase ASCII letter (A .. Z). pure logical function is_upper ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_upper = ( c >= 'A' ) . and . ( c <= 'Z' ) end function !> Checks whether or not `c` is a whitespace character. That includes the !> space, tab, vertical tab, form feed, carriage return, and linefeed !> characters. pure logical function is_white ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) ! TAB, LF, VT, FF, CR is_white = ( c == ' ' ) . or . ( ic >= int ( z '09' ) . and . ic <= int ( z '0D' )); end function !> Checks whether or not `c` is a blank character. That includes the !> only the space and tab characters pure logical function is_blank ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) ! TAB is_blank = ( c == ' ' ) . or . ( ic == int ( z '09' )); end function !> Returns the corresponding lowercase letter, if `c` is an uppercase !> ASCII character, otherwise `c` itself. pure function char_to_lower ( c ) result ( t ) character ( len = 1 ), intent ( in ) :: c !! A character. character ( len = 1 ) :: t integer , parameter :: wp = iachar ( 'a' ) - iachar ( 'A' ), BA = iachar ( 'A' ), BZ = iachar ( 'Z' ) integer :: k !Check whether the integer equivalent is between BA=65 and BZ=90 k = ichar ( c ) if ( k >= BA . and . k <= BZ ) k = k + wp t = char ( k ) end function char_to_lower !> Returns the corresponding uppercase letter, if `c` is a lowercase !> ASCII character, otherwise `c` itself. pure function char_to_upper ( c ) result ( t ) character ( len = 1 ), intent ( in ) :: c !! A character. character ( len = 1 ) :: t integer , parameter :: wp = iachar ( 'a' ) - iachar ( 'A' ), la = iachar ( 'a' ), lz = iachar ( 'z' ) integer :: k !Check whether the integer equivalent is between la=97 and lz=122 k = ichar ( c ) if ( k >= la . and . k <= lz ) k = k - wp t = char ( k ) end function char_to_upper !> Convert character variable to lower case !> ([Specification](../page/specs/stdlib_ascii.html#to_lower)) !> !> Version: experimental pure function to_lower ( string ) result ( lower_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: lower_string integer :: i do i = 1 , len ( string ) lower_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_lower !> Convert character variable to upper case !> ([Specification](../page/specs/stdlib_ascii.html#to_upper)) !> !> Version: experimental pure function to_upper ( string ) result ( upper_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: upper_string integer :: i do i = 1 , len ( string ) upper_string ( i : i ) = char_to_upper ( string ( i : i )) end do end function to_upper !> Converts character sequence to title case !> ([Specification](../page/specs/stdlib_ascii.html#to_title)) !> !> Version: experimental pure function to_title ( string ) result ( title_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: title_string integer :: i logical :: capitalize_switch capitalize_switch = . true . do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then if ( capitalize_switch ) then title_string ( i : i ) = char_to_upper ( string ( i : i )) capitalize_switch = . false . else title_string ( i : i ) = char_to_lower ( string ( i : i )) end if else title_string ( i : i ) = string ( i : i ) capitalize_switch = . true . end if end do end function to_title !> Converts character sequence to sentence case !> ([Specification](../page/specs/stdlib_ascii.html#to_sentence)) !> !> Version: experimental pure function to_sentence ( string ) result ( sentence_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: sentence_string integer :: i , n n = len ( string ) do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then sentence_string ( i : i ) = char_to_upper ( string ( i : i )) n = i exit else sentence_string ( i : i ) = string ( i : i ) end if end do do i = n + 1 , len ( string ) sentence_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_sentence !> Reverse the character order in the input character variable !> ([Specification](../page/specs/stdlib_ascii.html#reverse)) !> !> Version: experimental pure function reverse ( string ) result ( reverse_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: reverse_string integer :: i , n n = len ( string ) do i = 1 , n reverse_string ( n - i + 1 : n - i + 1 ) = string ( i : i ) end do end function reverse end module stdlib_ascii","tags":"","loc":"sourcefile/stdlib_ascii.fypp.html"},{"title":"stdlib_array.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Module for index manipulation and general array handling !> !> The specification of this module is available [here](../page/specs/stdlib_array.html). module stdlib_array implicit none private public :: trueloc , falseloc contains !> Version: experimental !> !> Return the positions of the true elements in array. !> [Specification](../page/specs/stdlib_array.html#trueloc) pure function trueloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of true elements integer :: loc ( count ( array )) call logicalloc ( loc , array , . true ., lbound ) end function trueloc !> Version: experimental !> !> Return the positions of the false elements in array. !> [Specification](../page/specs/stdlib_array.html#falseloc) pure function falseloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of false elements integer :: loc ( count (. not . array )) call logicalloc ( loc , array , . false ., lbound ) end function falseloc !> Return the positions of the truthy elements in array pure subroutine logicalloc ( loc , array , truth , lbound ) !> Locations of truthy elements integer , intent ( out ) :: loc (:) !> Mask of logicals logical , intent ( in ) :: array (:) !> Truthy value logical , intent ( in ) :: truth !> Lower bound of array to index integer , intent ( in ), optional :: lbound integer :: i , pos , offset offset = 0 if ( present ( lbound )) offset = lbound - 1 i = 0 do pos = 1 , size ( array ) if ( array ( pos ). eqv . truth ) then i = i + 1 loc ( i ) = pos + offset end if end do end subroutine logicalloc end module stdlib_array","tags":"","loc":"sourcefile/stdlib_array.f90.html"},{"title":"stdlib_ansi.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Terminal color and style escape sequences module stdlib_ansi use stdlib_kinds , only : i1 => int8 use stdlib_string_type , only : string_type implicit none private public :: ansi_code public :: style_reset , style_bold , style_dim , style_italic , style_underline , & & style_blink , style_blink_fast , style_reverse , style_hidden , style_strikethrough public :: fg_color_black , fg_color_red , fg_color_green , fg_color_yellow , fg_color_blue , & & fg_color_magenta , fg_color_cyan , fg_color_white , fg_color_default public :: bg_color_black , bg_color_red , bg_color_green , bg_color_yellow , bg_color_blue , & & bg_color_magenta , bg_color_cyan , bg_color_white , bg_color_default public :: to_string , operator ( + ), operator ( // ) !> Container for terminal escape code type :: ansi_code private !> Style descriptor integer ( i1 ) :: style = - 1_i1 !> Background color descriptor integer ( i1 ) :: bg = - 1_i1 !> Foreground color descriptor integer ( i1 ) :: fg = - 1_i1 end type ansi_code !> Identifier for reset style type ( ansi_code ), parameter :: style_reset = ansi_code ( style = 0 ) !> Identifier for bold style type ( ansi_code ), parameter :: style_bold = ansi_code ( style = 1 ) !> Identifier for dim style type ( ansi_code ), parameter :: style_dim = ansi_code ( style = 2 ) !> Identifier for italic style type ( ansi_code ), parameter :: style_italic = ansi_code ( style = 3 ) !> Identifier for underline style type ( ansi_code ), parameter :: style_underline = ansi_code ( style = 4 ) !> Identifier for blink style type ( ansi_code ), parameter :: style_blink = ansi_code ( style = 5 ) !> Identifier for (fast) blink style type ( ansi_code ), parameter :: style_blink_fast = ansi_code ( style = 6 ) !> Identifier for reverse style type ( ansi_code ), parameter :: style_reverse = ansi_code ( style = 7 ) !> Identifier for hidden style type ( ansi_code ), parameter :: style_hidden = ansi_code ( style = 8 ) !> Identifier for strikethrough style type ( ansi_code ), parameter :: style_strikethrough = ansi_code ( style = 9 ) !> Identifier for black foreground color type ( ansi_code ), parameter :: fg_color_black = ansi_code ( fg = 0 ) !> Identifier for red foreground color type ( ansi_code ), parameter :: fg_color_red = ansi_code ( fg = 1 ) !> Identifier for green foreground color type ( ansi_code ), parameter :: fg_color_green = ansi_code ( fg = 2 ) !> Identifier for yellow foreground color type ( ansi_code ), parameter :: fg_color_yellow = ansi_code ( fg = 3 ) !> Identifier for blue foreground color type ( ansi_code ), parameter :: fg_color_blue = ansi_code ( fg = 4 ) !> Identifier for magenta foreground color type ( ansi_code ), parameter :: fg_color_magenta = ansi_code ( fg = 5 ) !> Identifier for cyan foreground color type ( ansi_code ), parameter :: fg_color_cyan = ansi_code ( fg = 6 ) !> Identifier for white foreground color type ( ansi_code ), parameter :: fg_color_white = ansi_code ( fg = 7 ) !> Identifier for the default foreground color type ( ansi_code ), parameter :: fg_color_default = ansi_code ( fg = 9 ) !> Identifier for black background color type ( ansi_code ), parameter :: bg_color_black = ansi_code ( bg = 0 ) !> Identifier for red background color type ( ansi_code ), parameter :: bg_color_red = ansi_code ( bg = 1 ) !> Identifier for green background color type ( ansi_code ), parameter :: bg_color_green = ansi_code ( bg = 2 ) !> Identifier for yellow background color type ( ansi_code ), parameter :: bg_color_yellow = ansi_code ( bg = 3 ) !> Identifier for blue background color type ( ansi_code ), parameter :: bg_color_blue = ansi_code ( bg = 4 ) !> Identifier for magenta background color type ( ansi_code ), parameter :: bg_color_magenta = ansi_code ( bg = 5 ) !> Identifier for cyan background color type ( ansi_code ), parameter :: bg_color_cyan = ansi_code ( bg = 6 ) !> Identifier for white background color type ( ansi_code ), parameter :: bg_color_white = ansi_code ( bg = 7 ) !> Identifier for the default background color type ( ansi_code ), parameter :: bg_color_default = ansi_code ( bg = 9 ) interface to_string !> Transform a color code into an actual ANSI escape sequence pure module function to_string_ansi_code ( code ) result ( str ) !> Color code to be used type ( ansi_code ), intent ( in ) :: code !> ANSI escape sequence representing the color code character ( len = :), allocatable :: str end function to_string_ansi_code end interface to_string interface operator ( + ) !> Add two escape sequences, attributes in the right value override the left value ones. pure module function add ( lval , rval ) result ( code ) !> First escape code type ( ansi_code ), intent ( in ) :: lval !> Second escape code type ( ansi_code ), intent ( in ) :: rval !> Combined escape code type ( ansi_code ) :: code end function add end interface operator ( + ) interface operator ( // ) !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left ( lval , code ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str end function concat_left !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right ( code , rval ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str end function concat_right !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left_str ( lval , code ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str end function concat_left_str !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right_str ( code , rval ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str end function concat_right_str end interface operator ( // ) end module stdlib_ansi","tags":"","loc":"sourcefile/stdlib_ansi.f90.html"},{"title":"stdlib_stats_moment.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n ${ t1 }$ , allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if n = real ( size ( x , dim ), ${ k1 }$ ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - center ) ** order end do else allocate ( mean_ , source = mean ( x , ${ fi }$ )) do i = 1 , size ( x , ${ fi }$ ) res = res + ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean_ ) ** order end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n real ( dp ), allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if n = real ( size ( x , dim ), dp ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + ( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - & center ) ** order end do else allocate ( mean_ , source = mean ( x , ${ fi }$ )) do i = 1 , size ( x , ${ fi }$ ) res = res + ( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean_ ) ** order end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment.fypp.html"},{"title":"stdlib_math_meshgrid.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES #:set RANKS = range(1, MAXRANK + 1) #:def meshgrid_loop(indices) # : for j in reversed ( indices ) do i$ { j }$ = 1 , size ( x$ { j }$ ) # : endfor # : for j in indices xm$ { j }$ ( ${ \"\" . join ( f \"i{j},\" for j in indices ). removesuffix ( \",\" ) }$ ) = & x$ { j }$ ( i$ { j }$ ) # : endfor # : for j in indices end do # : endfor #:enddef submodule ( stdlib_math ) stdlib_math_meshgrid use stdlib_error , only : error_stop contains # : for k1 , t1 in IR_KINDS_TYPES # : for rank in RANKS # : if rank == 1 # : set XY_INDICES = [ 1 ] # : set IJ_INDICES = [ 1 ] # : else # : set XY_INDICES = [ 2 , 1 ] + [ j for j in range ( 3 , rank + 1 )] # : set IJ_INDICES = [ 1 , 2 ] + [ j for j in range ( 3 , rank + 1 )] # : endif # : set RName = rname ( \"meshgrid\" , rank , t1 , k1 ) module procedure ${ RName }$ integer :: ${ \"\" . join ( f \"i{j},\" for j in range ( 1 , rank + 1 )). removesuffix ( \",\" ) }$ select case ( optval ( indexing , stdlib_meshgrid_xy )) case ( stdlib_meshgrid_xy ) $ : meshgrid_loop ( XY_INDICES ) case ( stdlib_meshgrid_ij ) $ : meshgrid_loop ( IJ_INDICES ) case default call error_stop ( \"ERROR (meshgrid): unexpected indexing.\" ) end select end procedure # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_math_meshgrid.fypp.html"},{"title":"stdlib_linalg_outer_product.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_outer_product implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES pure module function outer_product_$ { t1 [ 0 ] }{ k1 }$ ( u , v ) result ( res ) ${ t1 }$ , intent ( in ) :: u (:), v (:) ${ t1 }$ :: res ( size ( u ), size ( v )) integer :: col do col = 1 , size ( v ) res (:, col ) = v ( col ) * u end do end function outer_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_linalg_outer_product.fypp.html"},{"title":"stdlib_math_linspace.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_math ) stdlib_math_linspace implicit none contains # : for k1 , t1 in REAL_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end ${ t1 }$ :: res ( DEFAULT_LINSPACE_LENGTH ) res = linspace ( start , end , DEFAULT_LINSPACE_LENGTH ) end function ${ RName }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ :: res ( max ( n , 0 )) integer :: i ! Looping index ${ t1 }$ :: interval ! Difference between adjacent elements if ( n <= 0 ) return ! If passed length is less than or equal to 0, return an empty (allocated with length 0) array if ( n == 1 ) then res ( 1 ) = end return end if interval = ( end - start ) / real (( n - 1 ), ${ k1 }$ ) res ( 1 ) = start res ( n ) = end do i = 2 , n - 1 res ( i ) = real (( i - 1 ), ${ k1 }$ ) * interval + start end do end function ${ RName }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) module procedure ${ RName }$ res = linspace ( start , end , DEFAULT_LINSPACE_LENGTH ) end procedure ${ RName }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) module procedure ${ RName }$ real ( ${ k1 }$ ) :: x ( max ( n , 0 )) ! array of the real part of complex number real ( ${ k1 }$ ) :: y ( max ( n , 0 )) ! array of the imaginary part of the complex number x = linspace ( start % re , end % re , n ) y = linspace ( start % im , end % im , n ) res = cmplx ( x , y , kind = ${ k1 }$ ) end procedure ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) module procedure ${ RName }$ res = linspace ( real ( start , kind = dp ), real ( end , kind = dp ), DEFAULT_LINSPACE_LENGTH ) end procedure ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) module procedure ${ RName }$ res = linspace ( real ( start , kind = dp ), real ( end , kind = dp ), n ) end procedure ${ RName }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_math_linspace.fypp.html"},{"title":"stdlib_codata.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_codata !! Codata Constants - Autogenerated use stdlib_kinds , only : dp , int32 use stdlib_codata_type private integer ( int32 ), parameter , public :: YEAR = 2022 !! Year of release. type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_ELECTRON_MASS_RATIO = & codata_constant_type ( \"alpha particle-electron mass ratio\" , & 729 4.29954171_dp , 0.00000017_dp , & \"\" ) !! alpha particle-electron mass ratio type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS = & codata_constant_type ( \"alpha particle mass\" , & 6.6446573450e-27_dp , 0.0000000021e-27_dp , & \"kg\" ) !! alpha particle mass type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"alpha particle mass energy equivalent\" , & 5.9719201997e-10_dp , 0.0000000019e-10_dp , & \"J\" ) !! alpha particle mass energy equivalent type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"alpha particle mass energy equivalent in MeV\" , & 372 7.3794118_dp , 0.0000012_dp , & \"MeV\" ) !! alpha particle mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS_IN_U = & codata_constant_type ( \"alpha particle mass in u\" , & 4.001506179129_dp , 0.000000000062_dp , & \"u\" ) !! alpha particle mass in u type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MOLAR_MASS = & codata_constant_type ( \"alpha particle molar mass\" , & 4.0015061833e-3_dp , 0.0000000012e-3_dp , & \"kg mol^-1\" ) !! alpha particle molar mass type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_PROTON_MASS_RATIO = & codata_constant_type ( \"alpha particle-proton mass ratio\" , & 3.972599690252_dp , 0.000000000070_dp , & \"\" ) !! alpha particle-proton mass ratio type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"alpha particle relative atomic mass\" , & 4.001506179129_dp , 0.000000000062_dp , & \"\" ) !! alpha particle relative atomic mass type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_RMS_CHARGE_RADIUS = & codata_constant_type ( \"alpha particle rms charge radius\" , & 1.6785e-15_dp , 0.0021e-15_dp , & \"m\" ) !! alpha particle rms charge radius type ( codata_constant_type ), parameter , public :: ANGSTROM_STAR = & codata_constant_type ( \"Angstrom star\" , & 1.00001495e-10_dp , 0.00000090e-10_dp , & \"m\" ) !! Angstrom star type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_CONSTANT = & codata_constant_type ( \"atomic mass constant\" , & 1.66053906892e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! atomic mass constant type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT = & codata_constant_type ( \"atomic mass constant energy equivalent\" , & 1.49241808768e-10_dp , 0.00000000046e-10_dp , & \"J\" ) !! atomic mass constant energy equivalent type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"atomic mass constant energy equivalent in MeV\" , & 93 1.49410372_dp , 0.00000029_dp , & \"MeV\" ) !! atomic mass constant energy equivalent in MeV type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-electron volt relationship\" , & 9.3149410372e8_dp , 0.0000000029e8_dp , & \"eV\" ) !! atomic mass unit-electron volt relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_HARTREE_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-hartree relationship\" , & 3.4231776922e7_dp , 0.0000000011e7_dp , & \"E_h\" ) !! atomic mass unit-hartree relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_HERTZ_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-hertz relationship\" , & 2.25234272185e23_dp , 0.00000000070e23_dp , & \"Hz\" ) !! atomic mass unit-hertz relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-inverse meter relationship\" , & 7.5130066209e14_dp , 0.0000000023e14_dp , & \"m^-1\" ) !! atomic mass unit-inverse meter relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_JOULE_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-joule relationship\" , & 1.49241808768e-10_dp , 0.00000000046e-10_dp , & \"J\" ) !! atomic mass unit-joule relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_KELVIN_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-kelvin relationship\" , & 1.08095402067e13_dp , 0.00000000034e13_dp , & \"K\" ) !! atomic mass unit-kelvin relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-kilogram relationship\" , & 1.66053906892e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! atomic mass unit-kilogram relationship type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_1ST_HYPERPOLARIZABILITY = & codata_constant_type ( \"atomic unit of 1st hyperpolarizability\" , & 3.2063612996e-53_dp , 0.0000000015e-53_dp , & \"C^3 m^3 J^-2\" ) !! atomic unit of 1st hyperpolarizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_2ND_HYPERPOLARIZABILITY = & codata_constant_type ( \"atomic unit of 2nd hyperpolarizability\" , & 6.2353799735e-65_dp , 0.0000000039e-65_dp , & \"C^4 m^4 J^-3\" ) !! atomic unit of 2nd hyperpolarizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ACTION = & codata_constant_type ( \"atomic unit of action\" , & 1.054571817e-34_dp , 0.0_dp , & \"J s\" ) !! atomic unit of action type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_CHARGE = & codata_constant_type ( \"atomic unit of charge\" , & 1.602176634e-19_dp , 0.0_dp , & \"C\" ) !! atomic unit of charge type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_CHARGE_DENSITY = & codata_constant_type ( \"atomic unit of charge density\" , & 1.08120238677e12_dp , 0.00000000051e12_dp , & \"C m^-3\" ) !! atomic unit of charge density type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_CURRENT = & codata_constant_type ( \"atomic unit of current\" , & 6.6236182375082e-3_dp , 0.0000000000072e-3_dp , & \"A\" ) !! atomic unit of current type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_DIPOLE_MOM = & codata_constant_type ( \"atomic unit of electric dipole mom.\" , & 8.4783536198e-30_dp , 0.0000000013e-30_dp , & \"C m\" ) !! atomic unit of electric dipole mom. type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_FIELD = & codata_constant_type ( \"atomic unit of electric field\" , & 5.14220675112e11_dp , 0.00000000080e11_dp , & \"V m^-1\" ) !! atomic unit of electric field type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_FIELD_GRADIENT = & codata_constant_type ( \"atomic unit of electric field gradient\" , & 9.7173624424e21_dp , 0.0000000030e21_dp , & \"V m^-2\" ) !! atomic unit of electric field gradient type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_POLARIZABILITY = & codata_constant_type ( \"atomic unit of electric polarizability\" , & 1.64877727212e-41_dp , 0.00000000051e-41_dp , & \"C^2 m^2 J^-1\" ) !! atomic unit of electric polarizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_POTENTIAL = & codata_constant_type ( \"atomic unit of electric potential\" , & 2 7.211386245981_dp , 0.000000000030_dp , & \"V\" ) !! atomic unit of electric potential type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_QUADRUPOLE_MOM = & codata_constant_type ( \"atomic unit of electric quadrupole mom.\" , & 4.4865515185e-40_dp , 0.0000000014e-40_dp , & \"C m^2\" ) !! atomic unit of electric quadrupole mom. type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ENERGY = & codata_constant_type ( \"atomic unit of energy\" , & 4.3597447222060e-18_dp , 0.0000000000048e-18_dp , & \"J\" ) !! atomic unit of energy type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_FORCE = & codata_constant_type ( \"atomic unit of force\" , & 8.2387235038e-8_dp , 0.0000000013e-8_dp , & \"N\" ) !! atomic unit of force type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_LENGTH = & codata_constant_type ( \"atomic unit of length\" , & 5.29177210544e-11_dp , 0.00000000082e-11_dp , & \"m\" ) !! atomic unit of length type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MAG_DIPOLE_MOM = & codata_constant_type ( \"atomic unit of mag. dipole mom.\" , & 1.85480201315e-23_dp , 0.00000000058e-23_dp , & \"J T^-1\" ) !! atomic unit of mag. dipole mom. type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MAG_FLUX_DENSITY = & codata_constant_type ( \"atomic unit of mag. flux density\" , & 2.35051757077e5_dp , 0.00000000073e5_dp , & \"T\" ) !! atomic unit of mag. flux density type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MAGNETIZABILITY = & codata_constant_type ( \"atomic unit of magnetizability\" , & 7.8910365794e-29_dp , 0.0000000049e-29_dp , & \"J T^-2\" ) !! atomic unit of magnetizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MASS = & codata_constant_type ( \"atomic unit of mass\" , & 9.1093837139e-31_dp , 0.0000000028e-31_dp , & \"kg\" ) !! atomic unit of mass type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MOMENTUM = & codata_constant_type ( \"atomic unit of momentum\" , & 1.99285191545e-24_dp , 0.00000000031e-24_dp , & \"kg m s^-1\" ) !! atomic unit of momentum type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_PERMITTIVITY = & codata_constant_type ( \"atomic unit of permittivity\" , & 1.11265005620e-10_dp , 0.00000000017e-10_dp , & \"F m^-1\" ) !! atomic unit of permittivity type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_TIME = & codata_constant_type ( \"atomic unit of time\" , & 2.4188843265864e-17_dp , 0.0000000000026e-17_dp , & \"s\" ) !! atomic unit of time type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_VELOCITY = & codata_constant_type ( \"atomic unit of velocity\" , & 2.18769126216e6_dp , 0.00000000034e6_dp , & \"m s^-1\" ) !! atomic unit of velocity type ( codata_constant_type ), parameter , public :: AVOGADRO_CONSTANT = & codata_constant_type ( \"Avogadro constant\" , & 6.02214076e23_dp , 0.0_dp , & \"mol^-1\" ) !! Avogadro constant type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON = & codata_constant_type ( \"Bohr magneton\" , & 9.2740100657e-24_dp , 0.0000000029e-24_dp , & \"J T^-1\" ) !! Bohr magneton type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_EV_T = & codata_constant_type ( \"Bohr magneton in eV/T\" , & 5.7883817982e-5_dp , 0.0000000018e-5_dp , & \"eV T^-1\" ) !! Bohr magneton in eV/T type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_HZ_T = & codata_constant_type ( \"Bohr magneton in Hz/T\" , & 1.39962449171e10_dp , 0.00000000044e10_dp , & \"Hz T^-1\" ) !! Bohr magneton in Hz/T type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_INVERSE_METER_PER_TESLA = & codata_constant_type ( \"Bohr magneton in inverse meter per tesla\" , & 4 6.686447719_dp , 0.000000015_dp , & \"m^-1 T^-1\" ) !! Bohr magneton in inverse meter per tesla type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_K_T = & codata_constant_type ( \"Bohr magneton in K/T\" , & 0.67171381472_dp , 0.00000000021_dp , & \"K T^-1\" ) !! Bohr magneton in K/T type ( codata_constant_type ), parameter , public :: BOHR_RADIUS = & codata_constant_type ( \"Bohr radius\" , & 5.29177210544e-11_dp , 0.00000000082e-11_dp , & \"m\" ) !! Bohr radius type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT = & codata_constant_type ( \"Boltzmann constant\" , & 1.380649e-23_dp , 0.0_dp , & \"J K^-1\" ) !! Boltzmann constant type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT_IN_EV_K = & codata_constant_type ( \"Boltzmann constant in eV/K\" , & 8.617333262e-5_dp , 0.0_dp , & \"eV K^-1\" ) !! Boltzmann constant in eV/K type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT_IN_HZ_K = & codata_constant_type ( \"Boltzmann constant in Hz/K\" , & 2.083661912e10_dp , 0.0_dp , & \"Hz K^-1\" ) !! Boltzmann constant in Hz/K type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT_IN_INVERSE_METER_PER_KELVIN = & codata_constant_type ( \"Boltzmann constant in inverse meter per kelvin\" , & 6 9.50348004_dp , 0.0_dp , & \"m^-1 K^-1\" ) !! Boltzmann constant in inverse meter per kelvin type ( codata_constant_type ), parameter , public :: CHARACTERISTIC_IMPEDANCE_OF_VACUUM = & codata_constant_type ( \"characteristic impedance of vacuum\" , & 37 6.730313412_dp , 0.000000059_dp , & \"ohm\" ) !! characteristic impedance of vacuum type ( codata_constant_type ), parameter , public :: CLASSICAL_ELECTRON_RADIUS = & codata_constant_type ( \"classical electron radius\" , & 2.8179403205e-15_dp , 0.0000000013e-15_dp , & \"m\" ) !! classical electron radius type ( codata_constant_type ), parameter , public :: COMPTON_WAVELENGTH = & codata_constant_type ( \"Compton wavelength\" , & 2.42631023538e-12_dp , 0.00000000076e-12_dp , & \"m\" ) !! Compton wavelength type ( codata_constant_type ), parameter , public :: CONDUCTANCE_QUANTUM = & codata_constant_type ( \"conductance quantum\" , & 7.748091729e-5_dp , 0.0_dp , & \"S\" ) !! conductance quantum type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_AMPERE_90 = & codata_constant_type ( \"conventional value of ampere-90\" , & 1.00000008887_dp , 0.0_dp , & \"A\" ) !! conventional value of ampere-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_COULOMB_90 = & codata_constant_type ( \"conventional value of coulomb-90\" , & 1.00000008887_dp , 0.0_dp , & \"C\" ) !! conventional value of coulomb-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_FARAD_90 = & codata_constant_type ( \"conventional value of farad-90\" , & 0.99999998220_dp , 0.0_dp , & \"F\" ) !! conventional value of farad-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_HENRY_90 = & codata_constant_type ( \"conventional value of henry-90\" , & 1.00000001779_dp , 0.0_dp , & \"H\" ) !! conventional value of henry-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_JOSEPHSON_CONSTANT = & codata_constant_type ( \"conventional value of Josephson constant\" , & 48359 7.9e9_dp , 0.0_dp , & \"Hz V^-1\" ) !! conventional value of Josephson constant type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_OHM_90 = & codata_constant_type ( \"conventional value of ohm-90\" , & 1.00000001779_dp , 0.0_dp , & \"ohm\" ) !! conventional value of ohm-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_VOLT_90 = & codata_constant_type ( \"conventional value of volt-90\" , & 1.00000010666_dp , 0.0_dp , & \"V\" ) !! conventional value of volt-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_VON_KLITZING_CONSTANT = & codata_constant_type ( \"conventional value of von Klitzing constant\" , & 2581 2.807_dp , 0.0_dp , & \"ohm\" ) !! conventional value of von Klitzing constant type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_WATT_90 = & codata_constant_type ( \"conventional value of watt-90\" , & 1.00000019553_dp , 0.0_dp , & \"W\" ) !! conventional value of watt-90 type ( codata_constant_type ), parameter , public :: COPPER_X_UNIT = & codata_constant_type ( \"Copper x unit\" , & 1.00207697e-13_dp , 0.00000028e-13_dp , & \"m\" ) !! Copper x unit type ( codata_constant_type ), parameter , public :: DEUTERON_ELECTRON_MAG_MOM_RATIO = & codata_constant_type ( \"deuteron-electron mag. mom. ratio\" , & - 4.664345550e-4_dp , 0.000000012e-4_dp , & \"\" ) !! deuteron-electron mag. mom. ratio type ( codata_constant_type ), parameter , public :: DEUTERON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"deuteron-electron mass ratio\" , & 367 0.482967655_dp , 0.000000063_dp , & \"\" ) !! deuteron-electron mass ratio type ( codata_constant_type ), parameter , public :: DEUTERON_G_FACTOR = & codata_constant_type ( \"deuteron g factor\" , & 0.8574382335_dp , 0.0000000022_dp , & \"\" ) !! deuteron g factor type ( codata_constant_type ), parameter , public :: DEUTERON_MAG_MOM = & codata_constant_type ( \"deuteron mag. mom.\" , & 4.330735087e-27_dp , 0.000000011e-27_dp , & \"J T^-1\" ) !! deuteron mag. mom. type ( codata_constant_type ), parameter , public :: DEUTERON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"deuteron mag. mom. to Bohr magneton ratio\" , & 4.669754568e-4_dp , 0.000000012e-4_dp , & \"\" ) !! deuteron mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: DEUTERON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"deuteron mag. mom. to nuclear magneton ratio\" , & 0.8574382335_dp , 0.0000000022_dp , & \"\" ) !! deuteron mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: DEUTERON_MASS = & codata_constant_type ( \"deuteron mass\" , & 3.3435837768e-27_dp , 0.0000000010e-27_dp , & \"kg\" ) !! deuteron mass type ( codata_constant_type ), parameter , public :: DEUTERON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"deuteron mass energy equivalent\" , & 3.00506323491e-10_dp , 0.00000000094e-10_dp , & \"J\" ) !! deuteron mass energy equivalent type ( codata_constant_type ), parameter , public :: DEUTERON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"deuteron mass energy equivalent in MeV\" , & 187 5.61294500_dp , 0.00000058_dp , & \"MeV\" ) !! deuteron mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: DEUTERON_MASS_IN_U = & codata_constant_type ( \"deuteron mass in u\" , & 2.013553212544_dp , 0.000000000015_dp , & \"u\" ) !! deuteron mass in u type ( codata_constant_type ), parameter , public :: DEUTERON_MOLAR_MASS = & codata_constant_type ( \"deuteron molar mass\" , & 2.01355321466e-3_dp , 0.00000000063e-3_dp , & \"kg mol^-1\" ) !! deuteron molar mass type ( codata_constant_type ), parameter , public :: DEUTERON_NEUTRON_MAG_MOM_RATIO = & codata_constant_type ( \"deuteron-neutron mag. mom. ratio\" , & - 0.44820652_dp , 0.00000011_dp , & \"\" ) !! deuteron-neutron mag. mom. ratio type ( codata_constant_type ), parameter , public :: DEUTERON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"deuteron-proton mag. mom. ratio\" , & 0.30701220930_dp , 0.00000000079_dp , & \"\" ) !! deuteron-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: DEUTERON_PROTON_MASS_RATIO = & codata_constant_type ( \"deuteron-proton mass ratio\" , & 1.9990075012699_dp , 0.0000000000084_dp , & \"\" ) !! deuteron-proton mass ratio type ( codata_constant_type ), parameter , public :: DEUTERON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"deuteron relative atomic mass\" , & 2.013553212544_dp , 0.000000000015_dp , & \"\" ) !! deuteron relative atomic mass type ( codata_constant_type ), parameter , public :: DEUTERON_RMS_CHARGE_RADIUS = & codata_constant_type ( \"deuteron rms charge radius\" , & 2.12778e-15_dp , 0.00027e-15_dp , & \"m\" ) !! deuteron rms charge radius type ( codata_constant_type ), parameter , public :: ELECTRON_CHARGE_TO_MASS_QUOTIENT = & codata_constant_type ( \"electron charge to mass quotient\" , & - 1.75882000838e11_dp , 0.00000000055e11_dp , & \"C kg^-1\" ) !! electron charge to mass quotient type ( codata_constant_type ), parameter , public :: ELECTRON_DEUTERON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-deuteron mag. mom. ratio\" , & - 214 3.9234921_dp , 0.0000056_dp , & \"\" ) !! electron-deuteron mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_DEUTERON_MASS_RATIO = & codata_constant_type ( \"electron-deuteron mass ratio\" , & 2.724437107629e-4_dp , 0.000000000047e-4_dp , & \"\" ) !! electron-deuteron mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_G_FACTOR = & codata_constant_type ( \"electron g factor\" , & - 2.00231930436092_dp , 0.00000000000036_dp , & \"\" ) !! electron g factor type ( codata_constant_type ), parameter , public :: ELECTRON_GYROMAG_RATIO = & codata_constant_type ( \"electron gyromag. ratio\" , & 1.76085962784e11_dp , 0.00000000055e11_dp , & \"s^-1 T^-1\" ) !! electron gyromag. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"electron gyromag. ratio in MHz/T\" , & 2802 4.9513861_dp , 0.0000087_dp , & \"MHz T^-1\" ) !! electron gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: ELECTRON_HELION_MASS_RATIO = & codata_constant_type ( \"electron-helion mass ratio\" , & 1.819543074649e-4_dp , 0.000000000053e-4_dp , & \"\" ) !! electron-helion mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM = & codata_constant_type ( \"electron mag. mom.\" , & - 9.2847646917e-24_dp , 0.0000000029e-24_dp , & \"J T^-1\" ) !! electron mag. mom. type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM_ANOMALY = & codata_constant_type ( \"electron mag. mom. anomaly\" , & 1.15965218046e-3_dp , 0.00000000018e-3_dp , & \"\" ) !! electron mag. mom. anomaly type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"electron mag. mom. to Bohr magneton ratio\" , & - 1.00115965218046_dp , 0.00000000000018_dp , & \"\" ) !! electron mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"electron mag. mom. to nuclear magneton ratio\" , & - 183 8.281971877_dp , 0.000000032_dp , & \"\" ) !! electron mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MASS = & codata_constant_type ( \"electron mass\" , & 9.1093837139e-31_dp , 0.0000000028e-31_dp , & \"kg\" ) !! electron mass type ( codata_constant_type ), parameter , public :: ELECTRON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"electron mass energy equivalent\" , & 8.1871057880e-14_dp , 0.0000000026e-14_dp , & \"J\" ) !! electron mass energy equivalent type ( codata_constant_type ), parameter , public :: ELECTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"electron mass energy equivalent in MeV\" , & 0.51099895069_dp , 0.00000000016_dp , & \"MeV\" ) !! electron mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: ELECTRON_MASS_IN_U = & codata_constant_type ( \"electron mass in u\" , & 5.485799090441e-4_dp , 0.000000000097e-4_dp , & \"u\" ) !! electron mass in u type ( codata_constant_type ), parameter , public :: ELECTRON_MOLAR_MASS = & codata_constant_type ( \"electron molar mass\" , & 5.4857990962e-7_dp , 0.0000000017e-7_dp , & \"kg mol^-1\" ) !! electron molar mass type ( codata_constant_type ), parameter , public :: ELECTRON_MUON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-muon mag. mom. ratio\" , & 20 6.7669881_dp , 0.0000046_dp , & \"\" ) !! electron-muon mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MUON_MASS_RATIO = & codata_constant_type ( \"electron-muon mass ratio\" , & 4.83633170e-3_dp , 0.00000011e-3_dp , & \"\" ) !! electron-muon mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_NEUTRON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-neutron mag. mom. ratio\" , & 96 0.92048_dp , 0.00023_dp , & \"\" ) !! electron-neutron mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_NEUTRON_MASS_RATIO = & codata_constant_type ( \"electron-neutron mass ratio\" , & 5.4386734416e-4_dp , 0.0000000022e-4_dp , & \"\" ) !! electron-neutron mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-proton mag. mom. ratio\" , & - 65 8.21068789_dp , 0.00000019_dp , & \"\" ) !! electron-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_PROTON_MASS_RATIO = & codata_constant_type ( \"electron-proton mass ratio\" , & 5.446170214889e-4_dp , 0.000000000094e-4_dp , & \"\" ) !! electron-proton mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"electron relative atomic mass\" , & 5.485799090441e-4_dp , 0.000000000097e-4_dp , & \"\" ) !! electron relative atomic mass type ( codata_constant_type ), parameter , public :: ELECTRON_TAU_MASS_RATIO = & codata_constant_type ( \"electron-tau mass ratio\" , & 2.87585e-4_dp , 0.00019e-4_dp , & \"\" ) !! electron-tau mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TO_ALPHA_PARTICLE_MASS_RATIO = & codata_constant_type ( \"electron to alpha particle mass ratio\" , & 1.370933554733e-4_dp , 0.000000000032e-4_dp , & \"\" ) !! electron to alpha particle mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TO_SHIELDED_HELION_MAG_MOM_RATIO = & codata_constant_type ( \"electron to shielded helion mag. mom. ratio\" , & 86 4.05823986_dp , 0.00000070_dp , & \"\" ) !! electron to shielded helion mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"electron to shielded proton mag. mom. ratio\" , & - 65 8.2275856_dp , 0.0000027_dp , & \"\" ) !! electron to shielded proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TRITON_MASS_RATIO = & codata_constant_type ( \"electron-triton mass ratio\" , & 1.819200062327e-4_dp , 0.000000000068e-4_dp , & \"\" ) !! electron-triton mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT = & codata_constant_type ( \"electron volt\" , & 1.602176634e-19_dp , 0.0_dp , & \"J\" ) !! electron volt type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"electron volt-atomic mass unit relationship\" , & 1.07354410083e-9_dp , 0.00000000033e-9_dp , & \"u\" ) !! electron volt-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_HARTREE_RELATIONSHIP = & codata_constant_type ( \"electron volt-hartree relationship\" , & 3.6749322175665e-2_dp , 0.0000000000040e-2_dp , & \"E_h\" ) !! electron volt-hartree relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_HERTZ_RELATIONSHIP = & codata_constant_type ( \"electron volt-hertz relationship\" , & 2.417989242e14_dp , 0.0_dp , & \"Hz\" ) !! electron volt-hertz relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"electron volt-inverse meter relationship\" , & 8.065543937e5_dp , 0.0_dp , & \"m^-1\" ) !! electron volt-inverse meter relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_JOULE_RELATIONSHIP = & codata_constant_type ( \"electron volt-joule relationship\" , & 1.602176634e-19_dp , 0.0_dp , & \"J\" ) !! electron volt-joule relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_KELVIN_RELATIONSHIP = & codata_constant_type ( \"electron volt-kelvin relationship\" , & 1.160451812e4_dp , 0.0_dp , & \"K\" ) !! electron volt-kelvin relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"electron volt-kilogram relationship\" , & 1.782661921e-36_dp , 0.0_dp , & \"kg\" ) !! electron volt-kilogram relationship type ( codata_constant_type ), parameter , public :: ELEMENTARY_CHARGE = & codata_constant_type ( \"elementary charge\" , & 1.602176634e-19_dp , 0.0_dp , & \"C\" ) !! elementary charge type ( codata_constant_type ), parameter , public :: ELEMENTARY_CHARGE_OVER_H_BAR = & codata_constant_type ( \"elementary charge over h-bar\" , & 1.519267447e15_dp , 0.0_dp , & \"A J^-1\" ) !! elementary charge over h-bar type ( codata_constant_type ), parameter , public :: FARADAY_CONSTANT = & codata_constant_type ( \"Faraday constant\" , & 9648 5.33212_dp , 0.0_dp , & \"C mol^-1\" ) !! Faraday constant type ( codata_constant_type ), parameter , public :: FERMI_COUPLING_CONSTANT = & codata_constant_type ( \"Fermi coupling constant\" , & 1.1663787e-5_dp , 0.0000006e-5_dp , & \"GeV^-2\" ) !! Fermi coupling constant type ( codata_constant_type ), parameter , public :: FINE_STRUCTURE_CONSTANT = & codata_constant_type ( \"fine-structure constant\" , & 7.2973525643e-3_dp , 0.0000000011e-3_dp , & \"\" ) !! fine-structure constant type ( codata_constant_type ), parameter , public :: FIRST_RADIATION_CONSTANT = & codata_constant_type ( \"first radiation constant\" , & 3.741771852e-16_dp , 0.0_dp , & \"W m^2\" ) !! first radiation constant type ( codata_constant_type ), parameter , public :: FIRST_RADIATION_CONSTANT_FOR_SPECTRAL_RADIANCE = & codata_constant_type ( \"first radiation constant for spectral radiance\" , & 1.191042972e-16_dp , 0.0_dp , & \"W m^2 sr^-1\" ) !! first radiation constant for spectral radiance type ( codata_constant_type ), parameter , public :: HARTREE_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"hartree-atomic mass unit relationship\" , & 2.92126231797e-8_dp , 0.00000000091e-8_dp , & \"u\" ) !! hartree-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: HARTREE_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"hartree-electron volt relationship\" , & 2 7.211386245981_dp , 0.000000000030_dp , & \"eV\" ) !! hartree-electron volt relationship type ( codata_constant_type ), parameter , public :: HARTREE_ENERGY = & codata_constant_type ( \"Hartree energy\" , & 4.3597447222060e-18_dp , 0.0000000000048e-18_dp , & \"J\" ) !! Hartree energy type ( codata_constant_type ), parameter , public :: HARTREE_ENERGY_IN_EV = & codata_constant_type ( \"Hartree energy in eV\" , & 2 7.211386245981_dp , 0.000000000030_dp , & \"eV\" ) !! Hartree energy in eV type ( codata_constant_type ), parameter , public :: HARTREE_HERTZ_RELATIONSHIP = & codata_constant_type ( \"hartree-hertz relationship\" , & 6.5796839204999e15_dp , 0.0000000000072e15_dp , & \"Hz\" ) !! hartree-hertz relationship type ( codata_constant_type ), parameter , public :: HARTREE_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"hartree-inverse meter relationship\" , & 2.1947463136314e7_dp , 0.0000000000024e7_dp , & \"m^-1\" ) !! hartree-inverse meter relationship type ( codata_constant_type ), parameter , public :: HARTREE_JOULE_RELATIONSHIP = & codata_constant_type ( \"hartree-joule relationship\" , & 4.3597447222060e-18_dp , 0.0000000000048e-18_dp , & \"J\" ) !! hartree-joule relationship type ( codata_constant_type ), parameter , public :: HARTREE_KELVIN_RELATIONSHIP = & codata_constant_type ( \"hartree-kelvin relationship\" , & 3.1577502480398e5_dp , 0.0000000000034e5_dp , & \"K\" ) !! hartree-kelvin relationship type ( codata_constant_type ), parameter , public :: HARTREE_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"hartree-kilogram relationship\" , & 4.8508702095419e-35_dp , 0.0000000000053e-35_dp , & \"kg\" ) !! hartree-kilogram relationship type ( codata_constant_type ), parameter , public :: HELION_ELECTRON_MASS_RATIO = & codata_constant_type ( \"helion-electron mass ratio\" , & 549 5.88527984_dp , 0.00000016_dp , & \"\" ) !! helion-electron mass ratio type ( codata_constant_type ), parameter , public :: HELION_G_FACTOR = & codata_constant_type ( \"helion g factor\" , & - 4.2552506995_dp , 0.0000000034_dp , & \"\" ) !! helion g factor type ( codata_constant_type ), parameter , public :: HELION_MAG_MOM = & codata_constant_type ( \"helion mag. mom.\" , & - 1.07461755198e-26_dp , 0.00000000093e-26_dp , & \"J T^-1\" ) !! helion mag. mom. type ( codata_constant_type ), parameter , public :: HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"helion mag. mom. to Bohr magneton ratio\" , & - 1.15874098083e-3_dp , 0.00000000094e-3_dp , & \"\" ) !! helion mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"helion mag. mom. to nuclear magneton ratio\" , & - 2.1276253498_dp , 0.0000000017_dp , & \"\" ) !! helion mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: HELION_MASS = & codata_constant_type ( \"helion mass\" , & 5.0064127862e-27_dp , 0.0000000016e-27_dp , & \"kg\" ) !! helion mass type ( codata_constant_type ), parameter , public :: HELION_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"helion mass energy equivalent\" , & 4.4995394185e-10_dp , 0.0000000014e-10_dp , & \"J\" ) !! helion mass energy equivalent type ( codata_constant_type ), parameter , public :: HELION_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"helion mass energy equivalent in MeV\" , & 280 8.39161112_dp , 0.00000088_dp , & \"MeV\" ) !! helion mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: HELION_MASS_IN_U = & codata_constant_type ( \"helion mass in u\" , & 3.014932246932_dp , 0.000000000074_dp , & \"u\" ) !! helion mass in u type ( codata_constant_type ), parameter , public :: HELION_MOLAR_MASS = & codata_constant_type ( \"helion molar mass\" , & 3.01493225010e-3_dp , 0.00000000094e-3_dp , & \"kg mol^-1\" ) !! helion molar mass type ( codata_constant_type ), parameter , public :: HELION_PROTON_MASS_RATIO = & codata_constant_type ( \"helion-proton mass ratio\" , & 2.993152671552_dp , 0.000000000070_dp , & \"\" ) !! helion-proton mass ratio type ( codata_constant_type ), parameter , public :: HELION_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"helion relative atomic mass\" , & 3.014932246932_dp , 0.000000000074_dp , & \"\" ) !! helion relative atomic mass type ( codata_constant_type ), parameter , public :: HELION_SHIELDING_SHIFT = & codata_constant_type ( \"helion shielding shift\" , & 5.9967029e-5_dp , 0.0000023e-5_dp , & \"\" ) !! helion shielding shift type ( codata_constant_type ), parameter , public :: HERTZ_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"hertz-atomic mass unit relationship\" , & 4.4398216590e-24_dp , 0.0000000014e-24_dp , & \"u\" ) !! hertz-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: HERTZ_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"hertz-electron volt relationship\" , & 4.135667696e-15_dp , 0.0_dp , & \"eV\" ) !! hertz-electron volt relationship type ( codata_constant_type ), parameter , public :: HERTZ_HARTREE_RELATIONSHIP = & codata_constant_type ( \"hertz-hartree relationship\" , & 1.5198298460574e-16_dp , 0.0000000000017e-16_dp , & \"E_h\" ) !! hertz-hartree relationship type ( codata_constant_type ), parameter , public :: HERTZ_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"hertz-inverse meter relationship\" , & 3.335640951e-9_dp , 0.0_dp , & \"m^-1\" ) !! hertz-inverse meter relationship type ( codata_constant_type ), parameter , public :: HERTZ_JOULE_RELATIONSHIP = & codata_constant_type ( \"hertz-joule relationship\" , & 6.62607015e-34_dp , 0.0_dp , & \"J\" ) !! hertz-joule relationship type ( codata_constant_type ), parameter , public :: HERTZ_KELVIN_RELATIONSHIP = & codata_constant_type ( \"hertz-kelvin relationship\" , & 4.799243073e-11_dp , 0.0_dp , & \"K\" ) !! hertz-kelvin relationship type ( codata_constant_type ), parameter , public :: HERTZ_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"hertz-kilogram relationship\" , & 7.372497323e-51_dp , 0.0_dp , & \"kg\" ) !! hertz-kilogram relationship type ( codata_constant_type ), parameter , public :: HYPERFINE_TRANSITION_FREQUENCY_OF_CS_133 = & codata_constant_type ( \"hyperfine transition frequency of Cs-133\" , & 9192631770_dp , 0.0_dp , & \"Hz\" ) !! hyperfine transition frequency of Cs-133 type ( codata_constant_type ), parameter , public :: INVERSE_FINE_STRUCTURE_CONSTANT = & codata_constant_type ( \"inverse fine-structure constant\" , & 13 7.035999177_dp , 0.000000021_dp , & \"\" ) !! inverse fine-structure constant type ( codata_constant_type ), parameter , public :: INVERSE_METER_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"inverse meter-atomic mass unit relationship\" , & 1.33102504824e-15_dp , 0.00000000041e-15_dp , & \"u\" ) !! inverse meter-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"inverse meter-electron volt relationship\" , & 1.239841984e-6_dp , 0.0_dp , & \"eV\" ) !! inverse meter-electron volt relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_HARTREE_RELATIONSHIP = & codata_constant_type ( \"inverse meter-hartree relationship\" , & 4.5563352529132e-8_dp , 0.0000000000050e-8_dp , & \"E_h\" ) !! inverse meter-hartree relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_HERTZ_RELATIONSHIP = & codata_constant_type ( \"inverse meter-hertz relationship\" , & 299792458_dp , 0.0_dp , & \"Hz\" ) !! inverse meter-hertz relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_JOULE_RELATIONSHIP = & codata_constant_type ( \"inverse meter-joule relationship\" , & 1.986445857e-25_dp , 0.0_dp , & \"J\" ) !! inverse meter-joule relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_KELVIN_RELATIONSHIP = & codata_constant_type ( \"inverse meter-kelvin relationship\" , & 1.438776877e-2_dp , 0.0_dp , & \"K\" ) !! inverse meter-kelvin relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"inverse meter-kilogram relationship\" , & 2.210219094e-42_dp , 0.0_dp , & \"kg\" ) !! inverse meter-kilogram relationship type ( codata_constant_type ), parameter , public :: INVERSE_OF_CONDUCTANCE_QUANTUM = & codata_constant_type ( \"inverse of conductance quantum\" , & 1290 6.40372_dp , 0.0_dp , & \"ohm\" ) !! inverse of conductance quantum type ( codata_constant_type ), parameter , public :: JOSEPHSON_CONSTANT = & codata_constant_type ( \"Josephson constant\" , & 48359 7.8484e9_dp , 0.0_dp , & \"Hz V^-1\" ) !! Josephson constant type ( codata_constant_type ), parameter , public :: JOULE_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"joule-atomic mass unit relationship\" , & 6.7005352471e9_dp , 0.0000000021e9_dp , & \"u\" ) !! joule-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: JOULE_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"joule-electron volt relationship\" , & 6.241509074e18_dp , 0.0_dp , & \"eV\" ) !! joule-electron volt relationship type ( codata_constant_type ), parameter , public :: JOULE_HARTREE_RELATIONSHIP = & codata_constant_type ( \"joule-hartree relationship\" , & 2.2937122783969e17_dp , 0.0000000000025e17_dp , & \"E_h\" ) !! joule-hartree relationship type ( codata_constant_type ), parameter , public :: JOULE_HERTZ_RELATIONSHIP = & codata_constant_type ( \"joule-hertz relationship\" , & 1.509190179e33_dp , 0.0_dp , & \"Hz\" ) !! joule-hertz relationship type ( codata_constant_type ), parameter , public :: JOULE_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"joule-inverse meter relationship\" , & 5.034116567e24_dp , 0.0_dp , & \"m^-1\" ) !! joule-inverse meter relationship type ( codata_constant_type ), parameter , public :: JOULE_KELVIN_RELATIONSHIP = & codata_constant_type ( \"joule-kelvin relationship\" , & 7.242970516e22_dp , 0.0_dp , & \"K\" ) !! joule-kelvin relationship type ( codata_constant_type ), parameter , public :: JOULE_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"joule-kilogram relationship\" , & 1.112650056e-17_dp , 0.0_dp , & \"kg\" ) !! joule-kilogram relationship type ( codata_constant_type ), parameter , public :: KELVIN_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"kelvin-atomic mass unit relationship\" , & 9.2510872884e-14_dp , 0.0000000029e-14_dp , & \"u\" ) !! kelvin-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: KELVIN_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"kelvin-electron volt relationship\" , & 8.617333262e-5_dp , 0.0_dp , & \"eV\" ) !! kelvin-electron volt relationship type ( codata_constant_type ), parameter , public :: KELVIN_HARTREE_RELATIONSHIP = & codata_constant_type ( \"kelvin-hartree relationship\" , & 3.1668115634564e-6_dp , 0.0000000000035e-6_dp , & \"E_h\" ) !! kelvin-hartree relationship type ( codata_constant_type ), parameter , public :: KELVIN_HERTZ_RELATIONSHIP = & codata_constant_type ( \"kelvin-hertz relationship\" , & 2.083661912e10_dp , 0.0_dp , & \"Hz\" ) !! kelvin-hertz relationship type ( codata_constant_type ), parameter , public :: KELVIN_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"kelvin-inverse meter relationship\" , & 6 9.50348004_dp , 0.0_dp , & \"m^-1\" ) !! kelvin-inverse meter relationship type ( codata_constant_type ), parameter , public :: KELVIN_JOULE_RELATIONSHIP = & codata_constant_type ( \"kelvin-joule relationship\" , & 1.380649e-23_dp , 0.0_dp , & \"J\" ) !! kelvin-joule relationship type ( codata_constant_type ), parameter , public :: KELVIN_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"kelvin-kilogram relationship\" , & 1.536179187e-40_dp , 0.0_dp , & \"kg\" ) !! kelvin-kilogram relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"kilogram-atomic mass unit relationship\" , & 6.0221407537e26_dp , 0.0000000019e26_dp , & \"u\" ) !! kilogram-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"kilogram-electron volt relationship\" , & 5.609588603e35_dp , 0.0_dp , & \"eV\" ) !! kilogram-electron volt relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_HARTREE_RELATIONSHIP = & codata_constant_type ( \"kilogram-hartree relationship\" , & 2.0614857887415e34_dp , 0.0000000000022e34_dp , & \"E_h\" ) !! kilogram-hartree relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_HERTZ_RELATIONSHIP = & codata_constant_type ( \"kilogram-hertz relationship\" , & 1.356392489e50_dp , 0.0_dp , & \"Hz\" ) !! kilogram-hertz relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"kilogram-inverse meter relationship\" , & 4.524438335e41_dp , 0.0_dp , & \"m^-1\" ) !! kilogram-inverse meter relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_JOULE_RELATIONSHIP = & codata_constant_type ( \"kilogram-joule relationship\" , & 8.987551787e16_dp , 0.0_dp , & \"J\" ) !! kilogram-joule relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_KELVIN_RELATIONSHIP = & codata_constant_type ( \"kilogram-kelvin relationship\" , & 6.509657260e39_dp , 0.0_dp , & \"K\" ) !! kilogram-kelvin relationship type ( codata_constant_type ), parameter , public :: LATTICE_PARAMETER_OF_SILICON = & codata_constant_type ( \"lattice parameter of silicon\" , & 5.431020511e-10_dp , 0.000000089e-10_dp , & \"m\" ) !! lattice parameter of silicon type ( codata_constant_type ), parameter , public :: LATTICE_SPACING_OF_IDEAL_SI_220 = & codata_constant_type ( \"lattice spacing of ideal Si (220)\" , & 1.920155716e-10_dp , 0.000000032e-10_dp , & \"m\" ) !! lattice spacing of ideal Si (220) type ( codata_constant_type ), parameter , public :: LOSCHMIDT_CONSTANT_273_15_K_100_KPA = & codata_constant_type ( \"Loschmidt constant (273.15 K, 100 kPa)\" , & 2.651645804e25_dp , 0.0_dp , & \"m^-3\" ) !! Loschmidt constant (273.15 K, 100 kPa) type ( codata_constant_type ), parameter , public :: LOSCHMIDT_CONSTANT_273_15_K_101_325_KPA = & codata_constant_type ( \"Loschmidt constant (273.15 K, 101.325 kPa)\" , & 2.686780111e25_dp , 0.0_dp , & \"m^-3\" ) !! Loschmidt constant (273.15 K, 101.325 kPa) type ( codata_constant_type ), parameter , public :: LUMINOUS_EFFICACY = & codata_constant_type ( \"luminous efficacy\" , & 683_dp , 0.0_dp , & \"lm W^-1\" ) !! luminous efficacy type ( codata_constant_type ), parameter , public :: MAG_FLUX_QUANTUM = & codata_constant_type ( \"mag. flux quantum\" , & 2.067833848e-15_dp , 0.0_dp , & \"Wb\" ) !! mag. flux quantum type ( codata_constant_type ), parameter , public :: MOLAR_GAS_CONSTANT = & codata_constant_type ( \"molar gas constant\" , & 8.314462618_dp , 0.0_dp , & \"J mol^-1 K^-1\" ) !! molar gas constant type ( codata_constant_type ), parameter , public :: MOLAR_MASS_CONSTANT = & codata_constant_type ( \"molar mass constant\" , & 1.00000000105e-3_dp , 0.00000000031e-3_dp , & \"kg mol^-1\" ) !! molar mass constant type ( codata_constant_type ), parameter , public :: MOLAR_MASS_OF_CARBON_12 = & codata_constant_type ( \"molar mass of carbon-12\" , & 1 2.0000000126e-3_dp , 0.0000000037e-3_dp , & \"kg mol^-1\" ) !! molar mass of carbon-12 type ( codata_constant_type ), parameter , public :: MOLAR_PLANCK_CONSTANT = & codata_constant_type ( \"molar Planck constant\" , & 3.990312712e-10_dp , 0.0_dp , & \"J Hz^-1 mol^-1\" ) !! molar Planck constant type ( codata_constant_type ), parameter , public :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_100_KPA = & codata_constant_type ( \"molar volume of ideal gas (273.15 K, 100 kPa)\" , & 2 2.71095464e-3_dp , 0.0_dp , & \"m^3 mol^-1\" ) !! molar volume of ideal gas (273.15 K, 100 kPa) type ( codata_constant_type ), parameter , public :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA = & codata_constant_type ( \"molar volume of ideal gas (273.15 K, 101.325 kPa)\" , & 2 2.41396954e-3_dp , 0.0_dp , & \"m^3 mol^-1\" ) !! molar volume of ideal gas (273.15 K, 101.325 kPa) type ( codata_constant_type ), parameter , public :: MOLAR_VOLUME_OF_SILICON = & codata_constant_type ( \"molar volume of silicon\" , & 1.205883199e-5_dp , 0.000000060e-5_dp , & \"m^3 mol^-1\" ) !! molar volume of silicon type ( codata_constant_type ), parameter , public :: MOLYBDENUM_X_UNIT = & codata_constant_type ( \"Molybdenum x unit\" , & 1.00209952e-13_dp , 0.00000053e-13_dp , & \"m\" ) !! Molybdenum x unit type ( codata_constant_type ), parameter , public :: MUON_COMPTON_WAVELENGTH = & codata_constant_type ( \"muon Compton wavelength\" , & 1.173444110e-14_dp , 0.000000026e-14_dp , & \"m\" ) !! muon Compton wavelength type ( codata_constant_type ), parameter , public :: MUON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"muon-electron mass ratio\" , & 20 6.7682827_dp , 0.0000046_dp , & \"\" ) !! muon-electron mass ratio type ( codata_constant_type ), parameter , public :: MUON_G_FACTOR = & codata_constant_type ( \"muon g factor\" , & - 2.00233184123_dp , 0.00000000082_dp , & \"\" ) !! muon g factor type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM = & codata_constant_type ( \"muon mag. mom.\" , & - 4.49044830e-26_dp , 0.00000010e-26_dp , & \"J T^-1\" ) !! muon mag. mom. type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM_ANOMALY = & codata_constant_type ( \"muon mag. mom. anomaly\" , & 1.16592062e-3_dp , 0.00000041e-3_dp , & \"\" ) !! muon mag. mom. anomaly type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"muon mag. mom. to Bohr magneton ratio\" , & - 4.84197048e-3_dp , 0.00000011e-3_dp , & \"\" ) !! muon mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"muon mag. mom. to nuclear magneton ratio\" , & - 8.89059704_dp , 0.00000020_dp , & \"\" ) !! muon mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: MUON_MASS = & codata_constant_type ( \"muon mass\" , & 1.883531627e-28_dp , 0.000000042e-28_dp , & \"kg\" ) !! muon mass type ( codata_constant_type ), parameter , public :: MUON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"muon mass energy equivalent\" , & 1.692833804e-11_dp , 0.000000038e-11_dp , & \"J\" ) !! muon mass energy equivalent type ( codata_constant_type ), parameter , public :: MUON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"muon mass energy equivalent in MeV\" , & 10 5.6583755_dp , 0.0000023_dp , & \"MeV\" ) !! muon mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: MUON_MASS_IN_U = & codata_constant_type ( \"muon mass in u\" , & 0.1134289257_dp , 0.0000000025_dp , & \"u\" ) !! muon mass in u type ( codata_constant_type ), parameter , public :: MUON_MOLAR_MASS = & codata_constant_type ( \"muon molar mass\" , & 1.134289258e-4_dp , 0.000000025e-4_dp , & \"kg mol^-1\" ) !! muon molar mass type ( codata_constant_type ), parameter , public :: MUON_NEUTRON_MASS_RATIO = & codata_constant_type ( \"muon-neutron mass ratio\" , & 0.1124545168_dp , 0.0000000025_dp , & \"\" ) !! muon-neutron mass ratio type ( codata_constant_type ), parameter , public :: MUON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"muon-proton mag. mom. ratio\" , & - 3.183345146_dp , 0.000000071_dp , & \"\" ) !! muon-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: MUON_PROTON_MASS_RATIO = & codata_constant_type ( \"muon-proton mass ratio\" , & 0.1126095262_dp , 0.0000000025_dp , & \"\" ) !! muon-proton mass ratio type ( codata_constant_type ), parameter , public :: MUON_TAU_MASS_RATIO = & codata_constant_type ( \"muon-tau mass ratio\" , & 5.94635e-2_dp , 0.00040e-2_dp , & \"\" ) !! muon-tau mass ratio type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ACTION = & codata_constant_type ( \"natural unit of action\" , & 1.054571817e-34_dp , 0.0_dp , & \"J s\" ) !! natural unit of action type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ACTION_IN_EV_S = & codata_constant_type ( \"natural unit of action in eV s\" , & 6.582119569e-16_dp , 0.0_dp , & \"eV s\" ) !! natural unit of action in eV s type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ENERGY = & codata_constant_type ( \"natural unit of energy\" , & 8.1871057880e-14_dp , 0.0000000026e-14_dp , & \"J\" ) !! natural unit of energy type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ENERGY_IN_MEV = & codata_constant_type ( \"natural unit of energy in MeV\" , & 0.51099895069_dp , 0.00000000016_dp , & \"MeV\" ) !! natural unit of energy in MeV type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_LENGTH = & codata_constant_type ( \"natural unit of length\" , & 3.8615926744e-13_dp , 0.0000000012e-13_dp , & \"m\" ) !! natural unit of length type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_MASS = & codata_constant_type ( \"natural unit of mass\" , & 9.1093837139e-31_dp , 0.0000000028e-31_dp , & \"kg\" ) !! natural unit of mass type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_MOMENTUM = & codata_constant_type ( \"natural unit of momentum\" , & 2.73092453446e-22_dp , 0.00000000085e-22_dp , & \"kg m s^-1\" ) !! natural unit of momentum type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_MOMENTUM_IN_MEV_C = & codata_constant_type ( \"natural unit of momentum in MeV/c\" , & 0.51099895069_dp , 0.00000000016_dp , & \"MeV/c\" ) !! natural unit of momentum in MeV/c type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_TIME = & codata_constant_type ( \"natural unit of time\" , & 1.28808866644e-21_dp , 0.00000000040e-21_dp , & \"s\" ) !! natural unit of time type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_VELOCITY = & codata_constant_type ( \"natural unit of velocity\" , & 299792458_dp , 0.0_dp , & \"m s^-1\" ) !! natural unit of velocity type ( codata_constant_type ), parameter , public :: NEUTRON_COMPTON_WAVELENGTH = & codata_constant_type ( \"neutron Compton wavelength\" , & 1.31959090382e-15_dp , 0.00000000067e-15_dp , & \"m\" ) !! neutron Compton wavelength type ( codata_constant_type ), parameter , public :: NEUTRON_ELECTRON_MAG_MOM_RATIO = & codata_constant_type ( \"neutron-electron mag. mom. ratio\" , & 1.04066884e-3_dp , 0.00000024e-3_dp , & \"\" ) !! neutron-electron mag. mom. ratio type ( codata_constant_type ), parameter , public :: NEUTRON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"neutron-electron mass ratio\" , & 183 8.68366200_dp , 0.00000074_dp , & \"\" ) !! neutron-electron mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_G_FACTOR = & codata_constant_type ( \"neutron g factor\" , & - 3.82608552_dp , 0.00000090_dp , & \"\" ) !! neutron g factor type ( codata_constant_type ), parameter , public :: NEUTRON_GYROMAG_RATIO = & codata_constant_type ( \"neutron gyromag. ratio\" , & 1.83247174e8_dp , 0.00000043e8_dp , & \"s^-1 T^-1\" ) !! neutron gyromag. ratio type ( codata_constant_type ), parameter , public :: NEUTRON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"neutron gyromag. ratio in MHz/T\" , & 2 9.1646935_dp , 0.0000069_dp , & \"MHz T^-1\" ) !! neutron gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: NEUTRON_MAG_MOM = & codata_constant_type ( \"neutron mag. mom.\" , & - 9.6623653e-27_dp , 0.0000023e-27_dp , & \"J T^-1\" ) !! neutron mag. mom. type ( codata_constant_type ), parameter , public :: NEUTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"neutron mag. mom. to Bohr magneton ratio\" , & - 1.04187565e-3_dp , 0.00000025e-3_dp , & \"\" ) !! neutron mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: NEUTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"neutron mag. mom. to nuclear magneton ratio\" , & - 1.91304276_dp , 0.00000045_dp , & \"\" ) !! neutron mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: NEUTRON_MASS = & codata_constant_type ( \"neutron mass\" , & 1.67492750056e-27_dp , 0.00000000085e-27_dp , & \"kg\" ) !! neutron mass type ( codata_constant_type ), parameter , public :: NEUTRON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"neutron mass energy equivalent\" , & 1.50534976514e-10_dp , 0.00000000076e-10_dp , & \"J\" ) !! neutron mass energy equivalent type ( codata_constant_type ), parameter , public :: NEUTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"neutron mass energy equivalent in MeV\" , & 93 9.56542194_dp , 0.00000048_dp , & \"MeV\" ) !! neutron mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: NEUTRON_MASS_IN_U = & codata_constant_type ( \"neutron mass in u\" , & 1.00866491606_dp , 0.00000000040_dp , & \"u\" ) !! neutron mass in u type ( codata_constant_type ), parameter , public :: NEUTRON_MOLAR_MASS = & codata_constant_type ( \"neutron molar mass\" , & 1.00866491712e-3_dp , 0.00000000051e-3_dp , & \"kg mol^-1\" ) !! neutron molar mass type ( codata_constant_type ), parameter , public :: NEUTRON_MUON_MASS_RATIO = & codata_constant_type ( \"neutron-muon mass ratio\" , & 8.89248408_dp , 0.00000020_dp , & \"\" ) !! neutron-muon mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"neutron-proton mag. mom. ratio\" , & - 0.68497935_dp , 0.00000016_dp , & \"\" ) !! neutron-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE = & codata_constant_type ( \"neutron-proton mass difference\" , & 2.30557461e-30_dp , 0.00000067e-30_dp , & \"kg\" ) !! neutron-proton mass difference type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT = & codata_constant_type ( \"neutron-proton mass difference energy equivalent\" , & 2.07214712e-13_dp , 0.00000060e-13_dp , & \"J\" ) !! neutron-proton mass difference energy equivalent type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"neutron-proton mass difference energy equivalent in MeV\" , & 1.29333251_dp , 0.00000038_dp , & \"MeV\" ) !! neutron-proton mass difference energy equivalent in MeV type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE_IN_U = & codata_constant_type ( \"neutron-proton mass difference in u\" , & 1.38844948e-3_dp , 0.00000040e-3_dp , & \"u\" ) !! neutron-proton mass difference in u type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_RATIO = & codata_constant_type ( \"neutron-proton mass ratio\" , & 1.00137841946_dp , 0.00000000040_dp , & \"\" ) !! neutron-proton mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"neutron relative atomic mass\" , & 1.00866491606_dp , 0.00000000040_dp , & \"\" ) !! neutron relative atomic mass type ( codata_constant_type ), parameter , public :: NEUTRON_TAU_MASS_RATIO = & codata_constant_type ( \"neutron-tau mass ratio\" , & 0.528779_dp , 0.000036_dp , & \"\" ) !! neutron-tau mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"neutron to shielded proton mag. mom. ratio\" , & - 0.68499694_dp , 0.00000016_dp , & \"\" ) !! neutron to shielded proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: NEWTONIAN_CONSTANT_OF_GRAVITATION = & codata_constant_type ( \"Newtonian constant of gravitation\" , & 6.67430e-11_dp , 0.00015e-11_dp , & \"m^3 kg^-1 s^-2\" ) !! Newtonian constant of gravitation type ( codata_constant_type ), parameter , public :: NEWTONIAN_CONSTANT_OF_GRAVITATION_OVER_H_BAR_C = & codata_constant_type ( \"Newtonian constant of gravitation over h-bar c\" , & 6.70883e-39_dp , 0.00015e-39_dp , & \"(GeV/c^2)^-2\" ) !! Newtonian constant of gravitation over h-bar c type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON = & codata_constant_type ( \"nuclear magneton\" , & 5.0507837393e-27_dp , 0.0000000016e-27_dp , & \"J T^-1\" ) !! nuclear magneton type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_EV_T = & codata_constant_type ( \"nuclear magneton in eV/T\" , & 3.15245125417e-8_dp , 0.00000000098e-8_dp , & \"eV T^-1\" ) !! nuclear magneton in eV/T type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_INVERSE_METER_PER_TESLA = & codata_constant_type ( \"nuclear magneton in inverse meter per tesla\" , & 2.54262341009e-2_dp , 0.00000000079e-2_dp , & \"m^-1 T^-1\" ) !! nuclear magneton in inverse meter per tesla type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_K_T = & codata_constant_type ( \"nuclear magneton in K/T\" , & 3.6582677706e-4_dp , 0.0000000011e-4_dp , & \"K T^-1\" ) !! nuclear magneton in K/T type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_MHZ_T = & codata_constant_type ( \"nuclear magneton in MHz/T\" , & 7.6225932188_dp , 0.0000000024_dp , & \"MHz T^-1\" ) !! nuclear magneton in MHz/T type ( codata_constant_type ), parameter , public :: PLANCK_CONSTANT = & codata_constant_type ( \"Planck constant\" , & 6.62607015e-34_dp , 0.0_dp , & \"J Hz^-1\" ) !! Planck constant type ( codata_constant_type ), parameter , public :: PLANCK_CONSTANT_IN_EV_HZ = & codata_constant_type ( \"Planck constant in eV/Hz\" , & 4.135667696e-15_dp , 0.0_dp , & \"eV Hz^-1\" ) !! Planck constant in eV/Hz type ( codata_constant_type ), parameter , public :: PLANCK_LENGTH = & codata_constant_type ( \"Planck length\" , & 1.616255e-35_dp , 0.000018e-35_dp , & \"m\" ) !! Planck length type ( codata_constant_type ), parameter , public :: PLANCK_MASS = & codata_constant_type ( \"Planck mass\" , & 2.176434e-8_dp , 0.000024e-8_dp , & \"kg\" ) !! Planck mass type ( codata_constant_type ), parameter , public :: PLANCK_MASS_ENERGY_EQUIVALENT_IN_GEV = & codata_constant_type ( \"Planck mass energy equivalent in GeV\" , & 1.220890e19_dp , 0.000014e19_dp , & \"GeV\" ) !! Planck mass energy equivalent in GeV type ( codata_constant_type ), parameter , public :: PLANCK_TEMPERATURE = & codata_constant_type ( \"Planck temperature\" , & 1.416784e32_dp , 0.000016e32_dp , & \"K\" ) !! Planck temperature type ( codata_constant_type ), parameter , public :: PLANCK_TIME = & codata_constant_type ( \"Planck time\" , & 5.391247e-44_dp , 0.000060e-44_dp , & \"s\" ) !! Planck time type ( codata_constant_type ), parameter , public :: PROTON_CHARGE_TO_MASS_QUOTIENT = & codata_constant_type ( \"proton charge to mass quotient\" , & 9.5788331430e7_dp , 0.0000000030e7_dp , & \"C kg^-1\" ) !! proton charge to mass quotient type ( codata_constant_type ), parameter , public :: PROTON_COMPTON_WAVELENGTH = & codata_constant_type ( \"proton Compton wavelength\" , & 1.32140985360e-15_dp , 0.00000000041e-15_dp , & \"m\" ) !! proton Compton wavelength type ( codata_constant_type ), parameter , public :: PROTON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"proton-electron mass ratio\" , & 183 6.152673426_dp , 0.000000032_dp , & \"\" ) !! proton-electron mass ratio type ( codata_constant_type ), parameter , public :: PROTON_G_FACTOR = & codata_constant_type ( \"proton g factor\" , & 5.5856946893_dp , 0.0000000016_dp , & \"\" ) !! proton g factor type ( codata_constant_type ), parameter , public :: PROTON_GYROMAG_RATIO = & codata_constant_type ( \"proton gyromag. ratio\" , & 2.6752218708e8_dp , 0.0000000011e8_dp , & \"s^-1 T^-1\" ) !! proton gyromag. ratio type ( codata_constant_type ), parameter , public :: PROTON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"proton gyromag. ratio in MHz/T\" , & 4 2.577478461_dp , 0.000000018_dp , & \"MHz T^-1\" ) !! proton gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: PROTON_MAG_MOM = & codata_constant_type ( \"proton mag. mom.\" , & 1.41060679545e-26_dp , 0.00000000060e-26_dp , & \"J T^-1\" ) !! proton mag. mom. type ( codata_constant_type ), parameter , public :: PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"proton mag. mom. to Bohr magneton ratio\" , & 1.52103220230e-3_dp , 0.00000000045e-3_dp , & \"\" ) !! proton mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"proton mag. mom. to nuclear magneton ratio\" , & 2.79284734463_dp , 0.00000000082_dp , & \"\" ) !! proton mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: PROTON_MAG_SHIELDING_CORRECTION = & codata_constant_type ( \"proton mag. shielding correction\" , & 2.56715e-5_dp , 0.00041e-5_dp , & \"\" ) !! proton mag. shielding correction type ( codata_constant_type ), parameter , public :: PROTON_MASS = & codata_constant_type ( \"proton mass\" , & 1.67262192595e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! proton mass type ( codata_constant_type ), parameter , public :: PROTON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"proton mass energy equivalent\" , & 1.50327761802e-10_dp , 0.00000000047e-10_dp , & \"J\" ) !! proton mass energy equivalent type ( codata_constant_type ), parameter , public :: PROTON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"proton mass energy equivalent in MeV\" , & 93 8.27208943_dp , 0.00000029_dp , & \"MeV\" ) !! proton mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: PROTON_MASS_IN_U = & codata_constant_type ( \"proton mass in u\" , & 1.0072764665789_dp , 0.0000000000083_dp , & \"u\" ) !! proton mass in u type ( codata_constant_type ), parameter , public :: PROTON_MOLAR_MASS = & codata_constant_type ( \"proton molar mass\" , & 1.00727646764e-3_dp , 0.00000000031e-3_dp , & \"kg mol^-1\" ) !! proton molar mass type ( codata_constant_type ), parameter , public :: PROTON_MUON_MASS_RATIO = & codata_constant_type ( \"proton-muon mass ratio\" , & 8.88024338_dp , 0.00000020_dp , & \"\" ) !! proton-muon mass ratio type ( codata_constant_type ), parameter , public :: PROTON_NEUTRON_MAG_MOM_RATIO = & codata_constant_type ( \"proton-neutron mag. mom. ratio\" , & - 1.45989802_dp , 0.00000034_dp , & \"\" ) !! proton-neutron mag. mom. ratio type ( codata_constant_type ), parameter , public :: PROTON_NEUTRON_MASS_RATIO = & codata_constant_type ( \"proton-neutron mass ratio\" , & 0.99862347797_dp , 0.00000000040_dp , & \"\" ) !! proton-neutron mass ratio type ( codata_constant_type ), parameter , public :: PROTON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"proton relative atomic mass\" , & 1.0072764665789_dp , 0.0000000000083_dp , & \"\" ) !! proton relative atomic mass type ( codata_constant_type ), parameter , public :: PROTON_RMS_CHARGE_RADIUS = & codata_constant_type ( \"proton rms charge radius\" , & 8.4075e-16_dp , 0.0064e-16_dp , & \"m\" ) !! proton rms charge radius type ( codata_constant_type ), parameter , public :: PROTON_TAU_MASS_RATIO = & codata_constant_type ( \"proton-tau mass ratio\" , & 0.528051_dp , 0.000036_dp , & \"\" ) !! proton-tau mass ratio type ( codata_constant_type ), parameter , public :: QUANTUM_OF_CIRCULATION = & codata_constant_type ( \"quantum of circulation\" , & 3.6369475467e-4_dp , 0.0000000011e-4_dp , & \"m^2 s^-1\" ) !! quantum of circulation type ( codata_constant_type ), parameter , public :: QUANTUM_OF_CIRCULATION_TIMES_2 = & codata_constant_type ( \"quantum of circulation times 2\" , & 7.2738950934e-4_dp , 0.0000000023e-4_dp , & \"m^2 s^-1\" ) !! quantum of circulation times 2 type ( codata_constant_type ), parameter , public :: REDUCED_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced Compton wavelength\" , & 3.8615926744e-13_dp , 0.0000000012e-13_dp , & \"m\" ) !! reduced Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_MUON_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced muon Compton wavelength\" , & 1.867594306e-15_dp , 0.000000042e-15_dp , & \"m\" ) !! reduced muon Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_NEUTRON_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced neutron Compton wavelength\" , & 2.1001941520e-16_dp , 0.0000000011e-16_dp , & \"m\" ) !! reduced neutron Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_PLANCK_CONSTANT = & codata_constant_type ( \"reduced Planck constant\" , & 1.054571817e-34_dp , 0.0_dp , & \"J s\" ) !! reduced Planck constant type ( codata_constant_type ), parameter , public :: REDUCED_PLANCK_CONSTANT_IN_EV_S = & codata_constant_type ( \"reduced Planck constant in eV s\" , & 6.582119569e-16_dp , 0.0_dp , & \"eV s\" ) !! reduced Planck constant in eV s type ( codata_constant_type ), parameter , public :: REDUCED_PLANCK_CONSTANT_TIMES_C_IN_MEV_FM = & codata_constant_type ( \"reduced Planck constant times c in MeV fm\" , & 19 7.3269804_dp , 0.0_dp , & \"MeV fm\" ) !! reduced Planck constant times c in MeV fm type ( codata_constant_type ), parameter , public :: REDUCED_PROTON_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced proton Compton wavelength\" , & 2.10308910051e-16_dp , 0.00000000066e-16_dp , & \"m\" ) !! reduced proton Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_TAU_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced tau Compton wavelength\" , & 1.110538e-16_dp , 0.000075e-16_dp , & \"m\" ) !! reduced tau Compton wavelength type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT = & codata_constant_type ( \"Rydberg constant\" , & 1097373 1.568157_dp , 0.000012_dp , & \"m^-1\" ) !! Rydberg constant type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT_TIMES_C_IN_HZ = & codata_constant_type ( \"Rydberg constant times c in Hz\" , & 3.2898419602500e15_dp , 0.0000000000036e15_dp , & \"Hz\" ) !! Rydberg constant times c in Hz type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT_TIMES_HC_IN_EV = & codata_constant_type ( \"Rydberg constant times hc in eV\" , & 1 3.605693122990_dp , 0.000000000015_dp , & \"eV\" ) !! Rydberg constant times hc in eV type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT_TIMES_HC_IN_J = & codata_constant_type ( \"Rydberg constant times hc in J\" , & 2.1798723611030e-18_dp , 0.0000000000024e-18_dp , & \"J\" ) !! Rydberg constant times hc in J type ( codata_constant_type ), parameter , public :: SACKUR_TETRODE_CONSTANT_1_K_100_KPA = & codata_constant_type ( \"Sackur-Tetrode constant (1 K, 100 kPa)\" , & - 1.15170753496_dp , 0.00000000047_dp , & \"\" ) !! Sackur-Tetrode constant (1 K, 100 kPa) type ( codata_constant_type ), parameter , public :: SACKUR_TETRODE_CONSTANT_1_K_101_325_KPA = & codata_constant_type ( \"Sackur-Tetrode constant (1 K, 101.325 kPa)\" , & - 1.16487052149_dp , 0.00000000047_dp , & \"\" ) !! Sackur-Tetrode constant (1 K, 101.325 kPa) type ( codata_constant_type ), parameter , public :: SECOND_RADIATION_CONSTANT = & codata_constant_type ( \"second radiation constant\" , & 1.438776877e-2_dp , 0.0_dp , & \"m K\" ) !! second radiation constant type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_GYROMAG_RATIO = & codata_constant_type ( \"shielded helion gyromag. ratio\" , & 2.0378946078e8_dp , 0.0000000018e8_dp , & \"s^-1 T^-1\" ) !! shielded helion gyromag. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"shielded helion gyromag. ratio in MHz/T\" , & 3 2.434100033_dp , 0.000000028_dp , & \"MHz T^-1\" ) !! shielded helion gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_MAG_MOM = & codata_constant_type ( \"shielded helion mag. mom.\" , & - 1.07455311035e-26_dp , 0.00000000093e-26_dp , & \"J T^-1\" ) !! shielded helion mag. mom. type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"shielded helion mag. mom. to Bohr magneton ratio\" , & - 1.15867149457e-3_dp , 0.00000000094e-3_dp , & \"\" ) !! shielded helion mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"shielded helion mag. mom. to nuclear magneton ratio\" , & - 2.1274977624_dp , 0.0000000017_dp , & \"\" ) !! shielded helion mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_TO_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"shielded helion to proton mag. mom. ratio\" , & - 0.76176657721_dp , 0.00000000066_dp , & \"\" ) !! shielded helion to proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_TO_SHIELDED_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"shielded helion to shielded proton mag. mom. ratio\" , & - 0.7617861334_dp , 0.0000000031_dp , & \"\" ) !! shielded helion to shielded proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_GYROMAG_RATIO = & codata_constant_type ( \"shielded proton gyromag. ratio\" , & 2.675153194e8_dp , 0.000000011e8_dp , & \"s^-1 T^-1\" ) !! shielded proton gyromag. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"shielded proton gyromag. ratio in MHz/T\" , & 4 2.57638543_dp , 0.00000017_dp , & \"MHz T^-1\" ) !! shielded proton gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_MAG_MOM = & codata_constant_type ( \"shielded proton mag. mom.\" , & 1.4105705830e-26_dp , 0.0000000058e-26_dp , & \"J T^-1\" ) !! shielded proton mag. mom. type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"shielded proton mag. mom. to Bohr magneton ratio\" , & 1.5209931551e-3_dp , 0.0000000062e-3_dp , & \"\" ) !! shielded proton mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"shielded proton mag. mom. to nuclear magneton ratio\" , & 2.792775648_dp , 0.000000011_dp , & \"\" ) !! shielded proton mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDING_DIFFERENCE_OF_D_AND_P_IN_HD = & codata_constant_type ( \"shielding difference of d and p in HD\" , & 1.98770e-8_dp , 0.00010e-8_dp , & \"\" ) !! shielding difference of d and p in HD type ( codata_constant_type ), parameter , public :: SHIELDING_DIFFERENCE_OF_T_AND_P_IN_HT = & codata_constant_type ( \"shielding difference of t and p in HT\" , & 2.39450e-8_dp , 0.00020e-8_dp , & \"\" ) !! shielding difference of t and p in HT type ( codata_constant_type ), parameter , public :: SPEED_OF_LIGHT_IN_VACUUM = & codata_constant_type ( \"speed of light in vacuum\" , & 299792458_dp , 0.0_dp , & \"m s^-1\" ) !! speed of light in vacuum type ( codata_constant_type ), parameter , public :: STANDARD_ACCELERATION_OF_GRAVITY = & codata_constant_type ( \"standard acceleration of gravity\" , & 9.80665_dp , 0.0_dp , & \"m s^-2\" ) !! standard acceleration of gravity type ( codata_constant_type ), parameter , public :: STANDARD_ATMOSPHERE = & codata_constant_type ( \"standard atmosphere\" , & 101325_dp , 0.0_dp , & \"Pa\" ) !! standard atmosphere type ( codata_constant_type ), parameter , public :: STANDARD_STATE_PRESSURE = & codata_constant_type ( \"standard-state pressure\" , & 100000_dp , 0.0_dp , & \"Pa\" ) !! standard-state pressure type ( codata_constant_type ), parameter , public :: STEFAN_BOLTZMANN_CONSTANT = & codata_constant_type ( \"Stefan-Boltzmann constant\" , & 5.670374419e-8_dp , 0.0_dp , & \"W m^-2 K^-4\" ) !! Stefan-Boltzmann constant type ( codata_constant_type ), parameter , public :: TAU_COMPTON_WAVELENGTH = & codata_constant_type ( \"tau Compton wavelength\" , & 6.97771e-16_dp , 0.00047e-16_dp , & \"m\" ) !! tau Compton wavelength type ( codata_constant_type ), parameter , public :: TAU_ELECTRON_MASS_RATIO = & codata_constant_type ( \"tau-electron mass ratio\" , & 347 7.23_dp , 0.23_dp , & \"\" ) !! tau-electron mass ratio type ( codata_constant_type ), parameter , public :: TAU_ENERGY_EQUIVALENT = & codata_constant_type ( \"tau energy equivalent\" , & 177 6.86_dp , 0.12_dp , & \"MeV\" ) !! tau energy equivalent type ( codata_constant_type ), parameter , public :: TAU_MASS = & codata_constant_type ( \"tau mass\" , & 3.16754e-27_dp , 0.00021e-27_dp , & \"kg\" ) !! tau mass type ( codata_constant_type ), parameter , public :: TAU_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"tau mass energy equivalent\" , & 2.84684e-10_dp , 0.00019e-10_dp , & \"J\" ) !! tau mass energy equivalent type ( codata_constant_type ), parameter , public :: TAU_MASS_IN_U = & codata_constant_type ( \"tau mass in u\" , & 1.90754_dp , 0.00013_dp , & \"u\" ) !! tau mass in u type ( codata_constant_type ), parameter , public :: TAU_MOLAR_MASS = & codata_constant_type ( \"tau molar mass\" , & 1.90754e-3_dp , 0.00013e-3_dp , & \"kg mol^-1\" ) !! tau molar mass type ( codata_constant_type ), parameter , public :: TAU_MUON_MASS_RATIO = & codata_constant_type ( \"tau-muon mass ratio\" , & 1 6.8170_dp , 0.0011_dp , & \"\" ) !! tau-muon mass ratio type ( codata_constant_type ), parameter , public :: TAU_NEUTRON_MASS_RATIO = & codata_constant_type ( \"tau-neutron mass ratio\" , & 1.89115_dp , 0.00013_dp , & \"\" ) !! tau-neutron mass ratio type ( codata_constant_type ), parameter , public :: TAU_PROTON_MASS_RATIO = & codata_constant_type ( \"tau-proton mass ratio\" , & 1.89376_dp , 0.00013_dp , & \"\" ) !! tau-proton mass ratio type ( codata_constant_type ), parameter , public :: THOMSON_CROSS_SECTION = & codata_constant_type ( \"Thomson cross section\" , & 6.6524587051e-29_dp , 0.0000000062e-29_dp , & \"m^2\" ) !! Thomson cross section type ( codata_constant_type ), parameter , public :: TRITON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"triton-electron mass ratio\" , & 549 6.92153551_dp , 0.00000021_dp , & \"\" ) !! triton-electron mass ratio type ( codata_constant_type ), parameter , public :: TRITON_G_FACTOR = & codata_constant_type ( \"triton g factor\" , & 5.957924930_dp , 0.000000012_dp , & \"\" ) !! triton g factor type ( codata_constant_type ), parameter , public :: TRITON_MAG_MOM = & codata_constant_type ( \"triton mag. mom.\" , & 1.5046095178e-26_dp , 0.0000000030e-26_dp , & \"J T^-1\" ) !! triton mag. mom. type ( codata_constant_type ), parameter , public :: TRITON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"triton mag. mom. to Bohr magneton ratio\" , & 1.6223936648e-3_dp , 0.0000000032e-3_dp , & \"\" ) !! triton mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: TRITON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"triton mag. mom. to nuclear magneton ratio\" , & 2.9789624650_dp , 0.0000000059_dp , & \"\" ) !! triton mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: TRITON_MASS = & codata_constant_type ( \"triton mass\" , & 5.0073567512e-27_dp , 0.0000000016e-27_dp , & \"kg\" ) !! triton mass type ( codata_constant_type ), parameter , public :: TRITON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"triton mass energy equivalent\" , & 4.5003878119e-10_dp , 0.0000000014e-10_dp , & \"J\" ) !! triton mass energy equivalent type ( codata_constant_type ), parameter , public :: TRITON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"triton mass energy equivalent in MeV\" , & 280 8.92113668_dp , 0.00000088_dp , & \"MeV\" ) !! triton mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: TRITON_MASS_IN_U = & codata_constant_type ( \"triton mass in u\" , & 3.01550071597_dp , 0.00000000010_dp , & \"u\" ) !! triton mass in u type ( codata_constant_type ), parameter , public :: TRITON_MOLAR_MASS = & codata_constant_type ( \"triton molar mass\" , & 3.01550071913e-3_dp , 0.00000000094e-3_dp , & \"kg mol^-1\" ) !! triton molar mass type ( codata_constant_type ), parameter , public :: TRITON_PROTON_MASS_RATIO = & codata_constant_type ( \"triton-proton mass ratio\" , & 2.99371703403_dp , 0.00000000010_dp , & \"\" ) !! triton-proton mass ratio type ( codata_constant_type ), parameter , public :: TRITON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"triton relative atomic mass\" , & 3.01550071597_dp , 0.00000000010_dp , & \"\" ) !! triton relative atomic mass type ( codata_constant_type ), parameter , public :: TRITON_TO_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"triton to proton mag. mom. ratio\" , & 1.0666399189_dp , 0.0000000021_dp , & \"\" ) !! triton to proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: UNIFIED_ATOMIC_MASS_UNIT = & codata_constant_type ( \"unified atomic mass unit\" , & 1.66053906892e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! unified atomic mass unit type ( codata_constant_type ), parameter , public :: VACUUM_ELECTRIC_PERMITTIVITY = & codata_constant_type ( \"vacuum electric permittivity\" , & 8.8541878188e-12_dp , 0.0000000014e-12_dp , & \"F m^-1\" ) !! vacuum electric permittivity type ( codata_constant_type ), parameter , public :: VACUUM_MAG_PERMEABILITY = & codata_constant_type ( \"vacuum mag. permeability\" , & 1.25663706127e-6_dp , 0.00000000020e-6_dp , & \"N A^-2\" ) !! vacuum mag. permeability type ( codata_constant_type ), parameter , public :: VON_KLITZING_CONSTANT = & codata_constant_type ( \"von Klitzing constant\" , & 2581 2.80745_dp , 0.0_dp , & \"ohm\" ) !! von Klitzing constant type ( codata_constant_type ), parameter , public :: WEAK_MIXING_ANGLE = & codata_constant_type ( \"weak mixing angle\" , & 0.22305_dp , 0.00023_dp , & \"\" ) !! weak mixing angle type ( codata_constant_type ), parameter , public :: WIEN_FREQUENCY_DISPLACEMENT_LAW_CONSTANT = & codata_constant_type ( \"Wien frequency displacement law constant\" , & 5.878925757e10_dp , 0.0_dp , & \"Hz K^-1\" ) !! Wien frequency displacement law constant type ( codata_constant_type ), parameter , public :: WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT = & codata_constant_type ( \"Wien wavelength displacement law constant\" , & 2.897771955e-3_dp , 0.0_dp , & \"m K\" ) !! Wien wavelength displacement law constant type ( codata_constant_type ), parameter , public :: W_TO_Z_MASS_RATIO = & codata_constant_type ( \"W to Z mass ratio\" , & 0.88145_dp , 0.00013_dp , & \"\" ) !! W to Z mass ratio end module stdlib_codata","tags":"","loc":"sourcefile/stdlib_codata.f90.html"},{"title":"stdlib_linalg_blas_s.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_s use stdlib_linalg_constants use stdlib_linalg_blas_aux implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_sasum public :: stdlib_saxpy public :: stdlib_scasum public :: stdlib_scnrm2 public :: stdlib_scopy public :: stdlib_sdot public :: stdlib_sdsdot public :: stdlib_sgbmv public :: stdlib_sgemm public :: stdlib_sgemv public :: stdlib_sger public :: stdlib_snrm2 public :: stdlib_srot public :: stdlib_srotg public :: stdlib_srotm public :: stdlib_srotmg public :: stdlib_ssbmv public :: stdlib_sscal public :: stdlib_sspmv public :: stdlib_sspr public :: stdlib_sspr2 public :: stdlib_sswap public :: stdlib_ssymm public :: stdlib_ssymv public :: stdlib_ssyr public :: stdlib_ssyr2 public :: stdlib_ssyr2k public :: stdlib_ssyrk public :: stdlib_stbmv public :: stdlib_stbsv public :: stdlib_stpmv public :: stdlib_stpsv public :: stdlib_strmm public :: stdlib_strmv public :: stdlib_strsm public :: stdlib_strsv ! 32-bit real constants real ( sp ), parameter , private :: negone = - 1.00_sp real ( sp ), parameter , private :: zero = 0.00_sp real ( sp ), parameter , private :: half = 0.50_sp real ( sp ), parameter , private :: one = 1.00_sp real ( sp ), parameter , private :: two = 2.00_sp real ( sp ), parameter , private :: three = 3.00_sp real ( sp ), parameter , private :: four = 4.00_sp real ( sp ), parameter , private :: eight = 8.00_sp real ( sp ), parameter , private :: ten = 1 0.00_sp ! 32-bit complex constants complex ( sp ), parameter , private :: czero = ( 0.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: chalf = ( 0.5_sp , 0.0_sp ) complex ( sp ), parameter , private :: cone = ( 1.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: cnegone = ( - 1.0_sp , 0.0_sp ) ! 32-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( sp ), parameter , private :: rradix = real ( radix ( zero ), sp ) real ( sp ), parameter , private :: ulp = epsilon ( zero ) real ( sp ), parameter , private :: eps = ulp * half real ( sp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( sp ), parameter , private :: safmax = one / safmin real ( sp ), parameter , private :: smlnum = safmin / ulp real ( sp ), parameter , private :: bignum = safmax * ulp real ( sp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( sp ), parameter , private :: rtmax = sqrt ( bignum ) ! 32-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( sp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( sp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( sp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( sp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure real ( sp ) function stdlib_sasum ( n , sx , incx ) !! SASUM takes the sum of the absolute values. !! uses unrolled loops for increment equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_sasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + abs ( sx ( i )) end do if ( n < 6 ) then stdlib_sasum = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 stemp = stemp + abs ( sx ( i )) + abs ( sx ( i + 1 )) + abs ( sx ( i + 2 )) + abs ( sx ( i + 3 )) + abs ( sx ( i + & 4 )) + abs ( sx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( sx ( i )) end do end if stdlib_sasum = stemp return end function stdlib_sasum pure subroutine stdlib_saxpy ( n , sa , sx , incx , sy , incy ) !! SAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( inout ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( sa == 0.0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sy ( i ) + sa * sx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 sy ( i ) = sy ( i ) + sa * sx ( i ) sy ( i + 1 ) = sy ( i + 1 ) + sa * sx ( i + 1 ) sy ( i + 2 ) = sy ( i + 2 ) + sa * sx ( i + 2 ) sy ( i + 3 ) = sy ( i + 3 ) + sa * sx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sy ( iy ) + sa * sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_saxpy pure real ( sp ) function stdlib_scasum ( n , cx , incx ) !! SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a single precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do end if stdlib_scasum = stemp return end function stdlib_scasum pure function stdlib_scnrm2 ( n , x , incx ) !! SCNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SCNRM2 := sqrt( x**H*x ) real ( sp ) :: stdlib_scnrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_scnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = sp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_scnrm2 = scl * sqrt ( sumsq ) return end function stdlib_scnrm2 pure subroutine stdlib_scopy ( n , sx , incx , sy , incy ) !! SCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( out ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 sy ( i ) = sx ( i ) sy ( i + 1 ) = sx ( i + 1 ) sy ( i + 2 ) = sx ( i + 2 ) sy ( i + 3 ) = sx ( i + 3 ) sy ( i + 4 ) = sx ( i + 4 ) sy ( i + 5 ) = sx ( i + 5 ) sy ( i + 6 ) = sx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_scopy pure real ( sp ) function stdlib_sdot ( n , sx , incx , sy , incy ) !! SDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stemp = zero stdlib_sdot = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + sx ( i ) * sy ( i ) end do if ( n < 5 ) then stdlib_sdot = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 stemp = stemp + sx ( i ) * sy ( i ) + sx ( i + 1 ) * sy ( i + 1 ) + sx ( i + 2 ) * sy ( i + 2 ) + sx ( i + 3 ) * sy ( i + 3 ) + & sx ( i + 4 ) * sy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = stemp + sx ( ix ) * sy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_sdot = stemp return end function stdlib_sdot pure real ( sp ) function stdlib_sdsdot ( n , sb , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation. !! Returns S.P. result with dot product accumulated in D.P. !! SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sb integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! Local Scalars real ( dp ) :: dsdot integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real dsdot = sb if ( n <= 0 ) then stdlib_sdsdot = dsdot return end if if ( incx == incy . and . incx > 0 ) then ! code for equal and positive increments. ns = n * incx do i = 1 , ns , incx dsdot = dsdot + real ( sx ( i ), KIND = sp ) * real ( sy ( i ), KIND = sp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n dsdot = dsdot + real ( sx ( kx ), KIND = sp ) * real ( sy ( ky ), KIND = sp ) kx = kx + incx ky = ky + incy end do end if stdlib_sdsdot = dsdot return end function stdlib_sdsdot pure subroutine stdlib_sgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! SGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_sgbmv pure subroutine stdlib_sgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_sgemm pure subroutine stdlib_sgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! SGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_sgemv pure subroutine stdlib_sger ( m , n , alpha , x , incx , y , incy , a , lda ) !! SGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_sger pure function stdlib_snrm2 ( n , x , incx ) !! SNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SNRM2 := sqrt( x'*x ). real ( sp ) :: stdlib_snrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_snrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_snrm2 = scl * sqrt ( sumsq ) return end function stdlib_snrm2 pure subroutine stdlib_srot ( n , sx , incx , sy , incy , c , s ) !! applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n stemp = c * sx ( i ) + s * sy ( i ) sy ( i ) = c * sy ( i ) - s * sx ( i ) sx ( i ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = c * sx ( ix ) + s * sy ( iy ) sy ( iy ) = c * sy ( iy ) - s * sx ( ix ) sx ( ix ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_srot pure subroutine stdlib_srotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( inout ) :: a , b real ( sp ), intent ( out ) :: c , s ! Local Scalars real ( sp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_srotg pure subroutine stdlib_srotm ( n , sx , incx , sy , incy , sparam ) !! SROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}SX^T\\\\SY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of SX are in !! SX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for SY using LY and INCY. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SH_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=-2}. !! See SROTMG for a description of data storage in SPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sparam ( 5 ) real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: sflag , sh11 , sh12 , sh21 , sh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_sp two = 2.0_sp sflag = sparam ( 1 ) if ( n <= 0 . or . ( sflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z * sh12 sy ( i ) = w * sh21 + z * sh22 end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w + z * sh12 sy ( i ) = w * sh21 + z end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z sy ( i ) = - w + sh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z * sh12 sy ( ky ) = w * sh21 + z * sh22 kx = kx + incx ky = ky + incy end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w + z * sh12 sy ( ky ) = w * sh21 + z kx = kx + incx ky = ky + incy end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z sy ( ky ) = - w + sh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_srotm pure subroutine stdlib_srotmg ( sd1 , sd2 , sx1 , sy1 , sparam ) !! SROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{SD_1}\\cdot SX_1,\\sqrt{SD_2}\\cdot SY_2} \\right]^T. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SD_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=2}. !! Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( inout ) :: sd1 , sd2 , sx1 real ( sp ), intent ( in ) :: sy1 ! Array Arguments real ( sp ), intent ( out ) :: sparam ( 5 ) ! ===================================================================== ! Local Scalars real ( sp ) :: gam , gamsq , one , rgamsq , sflag , sh11 , sh12 , sh21 , sh22 , sp1 , sp2 , sq1 , sq2 ,& stemp , su , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_sp one = 1.0_sp two = 2.0_sp gam = 409 6.0_sp gamsq = 1.67772e7_sp rgamsq = 5.96046e-8_sp if ( sd1 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else ! case-sd1-nonnegative sp2 = sd2 * sy1 if ( sp2 == zero ) then sflag = - two sparam ( 1 ) = sflag return end if ! regular-case.. sp1 = sd1 * sx1 sq2 = sp2 * sy1 sq1 = sp1 * sx1 if ( abs ( sq1 ) > abs ( sq2 )) then sh21 = - sy1 / sx1 sh12 = sp2 / sp1 su = one - sh12 * sh21 if ( su > zero ) then sflag = zero sd1 = sd1 / su sd2 = sd2 / su sx1 = sx1 * su else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero end if else if ( sq2 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else sflag = one sh11 = sp1 / sp2 sh22 = sx1 / sy1 su = one + sh11 * sh22 stemp = sd2 / su sd2 = sd1 / su sd1 = stemp sx1 = sy1 * su end if end if ! procedure..scale-check if ( sd1 /= zero ) then do while (( sd1 <= rgamsq ) . or . ( sd1 >= gamsq )) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( sd1 <= rgamsq ) then sd1 = sd1 * gam ** 2 sx1 = sx1 / gam sh11 = sh11 / gam sh12 = sh12 / gam else sd1 = sd1 / gam ** 2 sx1 = sx1 * gam sh11 = sh11 * gam sh12 = sh12 * gam end if enddo end if if ( sd2 /= zero ) then do while ( ( abs ( sd2 ) <= rgamsq ) . or . ( abs ( sd2 ) >= gamsq ) ) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( abs ( sd2 ) <= rgamsq ) then sd2 = sd2 * gam ** 2 sh21 = sh21 / gam sh22 = sh22 / gam else sd2 = sd2 / gam ** 2 sh21 = sh21 * gam sh22 = sh22 * gam end if end do end if end if if ( sflag < zero ) then sparam ( 2 ) = sh11 sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 sparam ( 5 ) = sh22 else if ( sflag == zero ) then sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 else sparam ( 2 ) = sh11 sparam ( 5 ) = sh22 end if sparam ( 1 ) = sflag return end subroutine stdlib_srotmg pure subroutine stdlib_ssbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! SSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssbmv pure subroutine stdlib_sscal ( n , sa , sx , incx ) !! SSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m sx ( i ) = sa * sx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 sx ( i ) = sa * sx ( i ) sx ( i + 1 ) = sa * sx ( i + 1 ) sx ( i + 2 ) = sa * sx ( i + 2 ) sx ( i + 3 ) = sa * sx ( i + 3 ) sx ( i + 4 ) = sa * sx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx sx ( i ) = sa * sx ( i ) end do end if return end subroutine stdlib_sscal pure subroutine stdlib_sspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! SSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_sspmv pure subroutine stdlib_sspr ( uplo , n , alpha , x , incx , ap ) !! SSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr pure subroutine stdlib_sspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! SSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr2 pure subroutine stdlib_sswap ( n , sx , incx , sy , incy ) !! SSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp stemp = sx ( i + 1 ) sx ( i + 1 ) = sy ( i + 1 ) sy ( i + 1 ) = stemp stemp = sx ( i + 2 ) sx ( i + 2 ) = sy ( i + 2 ) sy ( i + 2 ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = sx ( ix ) sx ( ix ) = sy ( iy ) sy ( iy ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_sswap pure subroutine stdlib_ssymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_ssymm pure subroutine stdlib_ssymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! SSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssymv pure subroutine stdlib_ssyr ( uplo , n , alpha , x , incx , a , lda ) !! SSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_ssyr pure subroutine stdlib_ssyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! SSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssyr2 pure subroutine stdlib_ssyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_ssyr2k pure subroutine stdlib_ssyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! SSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_ssyrk pure subroutine stdlib_stbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_stbmv pure subroutine stdlib_stbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_stbsv pure subroutine stdlib_stpmv ( uplo , trans , diag , n , ap , x , incx ) !! STPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpmv pure subroutine stdlib_stpsv ( uplo , trans , diag , n , ap , x , incx ) !! STPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpsv pure subroutine stdlib_strmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strmm pure subroutine stdlib_strmv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_strmv pure subroutine stdlib_strsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strsm pure subroutine stdlib_strsv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_strsv end module stdlib_linalg_blas_s","tags":"","loc":"sourcefile/stdlib_linalg_blas_s.fypp.html"},{"title":"stdlib_hashmap_open.f90 – Fortran-lang/stdlib","text":"The module, STDLIB_HASHMAP_OPEN implements a simple open addressing hash\nmap using linear addressing. The implementation is loosely based on a\nC implementation by David Chase, http://chasewoerner.org/src/hasht/, for\nwhich he has given permission to use in the Fortran Standard Library. Source Code !! The module, STDLIB_HASHMAP_OPEN implements a simple open addressing hash !! map using linear addressing. The implementation is loosely based on a !! C implementation by David Chase, http://chasewoerner.org/src/hasht/, for !! which he has given permission to use in the Fortran Standard Library. ! Note an error in the code caused attempts to deallocate already deallocated ! entries. This did not cause stat to be non-zero, but did cause system errors, ! on my Mac. I therefore decided to remove all deallocation error reporting. submodule ( stdlib_hashmaps ) stdlib_hashmap_open use , intrinsic :: iso_fortran_env , only : & character_storage_size , & error_unit use stdlib_hashmap_wrappers implicit none ! Error messages character ( len =* ), parameter :: & alloc_inv_fault = \"OPEN_HASHMAP_TYPE % INVERSE allocation fault.\" , & alloc_key_fault = \"KEY allocation fault.\" , & alloc_slots_fault = \"OPEN_HASHMAP_TYPE % SLOTS allocation fault.\" , & conflicting_key = \"KEY already exists in MAP.\" , & expand_slots_fail = \"OPEN_HASHMAP_TYPE % SLOTS allocation > \" // & \"MAX_BITS.\" , & init_slots_pow_fail = \"SLOTS_BITS is not between DEFAULT_BITS \" // & \"and MAX_BITS.\" , & invalid_inmap = \"INMAP was not a valid INVERSE index.\" , & map_consist_fault = \"The hash map found an inconsistency.\" character ( * ), parameter :: submodule_name = 'STDLIB_HASHMAP_OPEN' interface expand_slots !! Version: Experimental !! !! Interface to internal procedure that expands an open map's slots. module procedure expand_open_slots end interface expand_slots interface extend_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that expands an open map entry pool. module procedure extend_open_map_entry_pool end interface extend_map_entry_pool interface free_map !! Version: Experimental !! !! Interface to procedure that finalizes an open hash map. module procedure free_open_map end interface free_map interface free_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that finalizes an open hash map !! entry pool. module procedure free_map_entry_pool end interface free_map_entry_pool interface get_other_data !! Version: Experimental !! !! Interface to procedure that gets an entry's other data. module procedure get_other_open_data end interface get_other_data interface init !! Version: Experimental !! !! Interface to initialization procedure for an open hash map. module procedure init_open_map end interface init interface rehash !! Version: Experimental !! !! Interface to a procedure that changes the hash function that !! is used to map the keys into an open hash map. module procedure rehash_open_map end interface rehash interface remove !! Version: Experimental !! !! Interface to a procedure that removees an entry from an open hash map. module procedure remove_open_entry end interface remove interface set_other_data !! Version: Experimental !! !! Interface to a procedure that changes the other data associated with a key module procedure set_other_open_data end interface set_other_data contains subroutine expand_open_slots ( map ) !! Version: Experimental !! !! Internal routine to make a duplicate map with more hash slots. !! Doubles the size of the map % slots array !! Arguments: !! map - the hash table whose hash slots are to be expanded ! type ( open_hashmap_type ), intent ( inout ) :: map integer ( int_hash ) :: base_slot integer ( int_index ), allocatable :: dummy_slots (:) integer ( int_index ) :: inv_index , & new_size , & offset , & old_size , & test_slot integer ( int32 ) :: bits , & stat character ( 256 ) :: errmsg character ( * ), parameter :: procedure = 'EXPAND_SLOTS' if ( map % nbits == max_bits ) then error stop submodule_name // ' % ' // procedure // ': ' // & expand_slots_fail end if old_size = size ( map % slots , kind = int_index ) new_size = 2 * old_size bits = map % nbits + 1 allocate ( dummy_slots ( 0 : new_size - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if map % nbits = bits dummy_slots (:) = 0 map % index_mask = new_size - 1 map % total_probes = map % total_probes + map % probe_count map % probe_count = 0 REMAP_SLOTS : do inv_index = 1_int_index , & map % num_entries + map % num_free associate ( inverse => map % inverse ( inv_index ) ) if ( associated ( inverse % target ) ) then base_slot = fibonacci_hash ( inverse % target % hash_val , & map % nbits ) offset = 0 FIND_EMPTY_SLOT : do test_slot = iand ( int ( base_slot + offset , int_hash ), & map % index_mask ) if ( dummy_slots ( test_slot ) == 0 ) then dummy_slots ( test_slot ) = inv_index exit FIND_EMPTY_SLOT end if offset = offset + 1 end do FIND_EMPTY_SLOT end if end associate end do REMAP_SLOTS call move_alloc ( dummy_slots , map % slots ) end subroutine expand_open_slots subroutine extend_open_map_entry_pool ( pool ) ! gent_pool_new !! Version: Experimental !! !! Add more map_entrys to the pool head !! Arguments: !! pool - an open map entry pool type ( open_map_entry_pool ), intent ( inout ), pointer :: pool type ( open_map_entry_pool ), pointer :: map_entry_pool_head allocate ( map_entry_pool_head ) allocate ( map_entry_pool_head % more_map_entries ( 0 : pool_size - 1 )) map_entry_pool_head % lastpool => pool pool => map_entry_pool_head pool % next = 0 end subroutine extend_open_map_entry_pool recursive subroutine free_map_entry_pool ( pool ) ! gent_pool_free !! Version: Experimental !! Note the freeing of allocated memory may be unnecessary !! !! Recursively descends map entry pool list freeing each element !! Arguments: !! pool The map entry pool whose elements are to be freed ! type ( open_map_entry_pool ), intent ( inout ), pointer :: pool type ( open_map_entry_pool ), pointer :: lastpool if ( associated ( pool ) ) then lastpool => pool % lastpool pool % lastpool => null () deallocate ( pool ) ! Trace component pointers/lists call free_map_entry_pool ( lastpool ) end if end subroutine free_map_entry_pool module subroutine free_open_map ( map ) !! Version: Experimental !! !! Frees internal memory of an open map !! Arguments: !! map - the open hash map whose memory is to be freed ! type ( open_hashmap_type ), intent ( inout ) :: map type ( open_map_entry_list ), pointer :: free_list integer ( int_index ) :: i if ( allocated ( map % slots ) ) then deallocate ( map % slots ) end if if ( allocated ( map % inverse ) ) then remove_links : do i = 1 , size ( map % inverse , kind = int_index ) map % inverse ( i ) % target => null () end do remove_links deallocate ( map % inverse ) end if free_free_list : do while ( map % num_free > 0 ) free_list => map % free_list map % free_list => map % free_list % next free_list % next => null () free_list % target => null () map % num_free = map % num_free - 1 end do free_free_list map % num_free = 0 if ( associated ( map % cache ) ) call free_map_entry_pool ( map % cache ) map % num_entries = 0 end subroutine free_open_map module subroutine get_all_open_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hash map !! Arguments: !! map - an open hash map !! all_keys - all the keys contained in a hash map ! class ( open_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) integer ( int32 ) :: num_keys integer ( int_index ) :: i , key_idx num_keys = map % entries () allocate ( all_keys ( num_keys ) ) if ( num_keys == 0 ) return if ( allocated ( map % inverse ) ) then key_idx = 1_int_index do i = 1_int_index , size ( map % inverse , kind = int_index ) if ( associated ( map % inverse ( i ) % target ) ) then all_keys ( key_idx ) = map % inverse ( i ) % target % key key_idx = key_idx + 1_int_index end if end do end if end subroutine get_all_open_keys module subroutine get_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - an open hash table !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'GET_OTHER_DATA' call in_open_map ( map , inmap , key ) if ( inmap <= 0 . or . & inmap > map % num_entries + map % num_free ) then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then if ( present ( exists ) ) exists = . true . call copy_other ( map % inverse ( inmap ) % target % other , other ) else if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault end if end if end subroutine get_other_open_data subroutine in_open_map ( map , inmap , key ) ! Chase's inmap !! Version: Experimental !! !! Returns the index into the INVERSE array associated with the KEY !! Arguments: !! map - the hash map of interest !! inmap - the returned index into the INVERSE array of entry pointers !! key - the key identifying the entry of interest ! class ( open_hashmap_type ), intent ( inout ) :: map integer ( int_index ), intent ( out ) :: inmap type ( key_type ), intent ( in ) :: key character ( * ), parameter :: procedure = 'IN_MAP' integer ( int_hash ) :: & base_slot , & hash_val , & test_slot integer ( int_index ) :: & offset hash_val = map % hasher ( key ) if ( map % probe_count > inmap_probe_factor * map % call_count . or . & map % num_entries >= load_factor * & size ( map % slots , kind = int_index ) ) then if ( map % nbits < max_bits ) & call expand_slots ( map ) end if map % call_count = map % call_count + 1 base_slot = fibonacci_hash ( hash_val , map % nbits ) offset = 0_int_index PROBE_SLOTS : do test_slot = iand ( base_slot + offset , map % index_mask ) map % probe_count = map % probe_count + 1 inmap = map % slots ( test_slot ) if ( inmap == 0 ) then return else if ( inmap < 0 . or . & inmap > map % num_entries + map % num_free ) then error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault else if ( . not . associated ( map % inverse ( inmap ) % target ) ) then error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault else associate ( inverse => map % inverse ( inmap ) ) if ( hash_val == inverse % target % hash_val ) then if ( key == inverse % target % key ) then return end if end if end associate end if offset = offset + 1_int_index end do PROBE_SLOTS end subroutine in_open_map module subroutine init_open_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a !! maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the open hash maap to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the number of bits used to map to the slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bitd or !! greater than max_bits class ( open_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status character ( 256 ) :: errmsg integer ( int_index ) :: i character ( * ), parameter :: procedure = 'INIT' integer ( int_index ) :: slots integer ( int32 ) :: stat type ( open_map_entry_pool ), pointer :: map_entry_pool_head map % call_count = 0 map % probe_count = 0 map % total_probes = 0 map % hasher => hasher if ( present ( slots_bits ) ) then if ( slots_bits < default_bits . OR . & slots_bits > max_bits ) then if ( present ( status ) ) then status = array_size_error return else error stop submodule_name // ' % ' // procedure // ': ' // & init_slots_pow_fail end if end if map % nbits = slots_bits else map % nbits = min ( default_bits , max_bits ) end if slots = 2_int32 ** map % nbits map % index_mask = slots - 1 allocate ( map % slots ( 0 : slots - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if end if do i = 0 , size ( map % slots , kind = int_index ) - 1 map % slots ( i ) = 0 ! May be redundant end do !! 5*s from Chase's g_new_map allocate ( map % inverse ( 1 : ceiling ( load_factor * slots , & kind = int_index )), & stat = stat , & errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if end if do i = 1 , size ( map % inverse , kind = int_index ) map % inverse ( i ) % target => null () end do do while ( associated ( map % cache )) map_entry_pool_head => map % cache map % cache => map_entry_pool_head % lastpool map_entry_pool_head % lastpool => null () deallocate ( map_entry_pool_head % more_map_entries ) deallocate ( map_entry_pool_head ) end do call extend_map_entry_pool ( map % cache ) if ( present ( status ) ) status = success end subroutine init_open_map pure module function open_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map real :: open_loading open_loading = real ( map % num_entries ) / & size ( map % slots , kind = int_index ) end function open_loading module subroutine map_open_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! Arguments: !! map the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict type ( open_map_entry_type ), pointer :: new_ent integer ( int_hash ) :: base_slot integer ( int_hash ) :: hash_val integer ( int_index ) :: inmap , offset , test_slot character ( * ), parameter :: procedure = 'MAP_ENTRY' hash_val = map % hasher ( key ) if ( map % probe_count > map_probe_factor * map % call_count . or . & map % num_entries >= load_factor * size ( map % slots , & kind = int_index ) ) then call expand_slots ( map ) end if map % call_count = map % call_count + 1 base_slot = fibonacci_hash ( hash_val , map % nbits ) offset = 0 PROBE_SUCCESSIVE_SLOTS : do map % probe_count = map % probe_count + 1 test_slot = iand ( base_slot + offset , map % index_mask ) inmap = map % slots ( test_slot ) if ( inmap == 0 ) then call allocate_open_map_entry ( map , new_ent ) new_ent % hash_val = hash_val call copy_key ( key , new_ent % key ) if ( present ( other ) ) & call copy_other ( other , new_ent % other ) inmap = new_ent % inmap map % inverse ( inmap ) % target => new_ent map % slots ( test_slot ) = inmap if ( present ( conflict ) ) conflict = . false . return else if ( inmap < 0 . or . & inmap > map % num_entries + map % num_free ) then error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap else if (. not . associated ( map % inverse ( inmap ) % target ) ) then error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap else associate ( target => map % inverse ( inmap ) % target ) if ( hash_val == target % hash_val ) then if ( key == target % key ) then ! entry already exists if ( present ( conflict ) ) then conflict = . true . else error stop submodule_name // ' % ' // procedure & // ': ' // conflicting_key end if return end if end if end associate end if offset = offset + 1 end do PROBE_SUCCESSIVE_SLOTS contains subroutine allocate_open_map_entry ( map , bucket ) ! allocates a hash bucket type ( open_hashmap_type ), intent ( inout ) :: map type ( open_map_entry_type ), pointer , intent ( out ) :: bucket type ( open_map_entry_list ), pointer :: free_list type ( open_map_entry_pool ), pointer :: pool character ( * ), parameter :: procedure_name = \"ALLOCATE_MAP_ENTRY\" pool => map % cache map % num_entries = map % num_entries + 1 if ( associated ( map % free_list ) ) then ! Get hash bucket from free_list free_list => map % free_list bucket => free_list % target map % free_list => free_list % next free_list % target => null () free_list % next => null () if ( bucket % inmap <= 0 ) & error stop submodule_name // \" % \" // procedure_name // & \": Failed consistency check: BUCKET % INMAP <= 0\" map % num_free = map % num_free - 1 else ! Get hash bucket from pool if ( pool % next == pool_size ) then ! Expand pool call extend_map_entry_pool ( map % cache ) pool => map % cache end if bucket => pool % more_map_entries ( pool % next ) pool % next = pool % next + 1 ! 0s based -> post-increment if ( map % num_entries > & size ( map % inverse , kind = int_index ) ) then call expand_inverse ( map ) end if if ( map % num_entries <= 0 ) & error stop submodule_name // \" % \" // procedure_name // & \": Failed consistency check: MAP % NUM_ENTRIES <= 0.\" bucket % inmap = map % num_entries end if end subroutine allocate_open_map_entry subroutine expand_inverse ( map ) !! Increase size of map % inverse type ( open_hashmap_type ), intent ( inout ) :: map type ( open_map_entry_ptr ), allocatable :: dummy_inverse (:) integer ( int32 ) :: stat character ( 256 ) :: errmsg allocate ( dummy_inverse ( 1 : 2 * size ( map % inverse , kind = int_index )), & stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if dummy_inverse ( 1 : size ( map % inverse , kind = int_index )) = & map % inverse (:) call move_alloc ( dummy_inverse , map % inverse ) end subroutine expand_inverse end subroutine map_open_entry module subroutine rehash_open_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( open_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher integer ( int_hash ) :: base_slot integer ( int_hash ) :: hash_val integer ( int_index ) :: i , test_slot , offset map % hasher => hasher map % slots = 0 do i = 1 , map % num_entries + map % num_free if ( . not . associated ( map % inverse ( i ) % target ) ) cycle hash_val = map % hasher ( map % inverse ( i ) % target % key ) map % inverse ( i ) % target % hash_val = hash_val base_slot = fibonaccI_hash ( hash_val , map % nbits ) offset = 0 FIND_EMPTY_SLOT : do test_slot = iand ( int ( base_slot + offset , int_hash ), & map % index_mask ) if ( map % slots ( test_slot ) == 0 ) then map % slots ( test_slot ) = i exit FIND_EMPTY_SLOT end if offset = offset + 1 end do FIND_EMPTY_SLOT end do end subroutine rehash_open_map module subroutine remove_open_entry ( map , key , existed ) !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed type ( open_map_entry_list ), pointer :: aentry type ( open_map_entry_type ), pointer :: bucket integer ( int_index ) :: base_slot integer ( int_index ) :: current_index integer ( int_index ) :: current_slot integer ( int_index ) :: empty_slot integer ( int_index ) :: inmap logical :: overlap integer ( int_index ) :: slot_index overlap = . false . call in_open_map ( map , inmap , key ) if ( inmap < 1 . or . inmap > size ( map % inverse ) ) then if ( present ( existed ) ) existed = . false . return end if bucket => map % inverse ( inmap ) % target if ( associated ( bucket ) ) then base_slot = fibonacci_hash ( bucket % hash_val , map % nbits ) if ( present ( existed ) ) existed = . true . else if ( present ( existed ) ) existed = . false . return end if ! Find slot associated with inmap and nullify the pointer current_slot = base_slot search_for_inmap : do slot_index = map % slots ( current_slot ) if ( slot_index == inmap ) then allocate ( aentry ) aentry % target => map % inverse ( inmap ) % target aentry % next => map % free_list map % free_list => aentry map % num_free = map % num_free + 1 map % slots ( current_slot ) = 0 map % inverse ( inmap ) % target => null () map % num_entries = map % num_entries - 1 empty_slot = current_slot current_slot = iand ( map % index_mask , current_slot + 1 ) if ( map % slots ( current_slot ) == 0 ) return if ( current_slot == 0 ) overlap = . true . exit search_for_inmap else if ( map % slots ( current_slot ) == 0 ) return current_slot = iand ( map % index_mask , current_slot + 1 ) if ( current_slot == 0 ) overlap = . true . cycle search_for_inmap end if end do search_for_inmap ! Have found slot and stored it in free_list, now may need to iteratively ! swap to fill holes. First search backwards to find start of run. find_run_start : do base_slot = iand ( map % index_mask , base_slot - 1 ) if ( base_slot == map % index_mask ) then if ( map % slots ( base_slot ) == 0 ) then base_slot = 0 exit find_run_start else overlap = . true . cycle find_run_start end if else if ( map % slots ( base_slot ) == 0 ) then base_slot = iand ( map % index_mask , base_slot + 1 ) exit find_run_start else cycle find_run_start end if end do find_run_start ! Search forward for entry to fill empty slot fill_empty_slots : do bucket => map % inverse ( map % slots ( current_slot ) ) % target current_index = fibonacci_hash ( bucket % hash_val , & map % nbits ) if ( overlap . and . empty_slot < base_slot ) then if ( ( current_index >= base_slot . and . & current_index <= map % index_mask ) . or . & ( current_index >= 0 . and . & current_index <= empty_slot ) ) then map % slots ( empty_slot ) = map % slots ( current_slot ) map % slots ( current_slot ) = 0 empty_slot = current_slot end if current_slot = iand ( map % index_mask , current_slot + 1 ) else if ( current_index >= base_slot . and . & current_index <= empty_slot ) then map % slots ( empty_slot ) = map % slots ( current_slot ) map % slots ( current_slot ) = 0 empty_slot = current_slot end if current_slot = iand ( map % index_mask , current_slot + 1 ) if ( current_slot == 0 ) overlap = . true . end if if ( map % slots ( current_slot ) == 0 ) exit fill_empty_slots end do fill_empty_slots end subroutine remove_open_entry module subroutine set_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'SET_OTHER_DATA' call in_open_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then associate ( target => map % inverse ( inmap ) % target ) call copy_other ( other , target % other ) if ( present ( exists ) ) exists = . true . return end associate else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if end subroutine set_other_open_data module function total_open_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map integer ( int64 ) :: total_depth integer ( int_index ) :: inv_index , slot , slots integer ( int_hash ) :: index total_depth = 0_int64 slots = size ( map % slots , kind = int_index ) do slot = 0 , slots - 1 if ( map % slots ( slot ) == 0 ) cycle inv_index = map % slots ( slot ) if ( inv_index <= 0 ) cycle associate ( inverse => map % inverse ( inv_index )) index = fibonacci_hash ( inverse % target % hash_val , & map % nbits ) end associate total_depth = total_depth + & iand ( slot - index , map % index_mask ) + 1_int64 end do end function total_open_depth module subroutine open_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present integer ( int_index ) :: inmap call in_open_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then present = . false . else present = associated ( map % inverse ( inmap ) % target ) end if end subroutine open_key_test end submodule stdlib_hashmap_open","tags":"","loc":"sourcefile/stdlib_hashmap_open.f90.html"},{"title":"stdlib_stats_moment_scalar.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment_scalar use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum (( x - center ) ** order , dim ) / size ( x , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( ( real ( x , dp ) - center ) ** order , dim ) / size ( x , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum (( x - center ) ** order , dim , mask ) / count ( mask , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum (( real ( x , dp ) - center ) ** order , dim , mask ) / count ( mask , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment_scalar.fypp.html"},{"title":"stdlib_hash_32bit_nm.fypp – Fortran-lang/stdlib","text":"NM_HASH32 and NM_HASH32X are translations to Fortran 2008 and signed\n two's complement arithmetic of the nmhash32 and nmhash32x scalar\n algorithms of James Z. M. Gao, copyright 2021. James Z. M. Gao's original\n C++ code, nmhash.h , is available at the URL:\n https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/nmhash.h\n under the BSD 2-Clause License:\n https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/LICENSE\n The algorithms come in multiple versions, depending on whether the\n vectorized instructions SSE2 or AVX2 are available. As neither instruction\n is available in portable Fortran 2008, the algorithms that do not use these\n instructions are used. The BSD 2-Clause license is as follows: BSD 2-Clause License Copyright (c) 2021, water hash algorithm. James Z.M. Gao\n All rights reserved. Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n POSSIBILITY OF SUCH DAMAGE. Source Code !!------------------------------------------------------------------------------ !! `NM_HASH32` and `NM_HASH32X` are translations to Fortran 2008 and signed !! two's complement arithmetic of the `nmhash32` and `nmhash32x` scalar !! algorithms of James Z. M. Gao, copyright 2021. James Z. M. Gao's original !! C++ code, `nmhash.h`, is available at the URL: !! https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/nmhash.h !! under the BSD 2-Clause License: !! https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/LICENSE !! The algorithms come in multiple versions, depending on whether the !! vectorized instructions SSE2 or AVX2 are available. As neither instruction !! is available in portable Fortran 2008, the algorithms that do not use these !! instructions are used. !! !! The BSD 2-Clause license is as follows: !! !! BSD 2-Clause License !! !! Copyright (c) 2021, water hash algorithm. James Z.M. Gao !! All rights reserved. !! !! Redistribution and use in source and binary forms, with or without !! modification, are permitted provided that the following conditions are met: !! !! 1. Redistributions of source code must retain the above copyright notice, !! this list of conditions and the following disclaimer. !! !! 2. Redistributions in binary form must reproduce the above copyright notice, !! this list of conditions and the following disclaimer in the documentation !! and/or other materials provided with the distribution. !! !! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" !! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE !! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE !! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE !! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR !! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF !! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS !! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN !! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) !! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE !! POSSIBILITY OF SUCH DAMAGE. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_32bit ) stdlib_hash_32bit_nm implicit none ! Primes from XXH integer ( int32 ), parameter :: nmh_prime32_1 = int ( Z '9E3779B1' , int32 ) integer ( int32 ), parameter :: nmh_prime32_2 = int ( Z '85EBCA77' , int32 ) integer ( int32 ), parameter :: nmh_prime32_3 = int ( Z 'C2B2AE3D' , int32 ) integer ( int32 ), parameter :: nmh_prime32_4 = int ( Z '27D4EB2F' , int32 ) integer ( int32 ), parameter :: nmh_m1 = int ( z 'F0D9649B' , int32 ) integer ( int32 ), parameter :: nmh_m2 = int ( z '29A7935D' , int32 ) integer ( int32 ), parameter :: nmh_m3 = int ( z '55D35831' , int32 ) integer ( int32 ), parameter :: nmh_m1_v ( 0 : 31 ) = nmh_m1 integer ( int32 ), parameter :: nmh_m2_v ( 0 : 31 ) = nmh_m2 integer ( int32 ), parameter :: nmh_m3_v ( 0 : 31 ) = nmh_m3 logical , parameter :: nmh_short32_without_seed2 = . false . logical , parameter :: nmh_short32_with_seed2 = . true . integer , parameter :: init_size = 32 ! Pseudorandom secrets taken directly from FARSH. integer ( int32 ), parameter :: nmh_acc_init ( 0 : init_size - 1 ) = [ & int ( z 'B8FE6C39' , int32 ), int ( z '23A44BBE' , int32 ), & int ( z '7C01812C' , int32 ), int ( z 'F721AD1C' , int32 ), & int ( z 'DED46DE9' , int32 ), int ( z '839097DB' , int32 ), & int ( z '7240A4A4' , int32 ), int ( z 'B7B3671F' , int32 ), & int ( z 'CB79E64E' , int32 ), int ( z 'CCC0E578' , int32 ), & int ( z '825AD07D' , int32 ), int ( z 'CCFF7221' , int32 ), & int ( z 'B8084674' , int32 ), int ( z 'F743248E' , int32 ), & int ( z 'E03590E6' , int32 ), int ( z '813A264C' , int32 ), & int ( z '3C2852BB' , int32 ), int ( z '91C300CB' , int32 ), & int ( z '88D0658B' , int32 ), int ( z '1B532EA3' , int32 ), & int ( z '71644897' , int32 ), int ( z 'A20DF94E' , int32 ), & int ( z '3819EF46' , int32 ), int ( z 'A9DEACD8' , int32 ), & int ( z 'A8FA763F' , int32 ), int ( z 'E39C343F' , int32 ), & int ( z 'F9DCBBC7' , int32 ), int ( z 'C70B4F1D' , int32 ), & int ( z '8A51E04B' , int32 ), int ( z 'CDB45931' , int32 ), & int ( z 'C89F7EC9' , int32 ), int ( z 'D9787364' , int32 ) ] contains pure function nmh_readle32 ( p ) result ( v ) integer ( int32 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( p ( 1 : 4 ), 0_int32 ) else v = transfer ( [ p ( 4 ), p ( 3 ), p ( 2 ), p ( 1 ) ], 0_int32 ) end if end function nmh_readle32 pure function nmh_readle16 ( p ) result ( v ) integer ( int16 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( p ( 1 : 2 ), 0_int16 ) else v = transfer ( [ p ( 2 ), p ( 1 ) ], 0_int16 ) end if end function nmh_readle16 pure function nmhash32_0to8 ( x , seed ) result ( vx32 ) integer ( int32 ), intent ( in ) :: x integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: vx32 ! base mixer: [-6 -12 776bf593 -19 11 3fb39c65 -15 -9 e9139917 -11 16] ! = 0.027071104091278835 integer ( int32 ), parameter :: m1 = int ( z '776BF593' , int32 ) integer ( int32 ), parameter :: m2 = int ( z '3FB39C65' , int32 ) integer ( int32 ), parameter :: m3 = int ( z 'E9139917' , int32 ) integer ( int16 ) :: vx16 ( 2 ) vx32 = x vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , - 12 ), ishft ( vx32 , - 6 ) ) ) vx16 = transfer ( vx32 , 0_int16 , 2 ) vx16 = vx16 * transfer ( m1 , 0_int16 , 2 ) vx32 = transfer ( vx16 , 0_int32 ) vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , 11 ), ishft ( vx32 , - 19 ) ) ) vx16 = transfer ( vx32 , 0_int16 , 2 ) vx16 = vx16 * transfer ( m2 , 0_int16 , 2 ) vx32 = transfer ( vx16 , 0_int32 ) vx32 = ieor ( vx32 , seed ) vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , - 15 ), ishft ( vx32 , - 9 ) ) ) vx16 = transfer ( vx32 , 0_int16 , 2 ) vx16 = vx16 * transfer ( m3 , 0_int16 , 2 ) vx32 = transfer ( vx16 , 0_int32 ) vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , 16 ), ishft ( vx32 , - 11 ) ) ) end function nmhash32_0to8 pure function nmhash32_9to255 ( p , seed , full_avalanche ) result ( result ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed logical , intent ( in ) :: full_avalanche integer ( int32 ) :: result integer ( int32 ) :: xu32 ( 0 : 3 ), yu32 ( 0 : 3 ) integer ( int16 ) :: xu16 ( 0 : 1 ) ! Due to an issue with Intel OneAPI ifort 2021 (see ! https://community.intel.com/t5/Intel-Fortran-Compiler/Intrinsic-transfer-with-a-provided-size-un-expected-behavior/m-p/1343313#M158733 ! ), it is not possible to define the following variables as a parameter. ! integer(int16), parameter :: & ! nmh_m1_16(0:1) = transfer( nmh_m1, 0_int16, 2 ), & ! nmh_m2_16(0:1) = transfer( nmh_m2, 0_int16, 2 ), & ! nmh_m3_16(0:1) = transfer( nmh_m3, 0_int16, 2 ) integer ( int16 ) :: nmh_m1_16 ( 0 : 1 ), nmh_m2_16 ( 0 : 1 ), nmh_m3_16 ( 0 : 1 ) integer ( int32 ) :: s1 integer ( int64 ) :: length integer ( int32 ) :: length32 ( 0 : 1 ) integer ( int64 ) :: i , j , r nmh_m1_16 ( 0 : 1 ) = transfer ( nmh_m1 , 0_int16 , 2 ) nmh_m2_16 ( 0 : 1 ) = transfer ( nmh_m2 , 0_int16 , 2 ) nmh_m3_16 ( 0 : 1 ) = transfer ( nmh_m3 , 0_int16 , 2 ) ! base mixer: [f0d9649b 5 -13 29a7935d -9 11 55d35831 -20 -10 ] = ! 0.93495901789135362 result = 0 length = size ( p , kind = int64 ) length32 = transfer ( length , 0_int32 , 2 ) if ( little_endian ) then s1 = seed + length32 ( 0 ) else s1 = seed + length32 ( 1 ) end if xu32 ( 0 ) = nmh_prime32_1 xu32 ( 1 ) = nmh_prime32_2 xu32 ( 2 ) = nmh_prime32_3 xu32 ( 3 ) = nmh_prime32_4 yu32 (:) = s1 if ( full_avalanche ) then ! 33 to 255 bytes r = ( length - 1 ) / 32 do i = 0 , r - 1 do j = 0 , 3 xu32 ( j ) = ieor ( xu32 ( j ), nmh_readle32 ( p ( i * 32 + j * 4 : ) ) ) yu32 ( j ) = ieor ( yu32 ( j ), & nmh_readle32 ( p ( i * 32 + j * 4 + 16 : ) ) ) xu32 ( j ) = xu32 ( j ) + yu32 ( j ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m1_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), & ieor ( ishft ( xu32 ( j ), 5 ), & ishft ( xu32 ( j ), - 13 )) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m2_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), yu32 ( j ) ) xu32 ( j ) = ieor ( xu32 ( j ), & ieor ( ishft ( xu32 ( j ), 11 ), & ishft ( xu32 ( j ), - 9 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m3_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), & ieor ( ishft ( xu32 ( j ), - 10 ), & ishft ( xu32 ( j ), - 20 ) ) ) end do end do do j = 0 , 3 xu32 ( j ) = ieor ( xu32 ( j ), & nmh_readle32 ( p ( length - 32 + j * 4 : ) ) ) yu32 ( j ) = ieor ( yu32 ( j ), & nmh_readle32 ( p ( length - 16 + j * 4 : ) ) ) end do else ! 9 to 32 bytes xu32 ( 0 ) = ieor ( xu32 ( 0 ), nmh_readle32 ( p ( 0 :))) xu32 ( 1 ) = ieor ( xu32 ( 1 ), nmh_readle32 ( p ( ishft ( ishft ( length , - 4 ), 3 ):))) xu32 ( 2 ) = ieor ( xu32 ( 2 ), nmh_readle32 ( p ( length - 8 :))) xu32 ( 3 ) = ieor ( xu32 ( 3 ), & nmh_readle32 ( p ( length - 8 - ishft ( ishft ( length , - 4 ), 3 ):))) yu32 ( 0 ) = ieor ( yu32 ( 0 ), nmh_readle32 ( p ( 4 :))) yu32 ( 1 ) = ieor ( yu32 ( 1 ), & nmh_readle32 ( p ( ishft ( ishft ( length , - 4 ), 3 ) + 4 :))) yu32 ( 2 ) = ieor ( yu32 ( 2 ), nmh_readle32 ( p ( length - 8 + 4 :))) yu32 ( 3 ) = ieor ( yu32 ( 3 ), & nmh_readle32 ( p ( length - 8 - & ishft ( ishft ( length , - 4 ), 3 ) + 4 :))) end if do j = 0 , 3 xu32 ( j ) = xu32 ( j ) + yu32 ( j ) yu32 ( j ) = ieor ( yu32 ( j ), ieor ( ishft ( yu32 ( j ), 17 ), & ishft ( yu32 ( j ), - 6 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m1_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), ieor ( ishft ( xu32 ( j ), 5 ), & ishft ( xu32 ( j ), - 13 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m2_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), yu32 ( j ) ) xu32 ( j ) = ieor ( xu32 ( j ), ieor ( ishft ( xu32 ( j ), 11 ), & ishft ( xu32 ( j ), - 9 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m3_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), ieor ( ishft ( xu32 ( j ), - 10 ), & ishft ( xu32 ( j ), - 20 ) ) ) end do xu32 ( 0 ) = ieor ( xu32 ( 0 ), nmh_prime32_1 ) xu32 ( 1 ) = ieor ( xu32 ( 1 ), nmh_prime32_2 ) xu32 ( 2 ) = ieor ( xu32 ( 2 ), nmh_prime32_3 ) xu32 ( 3 ) = ieor ( xu32 ( 3 ), nmh_prime32_4 ) do j = 1 , 3 xu32 ( 0 ) = xu32 ( 0 ) + xu32 ( j ) end do xu32 ( 0 ) = ieor ( xu32 ( 0 ), s1 + ishft ( s1 , - 5 ) ) xu16 = transfer ( xu32 ( 0 ), 0_int16 , 2 ) xu16 = xu16 * nmh_m3_16 xu32 ( 0 ) = transfer ( xu16 , 0_int32 ) xu32 ( 0 ) = ieor ( xu32 ( 0 ), & ieor ( ishft ( xu32 ( 0 ), - 10 ), ishft ( xu32 ( 0 ), - 20 ) ) ) result = xu32 ( 0 ) end function nmhash32_9to255 pure function nmhash32_9to32 ( p , seed ) result ( result ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: result result = nmhash32_9to255 ( p , seed , . false . ) end function nmhash32_9to32 pure function nmhash32_33to255 ( p , seed ) result ( result ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: result result = nmhash32_9to255 ( p , seed , . true . ) end function nmhash32_33to255 pure subroutine nmhash32_long_round ( accx , accy , p ) integer ( int32 ), intent ( inout ) :: accx ( 0 :) integer ( int32 ), intent ( inout ) :: accy ( 0 :) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int64 ), parameter :: nbgroups = init_size integer ( int64 ) :: i integer ( int16 ) :: dummy1 ( 0 : 1 ) integer ( int16 ) :: dummy2 ( 0 : 1 ) do i = 0 , nbgroups - 1 accx ( i ) = ieor ( accx ( i ), nmh_readle32 ( p ( i * 4 :) ) ) accy ( i ) = ieor ( accy ( i ), nmh_readle32 ( p ( i * 4 + nbgroups * 4 :) ) ) accx ( i ) = accx ( i ) + accy ( i ) accy ( i ) = ieor ( accy ( i ), ishft ( accx ( i ), - 1 ) ) dummy1 = transfer ( accx ( i ), 0_int16 , 2 ) dummy2 = transfer ( nmh_m1_v ( i ), 0_int16 , 2 ) dummy1 = dummy1 * dummy2 accx ( i ) = transfer ( dummy1 , 0_int32 ) accx ( i ) = ieor ( accx ( i ), ieor ( ishft ( accx ( i ), 5 ), & ishft ( accx ( i ), - 13 ) ) ) dummy1 = transfer ( accx ( i ), 0_int16 , 2 ) dummy2 = transfer ( nmh_m2_v ( i ), 0_int16 , 2 ) dummy1 = dummy1 * dummy2 accx ( i ) = transfer ( dummy1 , 0_int32 ) accx ( i ) = ieor ( accx ( i ), accy ( i ) ) accx ( i ) = ieor ( accx ( i ), ieor ( ishft ( accx ( i ), 11 ), & ishft ( accx ( i ), - 9 ) ) ) dummy1 = transfer ( accx ( i ), 0_int16 , 2 ) dummy2 = transfer ( nmh_m3_v ( i ), 0_int16 , 2 ) dummy1 = dummy1 * dummy2 accx ( i ) = transfer ( dummy1 , 0_int32 ) accx ( i ) = ieor ( accx ( i ), ieor ( ishft ( accx ( i ), - 10 ), & ishft ( accx ( i ), - 20 ) ) ) end do end subroutine nmhash32_long_round pure function nmhash32_long ( p , seed ) result ( sum ) integer ( int32 ) :: sum integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: accx ( 0 : size ( nmh_acc_init ) - 1 ) integer ( int32 ) :: accy ( 0 : size ( nmh_acc_init ) - 1 ) integer ( int64 ) :: nbrounds integer ( int64 ) :: len integer ( int32 ) :: len32 ( 0 : 1 ) integer ( int64 ) :: i len = size ( p , kind = int64 ) nbrounds = ( len - 1 ) / ( 4 * size ( accx , kind = int64 ) * 2 ) sum = 0 ! Init do i = 0_int64 , size ( nmh_acc_init , kind = int64 ) - 1 accx ( i ) = nmh_acc_init ( i ) accy ( i ) = seed end do ! init do i = 0_int64 , nbrounds - 1 call nmhash32_long_round ( accx , accy , & p ( i * 8 * size ( accx , kind = int64 ):) ) end do call nmhash32_long_round ( accx , accy , & p ( len - 8 * size ( accx , kind = int64 ):) ) ! merge acc do i = 0 , size ( accx , kind = int64 ) - 1 accx ( i ) = ieor ( accx ( i ), nmh_acc_init ( i ) ) sum = sum + accx ( i ) end do len32 = transfer ( len , 0_int32 , 2 ) if ( little_endian ) then sum = sum + len32 ( 1 ) sum = ieor ( sum , len32 ( 0 )) else sum = sum + len32 ( 0 ) sum = ieor ( sum , len32 ( 1 )) end if end function nmhash32_long pure function nmhash32_avalanche32 ( x ) result ( u32 ) integer ( int32 ) :: u32 integer ( int32 ), intent ( in ) :: x integer ( int16 ) :: u16 ( 0 : 1 ) integer ( int32 ), parameter :: m1 = int ( z 'CCE5196D' , int32 ) integer ( int32 ), parameter :: m2 = int ( z '464BE229' , int32 ) ! Due to an issue with Intel OneAPI ifort 2021 (see ! https://community.intel.com/t5/Intel-Fortran-Compiler/Intrinsic-transfer-with-a-provided-size-un-expected-behavior/m-p/1343313#M158733 ! ), it is not possible to define the following variables as a parameter. !integer(int16), parameter:: m1_16(0:1) = transfer(m1, 0_int16, 2) !integer(int16), parameter:: m2_16(0:1) = transfer(m2, 0_int16, 2) integer ( int16 ) :: m1_16 ( 0 : 1 ), m2_16 ( 0 : 1 ) ! [-21 -8 cce5196d 12 -7 464be229 -21 -8] = 3.2267098842182733 m1_16 ( 0 : 1 ) = transfer ( m1 , 0_int16 , 2 ) m2_16 ( 0 : 1 ) = transfer ( m2 , 0_int16 , 2 ) u32 = x u32 = ieor ( u32 , ieor ( ishft ( u32 , - 8 ), ishft ( u32 , - 21 ) ) ) u16 = transfer ( u32 , 0_int16 , 2 ) u16 ( 0 ) = u16 ( 0 ) * m1_16 ( 0 ) u16 ( 1 ) = u16 ( 1 ) * m1_16 ( 1 ) u32 = transfer ( u16 , 0_int32 ) u32 = ieor ( u32 , ieor ( ishft ( u32 , 12 ), ishft ( u32 , - 7 ) ) ) u16 = transfer ( u32 , 0_int16 , 2 ) u16 ( 0 ) = u16 ( 0 ) * m2_16 ( 0 ) u16 ( 1 ) = u16 ( 1 ) * m2_16 ( 1 ) u32 = transfer ( u16 , 0_int32 ) u32 = ieor ( u32 , ieor ( ishft ( u32 , - 8 ), ishft ( u32 , - 21 ) ) ) end function nmhash32_avalanche32 pure module function int8_nmhash32 ( key , seed ) result ( hash ) !! NMHASH32 hash function for rank 1 array keys of kind INT8 integer ( int32 ) :: hash integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: len integer ( int32 ) :: u32 integer ( int16 ) :: u16 ( 0 : 1 ) integer ( int32 ) :: x , y integer ( int32 ) :: new_seed len = size ( key , kind = int64 ) if ( len <= 32 ) then if ( len > 8 ) then hash = nmhash32_9to32 ( key , seed ) return else if ( len > 4 ) then x = nmh_readle32 ( key ) y = ieor ( nmh_readle32 ( key ( len - 4 :)), nmh_prime32_4 + 2 + seed ) x = x + y x = ieor ( x , ishft ( x , len + 7 ) ) hash = nmhash32_0to8 ( x , ishftc ( y , 5 ) ) return else select case ( len ) case ( 0 ) new_seed = seed + nmh_prime32_2 u32 = 0 case ( 1 ) new_seed = seed + nmh_prime32_2 + ishft ( 1_int32 , 24 ) + & 2_int32 if ( little_endian ) then u32 = transfer ( [ key ( 0 ), 0_int8 , 0_int8 , 0_int8 ], & 0_int32 ) else u32 = transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( 0 )], & 0_int32 ) end if case ( 2 ) new_seed = seed + nmh_prime32_2 + ishft ( 2_int32 , 24 ) + & 4_int32 if ( little_endian ) then u32 = transfer ( [ nmh_readle16 ( key ), 0_int16 ], 0_int32 ) else u32 = transfer ( [ 0_int16 , nmh_readle16 ( key )], 0_int32 ) end if case ( 3 ) new_seed = seed + nmh_prime32_2 + ishft ( 3_int32 , 24 ) + & 6_int32 if ( little_endian ) then u16 ( 1 ) = transfer ( [ key ( 2 ), 0_int8 ], 0_int16 ) u16 ( 0 ) = nmh_readle16 ( key ) else u16 ( 0 ) = transfer ( [ 0_int8 , key ( 2 )], 0_int16 ) u16 ( 1 ) = nmh_readle16 ( key ) end if u32 = transfer ( u16 , 0_int32 ) case ( 4 ) new_seed = seed + nmh_prime32_3 u32 = nmh_readle32 ( key ) case default hash = 0 return end select hash = nmhash32_0to8 ( u32 + new_seed , ishftc ( new_seed , 5 ) ) return end if else if ( len < 256_int64 ) then hash = nmhash32_33to255 ( key , seed ) return else hash = nmhash32_avalanche32 ( nmhash32_long ( key , seed )) return end if end function int8_nmhash32 pure function nmhash32x_0to4 ( x , seed ) result ( hash ) integer ( int32 ), intent ( in ) :: x integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash ! [bdab1ea9 18 a7896a1b 12 83796a2d 16] = 0.092922873297662509 hash = x hash = ieor ( hash , seed ) hash = hash * int ( z 'BDAB1EA9' , int32 ) hash = hash + ishftc ( seed , 31 ) hash = ieor ( hash , ishft ( hash , - 18 ) ) hash = hash * int ( z 'A7896A1B' , int32 ) hash = ieor ( hash , ishft ( hash , - 12 ) ) hash = hash * int ( z '83796A2D' , int32 ) hash = ieor ( hash , ishft ( hash , - 16 ) ) end function nmhash32x_0to4 pure function nmhash32x_5to8 ( p , seed ) result ( x ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: x integer ( int64 ) :: len integer ( int32 ) :: y ! 5 to 9 bytes ! mixer: [11049a7d 23 bcccdc7b 12 065e9dad 12] = 0.16577596555667246 len = size ( p , kind = int64 ) x = ieor ( nmh_readle32 ( p ), nmh_prime32_3 ) y = ieor ( nmh_readle32 ( p ( len - 4 :)), seed ) x = x + y x = ieor ( x , ishft ( x , - len ) ) x = x * int ( z '11049A7D' , int32 ) x = ieor ( x , ishft ( x , - 23 ) ) x = x * int ( z 'BCCCDC7B' , int32 ) x = ieor ( x , ishftc ( y , 3 ) ) x = ieor ( x , ishft ( x , - 12 ) ) x = x * int ( z '065E9DAD' , int32 ) x = ieor ( x , ishft ( x , - 12 ) ) end function nmhash32x_5to8 pure function nmhash32x_9to255 ( p , seed ) result ( x ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: x integer ( int64 ) :: len integer ( int32 ) :: len32 ( 0 : 1 ), len_base integer ( int32 ) :: y integer ( int32 ) :: a , b integer ( int64 ) :: i , r ! - at least 9 bytes ! - base mixer: [11049a7d 23 bcccdc7b 12 065e9dad 12] = 0.16577596555667246 ! - tail mixer: [16 a52fb2cd 15 551e4d49 16] = 0.17162579707098322 len = size ( p , kind = int64 ) len32 = transfer ( len , 0_int32 , 2 ) if ( little_endian ) then len_base = len32 ( 0 ) else len_base = len32 ( 1 ) end if x = nmh_prime32_3 y = seed a = nmh_prime32_4 b = seed r = ( len - 1 ) / 16 do i = 0 , r - 1 x = ieor ( x , nmh_readle32 ( p ( i * 16 + 0 :) ) ) y = ieor ( y , nmh_readle32 ( p ( i * 16 + 4 :) ) ) x = ieor ( x , y ) x = x * int ( z '11049A7D' , int32 ) x = ieor ( x , ishft ( x , - 23 ) ) x = x * int ( z 'BCCCDC7B' , int32 ) y = ishftc ( y , 4 ) x = ieor ( x , y ) x = ieor ( x , ishft ( x , - 12 ) ) x = x * int ( z '065E9DAD' , int32 ) x = ieor ( x , ishft ( x , - 12 ) ) a = ieor ( a , nmh_readle32 ( p ( i * 16 + 8 :))) b = ieor ( b , nmh_readle32 ( p ( i * 16 + 12 :))) a = ieor ( a , b ) a = a * int ( z '11049A7D' , int32 ) a = ieor ( a , ishft ( a , - 23 ) ) a = a * int ( z 'BCCCDC7B' , int32 ) b = ishftc ( b , 3 ) a = ieor ( a , b ) a = ieor ( a , ishft ( a , - 12 ) ) a = a * int ( z '065E9DAD' , int32 ) a = ieor ( a , ishft ( a , - 12 ) ) end do if ( iand ( len_base - 1_int32 , 8_int32 ) /= 0 ) then if ( iand ( len_base - 1_int32 , 4_int32 ) /= 0 ) then a = ieor ( a , nmh_readle32 ( p ( r * 16 + 0 :) ) ) b = ieor ( b , nmh_readle32 ( p ( r * 16 + 4 :) ) ) a = ieor ( a , b ) a = a * int ( z '11049A7D' , int32 ) a = ieor ( a , ishft ( a , - 23 ) ) a = a * int ( z 'BCCCDC7B' , int32 ) a = ieor ( a , ishftc ( b , 4 )) a = ieor ( a , ishft ( a , - 12 )) a = a * int ( z '065E9DAD' , int32 ) else a = ieor ( a , nmh_readle32 ( p ( r * 16 :) ) + b ) a = ieor ( a , ishft ( a , - 16 ) ) a = a * int ( z 'A52FB2CD' , int32 ) a = ieor ( a , ishft ( a , - 15 ) ) a = a * int ( z '551E4D49' , int32 ) end if x = ieor ( x , nmh_readle32 ( p ( len - 8 :) ) ) y = ieor ( y , nmh_readle32 ( p ( len - 4 :) ) ) x = ieor ( x , y ) x = x * int ( z '11049A7D' , int32 ) x = ieor ( x , ishft ( x , - 23 ) ) x = x * int ( z 'BCCCDC7B' , int32 ); x = ieor ( x , ishftc ( y , 3 ) ) x = ieor ( x , ishft ( x , - 12 ) ) x = x * int ( z '065E9DAD' , int32 ) else if ( iand ( len_base - 1_int32 , 4_int32 ) /= 0 ) then a = ieor ( a , nmh_readle32 ( p ( r * 16 :) ) + b ) a = ieor ( a , ishft ( a , - 16 ) ) a = a * int ( z 'A52FB2CD' , int32 ) a = ieor ( a , ishft ( a , - 15 ) ) a = a * int ( z '551E4D49' , int32 ) end if x = ieor ( x , nmh_readle32 ( p ( len - 4 :) ) + y ) x = ieor ( x , ishft ( x , - 16 ) ) x = x * int ( z 'A52FB2CD' , int32 ) x = ieor ( x , ishft ( x , - 15 ) ) x = x * int ( z '551E4D49' , int32 ) end if x = ieor ( x , len_base ) x = ieor ( x , ishftc ( a , 27 )) ! rotate one lane to pass Diff test x = ieor ( x , ishft ( x , - 14 )) x = x * int ( z '141CC535' , int32 ) end function nmhash32x_9to255 pure function nmhash32x_avalanche32 ( x ) result ( hash ) integer ( int32 ) :: hash integer ( int32 ), intent ( in ) :: x ! Mixer with 2 mul from skeeto/hash-prospector: ! [15 d168aaad 15 af723597 15] = 0.15983776156606694 hash = x hash = ieor ( hash , ishft ( hash , - 15 ) ) hash = hash * int ( z 'D168AAAD' , int32 ) hash = ieor ( hash , ishft ( hash , - 15 ) ) hash = hash * int ( z 'AF723597' , int32 ) hash = ieor ( hash , ishft ( hash , - 15 ) ) end function nmhash32x_avalanche32 pure module function int8_nmhash32x ( key , seed ) result ( hash ) !! NMHASH32x hash function for rank 1 array keys of kind INT8 integer ( int32 ) :: hash integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: len integer ( int32 ) :: seed2 integer ( int32 ) :: u32 integer ( int16 ) :: u16 ( 0 : 1 ) len = size ( key , kind = int64 ) if ( len <= 8 ) then if ( len > 4 ) then hash = nmhash32x_5to8 ( key , seed ) return else ! 0 to 4 bytes select case ( len ) case ( 0 ) seed2 = seed + nmh_prime32_2 u32 = 0 case ( 1 ) seed2 = seed + nmh_prime32_2 + ishft ( 1_int32 , 24 ) + & ishft ( 1_int32 , 1 ) if ( little_endian ) then u32 = transfer ( [ key ( 0 ), 0_int8 , 0_int8 , 0_int8 ], & 0_int32 ) else u32 = transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( 0 )], & 0_int32 ) end if case ( 2 ) seed2 = seed + nmh_prime32_2 + ishft ( 2_int32 , 24 ) + & ishft ( 2_int32 , 1 ) if ( little_endian ) then u32 = transfer ( [ nmh_readle16 ( key ), 0_int16 ], 0_int32 ) else u32 = transfer ( [ 0_int16 , nmh_readle16 ( key )], 0_int32 ) end if case ( 3 ) seed2 = seed + nmh_prime32_2 + ishft ( 3_int32 , 24 ) + & ishft ( 3_int32 , 1 ) if ( little_endian ) then u16 ( 1 ) = transfer ( [ key ( 2 ), 0_int8 ], 0_int16 ) u16 ( 0 ) = nmh_readle16 ( key ) else u16 ( 0 ) = transfer ( [ 0_int8 , key ( 2 ) ], 0_int16 ) u16 ( 1 ) = nmh_readle16 ( key ) end if u32 = transfer ( u16 , 0_int32 ) case ( 4 ) seed2 = seed + nmh_prime32_1 u32 = nmh_readle32 ( key ) case default hash = 0 return end select hash = nmhash32x_0to4 ( u32 , seed2 ) return end if end if if ( len < 256 ) then hash = nmhash32x_9to255 ( key , seed ) return end if hash = nmhash32x_avalanche32 ( nmhash32_long ( key , seed )) end function int8_nmhash32x #:for k1 in INT_KINDS pure module function ${ k1 }$_ nmhash32 ( key , seed ) result ( hash_code ) !! NMHASH32 hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ nmhash32 #:endfor elemental module function character_nmhash32 ( key , seed ) result ( hash_code ) !! NMHASH32 hash function for default character keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32 ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_nmhash32 #:for k1 in INT_KINDS pure module function ${ k1 }$_ nmhash32x ( key , seed ) result ( hash_code ) !! NMHASH32X hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32x ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ nmhash32x #:endfor elemental module function character_nmhash32x ( key , seed ) result ( hash_code ) !! NMHASH32X hash function for default character keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32x ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_nmhash32x module subroutine new_nmhash32_seed ( seed ) ! Random SEED generator for NMHASH32 integer ( int32 ), intent ( inout ) :: seed integer ( int32 ) :: old_seed real ( dp ) :: sample old_seed = seed find_seed : do call random_number ( sample ) seed = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) if ( seed /= old_seed ) return end do find_seed end subroutine new_nmhash32_seed module subroutine new_nmhash32x_seed ( seed ) ! Random SEED generator for NMHASH32X integer ( int32 ), intent ( inout ) :: seed integer ( int32 ) :: old_seed real ( dp ) :: sample old_seed = seed find_seed : do call random_number ( sample ) seed = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) if ( seed /= old_seed ) return end do find_seed end subroutine new_nmhash32x_seed end submodule stdlib_hash_32bit_nm","tags":"","loc":"sourcefile/stdlib_hash_32bit_nm.fypp.html"},{"title":"stdlib_stats_var.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_var use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: mean if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), ${ k1 }$ ) mean = sum ( x ) / n # : if t1 [ 0 ] == 'r' res = sum (( x - mean ) ** 2 ) / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) # : else res = sum ( abs ( x - mean ) ** 2 ) / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) # : endif end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res real ( dp ) :: n , mean if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), dp ) mean = sum ( real ( x , dp )) / n res = sum (( real ( x , dp ) - mean ) ** 2 ) / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n ${ t1 }$ :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = 0. _${ k1 }$ select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = size ( x , dim ) mean = sum ( x , dim ) / n do i = 1 , size ( x , dim ) # : if t1 [ 0 ] == 'r' res = res + ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 # : else res = res + abs ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 # : endif end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n real ( dp ) :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = 0._dp select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = size ( x , dim ) mean = sum ( real ( x , dp ), dim ) / n do i = 1 , size ( x , dim ) res = res + ( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean ) ** 2 end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: mean n = real ( count ( mask , kind = int64 ), ${ k1 }$ ) mean = sum ( x , mask ) / n # : if t1 [ 0 ] == 'r' res = sum (( x - mean ) ** 2 , mask ) / ( n - & # : else res = sum ( abs ( x - mean ) ** 2 , mask ) / ( n - & # : endif merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res real ( dp ) :: n , mean n = real ( count ( mask , kind = int64 ), dp ) mean = sum ( real ( x , dp ), mask ) / n res = sum (( real ( x , dp ) - mean ) ** 2 , mask ) / ( n - & merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ ${ t1 }$ :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ res = 0. _${ k1 }$ select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = count ( mask , dim ) mean = sum ( x , dim , mask ) / n do i = 1 , size ( x , dim ) # : if t1 [ 0 ] == 'r' res = res + merge ( ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 ,& # : else res = res + merge ( abs ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 ,& # : endif 0. _${ k1 }$ ,& mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ real ( dp ) :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ res = 0._dp select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = count ( mask , dim ) mean = sum ( real ( x , dp ), dim , mask ) / n do i = 1 , size ( x , dim ) res = res + merge (( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean ) ** 2 ,& 0._dp , mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_var.fypp.html"},{"title":"stdlib_strings_to_string.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_strings ) stdlib_strings_to_string integer , parameter :: buffer_len = 128 character ( len =* ), parameter :: err_sym = \"[*]\" !!TODO: [*]? contains # : for k1 , t1 in REAL_KINDS_TYPES !> Format or transfer a ${t1}$ scalar as a string. pure module function to_string_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ), optional :: format character ( len = :), allocatable :: string character ( len = buffer_len ) :: buffer integer :: stat write ( buffer , '(' // optval ( format , \"g0\" ) // ')' , iostat = stat ) value if ( stat == 0 ) then string = trim ( buffer ) else string = err_sym end if end function to_string_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES !> Format or transfer a ${t1}$ scalar as a string. pure module function to_string_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ), optional :: format character ( len = :), allocatable :: string string = '(' // to_string_r_$ { k1 }$ ( value % re , format ) // ',' // & & to_string_r_$ { k1 }$ ( value % im , format ) // ')' end function to_string_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES !> Represent an integer of kind ${k1}$ as character sequence. pure module function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ ( value ) result ( string ) integer , parameter :: ik = ${ k1 }$ integer ( ik ), intent ( in ) :: value character ( len = :), allocatable :: string integer , parameter :: buffer_len = range ( value ) + 2 character ( len = buffer_len ) :: buffer integer :: pos integer ( ik ) :: n character ( len = 1 ), parameter :: numbers ( - 9 : 0 ) = & [ \"9\" , \"8\" , \"7\" , \"6\" , \"5\" , \"4\" , \"3\" , \"2\" , \"1\" , \"0\" ] if ( value == 0_ik ) then string = numbers ( 0 ) return end if n = sign ( value , - 1_ik ) buffer = \"\" pos = buffer_len + 1 do while ( n < 0_ik ) pos = pos - 1 buffer ( pos : pos ) = numbers ( mod ( n , 10_ik )) n = n / 10_ik end do if ( value < 0_ik ) then pos = pos - 1 buffer ( pos : pos ) = '-' end if string = buffer ( pos :) end function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ pure module function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ) :: format character ( len = :), allocatable :: string character ( len = buffer_len ) :: buffer integer :: stat write ( buffer , \"(\" // format // \")\" , iostat = stat ) value if ( stat == 0 ) then string = trim ( buffer ) else string = err_sym end if end function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in LOG_KINDS_TYPES !> Represent an logical of kind ${k1}$ as character sequence. pure module function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ ( value ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len = 1 ) :: string string = merge ( \"T\" , \"F\" , value ) end function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ pure module function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ) :: format character ( len = :), allocatable :: string character ( len = buffer_len ) :: buffer integer :: stat write ( buffer , \"(\" // format // \")\" , iostat = stat ) value if ( stat == 0 ) then string = trim ( buffer ) else string = err_sym end if end function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end submodule stdlib_strings_to_string","tags":"","loc":"sourcefile/stdlib_strings_to_string.fypp.html"},{"title":"stdlib_version.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" !> Version information on stdlib module stdlib_version implicit none private public :: get_stdlib_version public :: stdlib_version_string , stdlib_version_compact !> String representation of the standard library version character ( len =* ), parameter :: stdlib_version_string = \"${PROJECT_VERSION}$\" !> Major version number of the above standard library version integer , parameter :: stdlib_major = ${ PROJECT_VERSION_MAJOR }$ !> Minor version number of the above standard library version integer , parameter :: stdlib_minor = ${ PROJECT_VERSION_MINOR }$ !> Patch version number of the above standard library version integer , parameter :: stdlib_patch = ${ PROJECT_VERSION_PATCH }$ !> Compact numeric representation of the standard library version integer , parameter :: stdlib_version_compact = & & stdlib_major * 10000 + stdlib_minor * 100 + stdlib_patch contains !> Getter function to retrieve standard library version pure subroutine get_stdlib_version ( major , minor , patch , string ) !> Major version number of the standard library version integer , intent ( out ), optional :: major !> Minor version number of the standard library version integer , intent ( out ), optional :: minor !> Patch version number of the standard library version integer , intent ( out ), optional :: patch !> String representation of the standard library version character ( len = :), allocatable , intent ( out ), optional :: string if ( present ( major )) then major = stdlib_major end if if ( present ( minor )) then minor = stdlib_minor end if if ( present ( patch )) then patch = stdlib_patch end if if ( present ( string )) then string = stdlib_version_string end if end subroutine get_stdlib_version end module stdlib_version","tags":"","loc":"sourcefile/stdlib_version.fypp.html"},{"title":"stdlib_linalg.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set RCI_KINDS_TYPES = RC_KINDS_TYPES + INT_KINDS_TYPES #:set RHS_SUFFIX = [\"one\",\"many\"] #:set RHS_SYMBOL = [ranksuffix(r) for r in [1,2]] #:set RHS_EMPTY = [emptyranksuffix(r) for r in [1,2]] #:set ALL_RHS = list(zip(RHS_SYMBOL,RHS_SUFFIX,RHS_EMPTY)) module stdlib_linalg !!Provides a support for various linear algebra procedures !! ([Specification](../page/specs/stdlib_linalg.html)) use stdlib_kinds , only : xdp , int8 , int16 , int32 , int64 use stdlib_linalg_constants , only : sp , dp , qp , lk , ilp use stdlib_error , only : error_stop use stdlib_optval , only : optval use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling implicit none private public :: det public :: operator (. det .) public :: diag public :: eye public :: lstsq public :: lstsq_space public :: solve public :: solve_lu public :: solve_lstsq public :: trace public :: svd public :: svdvals public :: outer_product public :: kronecker_product public :: cross_product public :: is_square public :: is_diagonal public :: is_symmetric public :: is_skew_symmetric public :: is_hermitian public :: is_triangular public :: is_hessenberg ! Export linalg error handling public :: linalg_state_type , linalg_error_handling interface diag !! version: experimental !! !! Creates a diagonal array or extract the diagonal elements of an array !! ([Specification](../page/specs/stdlib_linalg.html# !! diag-create-a-diagonal-array-or-extract-the-diagonal-elements-of-an-array)) ! ! Vector to matrix ! # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$ ( v ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) ${ t1 }$ :: res ( size ( v ), size ( v )) end function diag_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ k ( v , k ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) integer , intent ( in ) :: k ${ t1 }$ :: res ( size ( v ) + abs ( k ), size ( v ) + abs ( k )) end function diag_$ { t1 [ 0 ] }{ k1 }$_ k # : endfor ! ! Matrix to vector ! # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) ${ t1 }$ :: res ( minval ( shape ( A ))) end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k ( A , k ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) integer , intent ( in ) :: k ${ t1 }$ :: res ( minval ( shape ( A )) - abs ( k )) end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k # : endfor end interface ! Matrix trace interface trace !! version: experimental !! !! Computes the trace of a matrix !! ([Specification](../page/specs/stdlib_linalg.html# !! trace-trace-of-a-matrix)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure trace_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface ! Outer product (of two vectors) interface outer_product !! version: experimental !! !! Computes the outer product of two vectors, returning a rank-2 array !! ([Specification](../page/specs/stdlib_linalg.html# !! outer_product-computes-the-outer-product-of-two-vectors)) # : for k1 , t1 in RCI_KINDS_TYPES pure module function outer_product_$ { t1 [ 0 ] }{ k1 }$ ( u , v ) result ( res ) ${ t1 }$ , intent ( in ) :: u (:), v (:) ${ t1 }$ :: res ( size ( u ), size ( v )) end function outer_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface outer_product interface kronecker_product !! version: experimental !! !! Computes the Kronecker product of two arrays of size M1xN1, and of M2xN2, returning an (M1*M2)x(N1*N2) array !! ([Specification](../page/specs/stdlib_linalg.html# !! kronecker_product-computes-the-kronecker-product-of-two-matrices)) # : for k1 , t1 in RCI_KINDS_TYPES pure module function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ ( A , B ) result ( C ) ${ t1 }$ , intent ( in ) :: A (:,:), B (:,:) ${ t1 }$ :: C ( size ( A , dim = 1 ) * size ( B , dim = 1 ), size ( A , dim = 2 ) * size ( B , dim = 2 )) end function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface kronecker_product ! Cross product (of two vectors) interface cross_product !! version: experimental !! !! Computes the cross product of two vectors, returning a rank-1 and size-3 array !! ([Specification](../page/specs/stdlib_linalg.html#cross_product-computes-the-cross-product-of-two-3-d-vectors)) # : for k1 , t1 in RCI_KINDS_TYPES pure module function cross_product_$ { t1 [ 0 ] }{ k1 }$ ( a , b ) result ( res ) ${ t1 }$ , intent ( in ) :: a ( 3 ), b ( 3 ) ${ t1 }$ :: res ( 3 ) end function cross_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cross_product ! Check for squareness interface is_square !! version: experimental !! !! Checks if a matrix (rank-2 array) is square !! ([Specification](../page/specs/stdlib_linalg.html# !! is_square-checks-if-a-matrix-is-square)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_square_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_square ! Check for diagonality interface is_diagonal !! version: experimental !! !! Checks if a matrix (rank-2 array) is diagonal !! ([Specification](../page/specs/stdlib_linalg.html# !! is_diagonal-checks-if-a-matrix-is-diagonal)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_diagonal_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_diagonal ! Check for symmetry interface is_symmetric !! version: experimental !! !! Checks if a matrix (rank-2 array) is symmetric !! ([Specification](../page/specs/stdlib_linalg.html# !! is_symmetric-checks-if-a-matrix-is-symmetric)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_symmetric ! Check for skew-symmetry interface is_skew_symmetric !! version: experimental !! !! Checks if a matrix (rank-2 array) is skew-symmetric !! ([Specification](../page/specs/stdlib_linalg.html# !! is_skew_symmetric-checks-if-a-matrix-is-skew-symmetric)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_skew_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_skew_symmetric ! Check for Hermiticity interface is_hermitian !! version: experimental !! !! Checks if a matrix (rank-2 array) is Hermitian !! ([Specification](../page/specs/stdlib_linalg.html# !! is_hermitian-checks-if-a-matrix-is-hermitian)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_hermitian_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_hermitian ! Check for triangularity interface is_triangular !! version: experimental !! !! Checks if a matrix (rank-2 array) is triangular !! ([Specification](../page/specs/stdlib_linalg.html# !! is_triangular-checks-if-a-matrix-is-triangular)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_triangular_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_triangular ! Check for matrix being Hessenberg interface is_hessenberg !! version: experimental !! !! Checks if a matrix (rank-2 array) is Hessenberg !! ([Specification](../page/specs/stdlib_linalg.html# !! is_hessenberg-checks-if-a-matrix-is-hessenberg)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_Hessenberg_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_hessenberg ! Solve linear system system Ax=b. interface solve !! version: experimental !! !! Solves the linear system A \\cdot x = b for the unknown vector x from a square matrix A . !! ([Specification](../page/specs/stdlib_linalg.html#solve-solves-a-linear-matrix-equation-or-a-linear-system-of-equations)) !! !!### Summary !! Interface for solving a linear system arising from a general matrix. !! !!### Description !! !! This interface provides methods for computing the solution of a linear matrix system. !! Supported data types include `real` and `complex`. No assumption is made on the matrix !! structure. !! The function can solve simultaneously either one (from a 1-d right-hand-side vector `b(:)`) !! or several (from a 2-d right-hand-side vector `b(:,:)`) systems. !! !!@note The solution is based on LAPACK's generic LU decomposition based solvers `*GESV`. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ ( a , b , overwrite_a , err ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ end function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ pure module function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ ( a , b ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ end function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ # : endif # : endfor # : endfor end interface solve ! Solve linear system Ax = b using LU decomposition (subroutine interface). interface solve_lu !! version: experimental !! !! Solves the linear system A \\cdot x = b for the unknown vector x from a square matrix A . !! ([Specification](../page/specs/stdlib_linalg.html#solve-lu-solves-a-linear-matrix-equation-or-a-linear-system-of-equations-subroutine-interface)) !! !!### Summary !! Subroutine interface for solving a linear system using LU decomposition. !! !!### Description !! !! This interface provides methods for computing the solution of a linear matrix system using !! a subroutine. Supported data types include `real` and `complex`. No assumption is made on the matrix !! structure. Preallocated space for the solution vector `x` is user-provided, and it may be provided !! for the array of pivot indices, `pivot`. If all pre-allocated work spaces are provided, no internal !! memory allocations take place when using this interface. !! The function can solve simultaneously either one (from a 1-d right-hand-side vector `b(:)`) !! or several (from a 2-d right-hand-side vector `b(:,:)`) systems. !! !!@note The solution is based on LAPACK's generic LU decomposition based solvers `*GESV`. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" pure module subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( a , b , x , pivot , overwrite_a , err ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] Storage array for the diagonal pivot indices integer ( ilp ), optional , intent ( inout ), target :: pivot (:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err end subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ # : endif # : endfor # : endfor end interface solve_lu ! Least squares solution to system Ax=b, i.e. such that the 2-norm abs(b-Ax) is minimized. interface lstsq !! version: experimental !! !! Computes the squares solution to system A \\cdot x = b . !! ([Specification](../page/specs/stdlib_linalg.html#lstsq-computes-the-least-squares-solution-to-a-linear-matrix-equation)) !! !!### Summary !! Interface for computing least squares, i.e. the 2-norm || (b-A \\cdot x ||_2 minimizing solution. !! !!### Description !! !! This interface provides methods for computing the least squares of a linear matrix system. !! Supported data types include `real` and `complex`. !! !!@note The solution is based on LAPACK's singular value decomposition `*GELSD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ ( a , b , cond , overwrite_a , rank , err ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ end function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ # : endif # : endfor # : endfor end interface lstsq ! Least squares solution to system Ax=b, i.e. such that the 2-norm abs(b-Ax) is minimized. interface solve_lstsq !! version: experimental !! !! Computes the squares solution to system A \\cdot x = b . !! ([Specification](../page/specs/stdlib_linalg.html#solve-lstsq-compute-the-least-squares-solution-to-a-linear-matrix-equation-subroutine-interface)) !! !!### Summary !! Subroutine interface for computing least squares, i.e. the 2-norm || (b-A \\cdot x ||_2 minimizing solution. !! !!### Description !! !! This interface provides methods for computing the least squares of a linear matrix system using !! a subroutine. Supported data types include `real` and `complex`. If pre-allocated work spaces !! are provided, no internal memory allocations take place when using this interface. !! !!@note The solution is based on LAPACK's singular value decomposition `*GELSD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ ( a , b , x , real_storage , int_storage ,& #{ if rt . startswith ( 'c' ) }# cmpl_storage , #{ endif }# cond , singvals , overwrite_a , rank , err ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] real working storage space real ( ${ rk }$ ), optional , intent ( inout ), target :: real_storage (:) !> [optional] integer working storage space integer ( ilp ), optional , intent ( inout ), target :: int_storage (:) # : if rt . startswith ( 'complex' ) !> [optional] complex working storage space ${ rt }$ , optional , intent ( inout ), target :: cmpl_storage (:) # : endif !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD real ( ${ rk }$ ), optional , intent ( out ), target :: singvals (:) !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err end subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ # : endif # : endfor # : endfor end interface solve_lstsq ! Return the working array space required by the least squares solver interface lstsq_space !! version: experimental !! !! Computes the integer, real [, complex] working space required by the least-squares solver !! ([Specification](../page/specs/stdlib_linalg.html#lstsq-space-compute-internal-working-space-requirements-for-the-least-squares-solver)) !! !!### Description !! !! This interface provides sizes of integer, real [, complex] working spaces required by the !! least-squares solver. These sizes can be used to pre-allocated working arrays in case several !! repeated least-squares solutions to a same system are sought. If pre-allocated working arrays !! are provided, no internal allocations will take place. !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" pure module subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ ( a , b , lrwork , liwork #{ if rt . startswith ( 'c' ) }# , lcwork #{ endif }# ) !> Input matrix a[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Size of the working space arrays integer ( ilp ), intent ( out ) :: lrwork , liwork #{ if rt . startswith ( 'c' ) }# , lcwork #{ endif }# end subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ # : endif # : endfor # : endfor end interface lstsq_space interface det !! version: experimental !! !! Computes the determinant of a square matrix !! ([Specification](../page/specs/stdlib_linalg.html#det-computes-the-determinant-of-a-square-matrix)) !! !!### Summary !! Interface for computing matrix determinant. !! !!### Description !! !! This interface provides methods for computing the determinant of a matrix. !! Supported data types include `real` and `complex`. !! !!@note The provided functions are intended for square matrices only. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! !! real(sp) :: a(3,3), d !! type(linalg_state_type) :: state !! a = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! !! ! ... !! d = det(a,err=state) !! if (state%ok()) then !! print *, 'Success! det=',d !! else !! print *, state%print() !! endif !! ! ... !!``` !! # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" module procedure stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant module procedure stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end interface det interface operator (. det .) !! version: experimental !! !! Determinant operator of a square matrix !! ([Specification](../page/specs/stdlib_linalg.html#det-determinant-operator-of-a-square-matrix)) !! !!### Summary !! Pure operator interface for computing matrix determinant. !! !!### Description !! !! This pure operator interface provides a convenient way to compute the determinant of a matrix. !! Supported data types include real and complex. !! !!@note The provided functions are intended for square matrices. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! !! ! ... !! real(sp) :: matrix(3,3), d !! matrix = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! d = .det.matrix !! ! ... !! !!``` ! # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" module procedure stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end interface operator (. det .) interface # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant ( a , overwrite_a , err ) result ( det ) !> Input matrix a[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> State return flag. type ( linalg_state_type ), intent ( out ) :: err !> Matrix determinant ${ rt }$ :: det end function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant pure module function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant ( a ) result ( det ) !> Input matrix a[m,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Matrix determinant ${ rt }$ :: det end function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end interface ! Singular value decomposition interface svd !! version: experimental !! !! Computes the singular value decomposition of a `real` or `complex` 2d matrix. !! ([Specification](../page/specs/stdlib_linalg.html#svd-compute-the-singular-value-decomposition-of-a-rank-2-array-matrix)) !! !!### Summary !! Interface for computing the singular value decomposition of a `real` or `complex` 2d matrix. !! !!### Description !! !! This interface provides methods for computing the singular value decomposition of a matrix. !! Supported data types include `real` and `complex`. The subroutine returns a `real` array of !! singular values, and optionally, left- and right- singular vector matrices, `U` and `V`. !! For a matrix `A` with size [m,n], full matrix storage for `U` and `V` should be [m,m] and [n,n]. !! It is possible to use partial storage [m,k] and [k,n], `k=min(m,n)`, choosing `full_matrices=.false.`. !! !!@note The solution is based on LAPACK's singular value decomposition `*GESDD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! real(sp) :: a(2,3), s(2), u(2,2), vt(3,3) !! a = reshape([3,2, 2,3, 2,-2],[2,3]) !! !! call svd(A,s,u,v) !! print *, 'singular values = ',s !!``` !! # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module subroutine stdlib_linalg_svd_$ { ri }$ ( a , s , u , vt , overwrite_a , full_matrices , err ) !!### Summary !! Compute singular value decomposition of a matrix A = U \\cdot S \\cdot \\V^T !! !!### Description !! !! This function computes the singular value decomposition of a `real` or `complex` matrix A , !! and returns the array of singular values, and optionally the left matrix U containing the !! left unitary singular vectors, and the right matrix V^T , containing the right unitary !! singular vectors. !! !! param: a Input matrix of size [m,n]. !! param: s Output `real` array of size [min(m,n)] returning a list of singular values. !! param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns. !! param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: full_matrices [optional] If `.true.` (default), matrices U and V^T have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with `k=min(m,n)`. !! param: err [optional] State return flag. !! !> Input matrix A[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Array of singular values real ( ${ rk }$ ), intent ( out ) :: s (:) !> The columns of U contain the left singular vectors ${ rt }$ , optional , intent ( out ), target :: u (:,:) !> The rows of V^T contain the right singular vectors ${ rt }$ , optional , intent ( out ), target :: vt (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise !> they are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) logical ( lk ), optional , intent ( in ) :: full_matrices !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err end subroutine stdlib_linalg_svd_$ { ri }$ # : endif # : endfor end interface svd ! Singular values interface svdvals !! version: experimental !! !! Computes the singular values of a `real` or `complex` 2d matrix. !! ([Specification](../page/specs/stdlib_linalg.html#svdvals-compute-the-singular-values-of-a-rank-2-array-matrix)) !! !!### Summary !! !! Function interface for computing the array of singular values from the singular value decomposition !! of a `real` or `complex` 2d matrix. !! !!### Description !! !! This interface provides methods for computing the singular values a 2d matrix. !! Supported data types include `real` and `complex`. The function returns a `real` array of !! singular values, with size [min(m,n)]. !! !!@note The solution is based on LAPACK's singular value decomposition `*GESDD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! real(sp) :: a(2,3), s(2) !! a = reshape([3,2, 2,3, 2,-2],[2,3]) !! !! s = svdvals(A) !! print *, 'singular values = ',s !!``` !! # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_svdvals_$ { ri }$ ( a , err ) result ( s ) !!### Summary !! Compute singular values S from the singular-value decomposition of a matrix A = U \\cdot S \\cdot \\V^T . !! !!### Description !! !! This function returns the array of singular values from the singular value decomposition of a `real` !! or `complex` matrix A = U \\cdot S \\cdot V^T . !! !! param: a Input matrix of size [m,n]. !! param: err [optional] State return flag. !! !!### Return value !! !! param: s `real` array of size [min(m,n)] returning a list of singular values. !! !> Input matrix A[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Array of singular values real ( ${ rk }$ ), allocatable :: s (:) end function stdlib_linalg_svdvals_$ { ri }$ # : endif # : endfor end interface svdvals contains !> Version: experimental !> !> Constructs the identity matrix. !> ([Specification](../page/specs/stdlib_linalg.html#eye-construct-the-identity-matrix)) pure function eye ( dim1 , dim2 ) result ( result ) integer , intent ( in ) :: dim1 integer , intent ( in ), optional :: dim2 integer ( int8 ), allocatable :: result (:, :) integer :: dim2_ integer :: i dim2_ = optval ( dim2 , dim1 ) allocate ( result ( dim1 , dim2_ )) result = 0_int8 do i = 1 , min ( dim1 , dim2_ ) result ( i , i ) = 1_int8 end do end function eye # : for k1 , t1 in RCI_KINDS_TYPES function trace_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) ${ t1 }$ :: res integer :: i res = 0 do i = 1 , minval ( shape ( A )) res = res + A ( i , i ) end do end function trace_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_square_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res res = ( size ( A , 1 ) == size ( A , 2 )) end function is_square_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_diagonal_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res ${ t1 }$ , parameter :: zero = 0 !zero of relevant type integer :: m , n , o , i , j m = size ( A , 1 ) n = size ( A , 2 ) do j = 1 , n !loop over all columns o = min ( j - 1 , m ) !index of row above diagonal (or last row) do i = 1 , o !loop over rows above diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do do i = o + 2 , m !loop over rows below diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do res = . true . !otherwise A is diagonal end function is_diagonal_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_symmetric_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res integer :: n , i , j if (. not . is_square ( A )) then res = . false . return !nonsquare matrices cannot be symmetric end if n = size ( A , 1 ) !symmetric dimension of A do j = 1 , n !loop over all columns do i = 1 , j - 1 !loop over all rows above diagonal if ( A ( i , j ) /= A ( j , i )) then res = . false . return end if end do end do res = . true . !otherwise A is symmetric end function is_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_skew_symmetric_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res integer :: n , i , j if (. not . is_square ( A )) then res = . false . return !nonsquare matrices cannot be skew-symmetric end if n = size ( A , 1 ) !symmetric dimension of A do j = 1 , n !loop over all columns do i = 1 , j !loop over all rows above diagonal (and diagonal) if ( A ( i , j ) /= - A ( j , i )) then res = . false . return end if end do end do res = . true . !otherwise A is skew-symmetric end function is_skew_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in ( REAL_KINDS_TYPES + INT_KINDS_TYPES ) pure function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res res = is_symmetric ( A ) !symmetry and Hermiticity are equivalent for real matrices end function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES pure function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res integer :: n , i , j if (. not . is_square ( A )) then res = . false . return !nonsquare matrices cannot be Hermitian end if n = size ( A , 1 ) !symmetric dimension of A do j = 1 , n !loop over all columns do i = 1 , j !loop over all rows above diagonal (and diagonal) if ( A ( i , j ) /= conjg ( A ( j , i ))) then res = . false . return end if end do end do res = . true . !otherwise A is Hermitian end function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES function is_triangular_$ { t1 [ 0 ] }{ k1 }$ ( A , uplo ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) character , intent ( in ) :: uplo logical :: res ${ t1 }$ , parameter :: zero = 0 !zero of relevant type integer :: m , n , o , i , j m = size ( A , 1 ) n = size ( A , 2 ) if (( uplo == 'u' ) . or . ( uplo == 'U' )) then !check for upper triangularity do j = 1 , n !loop over all columns o = min ( j - 1 , m ) !index of row above diagonal (or last row) do i = o + 2 , m !loop over rows below diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else if (( uplo == 'l' ) . or . ( uplo == 'L' )) then !check for lower triangularity do j = 1 , n !loop over all columns o = min ( j - 1 , m ) !index of row above diagonal (or last row) do i = 1 , o !loop over rows above diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else call error_stop ( \"ERROR (is_triangular): second argument must be one of {'u','U','l','L'}\" ) end if res = . true . !otherwise A is triangular of the requested type end function is_triangular_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES function is_hessenberg_$ { t1 [ 0 ] }{ k1 }$ ( A , uplo ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) character , intent ( in ) :: uplo logical :: res ${ t1 }$ , parameter :: zero = 0 !zero of relevant type integer :: m , n , o , i , j m = size ( A , 1 ) n = size ( A , 2 ) if (( uplo == 'u' ) . or . ( uplo == 'U' )) then !check for upper Hessenberg do j = 1 , n !loop over all columns o = min ( j - 2 , m ) !index of row two above diagonal (or last row) do i = o + 4 , m !loop over rows two or more below main diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else if (( uplo == 'l' ) . or . ( uplo == 'L' )) then !check for lower Hessenberg do j = 1 , n !loop over all columns o = min ( j - 2 , m ) !index of row two above diagonal (or last row) do i = 1 , o !loop over rows one or more above main diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else call error_stop ( \"ERROR (is_hessenberg): second argument must be one of {'u','U','l','L'}\" ) end if res = . true . !otherwise A is Hessenberg of the requested type end function is_hessenberg_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_linalg","tags":"","loc":"sourcefile/stdlib_linalg.fypp.html"},{"title":"stdlib_linalg_determinant.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_determinant !! Determinant of a rectangular matrix use stdlib_linalg_constants use stdlib_linalg_lapack , only : getrf use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR implicit none ( type , external ) ! Function interface character ( * ), parameter :: this = 'determinant' contains ! BLAS/LAPACK backends do not currently support xdp # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" pure module function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant ( a ) result ( det ) !!### Summary !! Compute determinant of a real square matrix (pure interface). !! !!### Description !! !! This function computes the determinant of a real square matrix. !! !! param: a Input matrix of size [m,n]. !! return: det Matrix determinant. !! !!### Example !! !!```fortran !! !! ${rt}$ :: matrix(3,3) !! ${rt}$ :: determinant !! matrix = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! determinant = det(matrix) !! !!``` !> Input matrix a[m,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Matrix determinant ${ rt }$ :: det !! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , info , perm , k integer ( ilp ), allocatable :: ipiv (:) ${ rt }$ , allocatable :: amat (:,:) ! Matrix determinant size m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) if ( m /= n . or . . not . min ( m , n ) >= 0 ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid or non-square matrix: a=[' , m , ',' , n , ']' ) det = 0.0 _${ rk }$ ! Process output and return call linalg_error_handling ( err0 ) return end if select case ( m ) case ( 0 ) ! Empty array has determinant 1 because math det = 1.0 _${ rk }$ case ( 1 ) ! Scalar input det = a ( 1 , 1 ) case default ! Find determinant from LU decomposition ! Initialize a matrix temporary allocate ( amat ( m , n ), source = a ) ! Pivot indices allocate ( ipiv ( n )) ! Compute determinant from LU factorization, then calculate the ! product of all diagonal entries of the U factor. call getrf ( m , n , amat , m , ipiv , info ) select case ( info ) case ( 0 ) ! Success: compute determinant ! Start with real 1.0 det = 1.0 _${ rk }$ perm = 0 do k = 1 , n if ( ipiv ( k ) /= k ) perm = perm + 1 det = det * amat ( k , k ) end do if ( mod ( perm , 2 ) /= 0 ) det = - det case (: - 1 ) err0 = linalg_state_type ( this , LINALG_ERROR , 'invalid matrix size a=[' , m , ',' , n , ']' ) case ( 1 :) err0 = linalg_state_type ( this , LINALG_ERROR , 'singular matrix' ) case default err0 = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select deallocate ( amat ) end select ! Process output and return call linalg_error_handling ( err0 ) end function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant module function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant ( a , overwrite_a , err ) result ( det ) !!### Summary !! Compute determinant of a square matrix (with error control). !! !!### Description !! !! This function computes the determinant of a square matrix with error control. !! !! param: a Input matrix of size [m,n]. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: err State return flag. !! return: det Matrix determinant. !! !!### Example !! !!```fortran !! !! ${rt}$ :: matrix(3,3) !! ${rt}$ :: determinant !! matrix = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! determinant = det(matrix, err=err) !! !!``` ! !> Input matrix a[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> State return flag. type ( linalg_state_type ), intent ( out ) :: err !> Matrix determinant ${ rt }$ :: det !! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , info , perm , k integer ( ilp ), allocatable :: ipiv (:) logical ( lk ) :: copy_a ${ rt }$ , pointer :: amat (:,:) ! Matrix determinant size m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) if ( m /= n . or . . not . min ( m , n ) >= 0 ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid or non-square matrix: a=[' , m , ',' , n , ']' ) det = 0.0 _${ rk }$ ! Process output and return call linalg_error_handling ( err0 , err ) return end if ! Can A be overwritten? By default, do not overwrite if ( present ( overwrite_a )) then copy_a = . not . overwrite_a else copy_a = . true . _ lk endif select case ( m ) case ( 0 ) ! Empty array has determinant 1 because math det = 1.0 _${ rk }$ case ( 1 ) ! Scalar input det = a ( 1 , 1 ) case default ! Find determinant from LU decomposition ! Initialize a matrix temporary if ( copy_a ) then allocate ( amat , source = a ) else amat => a endif ! Pivot indices allocate ( ipiv ( n )) ! Compute determinant from LU factorization, then calculate the ! product of all diagonal entries of the U factor. call getrf ( m , n , amat , m , ipiv , info ) select case ( info ) case ( 0 ) ! Success: compute determinant ! Start with real 1.0 det = 1.0 _${ rk }$ perm = 0 do k = 1 , n if ( ipiv ( k ) /= k ) perm = perm + 1 det = det * amat ( k , k ) end do if ( mod ( perm , 2 ) /= 0 ) det = - det case (: - 1 ) err0 = linalg_state_type ( this , LINALG_ERROR , 'invalid matrix size a=[' , m , ',' , n , ']' ) case ( 1 :) err0 = linalg_state_type ( this , LINALG_ERROR , 'singular matrix' ) case default err0 = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select if ( copy_a ) deallocate ( amat ) end select ! Process output and return call linalg_error_handling ( err0 , err ) end function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end submodule stdlib_linalg_determinant","tags":"","loc":"sourcefile/stdlib_linalg_determinant.fypp.html"},{"title":"stdlib_hash_32bit_fnv.fypp – Fortran-lang/stdlib","text":"FNV_1_HASH and FNV_1A_Hash are translations to Fortran 2008 of the FNV-1 and FNV-1a hash functions of Glenn Fowler, Landon Curt Noll,\n and Phong Vo, that has been released into the public domain. Permission\n has been granted, by Landon Curt Noll, for the use of these algorithms\n in the Fortran Standard Library. A description of these functions is\n available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function. Source Code !!------------------------------------------------------------------------------ !! `FNV_1_HASH` and `FNV_1A_Hash` are translations to Fortran 2008 of the !! `FNV-1` and `FNV-1a` hash functions of Glenn Fowler, Landon Curt Noll, !! and Phong Vo, that has been released into the public domain. Permission !! has been granted, by Landon Curt Noll, for the use of these algorithms !! in the Fortran Standard Library. A description of these functions is !! available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function. !!------------------------------------------------------------------------------ !#! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_32bit ) stdlib_hash_32bit_fnv !! An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt !! Noll, and Kiem-Phong-Vo, !! https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function implicit none integer ( int_hash ), parameter :: & offset_basis = int ( z '811C9DC5' , int_hash ), & prime = int ( z '01000193' , int_hash ) contains pure module function int8_fnv_1 ( key ) result ( hash_code ) !! The original FNV-1 8-bit key algorithm. integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) hash_code = hash_code * prime if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if end do end function int8_fnv_1 #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1 ( key ) result ( hash_code ) ! A ${k1}$ array key wrapper for the FNV-1 algorithm. integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 ) ) ) end function ${ k1 }$_ fnv_1 #:endfor elemental module function character_fnv_1 ( key ) result ( hash_code ) ! A default character key wrapper for the FNV-1 algorithm. character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , & 0_int8 , & bytes_char * & len ( key , kind = int64 ) ) ) end function character_fnv_1 pure module function int8_fnv_1a ( key ) result ( hash_code ) !! The original FNV-1a 8-bit key algorithm. integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if hash_code = hash_code * prime end do end function int8_fnv_1a #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1a ( key ) result ( hash_code ) ! A ${k1}$ array key wrapper for the FNV-1a algorithm. integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 )) ) end function ${ k1 }$_ fnv_1a #:endfor elemental module function character_fnv_1a ( key ) result ( hash_code ) ! A default character key wrapper for the FNV-1 algorithm. character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & ( bits_char / bits_int8 ) * & len ( key , kind = int64 ) ) ) end function character_fnv_1a end submodule stdlib_hash_32bit_fnv","tags":"","loc":"sourcefile/stdlib_hash_32bit_fnv.fypp.html"},{"title":"stdlib_stats_distribution_exponential.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_stats_distribution_exponential use ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_kinds , only : sp , dp , xdp , qp , int32 use stdlib_random , only : dist_rand use stdlib_stats_distribution_uniform , only : uni => rvs_uniform implicit none private integer :: ke ( 0 : 255 ) real ( dp ) :: we ( 0 : 255 ), fe ( 0 : 255 ) logical :: zig_exp_initialized = . false . public :: rvs_exp public :: pdf_exp public :: cdf_exp interface rvs_exp !! Version experimental !! !! Exponential Distribution Random Variates !! ([Specification](../page/specs/stdlib_stats_distribution_exponential.html# !! rvs_exp-exponential-distribution-random-variates)) !! module procedure rvs_exp_0_rsp !0 dummy variable # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_exp_$ { t1 [ 0 ] }{ k1 }$ !1 dummy variable # : endfor # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ !2 dummy variables # : endfor end interface rvs_exp interface pdf_exp !! Version experimental !! !! Exponential Distribution Probability Density Function !! ([Specification](../page/specs/stdlib_stats_distribution_exponential.html# !! pdf_exp-exponential-distribution-probability-density-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure pdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface pdf_exp interface cdf_exp !! Version experimental !! !! Exponential Cumulative Distribution Function !! ([Specification](../page/specs/stdlib_stats_distribution_exponential.html# !! cdf_exp-exponential-distribution-cumulative-distribution-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure cdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cdf_exp contains impure subroutine zigset ! Marsaglia & Tsang generator for random normals & random exponentials. ! Translated from C by Alan Miller (amiller@bigpond.net.au) ! ! Marsaglia, G. & Tsang, W.W. (2000) 'The ziggurat method for generating ! random variables', J. Statist. Software, v5(8). ! ! This is an electronic journal which can be downloaded from: ! http://www.jstatsoft.org/v05/i08 ! ! Latest version - 1 January 2001 ! real ( dp ), parameter :: M2 = 214748364 8.0_dp , ve = 0.003949659822581572_dp real ( dp ), parameter :: ONE = 1.0_dp real ( dp ) :: de , te , q integer :: i de = 7.697117470131487_dp te = de ! tables for random exponentials q = ve * exp ( de ) ke ( 0 ) = int (( de / q ) * M2 , kind = int32 ) ke ( 1 ) = 0 we ( 0 ) = q / M2 we ( 255 ) = de / M2 fe ( 0 ) = ONE fe ( 255 ) = exp ( - de ) do i = 254 , 1 , - 1 de = - log ( ve / de + exp ( - de )) ke ( i + 1 ) = int ( M2 * ( de / te ), kind = int32 ) te = de fe ( i ) = exp ( - de ) we ( i ) = de / M2 end do zig_exp_initialized = . true . end subroutine zigset # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_exp_0_$ { t1 [ 0 ] }{ k1 }$ ( ) result ( res ) ! ! Standard exponential random variate (lambda=1) ! ${ t1 }$ :: res , x ${ t1 }$ , parameter :: r = 7.69711747013104972 _${ k1 }$ integer :: jz , iz if (. not . zig_exp_initialized ) call zigset iz = 0 jz = dist_rand ( 1_int32 ) ! 32bit random integer iz = iand ( jz , 255 ) ! random integer in [0, 255] if ( abs ( jz ) < ke ( iz ) ) then res = abs ( jz ) * we ( iz ) else L1 : do if ( iz == 0 ) then res = r - log ( uni ( 1.0 _${ k1 }$ ) ) exit L1 end if x = abs ( jz ) * we ( iz ) if ( fe ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fe ( iz - 1 ) - fe ( iz )) < exp ( - x )) then res = x exit L1 end if jz = dist_rand ( 1_int32 ) iz = iand ( jz , 255 ) if ( abs ( jz ) < ke ( iz ) ) then res = abs ( jz ) * we ( iz ) exit L1 end if end do L1 endif end function rvs_exp_0_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ ( lambda ) result ( res ) ! ! Exponential distributed random variate ! ${ t1 }$ , intent ( in ) :: lambda ${ t1 }$ :: res if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = rvs_exp_0_$ { t1 [ 0 ] }{ k1 }$ ( ) res = res / lambda end if end function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ ( lambda ) result ( res ) ${ t1 }$ , intent ( in ) :: lambda ${ t1 }$ :: res real ( ${ k1 }$ ) :: tr , ti tr = rvs_exp_r$ { k1 }$ ( lambda % re ) ti = rvs_exp_r$ { k1 }$ ( lambda % im ) res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ ( lambda , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: lambda integer , intent ( in ) :: array_size ${ t1 }$ :: res ( array_size ), x , re ${ t1 }$ , parameter :: r = 7.69711747013104972 _${ k1 }$ integer :: jz , iz , i if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if if (. not . zig_exp_initialized ) call zigset do i = 1 , array_size iz = 0 jz = dist_rand ( 1_int32 ) iz = iand ( jz , 255 ) if ( abs ( jz ) < ke ( iz ) ) then re = abs ( jz ) * we ( iz ) else L1 : do if ( iz == 0 ) then re = r - log ( uni ( 1.0 _${ k1 }$ ) ) exit L1 end if x = abs ( jz ) * we ( iz ) if ( fe ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fe ( iz - 1 ) - fe ( iz )) < exp ( - x )) then re = x exit L1 end if jz = dist_rand ( 1_int32 ) iz = iand ( jz , 255 ) if ( abs ( jz ) < ke ( iz ) ) then re = abs ( jz ) * we ( iz ) exit L1 end if end do L1 endif res ( i ) = re / lambda end do end function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ ( lambda , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: lambda integer , intent ( in ) :: array_size ${ t1 }$ :: res ( array_size ) integer :: i real ( ${ k1 }$ ) :: tr , ti do i = 1 , array_size tr = rvs_exp_r$ { k1 }$ ( lambda % re ) ti = rvs_exp_r$ { k1 }$ ( lambda % im ) res ( i ) = cmplx ( tr , ti , kind = ${ k1 }$ ) end do end function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ! ! Exponential Distribution Probability Density Function ! ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else if ( x < 0. _${ k1 }$ ) then res = 0. _${ k1 }$ else res = exp ( - x * lambda ) * lambda end if end function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res res = pdf_exp_r$ { k1 }$ ( x % re , lambda % re ) res = res * pdf_exp_r$ { k1 }$ ( x % im , lambda % im ) end function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ! ! Exponential Distribution Cumulative Distribution Function ! ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else if ( x < 0. _${ k1 }$ ) then res = 0. _${ k1 }$ else res = 1.0 _${ k1 }$ - exp ( - x * lambda ) end if end function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res res = cdf_exp_r$ { k1 }$ ( x % re , lambda % re ) res = res * cdf_exp_r$ { k1 }$ ( x % im , lambda % im ) end function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_stats_distribution_exponential","tags":"","loc":"sourcefile/stdlib_stats_distribution_exponential.fypp.html"},{"title":"stdlib_math.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_math use stdlib_kinds , only : int8 , int16 , int32 , int64 , sp , dp , xdp , qp use stdlib_optval , only : optval implicit none private public :: clip , gcd , linspace , logspace public :: EULERS_NUMBER_SP , EULERS_NUMBER_DP #:if WITH_QP public :: EULERS_NUMBER_QP #:endif public :: DEFAULT_LINSPACE_LENGTH , DEFAULT_LOGSPACE_BASE , DEFAULT_LOGSPACE_LENGTH public :: stdlib_meshgrid_ij , stdlib_meshgrid_xy public :: arange , arg , argd , argpi , is_close , all_close , diff , meshgrid integer , parameter :: DEFAULT_LINSPACE_LENGTH = 100 integer , parameter :: DEFAULT_LOGSPACE_LENGTH = 50 integer , parameter :: DEFAULT_LOGSPACE_BASE = 10 ! Useful constants for lnspace real ( sp ), parameter :: EULERS_NUMBER_SP = exp ( 1.0_sp ) real ( dp ), parameter :: EULERS_NUMBER_DP = exp ( 1.0_dp ) #:if WITH_QP real ( qp ), parameter :: EULERS_NUMBER_QP = exp ( 1.0_qp ) #:endif !> Useful constants `PI` for `argd/argpi` # : for k1 in REAL_KINDS real ( kind = ${ k1 }$ ), parameter :: PI_$ { k1 }$ = acos ( - 1.0 _${ k1 }$ ) # : endfor !> Values for optional argument `indexing` of `meshgrid` integer , parameter :: stdlib_meshgrid_xy = 0 , stdlib_meshgrid_ij = 1 interface clip # : for k1 , t1 in IR_KINDS_TYPES module procedure clip_$ { k1 }$ # : endfor end interface clip !> Returns the greatest common divisor of two integers !> ([Specification](../page/specs/stdlib_math.html#gcd)) !> !> Version: experimental interface gcd # : for k1 , t1 in INT_KINDS_TYPES module procedure gcd_$ { k1 }$ # : endfor end interface gcd interface linspace !! Version: Experimental !! !! Create rank 1 array of linearly spaced elements !! If the number of elements is not specified, create an array with size 100. If n is a negative value, !! return an array with size 0. If n = 1, return an array whose only element is end !!([Specification](../page/specs/stdlib_math.html#linspace-create-a-linearly-spaced-rank-one-array)) # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end ${ t1 }$ :: res ( DEFAULT_LINSPACE_LENGTH ) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor ! Add support for integer linspace !! !! When dealing with integers as the `start` and `end` parameters, the return type is always a `real(dp)`. # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) # ! The interface for INT_KINDS_TYPES cannot be combined with RC_KINDS_TYPES # ! because the output for integer types is always a real with dp. pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end real ( dp ) :: res ( DEFAULT_LINSPACE_LENGTH ) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n real ( dp ) :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor end interface interface logspace !! Version: Experimental !! !! Create rank 1 array of logarithmically spaced elements from base**start to base**end. !! If the number of elements is not specified, create an array with size 50. If n is a negative value, !! return an array with size 0. If n = 1, return an array whose only element is base**end. If no base !! is specified, logspace will default to using a base of 10 !! !!([Specification](../page/specs/stdlib_math.html#logspace-create-a-logarithmically-spaced-rank-one-array)) # !========================================================= # != logspace(start, end) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"default\" ) pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end ${ t1 }$ :: res ( DEFAULT_LOGSPACE_LENGTH ) end function ${ RName }$ # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"default\" ) pure module function ${ RName }$ ( start , end ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end real ( dp ) :: res ( DEFAULT_LOGSPACE_LENGTH ) end function ${ RName }$ # !========================================================= # != logspace(start, end, n) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n\" ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n\" ) pure module function ${ RName }$ ( start , end , n ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n real ( dp ) :: res ( n ) end function ${ RName }$ # !========================================================= # != logspace(start, end, n, base) = # !========================================================= # ! Need another function where base is not optional, # ! otherwise the compiler can not differentiate between # ! generic calls to logspace_n where a base is not present # ! ======================================================== # : for k1 , t1 in REAL_KINDS_TYPES ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! Different combinations of parameter types will lead to different result types. ! Those combinations are indicated in the body of each function. # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_rbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ , intent ( in ) :: base ! real(${k1}$) endpoints + real(${k1}$) base = real(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_cbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n complex ( ${ k1 }$ ), intent ( in ) :: base ! real(${k1}$) endpoints + complex(${k1}$) base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_ibase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n integer , intent ( in ) :: base ! real(${k1}$) endpoints + integer base = real(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # ! ======================================================== # ! ======================================================== # : for k1 , t1 in CMPLX_KINDS_TYPES ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! Different combinations of parameter types will lead to different result types. ! Those combinations are indicated in the body of each function. # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_rbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n real ( ${ k1 }$ ), intent ( in ) :: base ! complex(${k1}$) endpoints + real(${k1}$) base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_cbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n complex ( ${ k1 }$ ), intent ( in ) :: base ! complex(${k1}$) endpoints + complex(${k1}$) base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_ibase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n integer , intent ( in ) :: base ! complex(${k1}$) endpoints + integer base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # ! ======================================================== # ! ======================================================== # ! Provide support for Integer start/endpoints ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! Different combinations of parameter types will lead to different result types. ! Those combinations are indicated in the body of each function. # : for k1 in REAL_KINDS # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_r\" + str ( k1 ) + \"base\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n real ( ${ k1 }$ ), intent ( in ) :: base ! integer endpoints + real(${k1}$) base = real(${k1}$) result real ( ${ k1 }$ ) :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_c\" + str ( k1 ) + \"base\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n complex ( ${ k1 }$ ), intent ( in ) :: base ! integer endpoints + complex(${k1}$) base = complex(${k1}$) result complex ( ${ k1 }$ ) :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_ibase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n integer , intent ( in ) :: base ! integer endpoints + integer base = integer result integer :: res ( max ( n , 0 )) end function ${ RName }$ end interface !> Version: experimental !> !> `arange` creates a one-dimensional `array` of the `integer/real` type !> with fixed-spaced values of given spacing, within a given interval. !> ([Specification](../page/specs/stdlib_math.html#arange-function)) interface arange # : set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES # : for k1 , t1 in RI_KINDS_TYPES pure module function arange_$ { t1 [ 0 ] }$_${ k1 }$ ( start , end , step ) result ( result ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ), optional :: end , step ${ t1 }$ , allocatable :: result (:) end function arange_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end interface arange !> Version: experimental !> !> `arg` computes the phase angle in the interval (-π,π]. !> ([Specification](../page/specs/stdlib_math.html#arg-function)) interface arg # : for k1 in CMPLX_KINDS procedure :: arg_$ { k1 }$ # : endfor end interface arg !> Version: experimental !> !> `argd` computes the phase angle of degree version in the interval (-180.0,180.0]. !> ([Specification](../page/specs/stdlib_math.html#argd-function)) interface argd # : for k1 in CMPLX_KINDS procedure :: argd_$ { k1 }$ # : endfor end interface argd !> Version: experimental !> !> `argpi` computes the phase angle of circular version in the interval (-1.0,1.0]. !> ([Specification](../page/specs/stdlib_math.html#argpi-function)) interface argpi # : for k1 in CMPLX_KINDS procedure :: argpi_$ { k1 }$ # : endfor end interface argpi !> Returns a boolean scalar/array where two scalar/arrays are element-wise equal within a tolerance. !> ([Specification](../page/specs/stdlib_math.html#is_close-function)) interface is_close # : set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES # : for k1 , t1 in RC_KINDS_TYPES elemental module logical function is_close_$ { t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a , b real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan end function is_close_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_close !> Version: experimental !> !> Returns a boolean scalar where two arrays are element-wise equal within a tolerance. !> ([Specification](../page/specs/stdlib_math.html#all_close-function)) interface all_close # : set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES # : set RANKS = range ( 1 , MAXRANK + 1 ) # : for k1 , t1 in RC_KINDS_TYPES # : for r1 in RANKS logical pure module function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a$ { ranksuffix ( r1 ) }$ , b$ { ranksuffix ( r1 ) }$ real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan end function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ # : endfor # : endfor end interface all_close !> Version: experimental !> !> Computes differences between adjacent elements of an array. !> ([Specification](../page/specs/stdlib_math.html#diff-function)) interface diff # : set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES # : for k1 , t1 in RI_KINDS_TYPES pure module function diff_1_$ { k1 }$ ( x , n , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ), optional :: n ${ t1 }$ , intent ( in ), optional :: prepend (:), append (:) ${ t1 }$ , allocatable :: y (:) end function diff_1_$ { k1 }$ pure module function diff_2_$ { k1 }$ ( X , n , dim , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ), optional :: n , dim ${ t1 }$ , intent ( in ), optional :: prepend (:, :), append (:, :) ${ t1 }$ , allocatable :: y (:, :) end function diff_2_$ { k1 }$ # : endfor end interface diff !> Version: experimental !> !> Computes a list of coordinate matrices from coordinate vectors. !> ([Specification](../page/specs/stdlib_math.html#meshgrid)) interface meshgrid # : set RANKS = range ( 1 , MAXRANK + 1 ) # : for k1 , t1 in IR_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"meshgrid\" , rank , t1 , k1 ) module subroutine ${ RName }$ (& ${ \"\" . join ( f \"x{i}, \" for i in range ( 1 , rank + 1 )) }$ & ${ \"\" . join ( f \"xm{i}, \" for i in range ( 1 , rank + 1 )) }$ & indexing & ) # : for i in range ( 1 , rank + 1 ) ${ t1 }$ , intent ( in ) :: x$ { i }$ (:) ${ t1 }$ , intent ( out ) :: xm$ { i }$ ${ ranksuffix ( rank ) }$ # : endfor integer , intent ( in ), optional :: indexing end subroutine ${ RName }$ # : endfor # : endfor end interface meshgrid contains # : for k1 , t1 in IR_KINDS_TYPES elemental function clip_$ { k1 }$ ( x , xmin , xmax ) result ( res ) ${ t1 }$ , intent ( in ) :: x ${ t1 }$ , intent ( in ) :: xmin ${ t1 }$ , intent ( in ) :: xmax ${ t1 }$ :: res res = max ( min ( x , xmax ), xmin ) end function clip_$ { k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function arg_$ { k1 }$ ( z ) result ( result ) ${ t1 }$ , intent ( in ) :: z real ( ${ k1 }$ ) :: result result = merge ( 0.0 _${ k1 }$ , atan2 ( z % im , z % re ), z == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) end function arg_$ { k1 }$ elemental function argd_$ { k1 }$ ( z ) result ( result ) ${ t1 }$ , intent ( in ) :: z real ( ${ k1 }$ ) :: result result = merge ( 0.0 _${ k1 }$ , atan2 ( z % im , z % re ) * 18 0.0 _${ k1 }$ / PI_$ { k1 }$ , & z == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) end function argd_$ { k1 }$ elemental function argpi_$ { k1 }$ ( z ) result ( result ) ${ t1 }$ , intent ( in ) :: z real ( ${ k1 }$ ) :: result result = merge ( 0.0 _${ k1 }$ , atan2 ( z % im , z % re ) / PI_$ { k1 }$ , & z == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) end function argpi_$ { k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES !> Returns the greatest common divisor of two integers of kind ${k1}$ !> using the Euclidean algorithm. elemental function gcd_$ { k1 }$ ( a , b ) result ( res ) ${ t1 }$ , intent ( in ) :: a ${ t1 }$ , intent ( in ) :: b ${ t1 }$ :: res ${ t1 }$ :: rem , tmp rem = min ( abs ( a ), abs ( b )) res = max ( abs ( a ), abs ( b )) do while ( rem /= 0 _${ k1 }$ ) tmp = rem rem = mod ( res , rem ) res = tmp end do end function gcd_$ { k1 }$ # : endfor end module stdlib_math","tags":"","loc":"sourcefile/stdlib_math.fypp.html"},{"title":"stdlib_linalg_constants.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_constants use stdlib_kinds , only : sp , dp , qp , int32 , int64 , lk use , intrinsic :: ieee_arithmetic , only : ieee_is_nan !$ use omp_lib implicit none ( type , external ) public ! Integer size support for ILP64 builds should be done here integer , parameter :: ilp = int32 private :: int32 , int64 end module stdlib_linalg_constants","tags":"","loc":"sourcefile/stdlib_linalg_constants.fypp.html"},{"title":"f08estop.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_error ) f08estop implicit none contains module procedure error_stop ! Aborts the program with nonzero exit code ! this is a fallback for Fortran 2008 error stop (e.g. Intel 19.1/2020 compiler) ! ! The \"stop \" statement generally has return code 0. ! To allow non-zero return code termination with character message, ! error_stop() uses the statement \"error stop\", which by default ! has exit code 1 and prints the message to stderr. ! An optional integer return code \"code\" may be specified. ! ! Example ! ------- ! ! call error_stop(\"Invalid argument\") write ( stderr , * ) msg if ( present ( code )) then select case ( code ) case ( 1 ) error stop 1 case ( 2 ) error stop 2 case ( 77 ) error stop 77 case default write ( stderr , * ) 'ERROR: code ' , code , ' was specified.' error stop end select else error stop endif end procedure end submodule f08estop","tags":"","loc":"sourcefile/f08estop.f90.html"},{"title":"stdlib_stats_moment_all.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment_all use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: center_ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), ${ k1 }$ ) if ( present ( center )) then center_ = center else center_ = mean ( x ) end if res = sum (( x - center_ ) ** order ) / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ), optional :: mask real ( dp ) :: res real ( dp ) :: n real ( dp ) :: center_ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), dp ) if ( present ( center )) then center_ = center else center_ = mean ( x ) end if res = sum (( real ( x , dp ) - center_ ) ** order ) / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: center_ n = real ( count ( mask , kind = int64 ), ${ k1 }$ ) if ( present ( center )) then center_ = center else center_ = mean ( x , mask ) end if res = sum (( x - center_ ) ** order , mask ) / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res real ( dp ) :: n real ( dp ) :: center_ n = real ( count ( mask , kind = int64 ), dp ) if ( present ( center )) then center_ = center else center_ = mean ( x , mask ) end if res = sum (( real ( x , dp ) - center_ ) ** order , mask ) / n end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment_all.fypp.html"},{"title":"stdlib_io_npy_load.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES !> Implementation of loading npy files into multidimensional arrays submodule ( stdlib_io_npy ) stdlib_io_npy_load use stdlib_error , only : error_stop use stdlib_strings , only : to_string , starts_with implicit none contains #:for k1, t1 in KINDS_TYPES # : for rank in RANKS !> Load a ${rank}$-dimensional array from a npy file module subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) !> Name of the npy file to load from character ( len =* ), intent ( in ) :: filename !> Array to be loaded from the npy file ${ t1 }$ , allocatable , intent ( out ) :: array ${ ranksuffix ( rank ) }$ !> Error status of loading, zero on success integer , intent ( out ), optional :: iostat !> Associated error message in case of non-zero status code character ( len = :), allocatable , intent ( out ), optional :: iomsg character ( len =* ), parameter :: vtype = type_$ { t1 [ 0 ] }{ k1 }$ integer , parameter :: rank = ${ rank }$ integer :: io , stat character ( len = :), allocatable :: msg open ( newunit = io , file = filename , form = \"unformatted\" , access = \"stream\" , iostat = stat ) catch : block character ( len = :), allocatable :: this_type integer , allocatable :: vshape (:) call get_descriptor ( io , filename , this_type , vshape , stat , msg ) if ( stat /= 0 ) exit catch if ( this_type /= vtype ) then stat = 1 msg = \"File '\" // filename // \"' contains data of type '\" // this_type // \"', \" // & & \"but expected '\" // vtype // \"'\" exit catch end if if ( size ( vshape ) /= rank ) then stat = 1 msg = \"File '\" // filename // \"' contains data of rank \" // & & to_string ( size ( vshape )) // \", but expected \" // & & to_string ( rank ) exit catch end if call allocator ( array , vshape , stat ) if ( stat /= 0 ) then msg = \"Failed to allocate array of type '\" // vtype // \"' \" // & & \"with total size of \" // to_string ( product ( vshape )) exit catch end if read ( io , iostat = stat ) array end block catch close ( io ) if ( present ( iostat )) then iostat = stat else if ( stat /= 0 ) then if ( allocated ( msg )) then call error_stop ( \"Failed to read array from file '\" // filename // \"'\" // nl // & & msg ) else call error_stop ( \"Failed to read array from file '\" // filename // \"'\" ) end if end if if ( present ( iomsg ). and . allocated ( msg )) call move_alloc ( msg , iomsg ) contains !> Wrapped intrinsic allocate to create an allocation from a shape array subroutine allocator ( array , vshape , stat ) !> Instance of the array to be allocated ${ t1 }$ , allocatable , intent ( out ) :: array ${ ranksuffix ( rank ) }$ !> Dimensions to allocate for integer , intent ( in ) :: vshape (:) !> Status of allocate integer , intent ( out ) :: stat allocate ( array ( & # : for i in range ( rank - 1 ) & vshape ( ${ i + 1 }$ ), & # : endfor & vshape ( ${ rank }$ )), & & stat = stat ) end subroutine allocator end subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor #:endfor !> Read the npy header from a binary file and retrieve the descriptor string. subroutine get_descriptor ( io , filename , vtype , vshape , stat , msg ) !> Unformatted, stream accessed unit integer , intent ( in ) :: io !> Filename for error reporting character ( len =* ), intent ( in ) :: filename !> Type of data saved in npy file character ( len = :), allocatable , intent ( out ) :: vtype !> Shape descriptor of the integer , allocatable , intent ( out ) :: vshape (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg integer :: major , header_len , i character ( len = :), allocatable :: dict character ( len = 8 ) :: header character :: buf ( 4 ) logical :: fortran_order ! stat should be zero if no error occurred stat = 0 read ( io , iostat = stat ) header if ( stat /= 0 ) return call parse_header ( header , major , stat , msg ) if ( stat /= 0 ) return read ( io , iostat = stat ) buf ( 1 : merge ( 4 , 2 , major > 1 )) if ( stat /= 0 ) return if ( major > 1 ) then header_len = ichar ( buf ( 1 )) & & + ichar ( buf ( 2 )) * 256 ** 1 & & + ichar ( buf ( 3 )) * 256 ** 2 & & + ichar ( buf ( 4 )) * 256 ** 3 else header_len = ichar ( buf ( 1 )) & & + ichar ( buf ( 2 )) * 256 ** 1 end if allocate ( character ( header_len ) :: dict , stat = stat ) if ( stat /= 0 ) return read ( io , iostat = stat ) dict if ( stat /= 0 ) return if ( dict ( header_len : header_len ) /= nl ) then stat = 1 msg = \"Descriptor length does not match\" return end if if ( scan ( dict , achar ( 0 )) > 0 ) then stat = 1 msg = \"Nul byte not allowed in descriptor string\" return end if call parse_descriptor ( trim ( dict (: len ( dict ) - 1 )), filename , & & vtype , fortran_order , vshape , stat , msg ) if ( stat /= 0 ) return if (. not . fortran_order ) then vshape = [( vshape ( i ), i = size ( vshape ), 1 , - 1 )] end if end subroutine get_descriptor !> Parse the first eight bytes of the npy header to verify the data subroutine parse_header ( header , major , stat , msg ) !> Header of the binary file character ( len =* ), intent ( in ) :: header !> Major version of the npy format integer , intent ( out ) :: major !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg integer :: minor ! stat should be zero if no error occurred stat = 0 if ( header ( 1 : 1 ) /= magic_number ) then stat = 1 msg = \"Expected z'93' but got z'\" // to_string ( ichar ( header ( 1 : 1 ))) // \"' \" // & & \"as first byte\" return end if if ( header ( 2 : 6 ) /= magic_string ) then stat = 1 msg = \"Expected identifier '\" // magic_string // \"'\" return end if major = ichar ( header ( 7 : 7 )) if (. not . any ( major == [ 1 , 2 , 3 ])) then stat = 1 msg = \"Unsupported format major version number '\" // to_string ( major ) // \"'\" return end if minor = ichar ( header ( 8 : 8 )) if ( minor /= 0 ) then stat = 1 msg = \"Unsupported format version \" // & & \"'\" // to_string ( major ) // \".\" // to_string ( minor ) // \"'\" return end if end subroutine parse_header !> Parse the descriptor in the npy header. This routine implements a minimal !> non-recursive parser for serialized Python dictionaries. subroutine parse_descriptor ( input , filename , vtype , fortran_order , vshape , stat , msg ) !> Input string to parse as descriptor character ( len =* ), intent ( in ) :: input !> Filename for error reporting character ( len =* ), intent ( in ) :: filename !> Type of the data stored, retrieved from field `descr` character ( len = :), allocatable , intent ( out ) :: vtype !> Whether the data is in left layout, retrieved from field `fortran_order` logical , intent ( out ) :: fortran_order !> Shape of the stored data, retrieved from field `shape` integer , allocatable , intent ( out ) :: vshape (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg enum , bind ( c ) enumerator :: invalid , string , lbrace , rbrace , comma , colon , & lparen , rparen , bool , literal , space end enum type :: token_type integer :: first , last , kind end type token_type integer :: pos character ( len = :), allocatable :: key type ( token_type ) :: token , last logical :: has_descr , has_shape , has_fortran_order has_descr = . false . has_shape = . false . has_fortran_order = . false . pos = 0 call next_token ( input , pos , token , [ lbrace ], stat , msg ) if ( stat /= 0 ) return last = token_type ( pos , pos , comma ) do while ( pos < len ( input )) call get_token ( input , pos , token ) select case ( token % kind ) case ( space ) continue case ( comma ) if ( token % kind == last % kind ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Comma cannot appear at this point\" ) return end if last = token case ( rbrace ) exit case ( string ) if ( token % kind == last % kind ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"String cannot appear at this point\" ) return end if last = token key = input ( token % first + 1 : token % last - 1 ) call next_token ( input , pos , token , [ colon ], stat , msg ) if ( stat /= 0 ) return if ( key == \"descr\" . and . has_descr & & . or . key == \"fortran_order\" . and . has_fortran_order & & . or . key == \"shape\" . and . has_shape ) then stat = 1 msg = make_message ( filename , input , last % first , last % last , & & \"Duplicate entry for '\" // key // \"' found\" ) return end if select case ( key ) case ( \"descr\" ) call next_token ( input , pos , token , [ string ], stat , msg ) if ( stat /= 0 ) return vtype = input ( token % first + 1 : token % last - 1 ) has_descr = . true . case ( \"fortran_order\" ) call next_token ( input , pos , token , [ bool ], stat , msg ) if ( stat /= 0 ) return fortran_order = input ( token % first : token % last ) == \"True\" has_fortran_order = . true . case ( \"shape\" ) call parse_tuple ( input , pos , vshape , stat , msg ) has_shape = . true . case default stat = 1 msg = make_message ( filename , input , last % first , last % last , & & \"Invalid entry '\" // key // \"' in dictionary encountered\" ) return end select case default stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end select end do if (. not . has_descr ) then stat = 1 msg = make_message ( filename , input , 1 , pos , & & \"Dictionary does not contain required entry 'descr'\" ) end if if (. not . has_shape ) then stat = 1 msg = make_message ( filename , input , 1 , pos , & & \"Dictionary does not contain required entry 'shape'\" ) end if if (. not . has_fortran_order ) then stat = 1 msg = make_message ( filename , input , 1 , pos , & & \"Dictionary does not contain required entry 'fortran_order'\" ) end if contains function make_message ( filename , input , first , last , message ) result ( str ) !> Filename for context character ( len =* ), intent ( in ) :: filename !> Input string to parse character ( len =* ), intent ( in ) :: input !> Offset in the input integer , intent ( in ) :: first , last !> Error message character ( len =* ), intent ( in ) :: message !> Final output message character ( len = :), allocatable :: str character ( len =* ), parameter :: nl = new_line ( 'a' ) str = message // nl // & & \" --> \" // filename // \":1:\" // to_string ( first ) // \"-\" // to_string ( last ) // nl // & & \" |\" // nl // & & \"1 | \" // input // nl // & & \" |\" // repeat ( \" \" , first ) // repeat ( \"^\" , last - first + 1 ) // nl // & & \" |\" end function make_message !> Parse a tuple of integers into an array of integers subroutine parse_tuple ( input , pos , tuple , stat , msg ) !> Input string to parse character ( len =* ), intent ( in ) :: input !> Offset in the input, will be advanced after reading integer , intent ( inout ) :: pos !> Array representing tuple of integers integer , allocatable , intent ( out ) :: tuple (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg type ( token_type ) :: token integer :: last , itmp allocate ( tuple ( 0 ), stat = stat ) if ( stat /= 0 ) return call next_token ( input , pos , token , [ lparen ], stat , msg ) if ( stat /= 0 ) return last = comma do while ( pos < len ( input )) call get_token ( input , pos , token ) select case ( token % kind ) case ( space ) continue case ( literal ) if ( token % kind == last ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end if last = token % kind read ( input ( token % first : token % last ), * , iostat = stat ) itmp if ( stat /= 0 ) then return end if tuple = [ tuple , itmp ] case ( comma ) if ( token % kind == last ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end if last = token % kind case ( rparen ) exit case default stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end select end do end subroutine parse_tuple !> Get the next allowed token subroutine next_token ( input , pos , token , allowed_token , stat , msg ) !> Input string to parse character ( len =* ), intent ( in ) :: input !> Current offset in the input string integer , intent ( inout ) :: pos !> Last token parsed type ( token_type ), intent ( out ) :: token !> Tokens allowed in the current context integer , intent ( in ) :: allowed_token (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg stat = pos do while ( pos < len ( input )) call get_token ( input , pos , token ) if ( token % kind == space ) then continue else if ( any ( token % kind == allowed_token )) then stat = 0 exit else stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) exit end if end do end subroutine next_token !> Tokenize input string subroutine get_token ( input , pos , token ) !> Input strin to tokenize character ( len =* ), intent ( in ) :: input !> Offset in input string, will be advanced integer , intent ( inout ) :: pos !> Returned token from the next position type ( token_type ), intent ( out ) :: token character :: quote pos = pos + 1 select case ( input ( pos : pos )) case ( \"\"\"\" , \"'\" ) quote = input ( pos : pos ) token % first = pos pos = pos + 1 do while ( pos <= len ( input )) if ( input ( pos : pos ) == quote ) then token % last = pos exit else pos = pos + 1 end if end do token % kind = string case ( \"0\" , \"1\" , \"2\" , \"3\" , \"4\" , \"5\" , \"6\" , \"7\" , \"8\" , \"9\" ) token % first = pos do while ( pos <= len ( input )) if (. not . any ( input ( pos : pos ) == [ \"0\" , \"1\" , \"2\" , \"3\" , \"4\" , \"5\" , \"6\" , \"7\" , \"8\" , \"9\" ])) then pos = pos - 1 token % last = pos exit else pos = pos + 1 end if end do token % kind = literal case ( \"T\" ) if ( starts_with ( input ( pos :), \"True\" )) then token = token_type ( pos , pos + 3 , bool ) pos = pos + 3 else token = token_type ( pos , pos , invalid ) end if case ( \"F\" ) if ( starts_with ( input ( pos :), \"False\" )) then token = token_type ( pos , pos + 4 , bool ) pos = pos + 4 else token = token_type ( pos , pos , invalid ) end if case ( \"{\" ) token = token_type ( pos , pos , lbrace ) case ( \"}\" ) token = token_type ( pos , pos , rbrace ) case ( \",\" ) token = token_type ( pos , pos , comma ) case ( \":\" ) token = token_type ( pos , pos , colon ) case ( \"(\" ) token = token_type ( pos , pos , lparen ) case ( \")\" ) token = token_type ( pos , pos , rparen ) case ( \" \" , nl ) token = token_type ( pos , pos , space ) case default token = token_type ( pos , pos , invalid ) end select end subroutine get_token end subroutine parse_descriptor end submodule stdlib_io_npy_load","tags":"","loc":"sourcefile/stdlib_io_npy_load.fypp.html"},{"title":"stdlib_io.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_io !! Provides a support for file handling !! ([Specification](../page/specs/stdlib_io.html)) use , intrinsic :: iso_fortran_env , only : input_unit use stdlib_kinds , only : sp , dp , xdp , qp , & int8 , int16 , int32 , int64 use stdlib_error , only : error_stop use stdlib_optval , only : optval use stdlib_ascii , only : is_blank use stdlib_string_type , only : string_type implicit none private ! Public API public :: loadtxt , savetxt , open , getline ! Private API that is exposed so that we can test it in tests public :: parse_mode !> Version: experimental !> !> Format strings with edit descriptors for each type and kind !> ([Specification](../page/specs/stdlib_io.html)) character ( * ), parameter :: & !> Format string for integers FMT_INT = '(i0)' , & !> Format string for single precision real numbers FMT_REAL_SP = '(es15.8e2)' , & !> Format string for souble precision real numbers FMT_REAL_DP = '(es24.16e3)' , & !> Format string for extended double precision real numbers FMT_REAL_XDP = '(es26.18e3)' , & !> Format string for quadruple precision real numbers FMT_REAL_QP = '(es44.35e4)' , & !> Format string for single precision complex numbers FMT_COMPLEX_SP = '(es15.8e2,1x,es15.8e2)' , & !> Format string for double precision complex numbers FMT_COMPLEX_DP = '(es24.16e3,1x,es24.16e3)' , & !> Format string for extended double precision complex numbers FMT_COMPLEX_XDP = '(es26.18e3,1x,es26.18e3)' , & !> Format string for quadruple precision complex numbers FMT_COMPLEX_QP = '(es44.35e4,1x,es44.35e4)' public :: FMT_INT , FMT_REAL_SP , FMT_REAL_DP , FMT_REAL_XDP , FMT_REAL_QP public :: FMT_COMPLEX_SP , FMT_COMPLEX_DP , FMT_COMPLEX_XDP , FMT_COMPLEX_QP !> Version: experimental !> !> Read a whole line from a formatted unit into a string variable interface getline module procedure :: getline_char module procedure :: getline_string module procedure :: getline_input_char module procedure :: getline_input_string end interface getline interface loadtxt !! version: experimental !! !! Loads a 2D array from a text file !! ([Specification](../page/specs/stdlib_io.html#description)) # : for k1 , t1 in KINDS_TYPES module procedure loadtxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface loadtxt interface savetxt !! version: experimental !! !! Saves a 2D array into a text file !! ([Specification](../page/specs/stdlib_io.html#description_2)) # : for k1 , t1 in KINDS_TYPES module procedure savetxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface contains # : for k1 , t1 in KINDS_TYPES subroutine loadtxt_$ { t1 [ 0 ] }{ k1 }$ ( filename , d , skiprows , max_rows , fmt ) !! version: experimental !! !! Loads a 2D array from a text file. !! !! Arguments !! --------- !! !! Filename to load the array from character ( len =* ), intent ( in ) :: filename !! The array 'd' will be automatically allocated with the correct dimensions ${ t1 }$ , allocatable , intent ( out ) :: d (:,:) !! Skip the first `skiprows` lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer , intent ( in ), optional :: skiprows !! Read `max_rows` lines of content after `skiprows` lines. !! A negative value results in reading all lines. !! A value of zero results in no lines to be read. !! The default value is -1. integer , intent ( in ), optional :: max_rows character ( len =* ), intent ( in ), optional :: fmt character ( len = :), allocatable :: fmt_ !! !! Example !! ------- !! !!```fortran !! ${t1}$, allocatable :: data(:, :) !! call loadtxt(\"log.txt\", data) ! 'data' will be automatically allocated !!``` !! !! Where 'log.txt' contains for example:: !! !! 1 2 3 !! 2 4 6 !! 8 9 10 !! 11 12 13 !! ... !! integer :: s integer :: nrow , ncol , i , skiprows_ , max_rows_ skiprows_ = max ( optval ( skiprows , 0 ), 0 ) max_rows_ = optval ( max_rows , - 1 ) s = open ( filename ) ! determine number or rows nrow = number_of_rows ( s ) skiprows_ = min ( skiprows_ , nrow ) if ( max_rows_ < 0 . or . max_rows_ > ( nrow - skiprows_ ) ) max_rows_ = nrow - skiprows_ ! determine number of columns ncol = 0 if ( skiprows_ < nrow ) ncol = number_of_columns ( s , skiprows = skiprows_ ) # : if 'complex' in t1 ncol = ncol / 2 # : endif allocate ( d ( max_rows_ , ncol )) do i = 1 , skiprows_ read ( s , * ) end do # : if 'real' in t1 ! Default to format used for savetxt if fmt not specified. fmt_ = optval ( fmt , \"(*\" // FMT_REAL_$ { k1 }$ ( 1 : len ( FMT_REAL_$ { k1 }$ ) - 1 ) // \",1x))\" ) if ( fmt_ == '*' ) then ! Use list directed read if user has specified fmt='*' do i = 1 , max_rows_ read ( s , * ) d ( i , :) enddo else ! Otherwise pass default or user specified fmt string. do i = 1 , max_rows_ read ( s , fmt_ ) d ( i , :) enddo endif # : elif 'complex' in t1 ! Default to format used for savetxt if fmt not specified. fmt_ = optval ( fmt , \"(*\" // FMT_COMPLEX_$ { k1 }$ ( 1 : len ( FMT_COMPLEX_$ { k1 }$ ) - 1 ) // \",1x))\" ) if ( fmt_ == '*' ) then ! Use list directed read if user has specified fmt='*' do i = 1 , max_rows_ read ( s , * ) d ( i , :) enddo else ! Otherwise pass default or user specified fmt string. do i = 1 , max_rows_ read ( s , fmt_ ) d ( i , :) enddo endif # : else ! Default to list directed for integer fmt_ = optval ( fmt , \"*\" ) ! Use list directed read if user has specified fmt='*' if ( fmt_ == '*' ) then do i = 1 , max_rows_ read ( s , * ) d ( i , :) enddo else ! Otherwise pass default user specified fmt string. do i = 1 , max_rows_ read ( s , fmt_ ) d ( i , :) enddo endif # : endif close ( s ) end subroutine loadtxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in KINDS_TYPES subroutine savetxt_$ { t1 [ 0 ] }{ k1 }$ ( filename , d ) !! version: experimental !! !! Saves a 2D array into a text file. !! !! Arguments !! --------- !! character ( len =* ), intent ( in ) :: filename ! File to save the array to ${ t1 }$ , intent ( in ) :: d (:,:) ! The 2D array to save !! !! Example !! ------- !! !!```fortran !! ${t1}$ :: data(3, 2) !! call savetxt(\"log.txt\", data) !!``` !! integer :: s , i s = open ( filename , \"w\" ) do i = 1 , size ( d , 1 ) # : if 'real' in t1 write ( s , \"(*\" // FMT_REAL_$ { k1 }$ ( 1 : len ( FMT_REAL_$ { k1 }$ ) - 1 ) // \",1x))\" ) d ( i , :) # : elif 'complex' in t1 write ( s , \"(*\" // FMT_COMPLEX_$ { k1 }$ ( 1 : len ( FMT_COMPLEX_$ { k1 }$ ) - 1 ) // \",1x))\" ) d ( i , :) # : elif 'integer' in t1 write ( s , \"(*\" // FMT_INT ( 1 : len ( FMT_INT ) - 1 ) // \",1x))\" ) d ( i , :) # : else write ( s , * ) d ( i , :) # : endif end do close ( s ) end subroutine savetxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor integer function number_of_columns ( s , skiprows ) !! version: experimental !! !! determine number of columns integer , intent ( in ) :: s integer , intent ( in ), optional :: skiprows integer :: ios , skiprows_ , i character :: c logical :: lastblank skiprows_ = optval ( skiprows , 0 ) rewind ( s ) do i = 1 , skiprows_ read ( s , * ) end do number_of_columns = 0 lastblank = . true . do read ( s , '(a)' , advance = 'no' , iostat = ios ) c if ( ios /= 0 ) exit if ( lastblank . and . . not . is_blank ( c )) number_of_columns = number_of_columns + 1 lastblank = is_blank ( c ) end do rewind ( s ) end function number_of_columns integer function number_of_rows ( s ) result ( nrows ) !! version: experimental !! !! Determine the number or rows in a file integer , intent ( in ) :: s integer :: ios rewind ( s ) nrows = 0 do read ( s , * , iostat = ios ) if ( ios /= 0 ) exit nrows = nrows + 1 end do rewind ( s ) end function number_of_rows integer function open ( filename , mode , iostat ) result ( u ) !! version: experimental !! !! Opens a file !! ([Specification](../page/specs/stdlib_io.html#description_1)) !! !!##### Behavior !! !! !! To open a file to read: !! !!```fortran !! u = open(\"somefile.txt\") ! The default `mode` is \"rt\" !! u = open(\"somefile.txt\", \"r\") !!``` !! !! To open a file to write: !! !!```fortran !! u = open(\"somefile.txt\", \"w\") !!``` !! !! To append to the end of the file if it exists: !! !!```fortran !! u = open(\"somefile.txt\", \"a\") !!``` character ( * ), intent ( in ) :: filename character ( * ), intent ( in ), optional :: mode integer , intent ( out ), optional :: iostat character ( 3 ) :: mode_ character (:), allocatable :: action_ , position_ , status_ , access_ , form_ mode_ = parse_mode ( optval ( mode , \"\" )) select case ( mode_ ( 1 : 2 )) case ( 'r' ) action_ = 'read' position_ = 'asis' status_ = 'old' case ( 'w' ) action_ = 'write' position_ = 'asis' status_ = 'replace' case ( 'a' ) action_ = 'write' position_ = 'append' status_ = 'old' case ( 'x' ) action_ = 'write' position_ = 'asis' status_ = 'new' case ( 'r+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'old' case ( 'w+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'replace' case ( 'a+' ) action_ = 'readwrite' position_ = 'append' status_ = 'old' case ( 'x+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'new' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 1 : 2 )) end select select case ( mode_ ( 3 : 3 )) case ( 't' ) form_ = 'formatted' case ( 'b' ) form_ = 'unformatted' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 3 : 3 )) end select access_ = 'stream' if ( present ( iostat )) then open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ , & iostat = iostat ) else open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ ) end if end function open character ( 3 ) function parse_mode ( mode ) result ( mode_ ) character ( * ), intent ( in ) :: mode integer :: i character (:), allocatable :: a logical :: lfirst ( 3 ) mode_ = 'r t' if ( len_trim ( mode ) == 0 ) return a = trim ( adjustl ( mode )) lfirst = . true . do i = 1 , len ( a ) if ( lfirst ( 1 ) & . and . ( a ( i : i ) == 'r' . or . a ( i : i ) == 'w' . or . a ( i : i ) == 'a' . or . a ( i : i ) == 'x' ) & ) then mode_ ( 1 : 1 ) = a ( i : i ) lfirst ( 1 ) = . false . else if ( lfirst ( 2 ) . and . a ( i : i ) == '+' ) then mode_ ( 2 : 2 ) = a ( i : i ) lfirst ( 2 ) = . false . else if ( lfirst ( 3 ) . and . ( a ( i : i ) == 't' . or . a ( i : i ) == 'b' )) then mode_ ( 3 : 3 ) = a ( i : i ) lfirst ( 3 ) = . false . else if ( a ( i : i ) == ' ' ) then cycle else if ( any (. not . lfirst )) then call error_stop ( \"Wrong mode: \" // trim ( a )) else call error_stop ( \"Wrong character: \" // a ( i : i )) endif end do end function parse_mode !> Version: experimental !> !> Read a whole line from a formatted unit into a deferred length character variable subroutine getline_char ( unit , line , iostat , iomsg ) !> Formatted IO unit integer , intent ( in ) :: unit !> Line to read character ( len = :), allocatable , intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg integer , parameter :: bufsize = 4096 character ( len = bufsize ) :: buffer , msg integer :: chunk , stat logical :: opened if ( unit /= - 1 ) then inquire ( unit = unit , opened = opened ) else opened = . false . end if if ( opened ) then open ( unit = unit , pad = \"yes\" , iostat = stat , iomsg = msg ) else stat = 1 msg = \"Unit is not connected\" end if line = \"\" do while ( stat == 0 ) read ( unit , '(a)' , advance = 'no' , iostat = stat , iomsg = msg , size = chunk ) buffer if ( stat > 0 ) exit line = line // buffer (: chunk ) end do if ( is_iostat_eor ( stat )) stat = 0 if ( stat /= 0 . and . present ( iomsg )) iomsg = trim ( msg ) if ( present ( iostat )) then iostat = stat else if ( stat /= 0 ) then call error_stop ( trim ( msg )) end if end subroutine getline_char !> Version: experimental !> !> Read a whole line from a formatted unit into a string variable subroutine getline_string ( unit , line , iostat , iomsg ) !> Formatted IO unit integer , intent ( in ) :: unit !> Line to read type ( string_type ), intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg character ( len = :), allocatable :: buffer call getline ( unit , buffer , iostat , iomsg ) line = string_type ( buffer ) end subroutine getline_string !> Version: experimental !> !> Read a whole line from the standard input into a deferred length character variable subroutine getline_input_char ( line , iostat , iomsg ) !> Line to read character ( len = :), allocatable , intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg call getline ( input_unit , line , iostat , iomsg ) end subroutine getline_input_char !> Version: experimental !> !> Read a whole line from the standard input into a string variable subroutine getline_input_string ( line , iostat , iomsg ) !> Line to read type ( string_type ), intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg call getline ( input_unit , line , iostat , iomsg ) end subroutine getline_input_string end module stdlib_io","tags":"","loc":"sourcefile/stdlib_io.fypp.html"},{"title":"stdlib_stats_distribution_normal.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_stats_distribution_normal use ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_kinds , only : sp , dp , xdp , qp , int32 use stdlib_random , only : dist_rand use stdlib_stats_distribution_uniform , only : uni => rvs_uniform implicit none private real ( dp ), parameter :: HALF = 0.5_dp , ONE = 1.0_dp , TWO = 2.0_dp integer :: kn ( 0 : 127 ) real ( dp ) :: wn ( 0 : 127 ), fn ( 0 : 127 ) logical :: zig_norm_initialized = . false . public :: rvs_normal public :: pdf_normal public :: cdf_normal interface rvs_normal !! version: experimental !! !! Normal Distribution Random Variates !! ([Specification](../page/specs/stdlib_stats_distribution_normal.html# !! rvs_normal-normal-distribution-random-variates)) !! module procedure rvs_norm_0_rsp !0 dummy variable # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_norm_$ { t1 [ 0 ] }{ k1 }$ !2 dummy variables # : endfor # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ !3 dummy variables # : endfor end interface rvs_normal interface pdf_normal !! version: experimental !! !! Normal Distribution Probability Density Function !! ([Specification](../page/specs/stdlib_stats_distribution_normal.html# !! pdf_normal-normal-distribution-probability-density-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure pdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface pdf_normal interface cdf_normal !! version: experimental !! !! Normal Distribution Cumulative Distribution Function !! ([Specification](../page/specs/stdlib_stats_distribution_normal.html# !! cdf_normal-normal-distribution-cumulative-distribution-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure cdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cdf_normal contains impure subroutine zigset ! Marsaglia & Tsang generator for random normals & random exponentials. ! Translated from C by Alan Miller (amiller@bigpond.net.au), released as public ! domain (https://jblevins.org/mirror/amiller/) ! ! Marsaglia, G. & Tsang, W.W. (2000) `The ziggurat method for generating ! random variables', J. Statist. Software, v5(8). ! ! This is an electronic journal which can be downloaded from: ! http://www.jstatsoft.org/v05/i08 ! ! Latest version - 1 January 2001 ! real ( dp ), parameter :: M1 = 214748364 8.0_dp , vn = 0.00991256303526217_dp real ( dp ) :: dn , tn , q integer :: i dn = 3.442619855899_dp tn = dn !tables for random normals q = vn * exp ( HALF * dn * dn ) kn ( 0 ) = int (( dn / q ) * M1 , kind = int32 ) kn ( 1 ) = 0 wn ( 0 ) = q / M1 wn ( 127 ) = dn / M1 fn ( 0 ) = ONE fn ( 127 ) = exp ( - HALF * dn * dn ) do i = 126 , 1 , - 1 dn = sqrt ( - TWO * log ( vn / dn + exp ( - HALF * dn * dn ))) kn ( i + 1 ) = int (( dn / tn ) * M1 , kind = int32 ) tn = dn fn ( i ) = exp ( - HALF * dn * dn ) wn ( i ) = dn / M1 end do zig_norm_initialized = . true . end subroutine zigset # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_norm_0_$ { t1 [ 0 ] }{ k1 }$ () result ( res ) ! ! Standard normal random variate (0,1) ! ${ t1 }$ :: res ${ t1 }$ , parameter :: r = 3.442619855899 _${ k1 }$ , rr = 1.0 _${ k1 }$ / r ${ t1 }$ :: x , y integer :: hz , iz if (. not . zig_norm_initialized ) call zigset iz = 0 hz = dist_rand ( 1_int32 ) !32bit random integer iz = iand ( hz , 127 ) !random integer in [0, 127] if ( abs ( hz ) < kn ( iz )) then res = hz * wn ( iz ) else L1 : do L2 : if ( iz == 0 ) then do x = - log ( uni ( 1.0 _${ k1 }$ )) * rr y = - log ( uni ( 1.0 _${ k1 }$ )) if ( y + y >= x * x ) exit end do res = r + x if ( hz <= 0 ) res = - res exit L1 end if L2 x = hz * wn ( iz ) if ( fn ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fn ( iz - 1 ) - fn ( iz )) < & exp ( - HALF * x * x )) then res = x exit L1 end if hz = dist_rand ( 1_int32 ) iz = iand ( hz , 127 ) if ( abs ( hz ) < kn ( iz )) then res = hz * wn ( iz ) exit L1 end if end do L1 end if end function rvs_norm_0_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental & function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Normal random variate (loc, scale) ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = rvs_norm_0_$ { t1 [ 0 ] }{ k1 }$ () res = res * scale + loc end if end function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Normally distributed complex. The real part and imaginary part are & ! independent of each other. ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res real ( ${ k1 }$ ) :: tr , ti tr = rvs_norm_r$ { k1 }$ ( loc % re , scale % re ) ti = rvs_norm_r$ { k1 }$ ( loc % im , scale % im ) res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: loc , scale integer , intent ( in ) :: array_size ${ t1 }$ :: res ( array_size ) ${ t1 }$ , parameter :: r = 3.442619855899 _${ k1 }$ , rr = 1.0 _${ k1 }$ / r ${ t1 }$ :: x , y , re integer :: hz , iz , i if (. not . zig_norm_initialized ) call zigset if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if do i = 1 , array_size iz = 0 hz = dist_rand ( 1_int32 ) iz = iand ( hz , 127 ) if ( abs ( hz ) < kn ( iz )) then re = hz * wn ( iz ) else L1 : do L2 : if ( iz == 0 ) then do x = - log ( uni ( 1.0 _${ k1 }$ )) * rr y = - log ( uni ( 1.0 _${ k1 }$ )) if ( y + y >= x * x ) exit end do re = r + x if ( hz <= 0 ) re = - re exit L1 end if L2 x = hz * wn ( iz ) if ( fn ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fn ( iz - 1 ) - fn ( iz )) < & exp ( - HALF * x * x )) then re = x exit L1 end if hz = dist_rand ( 1_int32 ) iz = iand ( hz , 127 ) if ( abs ( hz ) < kn ( iz )) then re = hz * wn ( iz ) exit L1 end if end do L1 end if res ( i ) = re * scale + loc end do end function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: loc , scale integer , intent ( in ) :: array_size integer :: i ${ t1 }$ :: res ( array_size ) real ( ${ k1 }$ ) :: tr , ti do i = 1 , array_size tr = rvs_norm_r$ { k1 }$ ( loc % re , scale % re ) ti = rvs_norm_r$ { k1 }$ ( loc % im , scale % im ) res ( i ) = cmplx ( tr , ti , kind = ${ k1 }$ ) end do end function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ! ! Normal distribution probability density function ! ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: sqrt_2_pi = sqrt ( 2.0 _${ k1 }$ * acos ( - 1.0 _${ k1 }$ )) if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = exp ( - 0.5 _${ k1 }$ * (( x - loc ) / scale ) * ( x - loc ) / scale ) / & ( sqrt_2_Pi * scale ) end if end function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res res = pdf_norm_r$ { k1 }$ ( x % re , loc % re , scale % re ) res = res * pdf_norm_r$ { k1 }$ ( x % im , loc % im , scale % im ) end function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ! ! Normal distribution cumulative distribution function ! ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: sqrt_2 = sqrt ( 2.0 _${ k1 }$ ) if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = erfc ( - ( x - loc ) / ( scale * sqrt_2 )) / 2.0 _${ k1 }$ end if end function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res res = cdf_norm_r$ { k1 }$ ( x % re , loc % re , scale % re ) res = res * cdf_norm_r$ { k1 }$ ( x % im , loc % im , scale % im ) end function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_stats_distribution_normal","tags":"","loc":"sourcefile/stdlib_stats_distribution_normal.fypp.html"},{"title":"stdlib_math_all_close.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_math ) stdlib_math_all_close implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for r1 in RANKS logical pure module function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a$ { ranksuffix ( r1 ) }$ , b$ { ranksuffix ( r1 ) }$ real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan close = all ( is_close ( a , b , rel_tol , abs_tol , equal_nan )) end function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ # : endfor # : endfor end submodule stdlib_math_all_close","tags":"","loc":"sourcefile/stdlib_math_all_close.fypp.html"},{"title":"stdlib_logger.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_logger !!### Module stdlib_logger !! !! This module defines a derived type, procedures, a variable, and !! constants to be used for logging information and reporting errors !! in Fortran applications. !!([Specification](../page/specs/stdlib_logger.html)) !! The derived type, `logger_type`, is to be used to define variables to !! serve as both local and global loggers. A logger directs its messages !! to selected I/O units so the user has a record (a log) of major events. !! For each entity of `logger_type` the reports go to a list of I/O units !! represented by the private internal array, `log_units`. If `log_units` is !! empty then output by default goes to `output_unit`. Otherwise reports !! go to `output_unit` only if it has been explicitly added to `log_units`. !! Each entity of type `logger_type` also maintains an internal state !! controlling the formatting of output. !! !! The procedures are as follows. The logical function !! `log_units_assigned` returns the number of I/O units in `log_units`. The !! subroutines `add_log_file` and `add_log_unit` include the specified file !! in `log_units`. `remove_log_units` removes the specified logical unit from !! the `log_units` array and optionally closes the file. `configure` !! configures the details of the logging process. `configuration` !! reports the details of that configuration. The subroutines !! `log_error`, `log_information`, `log_io_error`, `log_message`, !! `log_text_error`, and `log_warning` send messages to the log units. !! !! The variable `global_logger` of type `logger_type` can be used !! as a default global logger anywhere in the source code. !! !! The constants are used to report errors by some of the subroutines !! in their optional `stat` arguments. The constants are as follows. !! `success` indicates that no error has occurred. `close_failure` !! indicates that a `close` statement for an I/O unit failed. !! `index_invalid_error` indicates that `column` was invalid for !! the given `line`. `open_failure` indicates that an `open` statement !! failed. `read_only_error` indicates that an output unit did not have a !! `\"write\"` or `\"readwrite\"` action. `non_sequential_error` indicates !! that the unit did not have `sequential` access. `unformatted_in_error` !! indicates that the unit did not have a `form` of `\"formatted\"`. !! `unopened_in_error` indicates that the unit was not opened. `write_failure` !! indicates that at least one of the writes to `log_units` failed. use , intrinsic :: & iso_fortran_env , only : & error_unit , & input_unit , & output_unit use stdlib_ascii , only : to_lower use stdlib_optval , only : optval implicit none private public :: global_logger , logger_type !! public constants used as error flags integer , parameter , public :: & success = 0 , & close_failure = 1 , & index_invalid_error = 2 , & non_sequential_error = 3 , & open_failure = 4 , & read_only_error = 5 , & unformatted_in_error = 6 , & unopened_in_error = 7 , & write_failure = 8 integer , parameter , public :: & debug_level = 10 , & information_level = 20 , & warning_level = 30 , & error_level = 40 , & io_error_level = 40 , & text_error_level = 50 , & all_level = - 10 + min ( & debug_level , & information_level , & warning_level , & error_level , & io_error_level , & text_error_level ), & none_level = 10 + max ( & debug_level , & information_level , & warning_level , & error_level , & io_error_level , & text_error_level ) character ( * ), parameter :: module_name = 'stdlib_logger' type :: logger_type !! version: experimental !! Public derived type ([Specification](../page/specs/stdlib_logger.html#the-derived-type-logger_type)) private logical :: add_blank_line = . false . logical :: indent_lines = . true . integer :: level = information_level integer , allocatable :: log_units (:) integer :: max_width = 0 logical :: time_stamp = . true . integer :: units = 0 contains private procedure , public , pass ( self ) :: add_log_file procedure , public , pass ( self ) :: add_log_unit procedure , public , pass ( self ) :: configuration procedure , public , pass ( self ) :: configure procedure , public , pass ( self ) :: log_debug procedure , public , pass ( self ) :: log_error procedure , public , pass ( self ) :: log_information procedure , public , pass ( self ) :: log_io_error procedure , public , pass ( self ) :: log_message procedure , public , pass ( self ) :: log_text_error procedure , public , pass ( self ) :: log_units_assigned procedure , public , pass ( self ) :: log_warning procedure , public , pass ( self ) :: remove_log_unit final :: final_logger end type logger_type !! Variable of type `logger_type` to be used as a global logger type ( logger_type ) :: global_logger character ( * ), parameter :: & invalid_column = 'column is not a valid index to line.' contains subroutine add_log_file ( self , filename , unit , action , position , status , & stat ) !! version: experimental !! Opens a formatted sequential access output file, `filename` using !! `newunit` and adds the resulting unit number to `self`'s `log_units` !! array. `action`, if present, is the `action` specifier of the `open` !! statement, and has the default value of `\"write\"`. `position`, if present, !! is the `position` specifier, and has the default value of `\"REWIND\"`. !! `status`, if present, is the `status` specifier of the `open` statement, !! and has the default value of `\"REPLACE\"`. `stat`, if present, has the value !! `success` if `filename` could be opened, `read_only_error` if `action` is !! `\"read\"`, and `open_failure` otherwise. !!([Specification](../page/specs/stdlib_logger.html#add_log_file-open-a-file-and-add-its-unit-to-self-log_units)) class ( logger_type ), intent ( inout ) :: self !! The logger variable to which the file is to be added character ( * ), intent ( in ) :: filename !! The name of the file to be added to the logger integer , intent ( out ), optional :: unit !! The resulting I/O unit number character ( * ), intent ( in ), optional :: action !! The `action` specifier for the `open`` statement character ( * ), intent ( in ), optional :: position !! The `position` specifier for the `open` statement character ( * ), intent ( in ), optional :: status !! The `status` specifier for the `open` statement integer , intent ( out ), optional :: stat !! The error status on exit with the possible values !! * `success` - no errors found !! * `read_only_error` - file unopened as `action1 was `\"read\"` for an output !! file !! * `open_failure` - the `open` statement failed !!##### Example !! !! program main !! use stdlib_logger !! ... !! integer :: unit, stat !! ... !! call global_logger % add_log_file( 'error_log.txt', unit, & !! position='asis', stat=stat ) !! if ( stat /= success ) then !! error stop 'Unable to open \"error_log.txt\".' !! end if !! ... !! end program main character ( 16 ) :: aaction , aposition , astatus integer :: aunit character ( 128 ) :: iomsg integer :: iostat character ( * ), parameter :: procedure_name = 'add_log_file' integer , allocatable :: dummy (:) integer :: lun integer :: i aaction = optval ( action , 'write' ) aposition = optval ( position , 'rewind' ) astatus = optval ( status , 'replace' ) if ( len_trim ( aaction ) == 4 ) then do i = 1 , 4 aaction ( i : i ) = to_lower ( aaction ( i : i )) end do if ( aaction == 'read' ) then if ( present ( stat ) ) then stat = read_only_error return else error stop 'In ' // module_name // ' % ' // & procedure_name // ' action is \"read\" which ' // & 'does not allow writes to the file.' end if end if end if open ( newunit = aunit , file = filename , form = 'formatted' , action = aaction , & position = aposition , status = astatus , iostat = iostat , iomsg = iomsg , & err = 999 ) if ( allocated ( self % log_units ) ) then if ( size ( self % log_units ) == self % units ) then allocate ( dummy ( 2 * self % units ) ) do lun = 1 , self % units dummy ( lun ) = self % log_units ( lun ) end do dummy ( self % units + 1 :) = 0 call move_alloc ( dummy , self % log_units ) end if else allocate ( self % log_units ( 16 ) ) end if self % log_units ( self % units + 1 ) = aunit self % units = self % units + 1 if ( present ( unit ) ) unit = aunit if ( present ( stat ) ) stat = success return 999 if ( present ( stat ) ) then stat = open_failure return else call self % log_io_error ( 'Unable to open ' // trim ( filename ), & module = module_name , & procedure = procedure_name , & iostat = iostat , & iomsg = iomsg ) error stop module_name // ' % ' // procedure_name // & ': Unable to open file' end if end subroutine add_log_file subroutine add_log_unit ( self , unit , stat ) !! version: experimental !! Adds `unit` to the log file units in `log_units`. `unit` must be an `open` !! file, of `form` `\"formatted\"`, with `\"sequential\"` `access`, and an `action` !! of `\"write\"` or `\"readwrite\"`, otherwise either `stat`, if present, has a !! value other than `success` and `unit` is not entered into `log_units`, !! or, if `stat` is not presecn, processing stops. !!([Specification](../page/specs/stdlib_logger.html#add_log_unit-add-a-unit-to-the-array-self-log_units)) class ( logger_type ), intent ( inout ) :: self !! The logger variable to which the I/O unit is to be added integer , intent ( in ) :: unit !! The input logical unit number integer , intent ( out ), optional :: stat !! An error code with the possible values !! * `success` - no problems were found !! * `non_sequential_error` - `unit` did not have sequential access !! * `read_only_error` - `unit` was not writeable !! * `unformatted_in_error` - `unit` was an `'unformatted'` file !! * `unopened_in_error` - `unit` was not opened !!##### Example !! !! program main !! use stdlib_logger !! ... !! character(256) :: iomsg !! integer :: iostat, unit, stat !! ... !! open( newunit=unit, 'error_log.txt', form='formatted', & !! status='replace', position='rewind', err=999, & !! action='read', iostat=iostat, iomsg=iomsg ) !! ... !! call global_logger % add_log_unit( unit, stat ) !! select case ( stat ) !! ... !! case ( read_only_error ) !! error stop 'Unable to write to \"error_log.txt\".' !! ... !! end select !! ... !! 999 error stop 'Unable to open \"error_log.txt\". !! ... !! end program main integer , allocatable :: dummy (:) character ( * ), parameter :: procedure_name = 'set_log_unit' integer :: lun character ( 12 ) :: specifier logical :: question integer :: istat call validate_unit () if ( present ( stat ) ) then if ( stat /= success ) return end if do lun = 1 , self % units ! Check that unit is not already registered if ( self % log_units ( lun ) == unit ) return end do if ( allocated ( self % log_units ) ) then if ( size ( self % log_units ) == self % units ) then allocate ( dummy ( 2 * self % units ) ) do lun = 1 , self % units dummy ( lun ) = self % log_units ( lun ) end do call move_alloc ( dummy , self % log_units ) end if else allocate ( self % log_units ( 16 ) ) end if self % log_units ( self % units + 1 ) = unit self % units = self % units + 1 contains subroutine validate_unit () ! Check that unit is not input_unit if ( unit == input_unit ) then if ( present ( stat ) ) then stat = read_only_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' must not be input_unit.' end if end if ! Check that unit is opened inquire ( unit , opened = question , iostat = istat ) if ( istat /= 0 ) question = . false . if ( . not . question ) then if ( present ( stat ) ) then stat = unopened_in_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not open.' end if end if ! Check that unit is writeable inquire ( unit , write = specifier ) if ( specifier ( 1 : 1 ) /= 'Y' . and . specifier ( 1 : 1 ) /= 'y' ) then if ( present ( stat ) ) then stat = read_only_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not writeable.' end if end if inquire ( unit , sequential = specifier ) if ( specifier ( 1 : 1 ) /= 'Y' . and . specifier ( 1 : 1 ) /= 'y' ) then if ( present ( stat ) ) then stat = non_sequential_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not \"sequential\".' end if end if inquire ( unit , formatted = specifier ) if ( specifier ( 1 : 1 ) /= 'Y' . and . specifier ( 1 : 1 ) /= 'y' ) then if ( present ( stat ) ) then stat = unformatted_in_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not \"formatted\".' end if end if if ( present ( stat ) ) stat = success end subroutine validate_unit end subroutine add_log_unit pure subroutine configuration ( self , add_blank_line , indent , level , & max_width , time_stamp , log_units ) !! version: experimental !! Reports the logging configuration of `self`. The following attributes are !! reported: !! 1. `add_blank_line` is a logical flag with `.true.` implying that output !! starts with a blank line, and `.false.` implying no blank line. !! 2. `indent` is a logical flag with `.true.` implying that subsequent columns !! will be indented 4 spaces and `.false.` implying no indentation. !! 3. `level` is the lowest level for printing a message !! 4. `max_width` is the maximum number of columns of output text with !! `max_width` == 0 => no bounds on output width. !! 5. `time_stamp` is a logical flag with `.true.` implying that the output !! will have a time stamp, and `.false.` implying that there will be no !! time stamp. !! 6. `log_units` is an array of the I/O unit numbers to which log output !! will be written. !!([Specification](../page/specs/stdlib_logger.html#configuration-report-a-loggers-configuration)) class ( logger_type ), intent ( in ) :: self !! The logger variable whose configuration is being reported logical , intent ( out ), optional :: add_blank_line !! A logical flag to add a preceding blank line logical , intent ( out ), optional :: indent !! A logical flag to indent subsequent lines integer , intent ( out ), optional :: level !! The minimum level for printing a message integer , intent ( out ), optional :: max_width !! The maximum number of columns for most outputs logical , intent ( out ), optional :: time_stamp !! A logical flag to add a time stamp integer , intent ( out ), allocatable , optional :: log_units (:) !! The I/O units used in output !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! contains !! ... !! subroutine example_sub(unit, ...) !! integer, intent(in) :: unit !! ... !! integer, allocatable :: log_units(:) !! ... !! call global_logger % configuration( log_units=log_units ) !! if ( size(log_units) == 0 ) then !! call add_logger_unit( unit ) !! end if !! .. !! end subroutine example_sub !! ... !! end module example_mod if ( present ( add_blank_line ) ) add_blank_line = self % add_blank_line if ( present ( indent ) ) indent = self % indent_lines if ( present ( level ) ) level = self % level if ( present ( max_width ) ) max_width = self % max_width if ( present ( time_stamp ) ) time_stamp = self % time_stamp if ( present ( log_units ) ) then if ( self % units . gt . 0 ) then log_units = self % log_units ( 1 : self % units ) else allocate ( log_units ( 0 )) end if end if end subroutine configuration pure subroutine configure ( self , add_blank_line , indent , level , max_width , & time_stamp ) !! version: experimental !! Configures the logging process for SELF. The following attributes are !! configured: !! 1. `add_blank_line` is a logical flag with `.true.` implying that output !! starts with a blank line, and `.false.` implying no blank line. !! `add_blank_line` has a startup value of `.false.`. !! 2. `indent` is a logical flag with `.true.` implying that subsequent lines !! will be indented 4 spaces and `.false.` implying no indentation. `indent` !! has a startup value of `.true.`. !! 3. `level` is the lowest level for printing a message !! 4. `max_width` is the maximum number of columns of output text with !! `max_width == 0` => no bounds on output width. `max_width` has a startup !! value of 0. !! 5. `time_stamp` is a logical flag with `.true.` implying that the output !! will have a time stamp, and `.false.` implying that there will be no !! time stamp. `time_stamp` has a startup value of `.true.`. !!([Specification](../page/specs/stdlib_logger.html#configure-configure-the-logging-process)) !!##### Example !! !! program main !! use stdlib_logger !! ... !! call global_logger % configure( indent=.false., max_width=72 ) !! ... class ( logger_type ), intent ( inout ) :: self logical , intent ( in ), optional :: add_blank_line logical , intent ( in ), optional :: indent integer , intent ( in ), optional :: level integer , intent ( in ), optional :: max_width logical , intent ( in ), optional :: time_stamp if ( present ( add_blank_line ) ) self % add_blank_line = add_blank_line if ( present ( level ) ) self % level = level if ( present ( indent ) ) self % indent_lines = indent if ( present ( max_width ) ) then if ( max_width <= 4 ) then self % max_width = 0 else self % max_width = max_width end if end if if ( present ( time_stamp ) ) self % time_stamp = time_stamp end subroutine configure subroutine final_logger ( self ) !! version: experimental !! Finalizes the `logger_type` entity `self` by flushing the units type ( logger_type ), intent ( in ) :: self integer :: iostat character ( 256 ) :: message integer :: unit do unit = 1 , self % units flush ( self % log_units ( unit ), iomsg = message , iostat = iostat ) if ( iostat /= 0 ) then write ( error_unit , '(a, i0)' ) 'In the logger_type ' // & 'finalizer an error occurred in flushing unit = ' , & self % log_units ( unit ) write ( error_unit , '(a, i0)' ) 'With iostat = ' , iostat write ( error_unit , '(a)' ) 'With iomsg = ' // trim ( message ) end if end do end subroutine final_logger subroutine format_output_string ( self , string , col_indent , len_buffer , buffer ) !! version: experimental !! Writes the STRING to UNIT ensuring that the number of characters !! does not exceed MAX_WIDTH and that the lines after the first !! one are indented four characters. class ( logger_type ), intent ( in ) :: self character ( * ), intent ( in ) :: string character ( * ), intent ( in ) :: col_indent integer , intent ( out ) :: len_buffer character ( len = :), allocatable , intent ( out ) :: buffer integer :: count , indent_len , index_ , length , remain integer , parameter :: new_len = len ( new_line ( 'a' )) length = len_trim ( string ) allocate ( character ( 2 * length ) :: buffer ) len_buffer = 0 indent_len = len ( col_indent ) call format_first_line () if ( self % indent_lines ) then do while ( remain > 0 ) call indent_format_subsequent_line () end do else do while ( remain > 0 ) call format_subsequent_line () end do end if contains subroutine format_first_line () if ( self % max_width == 0 . or . & ( length <= self % max_width . and . & index ( string ( 1 : length ), new_line ( 'a' )) == 0 ) ) then buffer ( 1 : length ) = string ( 1 : length ) len_buffer = length remain = 0 return else index_ = index ( string ( 1 : min ( length , self % max_width )), & new_line ( 'a' ) ) if ( index_ == 0 ) then do index_ = self % max_width , 1 , - 1 if ( string ( index_ : index_ ) == ' ' ) exit end do end if if ( index_ == 0 ) then buffer ( 1 : self % max_width ) = & string ( 1 : self % max_width ) len_buffer = self % max_width count = self % max_width remain = length - count return else buffer ( 1 : index_ - 1 ) = string ( 1 : index_ - 1 ) len_buffer = index_ - 1 count = index_ remain = length - count return end if end if end subroutine format_first_line subroutine format_subsequent_line () integer :: new_len_buffer character (:), allocatable :: dummy if ( remain <= self % max_width ) then new_len_buffer = len_buffer + length - count + new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // string ( count + 1 : length ) len_buffer = new_len_buffer count = length remain = 0 return else index_ = count + index ( string ( count + 1 : count + self % max_width ),& new_line ( 'a' )) if ( index_ == count ) then do index_ = count + self % max_width , count + 1 , - 1 if ( string ( index_ : index_ ) == ' ' ) exit end do end if if ( index_ == count ) then new_len_buffer = len_buffer + self % max_width + & new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // string ( count + 1 : count + self % max_width ) len_buffer = new_len_buffer count = count + self % max_width remain = length - count return else new_len_buffer = len_buffer + index_ - 1 & - count + new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // string ( count + 1 : index_ - 1 ) len_buffer = new_len_buffer count = index_ remain = length - count return end if end if end subroutine format_subsequent_line subroutine indent_format_subsequent_line () integer :: new_len_buffer character (:), allocatable :: dummy if ( index ( string ( count + 1 : length ), new_line ( 'a' )) == 0 . and . & remain <= self % max_width - indent_len ) then new_len_buffer = len_buffer + length & - count + new_len + indent_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // col_indent // string ( count + 1 : length ) len_buffer = new_len_buffer count = length remain = 0 return else index_ = count + index ( string ( count + 1 : & min ( length , count + self % max_width - indent_len ) ), & new_line ( 'a' )) if ( index_ == count ) then do index_ = count + self % max_width - indent_len , count + 1 , - 1 if ( string ( index_ : index_ ) == ' ' ) exit end do end if if ( index_ == count ) then new_len_buffer = len_buffer + self % max_width & + new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // col_indent // & string ( count + 1 : count + self % max_width - indent_len ) len_buffer = new_len_buffer count = count + self % max_width - indent_len remain = length - count return else new_len_buffer = len_buffer + index_ - count - 1 & + new_len + indent_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // col_indent // string ( count + 1 : index_ - 1 ) len_buffer = new_len_buffer count = index_ remain = length - count return end if end if end subroutine indent_format_subsequent_line end subroutine format_output_string subroutine handle_write_failure ( unit , procedure_name , iostat , iomsg ) !! version: experimental !! Handles a failure to write to `unit` in `procedure_name` with `iostat` and !! `iomsg` by writing a description of the failure to `output_unit` and !! stopping. integer , intent ( in ) :: unit character ( * ), intent ( in ) :: procedure_name integer , intent ( in ) :: iostat character ( * ), intent ( in ) :: iomsg character ( 256 ) :: name logical :: named character ( 10 ) :: action write ( output_unit , '(a)' ) 'write failure in ' // module_name // & ' % ' // trim ( procedure_name ) // '.' if ( unit == - 999 ) then write ( output_unit , '(a, i0)' ) 'unit = internal file' else write ( output_unit , '(a, i0)' ) 'unit = ' , unit inquire ( unit , named = named ) if ( named ) then inquire ( unit , name = name ) write ( output_unit , '(a, a)' ) 'name = ' , trim ( name ) else write ( output_unit , '(a)' ) 'unit is unnamed' end if inquire ( unit , action = action ) write ( output_unit , '(a, a)' ) 'action = ' , trim ( action ) end if write ( output_unit , '(a, i0)' ) 'iostat = ' , iostat write ( output_unit , '(a, a )' ) 'iomsg = ' , trim ( iomsg ) error stop 'write failure in ' // module_name // '.' end subroutine handle_write_failure subroutine log_debug ( self , message , module , procedure ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !!([Specification](../page/specs/stdlib_logger.html#log_debug-writes-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, and then `message` is !! written with the prefix 'DEBUG: '. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( selection ) !! integer, intent(out) :: selection !! integer :: stat !! write(*,'(a)') \"Enter an integer to select a widget\" !! read(*,'(i0)') selection !! write( message, `(a, i0)' ) & !! \"The user selected \", selection !! call alogger % log_debug( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB' ) !! ... !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger used to send the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_information` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of !! `log_information` if ( self % level > debug_level ) return call self % log_message ( message , & module = module , & procedure = procedure , & prefix = 'DEBUG' ) end subroutine log_debug subroutine log_error ( self , message , module , procedure , stat , errmsg ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !! ([Specification](../specs/stdlib_logger.html#log_error-writes-the-string-message-to-self-log_units)) !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, then `message` is !! written with the prefix 'ERROR: ', and then if `stat` or `errmsg` !! are present they are written. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( size ) !! integer, intent(in) :: size !! character(128) :: errmsg, message !! integer :: stat !! allocate( a(size), stat=stat, errmsg=errmsg ) !! if ( stat /= 0 ) then !! write( message, `(a, i0)' ) & !! \"Allocation of A failed with SIZE = \", size !! alogger % call log_error( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB', & !! stat = stat, & !! errmsg = errmsg ) !! end if !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger to be used in logging the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_error` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of `log_error` integer , intent ( in ), optional :: stat !! The value of the `stat` specifier returned by a Fortran statement character ( len =* ), intent ( in ), optional :: errmsg !! The value of the `errmsg` specifier returned by a Fortran statement integer :: iostat character ( 28 ) :: dummy character ( 256 ) :: iomsg character ( * ), parameter :: procedure_name = 'log_error' character (:), allocatable :: suffix if ( self % level > error_level ) return if ( present ( stat ) ) then write ( dummy , '(a, i0)' , err = 999 , iostat = iostat , iomsg = iomsg ) & new_line ( 'a' ) // \"With stat = \" , stat else dummy = ' ' end if if ( present ( errmsg ) ) then if ( len_trim ( errmsg ) > 0 ) then suffix = trim ( dummy ) // & new_line ( 'a' ) // 'With errmsg = \"' // trim ( errmsg ) // '\"' else suffix = dummy end if else suffix = dummy end if call self % log_message ( trim ( message ) // suffix , & module = module , & procedure = procedure , & prefix = 'ERROR' ) return 999 call handle_write_failure ( - 999 , procedure_name , iostat , iomsg ) end subroutine log_error subroutine log_information ( self , message , module , procedure ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !!([Specification](../page/specs/stdlib_logger.html#log_information-writes-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, and then `message` is !! written with the prefix 'INFO: '. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( selection ) !! integer, intent(out) :: selection !! integer :: stat !! write(*,'(a)') \"Enter an integer to select a widget\" !! read(*,'(i0)') selection !! write( message, `(a, i0)' ) & !! \"The user selected \", selection !! call alogger % log_information( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB' ) !! ... !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger used to send the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_information` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of !! `log_information` if ( self % level > information_level ) return call self % log_message ( message , & module = module , & procedure = procedure , & prefix = 'INFO' ) end subroutine log_information subroutine log_io_error ( self , message , module , procedure , iostat , & iomsg ) !! version: experimental !! Writes the string `message` to the `self % log_units` with optional !! additional text. !!([Specification](../page/specs/stdlib_logger.html#log_io_error-write-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, then `message` is !! written with a prefix 'I/O ERROR: ', and then if `iostat` or `iomsg` !! are present they are also written. !! !!##### Example !! !! program example !! use stdlib_logger !! ... !! character(*), parameter :: filename = 'dummy.txt' !! integer :: iostat, lun !! character(128) :: iomsg !! character(*), parameter :: message = 'Failure in opening \"dummy.txt\".' !! !! open( newunit=lun, file = filename, form='formatted', & !! status='old', iostat=iostat, iomsg=iomsg ) !! if ( iostat /= 0 ) then !! call global_logger % log_io_error( message, procedure = 'EXAMPLE', & !! iostat=iostat, iomsg = iomsg ) !! error stop 'Error on opening ' // filename !! end if !! ... !! end program example class ( logger_type ), intent ( in ) :: self !! The logger variable to receivee the message character ( len =* ), intent ( in ) :: message !! A string to be written to LOG_UNIT character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of REPORT_ERROR character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of REPORT_ERROR integer , intent ( in ), optional :: iostat !! The value of the IOSTAT specifier returned by a Fortran I/O statement character ( len =* ), intent ( in ), optional :: iomsg !! The value of the IOMSG specifier returned by a Fortran I/O statement character ( 28 ) :: dummy character ( 256 ) :: iomsg2 integer :: iostat2 character ( * ), parameter :: procedure_name = 'log_io_error' character (:), allocatable :: suffix if ( self % level > io_error_level ) return if ( present ( iostat ) ) then write ( dummy , '(a, i0)' , err = 999 , iostat = iostat2 , iomsg = iomsg2 ) & new_line ( 'a' ) // \"With iostat = \" , iostat else dummy = ' ' end if if ( present ( iomsg ) ) then if ( len_trim ( iomsg ) > 0 ) then suffix = trim ( dummy ) // & new_line ( 'a' ) // 'With iomsg = \"' // trim ( iomsg ) // '\"' else suffix = trim ( dummy ) end if else suffix = trim ( dummy ) end if call self % log_message ( trim ( message ) // suffix , & module = module , & procedure = procedure , & prefix = 'I/O ERROR' ) return 999 call handle_write_failure ( - 999 , procedure_name , iostat2 , iomsg2 ) end subroutine log_io_error subroutine log_message ( self , message , module , procedure , prefix ) !! version: experimental !! Writes the string `message` to the `self % log_units` with optional !! additional text. !!([Specification](../page/specs/stdlib_logger.html#log_message-write-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by `module` !! and `procedure` if present, followed by `prefix // ': '` if present, !! and then `message`. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! contains !! ... !! subroutine example_sub( selection ) !! integer, intent(out) :: selection !! integer :: stat !! write(*,'(a)') \"Enter an integer to select a widget\" !! read(*,'(i0)') selection !! write( message, `(a, i0)' ) & !! \"The user selected \", selection !! call global_logger % log_message( message, & !! module = 'example_mod', & !! procedure = 'example_sub', & !! prefix = 'info' ) !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger variable to receive the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_message` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of `log_message` character ( len =* ), intent ( in ), optional :: prefix !! To be prepended to message as `prefix // ': ' // message`. integer :: unit integer :: iostat integer :: len_buffer character ( * ), parameter :: procedure_name = 'log_message' character ( 256 ) :: iomsg character (:), allocatable :: d_and_t , m_and_p , pref character (:), allocatable :: buffer pref = optval ( prefix , '' ) if ( len ( pref ) > 0 ) pref = pref // ': ' if ( self % time_stamp ) then d_and_t = time_stamp () // ': ' else d_and_t = '' end if if ( present ( module ) ) then if ( present ( procedure ) ) then m_and_p = trim ( module ) // ' % ' // trim ( procedure ) // ': ' else m_and_p = trim ( module ) // ': ' end if else if ( present ( procedure ) ) then m_and_p = trim ( procedure ) // ': ' else m_and_p = '' end if call format_output_string ( self , & d_and_t // m_and_p // pref // & trim ( message ), & ' ' , & len_buffer , & buffer ) if ( self % units == 0 ) then if ( self % add_blank_line ) then write ( output_unit , '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) & new_line ( 'a' ) // buffer ( 1 : len_buffer ) else write ( output_unit , '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) & buffer ( 1 : len_buffer ) end if else if ( self % add_blank_line ) then do unit = 1 , self % units write ( self % log_units ( unit ), '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) new_line ( 'a' ) // & buffer ( 1 : len_buffer ) end do else do unit = 1 , self % units write ( self % log_units ( unit ), '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) & buffer ( 1 : len_buffer ) end do end if end if return 999 call handle_write_failure ( unit , procedure_name , iostat , iomsg ) end subroutine log_message subroutine log_text_error ( self , line , column , summary , filename , & line_number , caret , stat ) !! version: experimental !! Sends a message to `self % log_units` describing an error found !! in a line of text. !!([Specification](../page/specs/stdlib_logger.html#log_text_error-send-a-message-to-self-log_units-describing-an-error)) !!##### Behavior !! !! If time stamps are active first a time stamp is written. Then if !! `filename` or `line_number` or `column` are present they are written. !! Then `line` is written. Then the symbol `caret` is written below `line` !! at the column indicated by `column`. Then `summary` is written. ! !!##### Example !! !! program example !! ... !! character(*), parameter :: filename = 'dummy.txt' !! integer :: col_num, line_num, lun !! character(128) :: line !! character(*), parameter :: message = 'Bad text found.' !! !! open( newunit=lun, file = filename, statu='old', form='formatted' ) !! line_num = 0 !! do !! read( lun, fmt='(a)', end=900 ) line !! line_num = line_num + 1 !! call check_line( line, status, col_num ) !! if ( status /= 0 ) !! call global_logger % log_text_error( line, col_num, message, & !! filename, line_num ) !! error stop 'Error in reading ' // filename !! end if !! ... !! end do !!900 continue !! ... !! end program example !! class ( logger_type ), intent ( in ) :: self !! The logger variable to receive the message character ( * ), intent ( in ) :: line !! The line of text in which the error was found. integer , intent ( in ) :: column !! The one's based column in LINE at which the error starts. character ( * ), intent ( in ) :: summary !! A brief description of the error. character ( * ), intent ( in ), optional :: filename !! The name of the file, if any, in which the error was found. integer , intent ( in ), optional :: line_number !! The one's based line number in the file where `line` was found. character ( 1 ), intent ( in ), optional :: caret !! The symbol used to mark the column wher the error was first detected integer , intent ( out ), optional :: stat !! Integer flag that an error has occurred. Has the value `success` if no !! error hass occurred, `index_invalid_error` if `column` is less than zero or !! greater than `len(line)`, and `write_failure` if any of the `write` !! statements has failed. character ( 1 ) :: acaret character ( 128 ) :: iomsg integer :: iostat integer :: lun character ( * ), parameter :: procedure_name = 'LOG_TEXT_ERROR' character ( len = :), allocatable :: buffer if ( self % level > text_error_level ) return acaret = optval ( caret , '^' ) if ( column < 0 . or . column > len ( line ) + 1 ) then if ( present ( stat ) ) then stat = index_invalid_error return else call self % log_error ( invalid_column , & module = module_name , & procedure = procedure_name ) error stop module_name // ' % ' // procedure_name // ': ' // & invalid_column end if end if call write_log_text_error_buffer ( ) if ( self % units == 0 ) then write ( output_unit , '(a)' ) buffer else do lun = 1 , self % units write ( self % log_units ( lun ), '(a)' ) buffer end do end if contains subroutine write_log_text_error_buffer ( ) integer :: i character (:), allocatable :: location , marker if ( present ( filename ) ) then if ( present ( line_number ) ) then allocate ( character ( len_trim ( filename ) + 15 ) :: location ) write ( location , fmt = '(a, \":\", i0, \":\", i0)' , err = 999 , & iomsg = iomsg , iostat = iostat ) & trim ( filename ) , line_number , column else allocate ( character ( len_trim ( filename ) + 45 ) :: location ) write ( location , fmt = '(a, i0)' , err = 999 , iomsg = iomsg , & iostat = iostat ) & \"Error found in file: '\" // trim ( filename ) // & \"', at column: \" , column end if else if ( present ( line_number ) ) then allocate ( character ( 54 ) :: location ) write ( location , fmt = '(a, i0, a, i0)' , err = 999 , & iomsg = iomsg , iostat = iostat ) & 'Error found at line number: ' , line_number , & ', and column: ' , column else allocate ( character ( 36 ) :: location ) write ( location , & fmt = '(\"Error found in line at column:\", i0)' ) & column end if end if allocate ( character ( column ) :: marker ) do i = 1 , column - 1 marker ( i : i ) = ' ' end do marker ( column : column ) = acaret if ( self % add_blank_line ) then if ( self % time_stamp ) then buffer = new_line ( 'a' ) // time_stamp () // & new_line ( 'a' ) // trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) else buffer = new_line ( 'a' ) // trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) end if else if ( self % time_stamp ) then buffer = time_stamp () // & new_line ( 'a' ) // trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) else buffer = trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) end if end if if ( present ( stat ) ) stat = success return 999 if ( present ( stat ) ) then stat = write_failure return else call handle_write_failure ( - 999 , procedure_name , iostat , & iomsg ) end if end subroutine write_log_text_error_buffer end subroutine log_text_error elemental function log_units_assigned ( self ) !! version: experimental !! Returns the number of units assigned to `self % log_units` !!([Specification](../page/specs/stdlib_logger.html#log_units_assigned-returns-the-number-of-active-io-units)) class ( logger_type ), intent ( in ) :: self !! The logger subject to the inquiry integer :: log_units_assigned !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub(unit, ...) !! integer, intent(in) :: unit !! ... !! integer, allocatable :: log_units(:) !! ... !! if ( alogger % log_units_assigned() == 0 ) then !! call alogger % add_log_unit( unit ) !! end if !! ... !! end subroutine example_sub !! ... !! end module example_mod log_units_assigned = self % units end function log_units_assigned subroutine log_warning ( self , message , module , procedure ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !!([Specification](../page/specs/stdlib_logger.html#log_warning-write-the-string-message-to-log_units)) !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, then `message` is !! written with the prefix 'WARN: '. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( size, stat ) !! integer, intent(in) :: size !! integer, intent(out) :: stat !! allocate( a(size) ) !! if ( stat /= 0 ) then !! write( message, `(a, i0)' ) & !! \"Allocation of A failed with SIZE = \", size !! call alogger % log_warning( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB' ) !! end if !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger to which the message is written character ( len =* ), intent ( in ) :: message !! A string to be written to LOG_UNIT character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_warning` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of `log_warning` if ( self % level > warning_level ) return call self % log_message ( message , & module = module , & procedure = procedure , & prefix = 'WARN' ) end subroutine log_warning subroutine remove_log_unit ( self , unit , close_unit , stat ) !! version: experimental !! Remove the I/O unit from the self % log_units list. If `close_unit` is !! present and `.true.` then the corresponding file is closed. If `unit` is !! not in `log_units` then nothing is done. If `stat` is present it, by !! default, has the value `success`. If closing the `unit` fails, then if !! `stat` is present it has the value `close_failure`, otherwise processing !! stops with an informative message. !!([Specification](../page/specs/stdlib_logger.html#remove_log_unit-remove-unit-from-self-log_units)) class ( logger_type ), intent ( inout ) :: self !! The logger variable whose unit is to be removed integer , intent ( in ) :: unit !! The I/O unit to be removed from self logical , intent ( in ), optional :: close_unit !! A logical flag to close the unit while removing it from the SELF list integer , intent ( out ), optional :: stat !! An error status with the values !! * success - no problems found !! * close_failure - the close statement for unit failed !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! type(logger_type) :: alogger !! contains !! ... !! subroutine example_sub(unit, ...) !! integer, intent(in) :: unit !! ... !! call alogger % remove_log_unit( unit ) !! ... !! end subroutine example_sub !! ... !! end module example_mod character ( 128 ) :: errmsg integer :: lun , lun_old character ( * ), parameter :: procedure_name = 'REMOVE_LOG_UNIT' if ( present ( stat ) ) stat = success do lun = 1 , self % units if ( unit == self % log_units ( lun ) ) exit end do if ( lun == self % units + 1 ) return if ( present ( close_unit ) ) then if ( close_unit ) close ( unit , err = 999 , iomsg = errmsg ) end if do lun_old = lun + 1 , self % units self % log_units ( lun_old - 1 ) = self % log_units ( lun_old ) end do self % units = self % units - 1 return 999 if ( present ( stat ) ) then stat = close_failure return else write ( * , '(a, i0)' ) 'In ' // module_name // ' % ' // & procedure_name // ' close_unit failed for unit = ' , unit write ( * , '(a)' ) 'With iomsg = ' // trim ( errmsg ) error stop 'close_unit failed in ' // module_name // ' % ' // & procedure_name // '.' end if end subroutine remove_log_unit function time_stamp () !! Creates a time stamp in the format 'yyyy-mm-dd hh:mm:ss.sss' character ( 23 ) :: time_stamp character ( 8 ) :: date character ( 10 ) :: time call date_and_time ( date , time ) time_stamp ( 1 : 4 ) = date ( 1 : 4 ) time_stamp ( 5 : 5 ) = '-' time_stamp ( 6 : 7 ) = date ( 5 : 6 ) time_stamp ( 8 : 8 ) = '-' time_stamp ( 9 : 10 ) = date ( 7 : 8 ) time_stamp ( 11 : 11 ) = ' ' time_stamp ( 12 : 13 ) = time ( 1 : 2 ) time_stamp ( 14 : 14 ) = ':' time_stamp ( 15 : 16 ) = time ( 3 : 4 ) time_stamp ( 17 : 17 ) = ':' time_stamp ( 18 : 23 ) = time ( 5 : 10 ) end function time_stamp end module stdlib_logger","tags":"","loc":"sourcefile/stdlib_logger.f90.html"},{"title":"stdlib_constants.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS = REAL_KINDS module stdlib_constants !! Constants !! ([Specification](../page/specs/stdlib_constants.html)) use stdlib_kinds , only : #{ for k in KINDS [: - 1 ] }#${ k }$ , #{ endfor }#${ KINDS [ - 1 ] }$ use stdlib_codata , only : SPEED_OF_LIGHT_IN_VACUUM , & VACUUM_ELECTRIC_PERMITTIVITY , & VACUUM_MAG_PERMEABILITY , & PLANCK_CONSTANT , & NEWTONIAN_CONSTANT_OF_GRAVITATION , & STANDARD_ACCELERATION_OF_GRAVITY , & ELEMENTARY_CHARGE , & MOLAR_GAS_CONSTANT , & FINE_STRUCTURE_CONSTANT , & AVOGADRO_CONSTANT , & BOLTZMANN_CONSTANT , & STEFAN_BOLTZMANN_CONSTANT , & WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT , & RYDBERG_CONSTANT , & ELECTRON_MASS , & PROTON_MASS , & NEUTRON_MASS , & ATOMIC_MASS_CONSTANT private ! mathematical constants # : for k in KINDS real ( ${ k }$ ), parameter , public :: PI_$ { k }$ = acos ( - 1.0 _${ k }$ ) !! PI # : endfor ! Physical constants real ( dp ), parameter , public :: c = SPEED_OF_LIGHT_IN_VACUUM % value !! Speed of light in vacuum real ( dp ), parameter , public :: speed_of_light = SPEED_OF_LIGHT_IN_VACUUM % value !! Speed of light in vacuum real ( dp ), parameter , public :: mu_0 = VACUUM_MAG_PERMEABILITY % value !! vacuum mag. permeability real ( dp ), parameter , public :: epsilon_0 = VACUUM_ELECTRIC_PERMITTIVITY % value !! vacuum mag. permeability real ( dp ), parameter , public :: h = PLANCK_CONSTANT % value !! Planck constant real ( dp ), parameter , public :: Planck = PLANCK_CONSTANT % value !! Planck constant real ( dp ), parameter , public :: hbar = PLANCK_CONSTANT % value / PI_dp !! Reduced Planck constant real ( dp ), parameter , public :: G = NEWTONIAN_CONSTANT_OF_GRAVITATION % value !! Newtonian constant of gravitation real ( dp ), parameter , public :: gravitation_constant = NEWTONIAN_CONSTANT_OF_GRAVITATION % value !! Newtonian constant of gravitation real ( dp ), parameter , public :: g2 = STANDARD_ACCELERATION_OF_GRAVITY % value !! Standard acceleration of gravity real ( dp ), parameter , public :: e = ELEMENTARY_CHARGE % value !! Elementary charge real ( dp ), parameter , public :: R = MOLAR_GAS_CONSTANT % value !! Molar gas constant real ( dp ), parameter , public :: gas_constant = MOLAR_GAS_CONSTANT % value !! Molar gas constant real ( dp ), parameter , public :: alpha = FINE_STRUCTURE_CONSTANT % value !! Fine structure constant real ( dp ), parameter , public :: fine_structure = FINE_STRUCTURE_CONSTANT % value !! Fine structure constant real ( dp ), parameter , public :: N_A = AVOGADRO_CONSTANT % value !! Avogadro constant real ( dp ), parameter , public :: Avogadro = AVOGADRO_CONSTANT % value !! Avogadro constant real ( dp ), parameter , public :: k = BOLTZMANN_CONSTANT % value !! Boltzmann constant real ( dp ), parameter , public :: Boltzmann = BOLTZMANN_CONSTANT % value !! Boltzmann constant real ( dp ), parameter , public :: sigma = STEFAN_BOLTZMANN_CONSTANT % value !! Stefan-Boltzmann constant real ( dp ), parameter , public :: Stefan_Boltzmann = STEFAN_BOLTZMANN_CONSTANT % value !! Stefan-Boltzmann constant real ( dp ), parameter , public :: Wien = WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT % value !! Wien wavelength displacement law constant real ( dp ), parameter , public :: Rydberg = RYDBERG_CONSTANT % value !! Rydberg constant real ( dp ), parameter , public :: m_e = ELECTRON_MASS % value !! Electron mass real ( dp ), parameter , public :: m_p = PROTON_MASS % value !! Proton mass real ( dp ), parameter , public :: m_n = NEUTRON_MASS % value !! Neutron mass real ( dp ), parameter , public :: m_u = ATOMIC_MASS_CONSTANT % value !! Atomic mass constant real ( dp ), parameter , public :: u = ATOMIC_MASS_CONSTANT % value !! Atomic mass constant ! Additional constants if needed end module stdlib_constants","tags":"","loc":"sourcefile/stdlib_constants.fypp.html"},{"title":"stdlib_ansi_to_string.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Implementation of the conversion to enumerator and identifier types to strings submodule ( stdlib_ansi ) stdlib_ansi_to_string implicit none character , parameter :: esc = achar ( 27 ), chars ( 0 : 9 ) = & [ \"0\" , \"1\" , \"2\" , \"3\" , \"4\" , \"5\" , \"6\" , \"7\" , \"8\" , \"9\" ] contains !> Transform a color code into an actual ANSI escape sequence pure module function to_string_ansi_code ( code ) result ( str ) !> Color code to be used type ( ansi_code ), intent ( in ) :: code !> ANSI escape sequence representing the color code character ( len = :), allocatable :: str if ( anycolor ( code )) then str = esc // \"[0\" ! Always reset the style if ( code % style > 0 . and . code % style < 10 ) str = str // \";\" // chars ( code % style ) if ( code % fg >= 0 . and . code % fg < 10 ) str = str // \";3\" // chars ( code % fg ) if ( code % bg >= 0 . and . code % bg < 10 ) str = str // \";4\" // chars ( code % bg ) str = str // \"m\" else str = \"\" end if end function to_string_ansi_code !> Check whether the code describes any color / style or is just a stub pure function anycolor ( code ) !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Any color / style is active logical :: anycolor anycolor = code % fg >= 0 . or . code % bg >= 0 . or . code % style >= 0 end function anycolor end submodule stdlib_ansi_to_string","tags":"","loc":"sourcefile/stdlib_ansi_to_string.f90.html"},{"title":"stdlib_stats_cov.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_cov use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = var ( x , dim , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = var ( x , dim , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res res = var ( x , dim , mask , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( dp ) :: res res = var ( x , dim , mask , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i ${ t1 }$ :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) ${ t1 }$ :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = x ( i , :) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( transpose ( center ), center ) # : else res = matmul ( transpose ( conjg ( center )), center ) # : endif case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = x (:, i ) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( center , transpose ( center )) # : else res = matmul ( center , transpose ( conjg ( center ))) # : endif case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select res = res / ( size ( x , dim ) - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i real ( dp ) :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) real ( dp ) :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = real ( x ( i , :), dp ) - mean_ end do res = matmul ( transpose ( center ), center ) case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = real ( x (:, i ), dp ) - mean_ end do res = matmul ( center , transpose ( center )) case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select res = res / ( size ( x , dim ) - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j , n ${ t1 }$ :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) ${ t1 }$ :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j , n real ( dp ) :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) real ( dp ) :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& 0._dp , mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& 0._dp , mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select end function ${ RName }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_cov.fypp.html"},{"title":"stdlib_linalg_blas_c.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_c use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_caxpy public :: stdlib_ccopy public :: stdlib_cdotc public :: stdlib_cdotu public :: stdlib_cgbmv public :: stdlib_cgemm public :: stdlib_cgemv public :: stdlib_cgerc public :: stdlib_cgeru public :: stdlib_chbmv public :: stdlib_chemm public :: stdlib_chemv public :: stdlib_cher public :: stdlib_cher2 public :: stdlib_cher2k public :: stdlib_cherk public :: stdlib_chpmv public :: stdlib_chpr public :: stdlib_chpr2 public :: stdlib_crotg public :: stdlib_cscal public :: stdlib_csrot public :: stdlib_csscal public :: stdlib_cswap public :: stdlib_csymm public :: stdlib_csyr2k public :: stdlib_csyrk public :: stdlib_ctbmv public :: stdlib_ctbsv public :: stdlib_ctpmv public :: stdlib_ctpsv public :: stdlib_ctrmm public :: stdlib_ctrmv public :: stdlib_ctrsm public :: stdlib_ctrsv ! 32-bit real constants real ( sp ), parameter , private :: negone = - 1.00_sp real ( sp ), parameter , private :: zero = 0.00_sp real ( sp ), parameter , private :: half = 0.50_sp real ( sp ), parameter , private :: one = 1.00_sp real ( sp ), parameter , private :: two = 2.00_sp real ( sp ), parameter , private :: three = 3.00_sp real ( sp ), parameter , private :: four = 4.00_sp real ( sp ), parameter , private :: eight = 8.00_sp real ( sp ), parameter , private :: ten = 1 0.00_sp ! 32-bit complex constants complex ( sp ), parameter , private :: czero = ( 0.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: chalf = ( 0.5_sp , 0.0_sp ) complex ( sp ), parameter , private :: cone = ( 1.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: cnegone = ( - 1.0_sp , 0.0_sp ) ! 32-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( sp ), parameter , private :: rradix = real ( radix ( zero ), sp ) real ( sp ), parameter , private :: ulp = epsilon ( zero ) real ( sp ), parameter , private :: eps = ulp * half real ( sp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( sp ), parameter , private :: safmax = one / safmin real ( sp ), parameter , private :: smlnum = safmin / ulp real ( sp ), parameter , private :: bignum = safmax * ulp real ( sp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( sp ), parameter , private :: rtmax = sqrt ( bignum ) ! 32-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( sp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( sp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( sp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( sp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure subroutine stdlib_caxpy ( n , ca , cx , incx , cy , incy ) !! CAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( inout ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_scabs1 ( ca ) == 0.0e+0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cy ( i ) + ca * cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cy ( iy ) + ca * cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_caxpy pure subroutine stdlib_ccopy ( n , cx , incx , cy , incy ) !! CCOPY copies a vector x to a vector y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( out ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_ccopy pure complex ( sp ) function stdlib_cdotc ( n , cx , incx , cy , incy ) !! CDOTC forms the dot product of two complex vectors !! CDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotc = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( i )) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( ix )) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotc = ctemp return end function stdlib_cdotc pure complex ( sp ) function stdlib_cdotu ( n , cx , incx , cy , incy ) !! CDOTU forms the dot product of two complex vectors !! CDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotu = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + cx ( i ) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + cx ( ix ) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotu = ctemp return end function stdlib_cdotu pure subroutine stdlib_cgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! CGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_cgbmv pure subroutine stdlib_cgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cgemm pure subroutine stdlib_cgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! CGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_cgemv pure subroutine stdlib_cgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgerc pure subroutine stdlib_cgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgeru pure subroutine stdlib_chbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! CHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: conjg , max , min , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chbmv pure subroutine stdlib_chemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = sp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_chemm pure subroutine stdlib_chemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! CHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chemv pure subroutine stdlib_cher ( uplo , n , alpha , x , incx , a , lda ) !! CHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_cher pure subroutine stdlib_cher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! CHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_cher2 pure subroutine stdlib_cher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha real ( sp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_cher2k pure subroutine stdlib_cherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: cmplx , conjg , max , real ! Local Scalars complex ( sp ) :: temp real ( sp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( i , l ), KIND = sp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( j , l ), KIND = sp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cherk pure subroutine stdlib_chpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! CHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = sp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_chpmv pure subroutine stdlib_chpr ( uplo , n , alpha , x , incx , ap ) !! CHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr pure subroutine stdlib_chpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! CHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr2 pure subroutine stdlib_crotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in SROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by SROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( out ) :: c complex ( sp ), intent ( inout ) :: a complex ( sp ), intent ( in ) :: b complex ( sp ), intent ( out ) :: s ! Local Scalars real ( sp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( sp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( sp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = sp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = sp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_crotg pure subroutine stdlib_cscal ( n , ca , cx , incx ) !! CSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = ca * cx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = ca * cx ( i ) end do end if return end subroutine stdlib_cscal pure subroutine stdlib_csrot ( n , cx , incx , cy , incy , c , s ) !! CSROT applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: c , s ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( sp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * cx ( i ) + s * cy ( i ) cy ( i ) = c * cy ( i ) - s * cx ( i ) cx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * cx ( ix ) + s * cy ( iy ) cy ( iy ) = c * cy ( iy ) - s * cx ( ix ) cx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_csrot pure subroutine stdlib_csscal ( n , sa , cx , incx ) !! CSSCAL scales a complex vector by a real constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: aimag , cmplx , real if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do end if return end subroutine stdlib_csscal pure subroutine stdlib_cswap ( n , cx , incx , cy , incy ) !! CSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = cx ( i ) cx ( i ) = cy ( i ) cy ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = cx ( ix ) cx ( ix ) = cy ( iy ) cy ( iy ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_cswap pure subroutine stdlib_csymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_csymm pure subroutine stdlib_csyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_csyr2k pure subroutine stdlib_csyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_csyrk pure subroutine stdlib_ctbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctbmv pure subroutine stdlib_ctbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ctbsv pure subroutine stdlib_ctpmv ( uplo , trans , diag , n , ap , x , incx ) !! CTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpmv pure subroutine stdlib_ctpsv ( uplo , trans , diag , n , ap , x , incx ) !! CTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpsv pure subroutine stdlib_ctrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ctrmm pure subroutine stdlib_ctrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctrmv pure subroutine stdlib_ctrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ctrsm pure subroutine stdlib_ctrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ctrsv end module stdlib_linalg_blas_c","tags":"","loc":"sourcefile/stdlib_linalg_blas_c.fypp.html"},{"title":"stdlib_stringlist_type.f90 – Fortran-lang/stdlib","text":"Source Code ! stdlib_stringlist_type.f90 -- ! Module for storing and manipulating list of strings ! The strings may have arbitrary lengths, not necessarily the same ! ! insert AT: Inserts an element BEFORE the element present currently at the asked index ! for forward indexes ! Inserts an element AFTER the element present currently at the asked index ! for backward indexes ! In other words, after insertion the element will be present at the asked index ! for both forward and backward indexes ! insert BEFORE: Inserts an element BEFORE the element present currently at the asked index ! insert AFTER: Inserts an element AFTER the element present currently at the asked index ! ! Note the distinction between AT and BEFORE in the module. Care has been taken to keep it consistent ! throughout the PR ! module stdlib_stringlist_type use stdlib_string_type , only : string_type , operator ( /= ) use stdlib_math , only : clip implicit none private public :: stringlist_type , operator ( // ), operator ( == ), operator ( /= ) public :: list_head , list_tail , fidx , bidx , stringlist_index_type type stringlist_index_type private logical :: forward integer :: offset end type stringlist_index_type type ( stringlist_index_type ), parameter :: list_head = stringlist_index_type ( . true . , 1 ) ! fidx(1) type ( stringlist_index_type ), parameter :: list_tail = stringlist_index_type ( . false ., 1 ) ! bidx(1) !> Version: experimental !> !> Returns an instance of type 'stringlist_index_type' representing forward index !> [Specifications](../page/specs/stdlib_stringlist_type.html#fidx) interface fidx module procedure forward_index end interface !> Version: experimental !> !> Returns an instance of type 'stringlist_index_type' representing backward index !> [Specifications](../page/specs/stdlib_stringlist_type.html#bidx) interface bidx module procedure backward_index end interface type stringlist_type private type ( string_type ), dimension (:), allocatable :: stringarray contains private procedure , public :: clear => clear_list procedure , public :: len => length_list procedure :: to_future_at_idxn => convert_to_future_at_idxn procedure :: to_current_idxn => convert_to_current_idxn procedure :: insert_at_char_idx => insert_at_char_idx_wrap procedure :: insert_at_string_idx => insert_at_string_idx_wrap procedure :: insert_at_stringlist_idx => insert_at_stringlist_idx_wrap procedure :: insert_at_chararray_idx => insert_at_chararray_idx_wrap procedure :: insert_at_stringarray_idx => insert_at_stringarray_idx_wrap generic , public :: insert_at => insert_at_char_idx , & insert_at_string_idx , & insert_at_stringlist_idx , & insert_at_chararray_idx , & insert_at_stringarray_idx procedure :: insert_before_string_int => insert_before_string_int_impl procedure :: insert_before_stringlist_int => insert_before_stringlist_int_impl procedure :: insert_before_chararray_int => insert_before_chararray_int_impl procedure :: insert_before_stringarray_int => insert_before_stringarray_int_impl generic :: insert_before => insert_before_string_int , & insert_before_stringlist_int , & insert_before_chararray_int , & insert_before_stringarray_int procedure :: get_string_idx => get_string_idx_wrap generic , public :: get => get_string_idx end type stringlist_type !> Version: experimental !> !> Constructor for stringlist !> Returns an instance of type stringlist_type !> [Specifications](../page/specs/stdlib_stringlist_type.html#stringlist_type) interface stringlist_type module procedure new_stringlist module procedure new_stringlist_carray module procedure new_stringlist_sarray end interface !> Version: experimental !> !> Concatenates stringlist with the input entity !> Returns a new stringlist !> [Specifications](../page/specs/stdlib_stringlist_type.html#append-operator) interface operator ( // ) module procedure append_char module procedure append_string module procedure prepend_char module procedure prepend_string module procedure append_stringlist module procedure append_carray module procedure append_sarray module procedure prepend_carray module procedure prepend_sarray end interface !> Version: experimental !> !> Compares stringlist for equality with the input entity !> Returns a logical !> [Specifications](../page/specs/stdlib_stringlist_type.html#equality-operator) interface operator ( == ) module procedure eq_stringlist module procedure eq_stringlist_carray module procedure eq_stringlist_sarray module procedure eq_carray_stringlist module procedure eq_sarray_stringlist end interface !> Version: experimental !> !> Compares stringlist for inequality with the input entity !> Returns a logical !> [Specifications](../page/specs/stdlib_stringlist_type.html#inequality-operator) interface operator ( /= ) module procedure ineq_stringlist module procedure ineq_stringlist_carray module procedure ineq_stringlist_sarray module procedure ineq_carray_stringlist module procedure ineq_sarray_stringlist end interface contains ! constructor for stringlist_type: !> Constructor with no argument !> Returns a new instance of type stringlist pure function new_stringlist () type ( stringlist_type ) :: new_stringlist end function new_stringlist !> Constructor to convert chararray to stringlist !> Returns a new instance of type stringlist pure function new_stringlist_carray ( array ) character ( len =* ), dimension (:), intent ( in ) :: array type ( stringlist_type ) :: new_stringlist_carray type ( string_type ), dimension ( size ( array ) ) :: sarray integer :: i do i = 1 , size ( array ) sarray ( i ) = string_type ( array ( i ) ) end do new_stringlist_carray = stringlist_type ( sarray ) end function new_stringlist_carray !> Constructor to convert stringarray to stringlist !> Returns a new instance of type stringlist pure function new_stringlist_sarray ( array ) type ( string_type ), dimension (:), intent ( in ) :: array type ( stringlist_type ) :: new_stringlist_sarray new_stringlist_sarray = stringlist_type () new_stringlist_sarray % stringarray = array end function new_stringlist_sarray ! constructor for stringlist_index_type: !> Returns an instance of type 'stringlist_index_type' representing forward index 'idx' pure function forward_index ( idx ) integer , intent ( in ) :: idx type ( stringlist_index_type ) :: forward_index forward_index = stringlist_index_type ( . true ., idx ) end function forward_index !> Returns an instance of type 'stringlist_index_type' representing backward index 'idx' pure function backward_index ( idx ) integer , intent ( in ) :: idx type ( stringlist_index_type ) :: backward_index backward_index = stringlist_index_type ( . false ., idx ) end function backward_index ! concatenation operator: !> Appends character scalar 'rhs' to the stringlist 'list' !> Returns a new stringlist function append_char ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs type ( stringlist_type ) :: append_char append_char = lhs // string_type ( rhs ) end function append_char !> Appends string 'rhs' to the stringlist 'list' !> Returns a new stringlist function append_string ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs type ( stringlist_type ) :: append_string append_string = lhs ! Intent: creating a full, deep copy call append_string % insert_at ( list_tail , rhs ) end function append_string !> Prepends character scalar 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_char ( lhs , rhs ) character ( len =* ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_char prepend_char = string_type ( lhs ) // rhs end function prepend_char !> Prepends string 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_string ( lhs , rhs ) type ( string_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_string prepend_string = rhs ! Intent: creating a full, deep copy call prepend_string % insert_at ( list_head , lhs ) end function prepend_string !> Appends stringlist 'rhs' to the stringlist 'lhs' !> Returns a new stringlist function append_stringlist ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: append_stringlist append_stringlist = lhs ! Intent: creating a full, deep copy call append_stringlist % insert_at ( list_tail , rhs ) end function append_stringlist !> Appends chararray 'rhs' to the stringlist 'lhs' !> Returns a new stringlist function append_carray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), dimension (:), intent ( in ) :: rhs type ( stringlist_type ) :: append_carray append_carray = lhs ! Intent: creating a full, deep copy call append_carray % insert_at ( list_tail , rhs ) end function append_carray !> Appends stringarray 'rhs' to the stringlist 'lhs' !> Returns a new stringlist function append_sarray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), dimension (:), intent ( in ) :: rhs type ( stringlist_type ) :: append_sarray append_sarray = lhs ! Intent: creating a full, deep copy call append_sarray % insert_at ( list_tail , rhs ) end function append_sarray !> Prepends chararray 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_carray ( lhs , rhs ) character ( len =* ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_carray prepend_carray = rhs ! Intent: creating a full, deep copy call prepend_carray % insert_at ( list_head , lhs ) end function prepend_carray !> Prepends stringarray 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_sarray ( lhs , rhs ) type ( string_type ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_sarray prepend_sarray = rhs ! Intent: creating a full, deep copy call prepend_sarray % insert_at ( list_head , lhs ) end function prepend_sarray ! equality operator: !> Compares stringlist 'lhs' for equality with stringlist 'rhs' !> Returns a logical pure logical function eq_stringlist ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs integer :: i eq_stringlist = . false . if ( lhs % len () == rhs % len () ) then eq_stringlist = . true . do i = 1 , lhs % len () if ( lhs % stringarray ( i ) /= rhs % stringarray ( i ) ) then eq_stringlist = . false . exit end if end do end if end function eq_stringlist !> Compares stringlist 'lhs' for equality with chararray 'rhs' !> Returns a logical pure logical function eq_stringlist_carray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), dimension (:), intent ( in ) :: rhs integer :: i eq_stringlist_carray = . false . if ( lhs % len () == size ( rhs ) ) then eq_stringlist_carray = . true . do i = 1 , lhs % len () if ( lhs % stringarray ( i ) /= rhs ( i ) ) then eq_stringlist_carray = . false . exit end if end do end if end function eq_stringlist_carray !> Compares stringlist 'lhs' for equality with stringarray 'rhs' !> Returns a logical pure logical function eq_stringlist_sarray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), dimension (:), intent ( in ) :: rhs integer :: i eq_stringlist_sarray = . false . if ( lhs % len () == size ( rhs ) ) then eq_stringlist_sarray = . true . do i = 1 , lhs % len () if ( lhs % stringarray ( i ) /= rhs ( i ) ) then eq_stringlist_sarray = . false . exit end if end do end if end function eq_stringlist_sarray !> Compares chararray 'lhs' for equality with stringlist 'rhs' !> Returns a logical pure logical function eq_carray_stringlist ( lhs , rhs ) character ( len =* ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs eq_carray_stringlist = ( rhs == lhs ) end function eq_carray_stringlist !> Compares stringarray 'lhs' for equality with stringlist 'rhs' !> Returns a logical pure logical function eq_sarray_stringlist ( lhs , rhs ) type ( string_type ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs eq_sarray_stringlist = ( rhs == lhs ) end function eq_sarray_stringlist ! inequality operator: !> Compares stringlist 'lhs' for inequality with stringlist 'rhs' !> Returns a logical pure logical function ineq_stringlist ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs ineq_stringlist = . not .( lhs == rhs ) end function ineq_stringlist !> Compares stringlist 'lhs' for inequality with chararray 'rhs' !> Returns a logical pure logical function ineq_stringlist_carray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), dimension (:), intent ( in ) :: rhs ineq_stringlist_carray = . not .( lhs == rhs ) end function ineq_stringlist_carray !> Compares stringlist 'lhs' for inequality with stringarray 'rhs' !> Returns a logical pure logical function ineq_stringlist_sarray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), dimension (:), intent ( in ) :: rhs ineq_stringlist_sarray = . not .( lhs == rhs ) end function ineq_stringlist_sarray !> Compares chararray 'lhs' for inequality with stringlist 'rhs' !> Returns a logical pure logical function ineq_carray_stringlist ( lhs , rhs ) character ( len =* ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs ineq_carray_stringlist = . not .( lhs == rhs ) end function ineq_carray_stringlist !> Compares stringarray 'lhs' for inequality with stringlist 'rhs' !> Returns a logical pure logical function ineq_sarray_stringlist ( lhs , rhs ) type ( string_type ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs ineq_sarray_stringlist = . not .( lhs == rhs ) end function ineq_sarray_stringlist ! clear: !> Version: experimental !> !> Resets stringlist 'list' to an empy stringlist of len 0 !> Modifies the input stringlist 'list' subroutine clear_list ( list ) class ( stringlist_type ), intent ( inout ) :: list if ( allocated ( list % stringarray ) ) then deallocate ( list % stringarray ) end if end subroutine clear_list ! len: !> Version: experimental !> !> Returns the len (length) of the list !> Returns an integer pure integer function length_list ( list ) class ( stringlist_type ), intent ( in ) :: list length_list = 0 if ( allocated ( list % stringarray ) ) then length_list = size ( list % stringarray ) end if end function length_list ! to_future_at_idxn: !> Version: experimental !> !> Converts a forward index OR a backward index to an integer index at !> which the new element will be present post insertion (i.e. in future) !> Returns an integer pure integer function convert_to_future_at_idxn ( list , idx ) !> Not a part of public API class ( stringlist_type ), intent ( in ) :: list type ( stringlist_index_type ), intent ( in ) :: idx ! Formula: merge( fidx( x ) - ( list_head - 1 ), len - bidx( x ) + ( list_tail - 1 ) + 2, ... ) convert_to_future_at_idxn = merge ( idx % offset , list % len () - idx % offset + 2 , idx % forward ) end function convert_to_future_at_idxn ! to_current_idxn: !> Version: experimental !> !> Converts a forward index OR backward index to its equivalent integer index idxn !> Returns an integer pure integer function convert_to_current_idxn ( list , idx ) !> Not a part of public API class ( stringlist_type ), intent ( in ) :: list type ( stringlist_index_type ), intent ( in ) :: idx ! Formula: merge( fidx( x ) - ( list_head - 1 ), len + 1 - bidx( x ) + ( list_tail - 1 ), ... ) convert_to_current_idxn = merge ( idx % offset , list % len () - idx % offset + 1 , idx % forward ) end function convert_to_current_idxn ! insert_at: !> Version: experimental !> !> Inserts character scalar 'string' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_char_idx_wrap ( list , idx , string ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx character ( len =* ), intent ( in ) :: string call list % insert_at ( idx , string_type ( string ) ) end subroutine insert_at_char_idx_wrap !> Version: experimental !> !> Inserts string 'string' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_string_idx_wrap ( list , idx , string ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( string_type ), intent ( in ) :: string call list % insert_before ( list % to_future_at_idxn ( idx ), string ) end subroutine insert_at_string_idx_wrap !> Version: experimental !> !> Inserts stringlist 'slist' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_stringlist_idx_wrap ( list , idx , slist ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( stringlist_type ), intent ( in ) :: slist call list % insert_before ( list % to_future_at_idxn ( idx ), slist ) end subroutine insert_at_stringlist_idx_wrap !> Version: experimental !> !> Inserts chararray 'carray' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_chararray_idx_wrap ( list , idx , carray ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx character ( len =* ), dimension (:), intent ( in ) :: carray call list % insert_before ( list % to_future_at_idxn ( idx ), carray ) end subroutine insert_at_chararray_idx_wrap !> Version: experimental !> !> Inserts stringarray 'sarray' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_stringarray_idx_wrap ( list , idx , sarray ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( string_type ), dimension (:), intent ( in ) :: sarray call list % insert_before ( list % to_future_at_idxn ( idx ), sarray ) end subroutine insert_at_stringarray_idx_wrap !> Version: experimental !> !> Inserts 'positions' number of empty positions BEFORE integer index 'idxn' !> Modifies the input stringlist 'list' subroutine insert_before_empty_positions ( list , idxn , positions ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( inout ) :: idxn integer , intent ( in ) :: positions integer :: i , inew integer :: new_len , old_len type ( string_type ), dimension (:), allocatable :: new_stringarray if ( positions > 0 ) then idxn = clip ( idxn , 1 , list % len () + 1 ) old_len = list % len () new_len = old_len + positions allocate ( new_stringarray ( new_len ) ) do i = 1 , idxn - 1 ! TODO: can be improved by move new_stringarray ( i ) = list % stringarray ( i ) end do do i = idxn , old_len inew = i + positions ! TODO: can be improved by move new_stringarray ( inew ) = list % stringarray ( i ) end do call move_alloc ( new_stringarray , list % stringarray ) end if end subroutine insert_before_empty_positions !> Version: experimental !> !> Inserts string 'string' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_string_int_impl ( list , idxn , string ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn type ( string_type ), intent ( in ) :: string integer :: work_idxn work_idxn = idxn call insert_before_empty_positions ( list , work_idxn , 1 ) list % stringarray ( work_idxn ) = string end subroutine insert_before_string_int_impl !> Version: experimental !> !> Inserts stringlist 'slist' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_stringlist_int_impl ( list , idxn , slist ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn type ( stringlist_type ), intent ( in ) :: slist integer :: i integer :: work_idxn , idxnew integer :: pre_length , post_length work_idxn = idxn pre_length = slist % len () call insert_before_empty_positions ( list , work_idxn , pre_length ) post_length = slist % len () do i = 1 , min ( work_idxn - 1 , pre_length ) idxnew = work_idxn + i - 1 list % stringarray ( idxnew ) = slist % stringarray ( i ) end do do i = work_idxn + post_length - pre_length , post_length idxnew = work_idxn + i - post_length + pre_length - 1 list % stringarray ( idxnew ) = slist % stringarray ( i ) end do end subroutine insert_before_stringlist_int_impl !> Version: experimental !> !> Inserts chararray 'carray' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_chararray_int_impl ( list , idxn , carray ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn character ( len =* ), dimension (:), intent ( in ) :: carray integer :: i integer :: work_idxn , idxnew work_idxn = idxn call insert_before_empty_positions ( list , work_idxn , size ( carray ) ) do i = 1 , size ( carray ) idxnew = work_idxn + i - 1 list % stringarray ( idxnew ) = string_type ( carray ( i ) ) end do end subroutine insert_before_chararray_int_impl !> Version: experimental !> !> Inserts stringarray 'sarray' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_stringarray_int_impl ( list , idxn , sarray ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn type ( string_type ), dimension (:), intent ( in ) :: sarray integer :: i integer :: work_idxn , idxnew work_idxn = idxn call insert_before_empty_positions ( list , work_idxn , size ( sarray ) ) do i = 1 , size ( sarray ) idxnew = work_idxn + i - 1 list % stringarray ( idxnew ) = sarray ( i ) end do end subroutine insert_before_stringarray_int_impl ! get: !> Version: experimental !> !> Returns the string present at stringlist_index 'idx' in stringlist 'list' !> Returns string_type instance pure function get_string_idx_wrap ( list , idx ) class ( stringlist_type ), intent ( in ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( string_type ) :: get_string_idx_wrap integer :: idxn idxn = list % to_current_idxn ( idx ) ! if the index is out of bounds, return a string_type equivalent to empty string if ( 1 <= idxn . and . idxn <= list % len () ) then get_string_idx_wrap = list % stringarray ( idxn ) end if end function get_string_idx_wrap end module stdlib_stringlist_type","tags":"","loc":"sourcefile/stdlib_stringlist_type.f90.html"},{"title":"stdlib_sorting_ord_sort.fypp – Fortran-lang/stdlib","text":"This file is subjec† both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The generic subroutine, ORD_SORT , is substantially a translation to\nFortran 2008 of the \"Rust\" sort sorting routines in slice.rs The rust sort implementation is distributed with the header: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\n file at the top-level directory of this distribution and at\n http://rust-lang.org/COPYRIGHT. Licensed under the Apache License, Version 2.0 or the MIT license , at your\n option. This file may not be copied, modified, or distributed\n except according to those terms. so the license for the original slice.rs code is compatible with the use\nof modified versions of the code in the Fortran Standard Library under\nthe MIT license. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=:)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME #:set SIGN_NAME = [\"increase\", \"decrease\"] #:set SIGN_TYPE = [\">\", \"<\"] #:set SIGN_OPP_TYPE = [\"<\", \">\"] #:set SIGN_NAME_TYPE = list(zip(SIGN_NAME, SIGN_TYPE, SIGN_OPP_TYPE)) !! Licensing: !! !! This file is subjec† both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! The generic subroutine, `ORD_SORT`, is substantially a translation to !! Fortran 2008 of the `\"Rust\" sort` sorting routines in !! [`slice.rs`](https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs) !! The `rust sort` implementation is distributed with the header: !! !! Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT !! file at the top-level directory of this distribution and at !! http://rust-lang.org/COPYRIGHT. !! !! Licensed under the Apache License, Version 2.0 or the MIT license !! , at your !! option. This file may not be copied, modified, or distributed !! except according to those terms. !! !! so the license for the original`slice.rs` code is compatible with the use !! of modified versions of the code in the Fortran Standard Library under !! the MIT license. submodule ( stdlib_sorting ) stdlib_sorting_ord_sort implicit none contains #:for t1, t2, t3, name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ ord_sort ( array , work , reverse ) ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ , intent ( out ), optional :: work ( 0 :) logical , intent ( in ), optional :: reverse if ( optval ( reverse , . false .)) then call ${ name1 }$_ decrease_ord_sort ( array , work ) else call ${ name1 }$_ increase_ord_sort ( array , work ) endif end subroutine ${ name1 }$_ ord_sort #:endfor #:for sname, signt, signoppt in SIGN_NAME_TYPE #:for t1, t2, t3, name1 in IRSCB_TYPES_ALT_NAME subroutine ${ name1 }$_${ sname }$_ ord_sort ( array , work ) ! 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 ! The Rust version in turn is a simplification of the Timsort algorithm ! described in ! https://svn.python.org/projects/python/trunk/Objects/listsort.txt, as ! it drops both the use of 'galloping' to identify bounds of regions to be ! sorted and the estimation of the optimal `run size`. However it remains ! a hybrid sorting algorithm combining an iterative Merge sort controlled ! by a stack of `RUNS` identified by regions of uniformly decreasing or ! non-decreasing sequences that may be expanded to a minimum run size and ! initially processed by an insertion sort. ! ! Note the Fortran implementation simplifies the logic as it only has to ! deal with Fortran arrays of intrinsic types and not the full generality ! of Rust's arrays and lists for arbitrary types. It also adds the ! estimation of the optimal `run size` as suggested in Tim Peters' ! original `listsort.txt`, and an optional `work` array to be used as ! scratch memory. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ , intent ( out ), optional :: work ( 0 :) ${ t2 }$ , allocatable :: buf (:) integer ( int_index ) :: array_size integer :: stat array_size = size ( array , kind = int_index ) if ( present ( work ) ) then if ( size ( work , kind = int_index ) < array_size / 2 ) then error stop \"${name1}$_${sname}$_ord_sort: work array is too small.\" endif ! Use the work array as scratch memory call merge_sort ( array , work ) else ! Allocate a buffer to use as scratch memory. # : if t1 [ 0 : 4 ] == \"char\" allocate ( ${ t3 }$ :: buf ( 0 : array_size / 2 - 1 ), & stat = stat ) # : else allocate ( buf ( 0 : array_size / 2 - 1 ), stat = stat ) # : endif if ( stat /= 0 ) error stop \"${name1}$_${sname}$_ord_sort: Allocation of buffer failed.\" call merge_sort ( array , buf ) end if contains pure function calc_min_run ( n ) result ( min_run ) !! Returns the minimum length of a run from 32-63 so that N/MIN_RUN is !! less than or equal to a power of two. See !! https://svn.python.org/projects/python/trunk/Objects/listsort.txt integer ( int_index ) :: min_run integer ( int_index ), intent ( in ) :: n integer ( int_index ) :: num , r num = n r = 0_int_index do while ( num >= 64 ) r = ior ( r , iand ( num , 1_int_index ) ) num = ishft ( num , - 1_int_index ) end do min_run = num + r end function calc_min_run pure subroutine insertion_sort ( array ) ! Sorts `ARRAY` using an insertion sort. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: i , j ${ t3 }$ :: key do j = 1 , size ( array , kind = int_index ) - 1 key = array ( j ) i = j - 1 do while ( i >= 0 ) if ( array ( i ) ${ signoppt }$ = key ) exit array ( i + 1 ) = array ( i ) i = i - 1 end do array ( i + 1 ) = key end do end subroutine insertion_sort pure function collapse ( runs ) result ( r ) ! Examine the stack of runs waiting to be merged, identifying adjacent runs ! to be merged until the stack invariants are restablished: ! ! 1. len(-3) > len(-2) + len(-1) ! 2. len(-2) > len(-1) integer ( int_index ) :: r type ( run_type_default ), intent ( in ), target :: runs ( 0 :) integer ( int_index ) :: n logical :: test n = size ( runs , kind = int_index ) test = . false . if ( n >= 2 ) then if ( runs ( n - 1 ) % base == 0 . or . & runs ( n - 2 ) % len <= runs ( n - 1 ) % len ) then test = . true . else if ( n >= 3 ) then ! X exists if ( runs ( n - 3 ) % len <= & runs ( n - 2 ) % len + runs ( n - 1 ) % len ) then test = . true . ! |X| <= |Y| + |Z| => will need to merge due to rho1 or rho2 else if ( n >= 4 ) then if ( runs ( n - 4 ) % len <= & runs ( n - 3 ) % len + runs ( n - 2 ) % len ) then test = . true . ! |W| <= |X| + |Y| => will need to merge due to rho1 or rho3 end if end if end if end if if ( test ) then ! By default merge Y & Z, rho2 or rho3 if ( n >= 3 ) then if ( runs ( n - 3 ) % len < runs ( n - 1 ) % len ) then r = n - 3 ! |X| < |Z| => merge X & Y, rho1 return end if end if r = n - 2 ! |Y| <= |Z| => merge Y & Z, rho4 return else r = - 1 end if end function collapse pure subroutine insert_head ( array ) ! Inserts `array(0)` into the pre-sorted sequence `array(1:)` so that the ! whole `array(0:)` becomes sorted, copying the first element into ! a temporary variable, iterating until the right place for it is found. ! copying every traversed element into the slot preceding it, and finally, ! copying data from the temporary variable into the resulting hole. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ :: tmp integer ( int_index ) :: i tmp = array ( 0 ) find_hole : do i = 1 , size ( array , kind = int_index ) - 1 if ( array ( i ) ${ signt }$ = tmp ) exit find_hole array ( i - 1 ) = array ( i ) end do find_hole array ( i - 1 ) = tmp end subroutine insert_head subroutine merge_sort ( array , buf ) ! The Rust merge sort borrows some (but not all) of the ideas from TimSort, ! which is described in detail at ! (http://svn.python.org/projects/python/trunk/Objects/listsort.txt). ! ! The algorithm identifies strictly descending and non-descending ! subsequences, which are called natural runs. Where these runs are less ! than a minimum run size they are padded by adding additional samples ! using an insertion sort. The merge process is driven by a stack of ! pending unmerged runs. Each newly found run is pushed onto the stack, ! and then pairs of adjacentd runs are merged until these two invariants ! are satisfied: ! ! 1. for every `i` in `1..size(runs)-1`: `runs(i - 1)%len > runs(i)%len` ! 2. for every `i` in `2..size(runs)-1`: `runs(i - 2)%len > ! runs(i - 1)%len + runs(i)%len` ! ! The invariants ensure that the total running time is `O(n log n)` ! worst-case. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ , intent ( inout ) :: buf ( 0 :) integer ( int_index ) :: array_size , finish , min_run , r , r_count , & start type ( run_type_default ) :: runs ( 0 : max_merge_stack - 1 ), left , right array_size = size ( array , kind = int_index ) ! Very short runs are extended using insertion sort to span at least ! min_run elements. Slices of up to this length are sorted using insertion ! sort. min_run = calc_min_run ( array_size ) if ( array_size <= min_run ) then if ( array_size >= 2 ) call insertion_sort ( array ) return end if ! Following Rust sort, natural runs in `array` are identified by traversing ! it backwards. By traversing it backward, merges more often go in the ! opposite direction (forwards). According to developers of Rust sort, ! merging forwards is slightly faster than merging backwards. Therefore ! identifying runs by traversing backwards should improve performance. r_count = 0 finish = array_size - 1 do while ( finish >= 0 ) ! Find the next natural run, and reverse it if it's strictly descending. start = finish if ( start > 0 ) then start = start - 1 if ( array ( start + 1 ) ${ signoppt }$ array ( start ) ) then Descending : do while ( start > 0 ) if ( array ( start ) ${ signt }$ = array ( start - 1 ) ) & exit Descending start = start - 1 end do Descending call reverse_segment ( array ( start : finish ) ) else Ascending : do while ( start > 0 ) if ( array ( start ) ${ signoppt }$ array ( start - 1 ) ) exit Ascending start = start - 1 end do Ascending end if end if ! If the run is too short insert some more elements using an insertion sort. Insert : do while ( start > 0 ) if ( finish - start >= min_run - 1 ) exit Insert start = start - 1 call insert_head ( array ( start : finish ) ) end do Insert if ( start == 0 . and . finish == array_size - 1 ) return runs ( r_count ) = run_type_default ( base = start , & len = finish - start + 1 ) finish = start - 1 r_count = r_count + 1 ! Determine whether pairs of adjacent runs need to be merged to satisfy ! the invariants, and, if so, merge them. Merge_loop : do r = collapse ( runs ( 0 : r_count - 1 ) ) if ( r < 0 . or . r_count <= 1 ) exit Merge_loop left = runs ( r + 1 ) right = runs ( r ) call merge ( array ( left % base : & right % base + right % len - 1 ), & left % len , buf ) runs ( r ) = run_type_default ( base = left % base , & len = left % len + right % len ) if ( r == r_count - 3 ) runs ( r + 1 ) = runs ( r + 2 ) r_count = r_count - 1 end do Merge_loop end do if ( r_count /= 1 ) & error stop \"MERGE_SORT completed without RUN COUNT == 1.\" end subroutine merge_sort pure subroutine merge ( array , mid , buf ) ! Merges the two non-decreasing runs `ARRAY(0:MID-1)` and `ARRAY(MID:)` ! using `BUF` as temporary storage, and stores the merged runs into ! `ARRAY(0:)`. `MID` must be > 0, and < `SIZE(ARRAY)-1`. Buffer `BUF` ! must be long enough to hold the shorter of the two runs. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ), intent ( in ) :: mid ${ t3 }$ , intent ( inout ) :: buf ( 0 :) integer ( int_index ) :: array_len , i , j , k array_len = size ( array , kind = int_index ) ! Merge first copies the shorter run into `buf`. Then, depending on which ! run was shorter, it traces the copied run and the longer run forwards ! (or backwards), comparing their next unprocessed elements and then ! copying the lesser (or greater) one into `array`. if ( mid <= array_len - mid ) then ! The left run is shorter. buf ( 0 : mid - 1 ) = array ( 0 : mid - 1 ) i = 0 j = mid merge_lower : do k = 0 , array_len - 1 if ( buf ( i ) ${ signoppt }$ = array ( j ) ) then array ( k ) = buf ( i ) i = i + 1 if ( i >= mid ) exit merge_lower else array ( k ) = array ( j ) j = j + 1 if ( j >= array_len ) then array ( k + 1 :) = buf ( i : mid - 1 ) exit merge_lower end if end if end do merge_lower else ! The right run is shorter ! check that it is stable buf ( 0 : array_len - mid - 1 ) = array ( mid : array_len - 1 ) i = mid - 1 j = array_len - mid - 1 merge_upper : do k = array_len - 1 , 0 , - 1 if ( buf ( j ) ${ signt }$ = array ( i ) ) then array ( k ) = buf ( j ) j = j - 1 if ( j < 0 ) exit merge_upper else array ( k ) = array ( i ) i = i - 1 if ( i < 0 ) then array ( 0 : k - 1 ) = buf ( 0 : j ) exit merge_upper end if end if end do merge_upper end if end subroutine merge pure subroutine reverse_segment ( array ) ! Reverse a segment of an array in place ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: lo , hi ${ t3 }$ :: temp lo = 0 hi = size ( array , kind = int_index ) - 1 do while ( lo < hi ) temp = array ( lo ) array ( lo ) = array ( hi ) array ( hi ) = temp lo = lo + 1 hi = hi - 1 end do end subroutine reverse_segment end subroutine ${ name1 }$_${ sname }$_ ord_sort #:endfor #:endfor end submodule stdlib_sorting_ord_sort","tags":"","loc":"sourcefile/stdlib_sorting_ord_sort.fypp.html"},{"title":"stdlib_linalg_blas_d.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_d use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_dasum public :: stdlib_daxpy public :: stdlib_dcopy public :: stdlib_ddot public :: stdlib_dgbmv public :: stdlib_dgemm public :: stdlib_dgemv public :: stdlib_dger public :: stdlib_dnrm2 public :: stdlib_drot public :: stdlib_drotg public :: stdlib_drotm public :: stdlib_drotmg public :: stdlib_dsbmv public :: stdlib_dscal public :: stdlib_dsdot public :: stdlib_dspmv public :: stdlib_dspr public :: stdlib_dspr2 public :: stdlib_dswap public :: stdlib_dsymm public :: stdlib_dsymv public :: stdlib_dsyr public :: stdlib_dsyr2 public :: stdlib_dsyr2k public :: stdlib_dsyrk public :: stdlib_dtbmv public :: stdlib_dtbsv public :: stdlib_dtpmv public :: stdlib_dtpsv public :: stdlib_dtrmm public :: stdlib_dtrmv public :: stdlib_dtrsm public :: stdlib_dtrsv public :: stdlib_dzasum public :: stdlib_dznrm2 ! 64-bit real constants real ( dp ), parameter , private :: negone = - 1.00_dp real ( dp ), parameter , private :: zero = 0.00_dp real ( dp ), parameter , private :: half = 0.50_dp real ( dp ), parameter , private :: one = 1.00_dp real ( dp ), parameter , private :: two = 2.00_dp real ( dp ), parameter , private :: three = 3.00_dp real ( dp ), parameter , private :: four = 4.00_dp real ( dp ), parameter , private :: eight = 8.00_dp real ( dp ), parameter , private :: ten = 1 0.00_dp ! 64-bit complex constants complex ( dp ), parameter , private :: czero = ( 0.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: chalf = ( 0.5_dp , 0.0_dp ) complex ( dp ), parameter , private :: cone = ( 1.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: cnegone = ( - 1.0_dp , 0.0_dp ) ! 64-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( dp ), parameter , private :: rradix = real ( radix ( zero ), dp ) real ( dp ), parameter , private :: ulp = epsilon ( zero ) real ( dp ), parameter , private :: eps = ulp * half real ( dp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( dp ), parameter , private :: safmax = one / safmin real ( dp ), parameter , private :: smlnum = safmin / ulp real ( dp ), parameter , private :: bignum = safmax * ulp real ( dp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( dp ), parameter , private :: rtmax = sqrt ( bignum ) ! 64-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( dp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( dp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( dp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( dp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure real ( dp ) function stdlib_dasum ( n , dx , incx ) !! DASUM takes the sum of the absolute values. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_dasum = zero dtemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + abs ( dx ( i )) end do if ( n < 6 ) then stdlib_dasum = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 dtemp = dtemp + abs ( dx ( i )) + abs ( dx ( i + 1 )) + abs ( dx ( i + 2 )) + abs ( dx ( i + 3 )) + abs ( dx ( i + & 4 )) + abs ( dx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dtemp = dtemp + abs ( dx ( i )) end do end if stdlib_dasum = dtemp return end function stdlib_dasum pure subroutine stdlib_daxpy ( n , da , dx , incx , dy , incy ) !! DAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( inout ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( da == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dy ( i ) + da * dx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 dy ( i ) = dy ( i ) + da * dx ( i ) dy ( i + 1 ) = dy ( i + 1 ) + da * dx ( i + 1 ) dy ( i + 2 ) = dy ( i + 2 ) + da * dx ( i + 2 ) dy ( i + 3 ) = dy ( i + 3 ) + da * dx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dy ( iy ) + da * dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_daxpy pure subroutine stdlib_dcopy ( n , dx , incx , dy , incy ) !! DCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( out ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 dy ( i ) = dx ( i ) dy ( i + 1 ) = dx ( i + 1 ) dy ( i + 2 ) = dx ( i + 2 ) dy ( i + 3 ) = dx ( i + 3 ) dy ( i + 4 ) = dx ( i + 4 ) dy ( i + 5 ) = dx ( i + 5 ) dy ( i + 6 ) = dx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dcopy pure real ( dp ) function stdlib_ddot ( n , dx , incx , dy , incy ) !! DDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stdlib_ddot = zero dtemp = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + dx ( i ) * dy ( i ) end do if ( n < 5 ) then stdlib_ddot = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 dtemp = dtemp + dx ( i ) * dy ( i ) + dx ( i + 1 ) * dy ( i + 1 ) + dx ( i + 2 ) * dy ( i + 2 ) + dx ( i + 3 ) * dy ( i + 3 ) + & dx ( i + 4 ) * dy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dtemp + dx ( ix ) * dy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_ddot = dtemp return end function stdlib_ddot pure subroutine stdlib_dgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! DGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_dgbmv pure subroutine stdlib_dgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dgemm pure subroutine stdlib_dgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! DGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_dgemv pure subroutine stdlib_dger ( m , n , alpha , x , incx , y , incy , a , lda ) !! DGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_dger pure function stdlib_dnrm2 ( n , x , incx ) !! DNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DNRM2 := sqrt( x'*x ) real ( dp ) :: stdlib_dnrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dnrm2 = scl * sqrt ( sumsq ) return end function stdlib_dnrm2 pure subroutine stdlib_drot ( n , dx , incx , dy , incy , c , s ) !! DROT applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n dtemp = c * dx ( i ) + s * dy ( i ) dy ( i ) = c * dy ( i ) - s * dx ( i ) dx ( i ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = c * dx ( ix ) + s * dy ( iy ) dy ( iy ) = c * dy ( iy ) - s * dx ( ix ) dx ( ix ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_drot pure subroutine stdlib_drotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( inout ) :: a , b real ( dp ), intent ( out ) :: c , s ! Local Scalars real ( dp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_drotg pure subroutine stdlib_drotm ( n , dx , incx , dy , incy , dparam ) !! DROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See DROTMG for a description of data storage in DPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dparam ( 5 ) real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_dp two = 2.0_dp dflag = dparam ( 1 ) if ( n <= 0 . or . ( dflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z * dh12 dy ( i ) = w * dh21 + z * dh22 end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w + z * dh12 dy ( i ) = w * dh21 + z end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z dy ( i ) = - w + dh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z * dh12 dy ( ky ) = w * dh21 + z * dh22 kx = kx + incx ky = ky + incy end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w + z * dh12 dy ( ky ) = w * dh21 + z kx = kx + incx ky = ky + incy end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z dy ( ky ) = - w + dh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_drotm pure subroutine stdlib_drotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) !! DROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( dp ), intent ( in ) :: dy1 ! Array Arguments real ( dp ), intent ( out ) :: dparam ( 5 ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , dp1 , dp2 , dq1 , dq2 , dtemp , du , gam , gamsq , & one , rgamsq , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_dp one = 1.0_dp two = 2.0_dp gam = 409 6.0_dp gamsq = 1677721 6.0_dp rgamsq = 5.9604645e-8_dp if ( dd1 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else ! case-dd1-nonnegative dp2 = dd2 * dy1 if ( dp2 == zero ) then dflag = - two dparam ( 1 ) = dflag return end if ! regular-case.. dp1 = dd1 * dx1 dq2 = dp2 * dy1 dq1 = dp1 * dx1 if ( abs ( dq1 ) > abs ( dq2 )) then dh21 = - dy1 / dx1 dh12 = dp2 / dp1 du = one - dh12 * dh21 if ( du > zero ) then dflag = zero dd1 = dd1 / du dd2 = dd2 / du dx1 = dx1 * du else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero end if else if ( dq2 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else dflag = one dh11 = dp1 / dp2 dh22 = dx1 / dy1 du = one + dh11 * dh22 dtemp = dd2 / du dd2 = dd1 / du dd1 = dtemp dx1 = dy1 * du end if end if ! procedure..scale-check if ( dd1 /= zero ) then do while (( dd1 <= rgamsq ) . or . ( dd1 >= gamsq )) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( dd1 <= rgamsq ) then dd1 = dd1 * gam ** 2 dx1 = dx1 / gam dh11 = dh11 / gam dh12 = dh12 / gam else dd1 = dd1 / gam ** 2 dx1 = dx1 * gam dh11 = dh11 * gam dh12 = dh12 * gam end if enddo end if if ( dd2 /= zero ) then do while ( ( abs ( dd2 ) <= rgamsq ) . or . ( abs ( dd2 ) >= gamsq ) ) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( abs ( dd2 ) <= rgamsq ) then dd2 = dd2 * gam ** 2 dh21 = dh21 / gam dh22 = dh22 / gam else dd2 = dd2 / gam ** 2 dh21 = dh21 * gam dh22 = dh22 * gam end if end do end if end if if ( dflag < zero ) then dparam ( 2 ) = dh11 dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 dparam ( 5 ) = dh22 else if ( dflag == zero ) then dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 else dparam ( 2 ) = dh11 dparam ( 5 ) = dh22 end if dparam ( 1 ) = dflag return end subroutine stdlib_drotmg pure subroutine stdlib_dsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! DSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsbmv pure subroutine stdlib_dscal ( n , da , dx , incx ) !! DSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dx ( i ) = da * dx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 dx ( i ) = da * dx ( i ) dx ( i + 1 ) = da * dx ( i + 1 ) dx ( i + 2 ) = da * dx ( i + 2 ) dx ( i + 3 ) = da * dx ( i + 3 ) dx ( i + 4 ) = da * dx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dx ( i ) = da * dx ( i ) end do end if return end subroutine stdlib_dscal pure real ( dp ) function stdlib_dsdot ( n , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! authors: ! ======== ! lawson, c. l., (jpl), hanson, r. j., (snla), ! kincaid, d. r., (u. of texas), krogh, f. t., (jpl) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real stdlib_dsdot = zero if ( n <= 0 ) return if ( incx == incy . and . incx > 0 ) then ! code for equal, positive, non-unit increments. ns = n * incx do i = 1 , ns , incx stdlib_dsdot = stdlib_dsdot + real ( sx ( i ), KIND = dp ) * real ( sy ( i ), KIND = dp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n stdlib_dsdot = stdlib_dsdot + real ( sx ( kx ), KIND = dp ) * real ( sy ( ky ), KIND = dp ) kx = kx + incx ky = ky + incy end do end if return end function stdlib_dsdot pure subroutine stdlib_dspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! DSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_dspmv pure subroutine stdlib_dspr ( uplo , n , alpha , x , incx , ap ) !! DSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr pure subroutine stdlib_dspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! DSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr2 pure subroutine stdlib_dswap ( n , dx , incx , dy , incy ) !! DSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp dtemp = dx ( i + 1 ) dx ( i + 1 ) = dy ( i + 1 ) dy ( i + 1 ) = dtemp dtemp = dx ( i + 2 ) dx ( i + 2 ) = dy ( i + 2 ) dy ( i + 2 ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dx ( ix ) dx ( ix ) = dy ( iy ) dy ( iy ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dswap pure subroutine stdlib_dsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_dsymm pure subroutine stdlib_dsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! DSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsymv pure subroutine stdlib_dsyr ( uplo , n , alpha , x , incx , a , lda ) !! DSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_dsyr pure subroutine stdlib_dsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! DSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsyr2 pure subroutine stdlib_dsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_dsyr2k pure subroutine stdlib_dsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! DSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dsyrk pure subroutine stdlib_dtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtbmv pure subroutine stdlib_dtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_dtbsv pure subroutine stdlib_dtpmv ( uplo , trans , diag , n , ap , x , incx ) !! DTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpmv pure subroutine stdlib_dtpsv ( uplo , trans , diag , n , ap , x , incx ) !! DTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpsv pure subroutine stdlib_dtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrmm pure subroutine stdlib_dtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtrmv pure subroutine stdlib_dtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrsm pure subroutine stdlib_dtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_dtrsv pure real ( dp ) function stdlib_dzasum ( n , zx , incx ) !! DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a double precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: stemp integer ( ilp ) :: i , nincx stdlib_dzasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do end if stdlib_dzasum = stemp return end function stdlib_dzasum pure function stdlib_dznrm2 ( n , x , incx ) !! DZNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DZNRM2 := sqrt( x**H*x ) real ( dp ) :: stdlib_dznrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dznrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = dp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dznrm2 = scl * sqrt ( sumsq ) return end function stdlib_dznrm2 end module stdlib_linalg_blas_d","tags":"","loc":"sourcefile/stdlib_linalg_blas_d.fypp.html"},{"title":"stdlib_math_is_close.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_math ) stdlib_math_is_close use , intrinsic :: ieee_arithmetic , only : ieee_is_nan implicit none # : for k1 in REAL_KINDS real ( ${ k1 }$ ), parameter :: sqrt_eps_$ { k1 }$ = sqrt ( epsilon ( 1.0 _${ k1 }$ )) # : endfor contains # ! Determines whether the values of `a` and `b` are close. # : for k1 , t1 in REAL_KINDS_TYPES elemental module logical function is_close_$ { t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a , b real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan logical :: equal_nan_ equal_nan_ = optval ( equal_nan , . false .) if ( ieee_is_nan ( a ) . or . ieee_is_nan ( b )) then close = merge (. true ., . false ., equal_nan_ . and . ieee_is_nan ( a ) . and . ieee_is_nan ( b )) else close = abs ( a - b ) <= max ( abs ( optval ( rel_tol , sqrt_eps_$ { k1 }$ ) * max ( abs ( a ), abs ( b ))), & abs ( optval ( abs_tol , 0.0 _${ k1 }$ )) ) end if end function is_close_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental module logical function is_close_$ { t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a , b real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan close = is_close_r$ { k1 }$ ( a % re , b % re , rel_tol , abs_tol , equal_nan ) . and . & is_close_r$ { k1 }$ ( a % im , b % im , rel_tol , abs_tol , equal_nan ) end function is_close_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule stdlib_math_is_close","tags":"","loc":"sourcefile/stdlib_math_is_close.fypp.html"},{"title":"stdlib_str2num.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" !> The `stdlib_str2num` module provides procedures and interfaces for conversion !> of characters to numerical types. Currently supported: `integer` and `real`. !> ([Specification](../page/specs/stdlib_str2num.html)) !> !> This code was modified from https://github.com/jalvesz/Fortran-String-to-Num by Alves Jose !> And was possible thanks to all the discussions in this thread https://fortran-lang.discourse.group/t/faster-string-to-double/ !> !> Known precisions limits of current proposal : !> Conversion to double precision is exact up to epsilon(0.0_dp) !> example: !> !> input : 123456.78901234567890123456789012345678901234567890+2 !> !> formatted read : 12345678.90123457 !> !> to_num : 12345678.90123457 !> !> difference abs : 0.1862645149230957E-08 !> !> difference rel : 0.1508742584455759E-13% !> !> Conversion to quadruple precision can deviate at about 200*epsilon(0.0_qp) !> example: !> !> input : 0.140129846432481707092372958328991613128026194187651577175706828388979108268586060148663818836212158203125E-443 !> !> formatted read : 0.140129846432481707092372958328991608E-443 !> !> to_num : 0.140129846432481707092372958328996233E-443 !> !> difference abs : 0.4625E-475 !> !> difference rel : 0.3300E-029% module stdlib_str2num use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_positive_inf , ieee_quiet_nan implicit none private public :: to_num , to_num_from_stream integer ( int8 ), parameter :: digit_0 = ichar ( '0' , int8 ) integer ( int8 ), parameter :: period = ichar ( '.' , int8 ) - digit_0 integer ( int8 ), parameter :: comma = ichar ( ',' , int8 ) - digit_0 integer ( int8 ), parameter :: minus_sign = ichar ( '-' , int8 ) - digit_0 integer ( int8 ), parameter :: plus_sign = ichar ( '+' , int8 ) - digit_0 integer ( int8 ), parameter :: Inf = ichar ( 'I' , int8 ) integer ( int8 ), parameter :: NaN = ichar ( 'N' , int8 ) integer ( int8 ), parameter :: le = ichar ( 'e' , int8 ) - digit_0 integer ( int8 ), parameter :: BE = ichar ( 'E' , int8 ) - digit_0 integer ( int8 ), parameter :: ld = ichar ( 'd' , int8 ) - digit_0 integer ( int8 ), parameter :: BD = ichar ( 'D' , int8 ) - digit_0 integer ( int8 ), parameter :: LF = 10 , CR = 13 , WS = 32 interface to_num !! version: experimental !! !! Conversion of strings to numbers !! ([Specification](../page/specs/stdlib_str2num.html#to-num-conversion-of-strings-to-numbers)) # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) module procedure to_$ { k1 }$ # : endfor end interface interface to_num_from_stream !! version: experimental !! !! Conversion of a stream of values in a string to numbers !! ([Specification](../page/specs/stdlib_str2num.html#to-num-p-conversion-of-a-stream-of-values-in-a-strings-to-numbers)) # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) module procedure to_$ { k1 }$_ from_stream # : endfor end interface interface to_num_base # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) module procedure to_$ { k1 }$_ base # : endfor end interface contains !--------------------------------------------- ! String To Number interfaces !--------------------------------------------- # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) elemental function to_$ { k1 }$ ( s , mold ) result ( v ) ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string ${ t1 }$ , intent ( in ) :: mold !! dummy argument to disambiguate at compile time the generic interface ${ t1 }$ :: v !! Output ${t1}$ value ! -- Internal Variables integer ( int8 ) :: p !! position within the number integer ( int8 ) :: stat !! error status !---------------------------------------------- call to_num_base ( s , v , p , stat ) end function function to_$ { k1 }$_ from_stream ( s , mold , stat ) result ( v ) ! -- In/out Variables character ( len = :), pointer :: s !! input string ${ t1 }$ , intent ( in ) :: mold !! dummy argument to disambiguate at compile time the generic interface ${ t1 }$ :: v !! Output ${t1}$ value integer ( int8 ), intent ( inout ), optional :: stat ! -- Internal Variables integer ( int8 ) :: p !! position within the number integer ( int8 ) :: err !---------------------------------------------- call to_num_base ( s , v , p , err ) p = min ( p , len ( s , kind = int8 ) ) s => s ( p :) if ( present ( stat )) stat = err end function # : endfor !--------------------------------------------- ! String To Number Implementations !--------------------------------------------- # : for k1 , t1 in INT_KINDS_TYPES elemental subroutine to_$ { k1 }$_ base ( s , v , p , stat ) !! Return an ${k1}$ integer ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string ${ t1 }$ , intent ( out ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! position within the number integer ( int8 ), intent ( out ) :: stat !! status upon succes or failure to read ! -- Internal Variables integer ( int8 ) :: val !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- v = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then v = v * 10 + val p = p + 1 else exit end if end do stat = 0 end subroutine # : endfor elemental subroutine to_sp_base ( s , v , p , stat ) integer , parameter :: wp = sp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 39 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 37 !! number of fractional number factors integer :: e ! Notice: We use dp here to obtain exact precision for sp. ! Otherwise errors may appear in comparison to formatted read. ! See https://github.com/fortran-lang/stdlib/pull/743#issuecomment-1791953430 for more details real ( dp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._dp ** ( nwnb - e ), e = 1 , nwnb )] real ( dp ), parameter :: fractional_base ( nfnb ) = [( 1 0._dp ** ( - e ), e = 1 , nfnb )] real ( dp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 11 !! Maximum depth to read values on int_wp integer ( dp ) :: int_wp !! long integer to capture fractional part integer :: i_exp !! integer to capture whole number part integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number in a single integer pP = 127 int_wp = 0 do i = p , min ( maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then int_wp = int_wp * 10 + val else if ( val == period ) then pP = i else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then v = sign * int_wp * expbase ( exp_aux ) else v = sign * int_wp * 1 0._dp ** ( sige * i_exp - resp + 1 ) end if stat = 0 end subroutine elemental subroutine to_dp_base ( s , v , p , stat ) integer , parameter :: wp = dp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 40 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 64 !! number of fractional number factors integer :: e real ( wp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._wp ** ( nwnb - e ), e = 1 , nwnb )] real ( wp ), parameter :: fractional_base ( nfnb ) = [( 1 0._wp ** ( - e ), e = 1 , nfnb )] real ( wp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 19 !! Maximum depth to read values on int_wp integer ( wp ) :: int_wp !! long integer to capture fractional part integer :: i_exp !! integer to capture whole number part integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number in a single integer pP = 127 int_wp = 0 do i = p , min ( maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then int_wp = int_wp * 10 + val else if ( val == period ) then pP = i else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then v = sign * int_wp * expbase ( exp_aux ) else v = sign * int_wp * 1 0._wp ** ( sige * i_exp - resp + 1 ) end if stat = 0 end subroutine #:if WITH_XDP elemental subroutine to_xdp_base ( s , v , p , stat ) integer , parameter :: wp = xdp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 50 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 64 !! number of fractional number factors integer :: e real ( wp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._wp ** ( nwnb - e ), e = 1 , nwnb )] real ( wp ), parameter :: fractional_base ( nfnb ) = [( 1 0._wp ** ( - e ), e = 1 , nfnb )] real ( wp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 19 !! Maximum depth to read values on int_dp integer ( dp ) :: int_dp1 , int_dp2 !! long integers to capture whole and fractional part integer :: i_exp !! integer to capture exponent number integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp , icount , aux !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number using two int64 values pP = 127 int_dp1 = 0 int_dp2 = 0 icount = 0 aux = 1 do i = p , min ( 2 * maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then icount = icount + 1 if ( icount <= maxdpt ) then int_dp1 = int_dp1 * 10 + val else if ( icount < 2 * maxdpt ) then int_dp2 = int_dp2 * 10 + val end if else if ( val == period ) then pP = i aux = 0 else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then if ( icount <= maxdpt ) then v = sign * int_dp1 * expbase ( exp_aux ) else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * expbase ( exp_aux - icount + maxdpt ) end if else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * 1 0._wp ** ( sige * i_exp - resp + maxdpt + aux ) end if stat = 0 end subroutine #:endif #:if WITH_QP elemental subroutine to_qp_base ( s , v , p , stat ) integer , parameter :: wp = qp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 50 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 64 !! number of fractional number factors integer :: e real ( wp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._wp ** ( nwnb - e ), e = 1 , nwnb )] real ( wp ), parameter :: fractional_base ( nfnb ) = [( 1 0._wp ** ( - e ), e = 1 , nfnb )] real ( wp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 19 !! Maximum depth to read values on int_dp integer ( dp ) :: int_dp1 , int_dp2 !! long integers to capture whole and fractional part integer :: i_exp !! integer to capture exponent number integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp , icount , aux !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number using two int64 values pP = 127 int_dp1 = 0 int_dp2 = 0 icount = 0 aux = 1 do i = p , min ( 2 * maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then icount = icount + 1 if ( icount <= maxdpt ) then int_dp1 = int_dp1 * 10 + val else if ( icount < 2 * maxdpt ) then int_dp2 = int_dp2 * 10 + val end if else if ( val == period ) then pP = i aux = 0 else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then if ( icount <= maxdpt ) then v = sign * int_dp1 * expbase ( exp_aux ) else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * expbase ( exp_aux - icount + maxdpt ) end if else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * 1 0._wp ** ( sige * i_exp - resp + maxdpt + aux ) end if stat = 0 end subroutine #:endif !--------------------------------------------- ! Internal Utility functions !--------------------------------------------- elemental function shift_to_nonwhitespace ( s ) result ( p ) !! move string to position of the next non white space character character ( * ), intent ( in ) :: s !! character chain integer ( int8 ) :: p !! position !---------------------------------------------- p = 1 do while ( p < len ( s ) . and . ( iachar ( s ( p : p )) == WS . or . iachar ( s ( p : p )) == LF . or . iachar ( s ( p : p )) == CR ) ) p = p + 1 end do end function elemental function shift_to_whitespace ( s ) result ( p ) !! move string to position of the next white space character character ( * ), intent ( in ) :: s !! character chain integer ( int8 ) :: p !! position !---------------------------------------------- p = 1 do while ( p < len ( s ) . and . . not .( iachar ( s ( p : p )) == WS . or . iachar ( s ( p : p )) == LF . or . iachar ( s ( p : p )) == CR ) ) p = p + 1 end do end function end module stdlib_str2num","tags":"","loc":"sourcefile/stdlib_str2num.fypp.html"},{"title":"stdlib_ansi_operator.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Implementation of the conversion to enumerator and identifier types to strings submodule ( stdlib_ansi ) stdlib_ansi_operator use stdlib_string_type , only : operator ( // ) implicit none contains !> Add two escape sequences, attributes in the right value override the left value ones. pure module function add ( lval , rval ) result ( code ) !> First escape code type ( ansi_code ), intent ( in ) :: lval !> Second escape code type ( ansi_code ), intent ( in ) :: rval !> Combined escape code type ( ansi_code ) :: code code % style = merge ( rval % style , lval % style , rval % style >= 0 ) code % fg = merge ( rval % fg , lval % fg , rval % fg >= 0 ) code % bg = merge ( rval % bg , lval % bg , rval % bg >= 0 ) end function add !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left ( lval , code ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str str = lval // to_string ( code ) end function concat_left !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right ( code , rval ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str str = to_string ( code ) // rval end function concat_right !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left_str ( lval , code ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str str = lval // to_string ( code ) end function concat_left_str !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right_str ( code , rval ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str str = to_string ( code ) // rval end function concat_right_str end submodule stdlib_ansi_operator","tags":"","loc":"sourcefile/stdlib_ansi_operator.f90.html"},{"title":"stdlib_stats_median.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set IR_KINDS_TYPES_OUTPUT = list(zip(INT_KINDS,INT_TYPES, ['dp']*len(INT_KINDS))) + list(zip(REAL_KINDS, REAL_TYPES, REAL_KINDS)) submodule ( stdlib_stats ) stdlib_stats_median use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan , ieee_is_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval use stdlib_selection , only : select implicit none contains # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median_all\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res integer ( kind = int64 ) :: c , n ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if (. not . optval ( mask , . true .) . or . size ( x ) == 0 ) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x ))) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if # : endif n = size ( x , kind = int64 ) c = floor ( ( n + 1 ) / 2. _${ o1 }$ , kind = int64 ) x_tmp = reshape ( x , [ n ]) call select ( x_tmp , c , val ) if ( mod ( n , 2_int64 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) !instead of call select(x_tmp, c+1, val1, left = c) # : if t1 [ 0 ] == 'r' res = ( val + val1 ) / 2. _${ o1 }$ # : else res = ( real ( val , kind = ${ o1 }$ ) + & real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else res = val end if end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: c , n # : if rank > 1 # : for fj in range ( 1 , rank + 1 ) integer :: j$ { fj }$ # : endfor # : endif ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if (. not . optval ( mask , . true .) . or . size ( x ) == 0 ) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if n = size ( x , dim ) c = floor ( ( n + 1 ) / 2. _${ o1 }$ ) allocate ( x_tmp ( n )) select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) ! Loop over every dimension of the array except \"dim\" # : for fj in list ( range ( 1 , fi )) + list ( range ( fi + 1 , rank + 1 )) do j$ { fj }$ = 1 , size ( x , ${ fj }$ ) # : endfor x_tmp (:) = x$ { select_subvector ( 'j' , rank , fi ) }$ # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x_tmp ))) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) # : if fi == 1 return # : else cycle # : endif end if # : endif call select ( x_tmp , c , val ) if ( mod ( n , 2 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & # : if t1 [ 0 ] == 'r' ( val + val1 ) / 2. _${ o1 }$ # : else ( real ( val , kind = ${ o1 }$ ) + real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else res$ { reduce_subvector ( 'j' , rank , fi ) }$ = val end if # : for fj in range ( 1 , rank ) end do # : endfor # : endfor case default call error_stop ( \"ERROR (median): wrong dimension\" ) end select end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_all_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res integer ( kind = int64 ) :: c , n ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if ( any ( shape ( x ) . ne . shape ( mask ))) then call error_stop ( \"ERROR (median): shapes of x and mask are different\" ) end if # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x ))) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if # : endif x_tmp = pack ( x , mask ) n = size ( x_tmp , kind = int64 ) if ( n == 0 ) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if c = floor ( ( n + 1 ) / 2. _${ o1 }$ , kind = int64 ) call select ( x_tmp , c , val ) if ( mod ( n , 2_int64 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) # : if t1 [ 0 ] == 'r' res = ( val + val1 ) / 2. _${ o1 }$ # : else res = ( real ( val , kind = ${ o1 }$ ) + real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else if ( mod ( n , 2_int64 ) == 1 ) then res = val end if end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer ( kind = int64 ) :: c , n # : if rank > 1 # : for fj in range ( 1 , rank + 1 ) integer :: j$ { fj }$ # : endfor # : endif ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if ( any ( shape ( x ) . ne . shape ( mask ))) then call error_stop ( \"ERROR (median): shapes of x and mask are different\" ) end if select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) ! Loop over every dimension of the array except \"dim\" # : for fj in list ( range ( 1 , fi )) + list ( range ( fi + 1 , rank + 1 )) do j$ { fj }$ = 1 , size ( x , ${ fj }$ ) # : endfor x_tmp = pack ( x$ { select_subvector ( 'j' , rank , fi ) }$ , & mask$ { select_subvector ( 'j' , rank , fi ) }$ ) # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x_tmp ))) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) # : if rank == 1 return # : else cycle # : endif end if # : endif n = size ( x_tmp , kind = int64 ) if ( n == 0 ) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if c = floor ( ( n + 1 ) / 2. _${ o1 }$ , kind = int64 ) call select ( x_tmp , c , val ) if ( mod ( n , 2_int64 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & # : if t1 [ 0 ] == 'r' ( val + val1 ) / 2. _${ o1 }$ # : else ( real ( val , kind = ${ o1 }$ ) + real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else if ( mod ( n , 2_int64 ) == 1 ) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = val end if deallocate ( x_tmp ) # : for fj in range ( 1 , rank ) end do # : endfor # : endfor case default call error_stop ( \"ERROR (median): wrong dimension\" ) end select end function ${ name }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_median.fypp.html"},{"title":"stdlib_string_type_constructor.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_string_type ) stdlib_string_type_constructor use stdlib_strings , only : to_string contains !> Constructor for new string instances from a scalar character value. elemental module function new_string ( string ) result ( new ) character ( len =* ), intent ( in ), optional :: string type ( string_type ) :: new if ( present ( string )) then new % raw = string end if end function new_string # : for kind in INT_KINDS !> Constructor for new string instances from an integer of kind ${kind}$. elemental module function new_string_from_integer_$ { kind }$ ( val ) result ( new ) integer ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new new % raw = to_string ( val ) end function new_string_from_integer_$ { kind }$ # : endfor # : for kind in LOG_KINDS !> Constructor for new string instances from a logical of kind ${kind}$. elemental module function new_string_from_logical_$ { kind }$ ( val ) result ( new ) logical ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new new % raw = to_string ( val ) end function new_string_from_logical_$ { kind }$ # : endfor end submodule stdlib_string_type_constructor","tags":"","loc":"sourcefile/stdlib_string_type_constructor.fypp.html"},{"title":"stdlib_codata_type.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS = REAL_KINDS module stdlib_codata_type !! Codata constant type !! ([Specification](../page/specs/stdlib_constants.html)) use stdlib_kinds , only : #{ for k in KINDS [: - 1 ] }#${ k }$ , #{ endfor }#${ KINDS [ - 1 ] }$ use stdlib_io , only : FMT_REAL_DP use stdlib_optval , only : optval private type , public :: codata_constant_type !! version: experimental !! !! Derived type for representing a Codata constant. !! ([Specification](../page/specs/stdlib_constants.html)) character ( len = 64 ) :: name real ( dp ) :: value real ( dp ) :: uncertainty character ( len = 32 ) :: unit contains procedure :: print # : for k in KINDS procedure :: to_real_$ { k }$ # : endfor generic :: to_real => #{ for k in KINDS [: - 1 ] }# to_real_$ { k }$ , #{ endfor }# to_real_$ { KINDS [ - 1 ] }$ end type interface to_real !! Get the constant value or uncertainty. # : for k in KINDS module procedure to_real_$ { k }$ # : endfor end interface public :: to_real contains subroutine print ( self ) !! Print out the constant's name, value, uncertainty and unit. class ( codata_constant_type ), intent ( in ) :: self print \"(A64, SP, \" // FMT_REAL_DP // \", A5, \" // FMT_REAL_DP // \", 1X, A32)\" , self % name , self % value , \"+/-\" , self % uncertainty , self % unit end subroutine #:for k in KINDS elemental pure real ( ${ k }$ ) function to_real_$ { k }$ ( self , mold , uncertainty ) result ( r ) !! version: experimental !! !! Get the constant value or uncertainty for the kind ${k}$ !! ([Specification](../page/specs/stdlib_constants.html)) class ( codata_constant_type ), intent ( in ) :: self !! Codata constant real ( ${ k }$ ), intent ( in ) :: mold !! dummy argument to disambiguate at compile time the generic interface logical , intent ( in ), optional :: uncertainty !! Set to true if the uncertainty is required. Default to .false.. !! logical :: u u = optval ( uncertainty , . false .) if ( u . eqv . . false .) then r = real ( self % value , kind ( mold )) else r = real ( self % uncertainty , kind ( mold )) end if end function #:endfor end module stdlib_codata_type","tags":"","loc":"sourcefile/stdlib_codata_type.fypp.html"},{"title":"stdlib_specialfunctions_legendre.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_specialfunctions ) stdlib_specialfunctions_legendre implicit none contains ! derivatives of legegendre polynomials ! unspecified behaviour if n is negative pure elemental module function dlegendre_fp64 ( n , x ) result ( dleg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: dleg select case ( n ) case ( 0 ) dleg = 0 case ( 1 ) dleg = 1 case default block real ( dp ) :: leg_down1 , leg_down2 , leg real ( dp ) :: dleg_down1 , dleg_down2 integer :: i leg_down1 = x dleg_down1 = 1 leg_down2 = 1 dleg_down2 = 0 do i = 2 , n leg = ( 2 * i - 1 ) * x * leg_down1 / i - ( i - 1 ) * leg_down2 / i dleg = dleg_down2 + ( 2 * i - 1 ) * leg_down1 leg_down2 = leg_down1 leg_down1 = leg dleg_down2 = dleg_down1 dleg_down1 = dleg end do end block end select end function ! legegendre polynomials ! unspecified behaviour if n is negative pure elemental module function legendre_fp64 ( n , x ) result ( leg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: leg select case ( n ) case ( 0 ) leg = 1 case ( 1 ) leg = x case default block real ( dp ) :: leg_down1 , leg_down2 integer :: i leg_down1 = x leg_down2 = 1 do i = 2 , n leg = ( 2 * i - 1 ) * x * leg_down1 / i - ( i - 1 ) * leg_down2 / i leg_down2 = leg_down1 leg_down1 = leg end do end block end select end function end submodule","tags":"","loc":"sourcefile/stdlib_specialfunctions_legendre.f90.html"},{"title":"stdlib_quadrature_trapz.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_quadrature ) stdlib_quadrature_trapz use stdlib_error , only : check implicit none contains # : for KIND in REAL_KINDS pure module function trapz_dx_$ { KIND }$ ( y , dx ) result ( integral ) real ( ${ KIND }$ ), dimension (:), intent ( in ) :: y real ( ${ KIND }$ ), intent ( in ) :: dx real ( ${ KIND }$ ) :: integral integer :: n n = size ( y ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ KIND }$ case ( 2 ) integral = 0.5 _${ KIND }$ * dx * ( y ( 1 ) + y ( 2 )) case default integral = dx * ( sum ( y ( 2 : n - 1 )) + 0.5 _${ KIND }$ * ( y ( 1 ) + y ( n ))) end select end function trapz_dx_$ { KIND }$ # : endfor # : for KIND in REAL_KINDS module function trapz_x_$ { KIND }$ ( y , x ) result ( integral ) real ( ${ KIND }$ ), dimension (:), intent ( in ) :: y real ( ${ KIND }$ ), dimension (:), intent ( in ) :: x real ( ${ KIND }$ ) :: integral integer :: i integer :: n n = size ( y ) call check ( size ( x ) == n , \"trapz: Arguments `x` and `y` must be the same size.\" ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ KIND }$ case ( 2 ) integral = 0.5 _${ KIND }$ * ( x ( 2 ) - x ( 1 )) * ( y ( 1 ) + y ( 2 )) case default integral = 0.0 _${ KIND }$ do i = 2 , n integral = integral + ( x ( i ) - x ( i - 1 )) * ( y ( i ) + y ( i - 1 )) end do integral = 0.5 _${ KIND }$ * integral end select end function trapz_x_$ { KIND }$ # : endfor # : for KIND in REAL_KINDS pure module function trapz_weights_$ { KIND }$ ( x ) result ( w ) real ( ${ KIND }$ ), dimension (:), intent ( in ) :: x real ( ${ KIND }$ ), dimension ( size ( x )) :: w integer :: i integer :: n n = size ( x ) select case ( n ) case ( 0 ) ! no action needed case ( 1 ) w ( 1 ) = 0.0 _${ KIND }$ case ( 2 ) w = 0.5 _${ KIND }$ * ( x ( 2 ) - x ( 1 )) case default w ( 1 ) = 0.5 _${ KIND }$ * ( x ( 2 ) - x ( 1 )) w ( n ) = 0.5 _${ KIND }$ * ( x ( n ) - x ( n - 1 )) do i = 2 , size ( x ) - 1 w ( i ) = 0.5 _${ KIND }$ * ( x ( i + 1 ) - x ( i - 1 )) end do end select end function trapz_weights_$ { KIND }$ #:endfor end submodule stdlib_quadrature_trapz","tags":"","loc":"sourcefile/stdlib_quadrature_trapz.fypp.html"},{"title":"stdlib_sorting_sort_index.fypp – Fortran-lang/stdlib","text":"This file is subjec† both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The generic subroutine, SORT_INDEX , is substantially a translation to\nFortran 2008 of the \"Rust\" sort sorting routines in slice.rs The rust sort implementation is distributed with the header: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\n file at the top-level directory of this distribution and at\n http://rust-lang.org/COPYRIGHT. Licensed under the Apache License, Version 2.0 or the MIT license , at your\n option. This file may not be copied, modified, or distributed\n except according to those terms. so the license for the original slice.rs code is compatible with the use\nof modified versions of the code in the Fortran Standard Library under\nthe MIT license. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=:)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #:set INT_INDEX_TYPES_ALT_NAME = list(zip([\"int_index\", \"int_index_low\"], [\"integer(int_index)\", \"integer(int_index_low)\"], [\"default\", \"low\"])) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME !! Licensing: !! !! This file is subjec† both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! The generic subroutine, `SORT_INDEX`, is substantially a translation to !! Fortran 2008 of the `\"Rust\" sort` sorting routines in !! [`slice.rs`](https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs) !! The `rust sort` implementation is distributed with the header: !! !! Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT !! file at the top-level directory of this distribution and at !! http://rust-lang.org/COPYRIGHT. !! !! Licensed under the Apache License, Version 2.0 or the MIT license !! , at your !! option. This file may not be copied, modified, or distributed !! except according to those terms. !! !! so the license for the original`slice.rs` code is compatible with the use !! of modified versions of the code in the Fortran Standard Library under !! the MIT license. submodule ( stdlib_sorting ) stdlib_sorting_sort_index implicit none contains #:for ki, ti, namei in INT_INDEX_TYPES_ALT_NAME # : for t1 , t2 , t3 , name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ sort_index_$ { namei }$ ( array , index , work , iwork , reverse ) ! A modification of `${name1}$_ord_sort` to return an array of indices that ! would perform a stable sort of the `ARRAY` as input, and also sort `ARRAY` ! as desired. The indices by default ! correspond to a non-decreasing sort, but if the optional argument ! `REVERSE` is present with a value of `.TRUE.` the indices correspond to ! a non-increasing sort. The logic of the determination of indexing largely ! follows the `\"Rust\" sort` found in `slice.rs`: ! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159 ! The Rust version is a simplification of the Timsort algorithm described ! in https://svn.python.org/projects/python/trunk/Objects/listsort.txt, as ! it drops both the use of 'galloping' to identify bounds of regions to be ! sorted and the estimation of the optimal `run size`. However it remains ! a hybrid sorting algorithm combining an iterative Merge sort controlled ! by a stack of `RUNS` identified by regions of uniformly decreasing or ! non-decreasing sequences that may be expanded to a minimum run size, with ! an insertion sort. ! ! Note the Fortran implementation simplifies the logic as it only has to ! deal with Fortran arrays of intrinsic types and not the full generality ! of Rust's arrays and lists for arbitrary types. It also adds the ! estimation of the optimal `run size` as suggested in Tim Peters' ! original listsort.txt, and the optional `work` and `iwork` arrays to be ! used as scratch memory. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( out ) :: index ( 0 :) ${ t3 }$ , intent ( out ), optional :: work ( 0 :) ${ ti }$ , intent ( out ), optional :: iwork ( 0 :) logical , intent ( in ), optional :: reverse ${ ti }$ :: array_size , i , stat ${ t2 }$ , allocatable :: buf (:) ${ ti }$ , allocatable :: ibuf (:) if ( size ( array , kind = int_index ) > huge ( 1 _${ ki }$ ) ) then error stop \"Too many entries for the kind of index.\" end if array_size = size ( array , kind = ${ ki }$ ) if ( size ( index , kind = ${ ki }$ ) < array_size ) then error stop \"index array is too small.\" end if do i = 0 , array_size - 1 index ( i ) = i + 1 end do if ( optval ( reverse , . false .) ) then call reverse_segment ( array , index ) end if ! If necessary allocate buffers to serve as scratch memory. if ( present ( work ) ) then if ( size ( work , kind = ${ ki }$ ) < array_size / 2 ) then error stop \"work array is too small.\" end if if ( present ( iwork ) ) then if ( size ( iwork , kind = ${ ki }$ ) < array_size / 2 ) then error stop \"iwork array is too small.\" endif call merge_sort ( array , index , work , iwork ) else allocate ( ibuf ( 0 : array_size / 2 - 1 ), stat = stat ) if ( stat /= 0 ) error stop \"Allocation of index buffer failed.\" call merge_sort ( array , index , work , ibuf ) end if else # : if t1 [ 0 : 4 ] == \"char\" allocate ( ${ t3 }$ :: buf ( 0 : array_size / 2 - 1 ), & stat = stat ) # : else allocate ( buf ( 0 : array_size / 2 - 1 ), stat = stat ) # : endif if ( stat /= 0 ) error stop \"Allocation of array buffer failed.\" if ( present ( iwork ) ) then if ( size ( iwork , kind = ${ ki }$ ) < array_size / 2 ) then error stop \"iwork array is too small.\" endif call merge_sort ( array , index , buf , iwork ) else allocate ( ibuf ( 0 : array_size / 2 - 1 ), stat = stat ) if ( stat /= 0 ) error stop \"Allocation of index buffer failed.\" call merge_sort ( array , index , buf , ibuf ) end if end if if ( optval ( reverse , . false .) ) then call reverse_segment ( array , index ) end if contains pure function calc_min_run ( n ) result ( min_run ) !! Returns the minimum length of a run from 32-63 so that N/MIN_RUN is !! less than or equal to a power of two. See !! https://svn.python.org/projects/python/trunk/Objects/listsort.txt ${ ti }$ :: min_run ${ ti }$ , intent ( in ) :: n ${ ti }$ :: num , r num = n r = 0 _${ ki }$ do while ( num >= 64 ) r = ior ( r , iand ( num , 1 _${ ki }$ ) ) num = ishft ( num , - 1 _${ ki }$ ) end do min_run = num + r end function calc_min_run pure subroutine insertion_sort ( array , index ) ! Sorts `ARRAY` using an insertion sort, while maintaining consistency in ! location of the indices in `INDEX` to the elements of `ARRAY`. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ ti }$ :: i , j , key_index ${ t3 }$ :: key do j = 1 , size ( array , kind = ${ ki }$ ) - 1 key = array ( j ) key_index = index ( j ) i = j - 1 do while ( i >= 0 ) if ( array ( i ) <= key ) exit array ( i + 1 ) = array ( i ) index ( i + 1 ) = index ( i ) i = i - 1 end do array ( i + 1 ) = key index ( i + 1 ) = key_index end do end subroutine insertion_sort pure function collapse ( runs ) result ( r ) ! Examine the stack of runs waiting to be merged, identifying adjacent runs ! to be merged until the stack invariants are restablished: ! ! 1. len(-3) > len(-2) + len(-1) ! 2. len(-2) > len(-1) ${ ti }$ :: r type ( run_type_$ { namei }$ ), intent ( in ), target :: runs ( 0 :) ${ ti }$ :: n logical :: test n = size ( runs , kind = ${ ki }$ ) test = . false . if ( n >= 2 ) then if ( runs ( n - 1 ) % base == 0 . or . & runs ( n - 2 ) % len <= runs ( n - 1 ) % len ) then test = . true . else if ( n >= 3 ) then ! X exists if ( runs ( n - 3 ) % len <= & runs ( n - 2 ) % len + runs ( n - 1 ) % len ) then test = . true . ! |X| <= |Y| + |Z| => will need to merge due to rho1 or rho2 else if ( n >= 4 ) then if ( runs ( n - 4 ) % len <= & runs ( n - 3 ) % len + runs ( n - 2 ) % len ) then test = . true . ! |W| <= |X| + |Y| => will need to merge due to rho1 or rho3 end if end if end if end if if ( test ) then ! By default merge Y & Z, rho2 or rho3 if ( n >= 3 ) then if ( runs ( n - 3 ) % len < runs ( n - 1 ) % len ) then r = n - 3 ! |X| < |Z| => merge X & Y, rho1 return end if end if r = n - 2 ! |Y| <= |Z| => merge Y & Z, rho4 return else r = - 1 end if end function collapse pure subroutine insert_head ( array , index ) ! Inserts `array(0)` into the pre-sorted sequence `array(1:)` so that the ! whole `array(0:)` becomes sorted, copying the first element into ! a temporary variable, iterating until the right place for it is found. ! copying every traversed element into the slot preceding it, and finally, ! copying data from the temporary variable into the resulting hole. ! Consistency of the indices in `index` with the elements of `array` ! are maintained. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ t3 }$ :: tmp ${ ti }$ :: i , tmp_index tmp = array ( 0 ) tmp_index = index ( 0 ) find_hole : do i = 1 , size ( array , kind = ${ ki }$ ) - 1 if ( array ( i ) >= tmp ) exit find_hole array ( i - 1 ) = array ( i ) index ( i - 1 ) = index ( i ) end do find_hole array ( i - 1 ) = tmp index ( i - 1 ) = tmp_index end subroutine insert_head subroutine merge_sort ( array , index , buf , ibuf ) ! The Rust merge sort borrows some (but not all) of the ideas from TimSort, ! which is described in detail at ! (http://svn.python.org/projects/python/trunk/Objects/listsort.txt). ! ! The algorithm identifies strictly descending and non-descending ! subsequences, which are called natural runs. Where these runs are less ! than a minimum run size they are padded by adding additional samples ! using an insertion sort. The merge process is driven by a stack of ! pending unmerged runs. Each newly found run is pushed onto the stack, ! and then pairs of adjacentd runs are merged until these two invariants ! are satisfied: ! ! 1. for every `i` in `1..size(runs)-1`: `runs(i - 1)%len > runs(i)%len` ! 2. for every `i` in `2..size(runs)-1`: `runs(i - 2)%len > ! runs(i - 1)%len + runs(i)%len` ! ! The invariants ensure that the total running time is `O(n log n)` ! worst-case. Consistency of the indices in `index` with the elements of ! `array` are maintained. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ t3 }$ , intent ( inout ) :: buf ( 0 :) ${ ti }$ , intent ( inout ) :: ibuf ( 0 :) ${ ti }$ :: array_size , finish , min_run , r , r_count , & start type ( run_type_$ { namei }$ ) :: runs ( 0 : max_merge_stack - 1 ), left , right array_size = size ( array , kind = ${ ki }$ ) ! Very short runs are extended using insertion sort to span at least this ! many elements. Slices of up to this length are sorted using insertion sort. min_run = calc_min_run ( array_size ) if ( array_size <= min_run ) then if ( array_size >= 2 ) call insertion_sort ( array , index ) return end if ! Following Rust sort, natural runs in `array` are identified by traversing ! it backwards. By traversing it backward, merges more often go in the ! opposite direction (forwards). According to developers of Rust sort, ! merging forwards is slightly faster than merging backwards. Therefore ! identifying runs by traversing backwards should improve performance. r_count = 0 finish = array_size - 1 do while ( finish >= 0 ) ! Find the next natural run, and reverse it if it's strictly descending. start = finish if ( start > 0 ) then start = start - 1 if ( array ( start + 1 ) < array ( start ) ) then Descending : do while ( start > 0 ) if ( array ( start ) >= array ( start - 1 ) ) & exit Descending start = start - 1 end do Descending call reverse_segment ( array ( start : finish ), & index ( start : finish ) ) else Ascending : do while ( start > 0 ) if ( array ( start ) < array ( start - 1 ) ) exit Ascending start = start - 1 end do Ascending end if end if ! If the run is too short insert some more elements using an insertion sort. Insert : do while ( start > 0 ) if ( finish - start >= min_run - 1 ) exit Insert start = start - 1 call insert_head ( array ( start : finish ), index ( start : finish ) ) end do Insert if ( start == 0 . and . finish == array_size - 1 ) return runs ( r_count ) = run_type_$ { namei }$ ( base = start , & len = finish - start + 1 ) finish = start - 1 r_count = r_count + 1 ! Determine whether pairs of adjacent runs need to be merged to satisfy ! the invariants, and, if so, merge them. Merge_loop : do r = collapse ( runs ( 0 : r_count - 1 ) ) if ( r < 0 . or . r_count <= 1 ) exit Merge_loop left = runs ( r + 1 ) right = runs ( r ) call merge ( array ( left % base : & right % base + right % len - 1 ), & left % len , buf , & index ( left % base : & right % base + right % len - 1 ), ibuf ) runs ( r ) = run_type_$ { namei }$ ( base = left % base , & len = left % len + right % len ) if ( r == r_count - 3 ) runs ( r + 1 ) = runs ( r + 2 ) r_count = r_count - 1 end do Merge_loop end do if ( r_count /= 1 ) & error stop \"MERGE_SORT completed without RUN COUNT == 1.\" end subroutine merge_sort pure subroutine merge ( array , mid , buf , index , ibuf ) ! Merges the two non-decreasing runs `ARRAY(0:MID-1)` and `ARRAY(MID:)` ! using `BUF` as temporary storage, and stores the merged runs into ! `ARRAY(0:)`. `MID` must be > 0, and < `SIZE(ARRAY)-1`. Buffer `BUF` ! must be long enough to hold the shorter of the two runs. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( in ) :: mid ${ t3 }$ , intent ( inout ) :: buf ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ ti }$ , intent ( inout ) :: ibuf ( 0 :) ${ ti }$ :: array_len , i , j , k array_len = size ( array , kind = ${ ki }$ ) ! Merge first copies the shorter run into `buf`. Then, depending on which ! run was shorter, it traces the copied run and the longer run forwards ! (or backwards), comparing their next unprocessed elements and then ! copying the lesser (or greater) one into `array`. if ( mid <= array_len - mid ) then ! The left run is shorter. buf ( 0 : mid - 1 ) = array ( 0 : mid - 1 ) ibuf ( 0 : mid - 1 ) = index ( 0 : mid - 1 ) i = 0 j = mid merge_lower : do k = 0 , array_len - 1 if ( buf ( i ) <= array ( j ) ) then array ( k ) = buf ( i ) index ( k ) = ibuf ( i ) i = i + 1 if ( i >= mid ) exit merge_lower else array ( k ) = array ( j ) index ( k ) = index ( j ) j = j + 1 if ( j >= array_len ) then array ( k + 1 :) = buf ( i : mid - 1 ) index ( k + 1 :) = ibuf ( i : mid - 1 ) exit merge_lower end if end if end do merge_lower else ! The right run is shorter buf ( 0 : array_len - mid - 1 ) = array ( mid : array_len - 1 ) ibuf ( 0 : array_len - mid - 1 ) = index ( mid : array_len - 1 ) i = mid - 1 j = array_len - mid - 1 merge_upper : do k = array_len - 1 , 0 , - 1 if ( buf ( j ) >= array ( i ) ) then array ( k ) = buf ( j ) index ( k ) = ibuf ( j ) j = j - 1 if ( j < 0 ) exit merge_upper else array ( k ) = array ( i ) index ( k ) = index ( i ) i = i - 1 if ( i < 0 ) then array ( 0 : k - 1 ) = buf ( 0 : j ) index ( 0 : k - 1 ) = ibuf ( 0 : j ) exit merge_upper end if end if end do merge_upper end if end subroutine merge pure subroutine reverse_segment ( array , index ) ! Reverse a segment of an array in place ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ ti }$ :: itemp , lo , hi ${ t3 }$ :: temp lo = 0 hi = size ( array , kind = ${ ki }$ ) - 1 do while ( lo < hi ) temp = array ( lo ) array ( lo ) = array ( hi ) array ( hi ) = temp itemp = index ( lo ) index ( lo ) = index ( hi ) index ( hi ) = itemp lo = lo + 1 hi = hi - 1 end do end subroutine reverse_segment end subroutine ${ name1 }$_ sort_index_$ { namei }$ # : endfor #:endfor end submodule stdlib_sorting_sort_index","tags":"","loc":"sourcefile/stdlib_sorting_sort_index.fypp.html"},{"title":"stdlib_hashmaps.f90 – Fortran-lang/stdlib","text":"The module, STDLIB_HASH_MAPS, implements two hash maps:\nCHAINING_HASH_MAP_TYPE, a separate chaining hash map; and OPEN_HASH_MAP_TYPE,\nan open addressing hash map using linear addressing. The two hash maps are\nimplementations of the abstract type, HASH_MAP_TYPE. Source Code !! The module, STDLIB_HASH_MAPS, implements two hash maps: !! CHAINING_HASH_MAP_TYPE, a separate chaining hash map; and OPEN_HASH_MAP_TYPE, !! an open addressing hash map using linear addressing. The two hash maps are !! implementations of the abstract type, HASH_MAP_TYPE. module stdlib_hashmaps use , intrinsic :: iso_fortran_env , only : & character_storage_size , & error_unit use stdlib_kinds , only : & dp , & int8 , & int16 , & int32 , & int64 use stdlib_hashmap_wrappers implicit none private !! Public data_types public :: & chaining_hashmap_type , & hashmap_type , & open_hashmap_type !! Values that parameterize David Chase's empirical SLOT expansion code integer , parameter :: & inmap_probe_factor = 10 , & map_probe_factor = 5 !! Values that parameterize the SLOTS table size integer , parameter , public :: & default_bits = 6 , & max_bits = 30 !! KIND values used to parameterixe the hash map and its procedures integer , parameter , public :: & int_calls = int64 , & int_depth = int64 , & int_index = int32 , & int_probes = int64 !! Error codes returned by the hash map procedures integer , parameter , public :: & success = 0 , & alloc_fault = 1 , & array_size_error = 2 ! The number of bits used by various types integer , parameter :: & ! Should be 8 int8_bits = bit_size ( 0_int8 ), & char_bits = character_storage_size !! The hash map load factor real , parameter , public :: & load_factor = 0.5625 !! The size of the pools of allocated map entries integer ( int32 ), parameter :: pool_size = 64 character ( * ), parameter , private :: module_name = 'STDLIB_HASHMAPS' type , abstract :: hashmap_type !! Version: Experimental !! !! Type implementing an abstract hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-hashmap_type-abstract-type)) private integer ( int_calls ) :: call_count = 0 !! Number of calls integer ( int_calls ) :: probe_count = 0 !! Number of probes since last expansion integer ( int_calls ) :: total_probes = 0 !! Cumulative number of probes integer ( int_index ) :: num_entries = 0 !! Number of entries integer ( int_index ) :: num_free = 0 !! Number of elements in the free_list integer ( int32 ) :: nbits = default_bits !! Number of bits used to address the slots procedure ( hasher_fun ), pointer , nopass :: hasher => fnv_1_hasher !! Hash function contains procedure , non_overridable , pass ( map ) :: calls procedure , non_overridable , pass ( map ) :: entries procedure , non_overridable , pass ( map ) :: map_probes procedure , non_overridable , pass ( map ) :: num_slots procedure , non_overridable , pass ( map ) :: slots_bits procedure ( get_all_keys ), deferred , pass ( map ) :: get_all_keys procedure ( get_other ), deferred , pass ( map ) :: get_other_data procedure ( init_map ), deferred , pass ( map ) :: init procedure ( key_test ), deferred , pass ( map ) :: key_test procedure ( loading ), deferred , pass ( map ) :: loading procedure ( map_entry ), deferred , pass ( map ) :: map_entry procedure ( rehash_map ), deferred , pass ( map ) :: rehash procedure ( remove_entry ), deferred , pass ( map ) :: remove procedure ( set_other ), deferred , pass ( map ) :: set_other_data procedure ( total_depth ), deferred , pass ( map ) :: total_depth end type hashmap_type abstract interface subroutine get_all_keys ( map , all_keys ) !! Version: Experimental !! !! Returns the all keys contained in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#get_all_keys-returns-all-the-keys-contained-in-a-map)) !! !! Arguments: !! map - a hash map !! all_keys - all the keys contained in a hash map ! import hashmap_type , key_type class ( hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) end subroutine get_all_keys subroutine get_other ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - a hash map !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! import hashmap_type , key_type , other_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists end subroutine get_other subroutine init_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a !! maximum of 2**MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots), !! map % inverse elements. All fields are initialized. !! Arguments: !! map - the hash maap to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the number of bits initially used to map to the slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits or max_bits is less than !! default_bits or greater than strict_max_bits !! real_value_error - load_factor is less than 0.375 or greater than !! 0.875 ! import hashmap_type , hasher_fun , int32 class ( hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status end subroutine init_map subroutine key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) !! !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a flag indicating whether key is present in the map ! import hashmap_type , key_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present end subroutine key_test pure function loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#loading-returns-the-ratio-of-entries-to-slots)) !! !! Arguments: !! map - a hash map import hashmap_type class ( hashmap_type ), intent ( in ) :: map real :: loading end function loading subroutine map_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) !! import hashmap_type , key_type , other_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict end subroutine map_entry subroutine rehash_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! import hashmap_type , hasher_fun class ( hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher end subroutine rehash_map subroutine remove_entry ( map , key , existed ) ! Chase's delent !! Version: Experimental !! !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! import hashmap_type , key_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed end subroutine remove_entry subroutine set_other ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map !! ! import hashmap_type , key_type , other_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists end subroutine set_other function total_depth ( map ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entriesyy from !! their slot index for a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#total_depth-returns-the-total-depth-of-the-hash-map-entries)) !! Arguments: !! map - a hash map import hashmap_type , int64 class ( hashmap_type ), intent ( in ) :: map integer ( int64 ) :: total_depth end function total_depth end interface !! API for the chaining_hashmap_type type :: chaining_map_entry_type ! Hash entry !! Version: Experimental !! !! Chaining hash map entry type !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type-derived-type)) private integer ( int_hash ) :: hash_val !! Full hash value type ( key_type ) :: key !! The entry's key type ( other_type ) :: other !! Other entry data integer ( int_index ) :: inmap !! Index into inverse table type ( chaining_map_entry_type ), pointer :: next => null () !! Next bucket end type chaining_map_entry_type type chaining_map_entry_ptr !! Version: Experimental !! !! Wrapper for a pointer to a chaining map entry type object !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type_ptr-derived-type)) type ( chaining_map_entry_type ), pointer :: target => null () end type chaining_map_entry_ptr type :: chaining_map_entry_pool !! Version: Experimental !! !! Type implementing a pool of allocated `chaining_map_entry_type` !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_pool-derived-type)) private ! Index of next bucket integer ( int_index ) :: next = 0 type ( chaining_map_entry_type ), allocatable :: more_map_entries (:) type ( chaining_map_entry_pool ), pointer :: lastpool => null () end type chaining_map_entry_pool type , extends ( hashmap_type ) :: chaining_hashmap_type !! Version: Experimental !! !! Type implementing the `chaining_hashmap_type` types !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_hashmap_type-derived-type)) private type ( chaining_map_entry_pool ), pointer :: cache => null () !! Pool of allocated chaining_map_entry_type objects type ( chaining_map_entry_type ), pointer :: free_list => null () !! free list of map entries type ( chaining_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) type ( chaining_map_entry_ptr ), allocatable :: slots (:) !! Array of bucket lists Note # slots=size(slots) contains procedure :: get_all_keys => get_all_chaining_keys procedure :: get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: loading => chaining_loading procedure :: map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map procedure :: remove => remove_chaining_entry procedure :: set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth procedure :: key_test => chaining_key_test final :: free_chaining_map end type chaining_hashmap_type interface module subroutine free_chaining_map ( map ) !! Version: Experimental !! !! Frees internal memory of an chaining map !! Arguments: !! map - the chaining hash map whose memory is to be freed ! type ( chaining_hashmap_type ), intent ( inout ) :: map end subroutine free_chaining_map module subroutine get_all_chaining_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hashmap !! Arguments: !! map - an chaining hash map !! all_keys - all the keys contained in a hash map ! class ( chaining_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) end subroutine get_all_chaining_keys module subroutine get_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - a chaining hash table !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists end subroutine get_other_chaining_data module subroutine init_chaining_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited !! to a maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the chaining hash map to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the bits of two used to initialize the number of slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bits or !! greater than max_bits ! class ( chaining_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status end subroutine init_chaining_map module subroutine chaining_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY is present in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a logical flag indicating whether key is present in map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present end subroutine chaining_key_test pure module function chaining_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - a chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map real :: chaining_loading end function chaining_loading module subroutine map_chain_entry ( map , key , other , conflict ) ! ! Inserts an entry innto the hash map ! Arguments: !! map - the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict end subroutine map_chain_entry module subroutine rehash_chaining_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( chaining_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher end subroutine rehash_chaining_map module subroutine remove_chaining_entry ( map , key , existed ) !! Version: Experimental !! !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed end subroutine remove_chaining_entry module subroutine set_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists end subroutine set_other_chaining_data module function total_chaining_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map integer ( int_depth ) :: total_depth end function total_chaining_depth end interface !! API for the open_hashmap_type type :: open_map_entry_type !! Version: Experimental !! !! Open hash map entry type !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_type-derived-type)) private integer ( int_hash ) :: hash_val !! Full hash value type ( key_type ) :: key !! Hash entry key type ( other_type ) :: other !! Other entry data integer ( int_index ) :: inmap !! Index into inverse table end type open_map_entry_type type :: open_map_entry_list !! Version: Experimental !! !! Open hash map entry type private type ( open_map_entry_type ), pointer :: target => null () type ( open_map_entry_list ), pointer :: next => null () end type open_map_entry_list type open_map_entry_ptr !! Version: Experimental !! !! Wrapper for a pointer to an open hash map entry type object !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_ptr-derived-type)) type ( open_map_entry_type ), pointer :: target => null () end type open_map_entry_ptr type :: open_map_entry_pool !! Version: Experimental !! !! Type implementing a pool of allocated `open_map_entry_type` private integer ( int_index ) :: next = 0 !! Index of next bucket type ( open_map_entry_type ), allocatable :: more_map_entries (:) type ( open_map_entry_pool ), pointer :: lastpool => null () end type open_map_entry_pool type , extends ( hashmap_type ) :: open_hashmap_type !! Version: Experimental !! !! Type implementing an \"open\" hash map private integer ( int_index ) :: index_mask = 2_int_index ** default_bits - 1 !! Mask used in linear addressing type ( open_map_entry_pool ), pointer :: cache => null () !! Pool of allocated open_map_entry_type objects type ( open_map_entry_list ), pointer :: free_list => null () !! free list of map entries type ( open_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) integer ( int_index ), allocatable :: slots (:) !! Array of indices to the inverse Note # slots=size(slots) contains procedure :: get_all_keys => get_all_open_keys procedure :: get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: loading => open_loading procedure :: map_entry => map_open_entry procedure :: rehash => rehash_open_map procedure :: remove => remove_open_entry procedure :: set_other_data => set_other_open_data procedure :: total_depth => total_open_depth procedure :: key_test => open_key_test final :: free_open_map end type open_hashmap_type interface module subroutine free_open_map ( map ) !! Version: Experimental !! !! Frees internal memory of an open map !! Arguments: !! map - the open hash map whose memory is to be freed ! type ( open_hashmap_type ), intent ( inout ) :: map end subroutine free_open_map module subroutine get_all_open_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hashmap !! Arguments: !! map - an open hash map !! all_keys - all the keys contained in a hash map ! class ( open_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) end subroutine get_all_open_keys module subroutine get_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - an open hash table !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists end subroutine get_other_open_data module subroutine init_open_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a !! maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the open hash maap to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the number of bits used to map to the slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bitd or !! greater than max_bits class ( open_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status end subroutine init_open_map module subroutine open_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a logical flag indicating whether KEY exists in the hash map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present end subroutine open_key_test pure module function open_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map real :: open_loading end function open_loading module subroutine map_open_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! Arguments: !! map - the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict end subroutine map_open_entry module subroutine rehash_open_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( open_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher end subroutine rehash_open_map module subroutine remove_open_entry ( map , key , existed ) !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed end subroutine remove_open_entry module subroutine set_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists end subroutine set_other_open_data module function total_open_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map integer ( int64 ) :: total_depth end function total_open_depth end interface contains pure function calls ( map ) !! Version: Experimental !! !! Returns the number of subroutine calls on an open hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#calls-returns-the-number-of-calls-on-the-hash-map)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_calls ) :: calls calls = map % call_count end function calls pure function entries ( map ) !! Version: Experimental !! !! Returns the number of entries in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#entries-returns-the-number-of-entries-in-the-hash-map)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_index ) :: entries entries = map % num_entries end function entries pure function map_probes ( map ) !! Version: Experimental !! !! Returns the total number of table probes on a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_probes-returns-the-number-of-hash-map-probes)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_calls ) :: map_probes map_probes = map % total_probes + map % probe_count end function map_probes pure function num_slots ( map ) !! Version: Experimental !! !! Returns the number of allocated slots in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#num_slots-returns-the-number-of-hash-map-slots)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_index ) :: num_slots num_slots = 2 ** map % nbits end function num_slots pure function slots_bits ( map ) !! Version: Experimental !! !! Returns the number of bits used to specify the number of allocated !! slots in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#slots_bits-returns-the-number-of-bits-used-to-address-the-hash-map-slots)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer :: slots_bits slots_bits = map % nbits end function slots_bits end module stdlib_hashmaps","tags":"","loc":"sourcefile/stdlib_hashmaps.f90.html"},{"title":"stdlib_linalg_diag.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_diag implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$ ( v ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) ${ t1 }$ :: res ( size ( v ), size ( v )) integer :: i res = 0 do i = 1 , size ( v ) res ( i , i ) = v ( i ) end do end function diag_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ k ( v , k ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) integer , intent ( in ) :: k ${ t1 }$ :: res ( size ( v ) + abs ( k ), size ( v ) + abs ( k )) integer :: i , sz sz = size ( v ) res = 0 if ( k > 0 ) then do i = 1 , sz res ( i , k + i ) = v ( i ) end do else if ( k < 0 ) then do i = 1 , sz res ( i + abs ( k ), i ) = v ( i ) end do else do i = 1 , sz res ( i , i ) = v ( i ) end do end if end function diag_$ { t1 [ 0 ] }{ k1 }$_ k # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) ${ t1 }$ :: res ( minval ( shape ( A ))) integer :: i do i = 1 , minval ( shape ( A )) res ( i ) = A ( i , i ) end do end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k ( A , k ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) integer , intent ( in ) :: k ${ t1 }$ :: res ( minval ( shape ( A )) - abs ( k )) integer :: i , sz sz = minval ( shape ( A )) - abs ( k ) if ( k > 0 ) then do i = 1 , sz res ( i ) = A ( i , k + i ) end do else if ( k < 0 ) then do i = 1 , sz res ( i ) = A ( i + abs ( k ), i ) end do else do i = 1 , sz res ( i ) = A ( i , i ) end do end if end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_linalg_diag.fypp.html"},{"title":"stdlib_linalg_blas_z.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_z use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c use stdlib_linalg_blas_d implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_zaxpy public :: stdlib_zcopy public :: stdlib_zdotc public :: stdlib_zdotu public :: stdlib_zdrot public :: stdlib_zdscal public :: stdlib_zgbmv public :: stdlib_zgemm public :: stdlib_zgemv public :: stdlib_zgerc public :: stdlib_zgeru public :: stdlib_zhbmv public :: stdlib_zhemm public :: stdlib_zhemv public :: stdlib_zher public :: stdlib_zher2 public :: stdlib_zher2k public :: stdlib_zherk public :: stdlib_zhpmv public :: stdlib_zhpr public :: stdlib_zhpr2 public :: stdlib_zrotg public :: stdlib_zscal public :: stdlib_zswap public :: stdlib_zsymm public :: stdlib_zsyr2k public :: stdlib_zsyrk public :: stdlib_ztbmv public :: stdlib_ztbsv public :: stdlib_ztpmv public :: stdlib_ztpsv public :: stdlib_ztrmm public :: stdlib_ztrmv public :: stdlib_ztrsm public :: stdlib_ztrsv ! 64-bit real constants real ( dp ), parameter , private :: negone = - 1.00_dp real ( dp ), parameter , private :: zero = 0.00_dp real ( dp ), parameter , private :: half = 0.50_dp real ( dp ), parameter , private :: one = 1.00_dp real ( dp ), parameter , private :: two = 2.00_dp real ( dp ), parameter , private :: three = 3.00_dp real ( dp ), parameter , private :: four = 4.00_dp real ( dp ), parameter , private :: eight = 8.00_dp real ( dp ), parameter , private :: ten = 1 0.00_dp ! 64-bit complex constants complex ( dp ), parameter , private :: czero = ( 0.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: chalf = ( 0.5_dp , 0.0_dp ) complex ( dp ), parameter , private :: cone = ( 1.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: cnegone = ( - 1.0_dp , 0.0_dp ) ! 64-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( dp ), parameter , private :: rradix = real ( radix ( zero ), dp ) real ( dp ), parameter , private :: ulp = epsilon ( zero ) real ( dp ), parameter , private :: eps = ulp * half real ( dp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( dp ), parameter , private :: safmax = one / safmin real ( dp ), parameter , private :: smlnum = safmin / ulp real ( dp ), parameter , private :: bignum = safmax * ulp real ( dp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( dp ), parameter , private :: rtmax = sqrt ( bignum ) ! 64-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( dp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( dp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( dp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( dp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure subroutine stdlib_zaxpy ( n , za , zx , incx , zy , incy ) !! ZAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( inout ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_dcabs1 ( za ) == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zy ( i ) + za * zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zy ( iy ) + za * zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zaxpy pure subroutine stdlib_zcopy ( n , zx , incx , zy , incy ) !! ZCOPY copies a vector, x, to a vector, y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( out ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zcopy pure complex ( dp ) function stdlib_zdotc ( n , zx , incx , zy , incy ) !! ZDOTC forms the dot product of two complex vectors !! ZDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotc = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( i )) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( ix )) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotc = ztemp return end function stdlib_zdotc pure complex ( dp ) function stdlib_zdotu ( n , zx , incx , zy , incy ) !! ZDOTU forms the dot product of two complex vectors !! ZDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotu = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + zx ( i ) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + zx ( ix ) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotu = ztemp return end function stdlib_zdotu pure subroutine stdlib_zdrot ( n , zx , incx , zy , incy , c , s ) !! Applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: c , s ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( dp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * zx ( i ) + s * zy ( i ) zy ( i ) = c * zy ( i ) - s * zx ( i ) zx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * zx ( ix ) + s * zy ( iy ) zy ( iy ) = c * zy ( iy ) - s * zx ( ix ) zx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zdrot pure subroutine stdlib_zdscal ( n , da , zx , incx ) !! ZDSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: cmplx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do end if return end subroutine stdlib_zdscal pure subroutine stdlib_zgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! ZGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_zgbmv pure subroutine stdlib_zgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zgemm pure subroutine stdlib_zgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_zgemv pure subroutine stdlib_zgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgerc pure subroutine stdlib_zgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgeru pure subroutine stdlib_zhbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! ZHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: real , conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhbmv pure subroutine stdlib_zhemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = dp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zhemm pure subroutine stdlib_zhemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhemv pure subroutine stdlib_zher ( uplo , n , alpha , x , incx , a , lda ) !! ZHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_zher pure subroutine stdlib_zher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! ZHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zher2 pure subroutine stdlib_zher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha real ( dp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_zher2k pure subroutine stdlib_zherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , cmplx , conjg , max ! Local Scalars complex ( dp ) :: temp real ( dp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( i , l ), KIND = dp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( j , l ), KIND = dp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zherk pure subroutine stdlib_zhpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! ZHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = dp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_zhpmv pure subroutine stdlib_zhpr ( uplo , n , alpha , x , incx , ap ) !! ZHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr pure subroutine stdlib_zhpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! ZHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr2 pure subroutine stdlib_zrotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in DROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by DROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( out ) :: c complex ( dp ), intent ( inout ) :: a complex ( dp ), intent ( in ) :: b complex ( dp ), intent ( out ) :: s ! Local Scalars real ( dp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( dp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( dp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = dp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = dp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_zrotg pure subroutine stdlib_zscal ( n , za , zx , incx ) !! ZSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = za * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = za * zx ( i ) end do end if return end subroutine stdlib_zscal pure subroutine stdlib_zswap ( n , zx , incx , zy , incy ) !! ZSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = zx ( i ) zx ( i ) = zy ( i ) zy ( i ) = ztemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = zx ( ix ) zx ( ix ) = zy ( iy ) zy ( iy ) = ztemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zswap pure subroutine stdlib_zsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zsymm pure subroutine stdlib_zsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_zsyr2k pure subroutine stdlib_zsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zsyrk pure subroutine stdlib_ztbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztbmv pure subroutine stdlib_ztbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ztbsv pure subroutine stdlib_ztpmv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpmv pure subroutine stdlib_ztpsv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpsv pure subroutine stdlib_ztrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ztrmm pure subroutine stdlib_ztrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztrmv pure subroutine stdlib_ztrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ztrsm pure subroutine stdlib_ztrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ztrsv end module stdlib_linalg_blas_z","tags":"","loc":"sourcefile/stdlib_linalg_blas_z.fypp.html"},{"title":"stdlib_bitsets.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_bitsets !! Implements zero based bitsets of size up to `huge(0_int32)`. !! The current code uses 64 bit integers to store the bits and uses all 64 bits. !! The code assumes two's complement integers, and treats negative integers as !! having the sign bit set. !!([Specification](../page/specs/stdlib_bitsets.html)) use :: stdlib_kinds , only : & bits_kind => int32 , & ! If changed change also max_digits, and block_kind => int64 , & ! overflow_bits int8 , & int16 , & int32 , & int64 use stdlib_optval , only : optval use , intrinsic :: & iso_fortran_env , only : & error_unit implicit none private integer ( bits_kind ), parameter :: & block_size = bit_size ( 0_block_kind ) public :: max_digits , overflow_bits integer , parameter :: & max_digits = 10 ! bits_kind == int32 ! max_digits = 19 ! bits_kind == int64 integer ( bits_kind ), parameter :: & overflow_bits = 2_bits_kind ** 30 / 5 ! bits_kind == int32 ! overflow_bits = 2_bits_kind**62/5 ! bits_kind == int64 integer ( block_kind ), parameter :: all_zeros = 0_block_kind integer ( block_kind ), parameter :: all_ones = not ( all_zeros ) character ( * ), parameter :: module_name = \"STDLIB_BITSETS\" integer , parameter :: & ia0 = iachar ( '0' ), & ia9 = iachar ( '9' ) integer , parameter , public :: success = 0 !! Error flag indicating no errors integer , parameter , public :: alloc_fault = 1 !! Error flag indicating a memory allocation failure integer , parameter , public :: array_size_invalid_error = 2 !! Error flag indicating an invalid bits value integer , parameter , public :: char_string_invalid_error = 3 !! Error flag indicating an invalid character string integer , parameter , public :: char_string_too_large_error = 4 !! Error flag indicating a too large character string integer , parameter , public :: char_string_too_small_error = 5 !! Error flag indicating a too small character string integer , parameter , public :: eof_failure = 6 !! Error flag indicating unexpected End-of-File on a READ integer , parameter , public :: index_invalid_error = 7 !! Error flag indicating an invalid index integer , parameter , public :: integer_overflow_error = 8 !! Error flag indicating integer overflow integer , parameter , public :: read_failure = 9 !! Error flag indicating failure of a READ statement integer , parameter , public :: write_failure = 10 !! Error flag indicating a failure on a WRITE statement public :: bits_kind ! Public constant public :: & bitset_type , & bitset_large , & bitset_64 ! Public types public :: & assignment ( = ), & and , & and_not , & bits , & extract , & operator ( == ), & operator ( /= ), & operator ( > ), & operator ( >= ), & operator ( < ), & operator ( <= ), & or , & xor !! Public procedures public :: error_handler type , abstract :: bitset_type !! version: experimental !! !! Parent type for bitset_64 and bitset_large ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( bits_kind ) :: num_bits = 0_bits_kind contains procedure ( all_abstract ), deferred , pass ( self ) :: all procedure ( any_abstract ), deferred , pass ( self ) :: any procedure ( bit_count_abstract ), deferred , pass ( self ) :: bit_count procedure , pass ( self ) :: bits procedure ( clear_bit_abstract ), deferred , pass ( self ) :: clear_bit procedure ( clear_range_abstract ), deferred , pass ( self ) :: clear_range generic :: clear => clear_bit , clear_range procedure ( flip_bit_abstract ), deferred , pass ( self ) :: flip_bit procedure ( flip_range_abstract ), deferred , pass ( self ) :: flip_range generic :: flip => flip_bit , flip_range procedure ( from_string_abstract ), deferred , pass ( self ) :: from_string procedure ( init_zero_abstract ), deferred , pass ( self ) :: init_zero generic :: init => init_zero procedure ( input_abstract ), deferred , pass ( self ) :: input procedure ( none_abstract ), deferred , pass ( self ) :: none procedure ( not_abstract ), deferred , pass ( self ) :: not procedure ( output_abstract ), deferred , pass ( self ) :: output procedure ( read_bitset_string_abstract ), deferred , pass ( self ) :: & read_bitset_string procedure ( read_bitset_unit_abstract ), deferred , pass ( self ) :: & read_bitset_unit generic :: read_bitset => read_bitset_string , read_bitset_unit procedure ( set_bit_abstract ), deferred , pass ( self ) :: set_bit procedure ( set_range_abstract ), deferred , pass ( self ) :: set_range generic :: set => set_bit , set_range procedure ( test_abstract ), deferred , pass ( self ) :: test procedure ( to_string_abstract ), deferred , pass ( self ) :: to_string procedure ( value_abstract ), deferred , pass ( self ) :: value procedure ( write_bitset_string_abstract ), deferred , pass ( self ) :: & write_bitset_string procedure ( write_bitset_unit_abstract ), deferred , pass ( self ) :: & write_bitset_unit generic :: write_bitset => write_bitset_string , write_bitset_unit end type bitset_type abstract interface elemental function all_abstract ( self ) result ( all ) !! Version: experimental !! !! Returns `.true.` if all bits in `self` are 1, `.false.` otherwise. !! !!#### Example !! !!```fortran !! program example_all !! use stdlib_bitsets !! character(*), parameter :: & !! bits_all = '111111111111111111111111111111111' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_all ) !! if ( bits(set0) /= 33 ) then !! error stop \"FROM_STRING failed to interpret \" // & !! 'BITS_ALL's size properly.\" !! else if ( .not. set0 % all() ) then !! error stop \"FROM_STRING failed to interpret\" // & !! \"BITS_ALL's value properly.\" !! else !! write(*,*) \"FROM_STRING transferred BITS_ALL properly\" // & !! \" into set0.\" !! end if !! end program example_all !!``` import :: bitset_type logical :: all class ( bitset_type ), intent ( in ) :: self end function all_abstract elemental function any_abstract ( self ) result ( any ) !! Version: experimental !! !! Returns `.true.` if any bit in `self` is 1, `.false.` otherwise. !! !!#### Example !! !!```fortran !! program example_any !! use stdlib_bitsets !! character(*), parameter :: & !! bits_0 = '0000000000000000000' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_0 ) !! if ( .not. set0 % any() ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % set(5) !! if ( set0 % any() ) then !! write(*,*) \"ANY interpreted SET0's value properly.\" !! end if !! end program example_any !!``` import :: bitset_type logical :: any class ( bitset_type ), intent ( in ) :: self end function any_abstract elemental function bit_count_abstract ( self ) result ( bit_count ) !! Version: experimental !! !! Returns the number of non-zero bits in `self`. !! !!#### Example !! !!```fortran !! program example_bit_count !! use stdlib_bitsets !! character(*), parameter :: & !! bits_0 = '0000000000000000000' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_0 ) !! if ( set0 % bit_count() == 0 ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % set(5) !! if ( set0 % bit_count() == 1 ) then !! write(*,*) \"BIT_COUNT interpreted SET0's value properly.\" !! end if !! end program example_bit_count !!``` import :: bitset_type , bits_kind integer ( bits_kind ) :: bit_count class ( bitset_type ), intent ( in ) :: self end function bit_count_abstract elemental subroutine clear_bit_abstract ( self , pos ) !! Version: experimental !! !! Sets to zero the `pos` position in `self`. If `pos` is less than zero or !! greater than `bits(self)-1` it is ignored. !! !!#### Example !! !!```fortran !! program example_clear !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! call set0 % not() !! if ( set0 % all() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % clear(165) !! if ( .not. set0 % test(165) ) write(*,*) 'Bit 165 is cleared.' !! call set0 % clear(0,164) !! if ( set0 % none() ) write(*,*) 'All bits are cleared.' !! end program example_clear !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine clear_bit_abstract pure subroutine clear_range_abstract ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets to zero all bits from the `start_pos` to `stop_pos` positions in `set`. !! If `stop_pos < start_pos` then no bits are modified. Positions outside !! the range 0 to `bits(self)-1` are ignored. import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine clear_range_abstract elemental subroutine flip_bit_abstract ( self , pos ) !! Version: experimental !! !! Flips the value at the `pos` position in `self`, provided the position is !! valid. If `pos` is less than 0 or greater than `bits(self)-1`, no value is !! changed. !! !!#### Example !! !!```fortran !! program example_flip !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! if ( set0 % none() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % flip(165) !! if ( set0 % test(165) ) write(*,*) 'Bit 165 is flipped.' !! call set0 % flip(0,164) !! if ( set0 % all() ) write(*,*) 'All bits are flipped.' !! end program example_flip !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine flip_bit_abstract pure subroutine flip_range_abstract ( self , start_pos , stop_pos ) !! Version: experimental !! !! Flips all valid bits from the `start_pos` to the `stop_pos` positions in !! `self`. If `stop_pos < start_pos` no bits are flipped. Positions less than !! 0 or greater than `bits(self)-1` are ignored. import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine flip_range_abstract subroutine from_string_abstract ( self , string , status ) !! Version: experimental !! !! Initializes the bitset `self` treating `string` as a binary literal !! `status` may have the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if allocation of the bitset failed !! * `char_string_too_large_error` - if `string` was too large, or !! * `char_string_invalid_error` - if string had an invalid character. !! !!#### Example !! !!```fortran !! program example_from_string !! use stdlib_bitsets !! character(*), parameter :: & !! bits_all = '111111111111111111111111111111111' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_all ) !! if ( bits(set0) /= 33 ) then !! error stop \"FROM_STRING failed to interpret \" // & !! 'BITS_ALL's size properly.\" !! else if ( .not. set0 % all() ) then !! error stop \"FROM_STRING failed to interpret\" // & !! \"BITS_ALL's value properly.\" !! else !! write(*,*) \"FROM_STRING transferred BITS_ALL properly\" // & !! \" into set0.\" !! end if !! end program example_from_string !!``` import :: bitset_type class ( bitset_type ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine from_string_abstract subroutine init_zero_abstract ( self , bits , status ) !! Creates the bitset, `self`, of size `bits`, with all bits initialized to !! zero. `bits` must be non-negative. If an error occurs and `status` is !! absent then processing stops with an informative stop code. `status` !! will have one of the values; !! * `success` - if no problems were found, !! * `alloc_fault` - if memory allocation failed !! * `array_size_invalid_error` - if `bits` is either negative or larger !! than 64 with `self` of class `bitset_64`, or !! !!#### Example !! !!```fortran !! program example_init !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! if ( set0 % bits() == 166 ) & !! write(*,*) `SET0 has the proper size.' !! if ( set0 % none() ) write(*,*) 'SET0 is properly initialized.' !! end program example_init !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status end subroutine init_zero_abstract subroutine input_abstract ( self , unit , status ) !! Version: experimental !! !! Reads the components of the bitset, `self`, from the unformatted I/O !! unit, `unit`, assuming that the components were written using `output`. !! If an error occurs and `status` is absent then processing stops with !! an informative stop code. `status` has one of the values: !! * `success` - if no problem was found !! * `alloc_fault` - if it failed allocating memory for `self`, or !! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative !! or greater than 64 for a `bitset_64` input. !! * `read_failure` - if it failed during the reads from `unit` !! !!#### Example !! !!```fortran !! program example_input !! character(*), parameter :: & !! bits_0 = '000000000000000000000000000000000', & !! bits_1 = '000000000000000000000000000000001', & !! bits_33 = '100000000000000000000000000000000' !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % from_string( bits_0 ) !! call set1 % from_string( bits_1 ) !! call set2 % from_string( bits_33 ) !! open( newunit=unit, file='test.bin', status='replace', & !! form='unformatted', action='write' ) !! call set2 % output(unit) !! call set1 % output(unit) !! call set0 % output(unit) !! close( unit ) !! open( newunit=unit, file='test.bin', status='old', & !! form='unformatted', action='read' ) !! call set5 % input(unit) !! call set4 % input(unit) !! call set3 % input(unit) !! close( unit ) !! if ( set3 /= set0 .or. set4 /= set1 .or. set5 /= set2 ) then !! error stop 'Transfer to and from units using ' // & !! ' output and input failed.' !! else !! write(*,*) 'Transfer to and from units using ' // & !! 'output and input succeeded.' !! end if !! end program example_input !!``` import :: bitset_type class ( bitset_type ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine input_abstract elemental function none_abstract ( self ) result ( none ) !! Version: experimental !! !! Returns `.true.` if none of the bits in `self` have the value 1. !! !!#### Example !! !!```fortran !! program example_none !! use stdlib_bitsets !! character(*), parameter :: & !! bits_0 = '0000000000000000000' !! type(bitset_large) :: set0 !! call set0 % from_string( bits_0 ) !! if ( set0 % none() ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % set(5) !! if ( .not. set0 % none() ) then !! write(*,*) \"NONE interpreted SET0's value properly.\" !! end if !! end program example_none !!``` import :: bitset_type logical :: none class ( bitset_type ), intent ( in ) :: self end function none_abstract elemental subroutine not_abstract ( self ) !! Version: experimental !! !! Sets the bits in `self` to their logical complement !! !!#### Example !! !!```fortran !! program example_not !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init( 155 ) !! if ( set0 % none() ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % not() !! if ( set0 % all() ) then !! write(*,*) \"ALL interpreted SET0's value properly.\" !! end if !! end program example_not !!``` import :: bitset_type class ( bitset_type ), intent ( inout ) :: self end subroutine not_abstract subroutine output_abstract ( self , unit , status ) !! Version: experimental !! !! Writes the components of the bitset, `self`, to the unformatted I/O !! unit, `unit`, in a unformatted sequence compatible with `input`. If !! `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `write_failure` if the write failed. !! !!#### Example !! !!```fortran !! program example_output !! character(*), parameter :: & !! bits_0 = '000000000000000000000000000000000', & !! bits_1 = '000000000000000000000000000000001', & !! bits_33 = '100000000000000000000000000000000' !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % from_string( bits_0 ) !! call set1 % from_string( bits_1 ) !! call set2 % from_string( bits_33 ) !! open( newunit=unit, file='test.bin', status='replace', & !! form='unformatted', action='write' ) !! call set2 % output(unit) !! call set1 % output(unit) !! call set0 % output(unit) !! close( unit ) !! open( newunit=unit, file='test.bin', status='old', & !! form='unformatted', action='read' ) !! call set5 % input(unit) !! call set4 % input(unit) !! call set3 % input(unit) !! close( unit ) !! if ( set3 /= set0 .or. set4 /= set1 .or. set5 /= set2 ) then !! error stop 'Transfer to and from units using ' // & !! ' output and input failed.' !! else !! write(*,*) 'Transfer to and from units using ' // & !! 'output and input succeeded.' !! end if !! end program example_output !!``` import :: bitset_type class ( bitset_type ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine output_abstract subroutine read_bitset_string_abstract ( self , string , status ) !! Version: experimental !! !! Uses the bitset literal in the default character `string`, to define !! the bitset, `self`. The literal may be preceded by an an arbitrary !! sequence of blank characters. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` !! is present it has one of the values !! * `success` - if no problems occurred, !! * `alloc_fault` - if allocation of memory for SELF failed, !! * `array_size_invalid_error - if `bits(self)` in `string` is greater !! than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the bitset literal has an invalid !! character, !! * `char_string_too_small_error - if the string ends before all the bits !! are read. !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! !!#### Example !! !!```fortran !! program example_read_bitset !! character(*), parameter :: & !! bits_0 = 'S33B000000000000000000000000000000000', & !! bits_1 = 'S33B000000000000000000000000000000001', & !! bits_33 = 'S33B100000000000000000000000000000000' !! character(:), allocatable :: test_0, test_1, test_2 !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % read_bitset( bits_0, status ) !! call set1 % read_bitset( bits_1, status ) !! call set2 % read_bitset( bits_2, status ) !! call set0 % write_bitset( test_0, status ) !! call set1 % write_bitset( test_1, status ) !! call set2 % write_bitset( test_2, status ) !! if ( bits_0 == test_0 .and. bits_1 == test_1 .and. & !! bits_2 == test_2 ) then !! write(*,*) 'READ_BITSET to WRITE_BITSET strings worked.' !! end if !! open( newunit=unit, file='test.txt', status='replace', & !! form='formatted', action='write' ) !! call set2 % write_bitset(unit, advance='no') !! call set1 % write_bitset(unit, advance='no') !! call set0 % write_bitset(unit) !! close( unit ) !! open( newunit=unit, file='test.txt', status='old', & !! form='formatted', action='read' ) !! call set3 % read_bitset(unit, advance='no') !! call set4 % read_bitset(unit, advance='no') !! call set5 % read_bitset(unit) !! if ( set3 == set0 .and. set4 == set1 .and. set5 == set2 ) then !! write(*,*) WRITE_BITSET to READ_BITSET through unit worked.' !! end if !! end program example_read_bitset !!``` import :: bitset_type class ( bitset_type ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine read_bitset_string_abstract subroutine read_bitset_unit_abstract ( self , unit , advance , status ) !! Version: experimental !! !! Uses the bitset literal at the current position in the formatted !! file with I/O unit, `unit`, to define the bitset, `self`. The literal !! may be preceded by an an arbitrary sequence of blank characters. !! If `advance` is present it must be either 'YES' or 'NO'. If absent !! it has the default value of 'YES' to determine whether advancing !! I/O occurs. If `status` is absent an error results in an error stop !! with an informative stop code. If `status` is present it has one of !! the values: !! * `success` - if no problem occurred, !! * `alloc_fault` - if allocation of `self` failed, !! * `array_size_invalid_error` - if `bits(self)` in the bitset literal !! is greater than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the read of the bitset literal found !! an invalid character, !! * `eof_failure` - if a `read` statement reached an end-of-file before !! completing the read of the bitset literal, !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! * `read_failure` - if a `read` statement fails, ! import :: bitset_type class ( bitset_type ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine read_bitset_unit_abstract elemental subroutine set_bit_abstract ( self , pos ) !! Version: experimental !! !! Sets the value at the `pos` position in `self`, provided the position is !! valid. If the position is less than 0 or greater than `bits(self)-1` !! then `self` is unchanged. !! !!#### Example !! !!```fortran !! program example_set !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! if ( set0 % none() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % set(165) !! if ( set0 % test(165) ) write(*,*) 'Bit 165 is set.' !! call set0 % set(0,164) !! if ( set0 % all() ) write(*,*) 'All bits are set.' !! end program example_set !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine set_bit_abstract pure subroutine set_range_abstract ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets all valid bits to 1 from the `start_pos` to the `stop_pos` positions !! in `self`. If `stop_pos < start_pos` no bits are changed. Positions outside !! the range 0 to `bits(self)-1` are ignored. import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine set_range_abstract elemental function test_abstract ( self , pos ) result ( test ) !! Version: experimental !! !! Returns `.true.` if the `pos` position is set, `.false.` otherwise. If `pos` !! is negative or greater than `bits(self) - 1` the result is `.false.`. !! !!#### Example !! !!```fortran !! program example_test !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! call set0 % not() !! if ( set0 % all() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % clear(165) !! if ( .not. set0 % test(165) ) write(*,*) 'Bit 165 is cleared.' !! call set0 % set(165) !! if ( set0 % test(165) ) write(*,*) 'Bit 165 is set.' !! end program example_test !!``` import :: bitset_type , bits_kind logical :: test class ( bitset_type ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function test_abstract subroutine to_string_abstract ( self , string , status ) !! Version: experimental !! !! Represents the value of `self` as a binary literal in `string` !! Status may have the values `success` or `alloc_fault`. !! !!#### Example !! !!```fortran !! program example_to_string !! use stdlib_bitsets !! character(*), parameter :: & !! bits_all = '111111111111111111111111111111111' !! type(bitset_64) :: set0 !! character(:), allocatable :: new_string !! call set0 % init(33) !! call set0 % not() !! call set0 % to_string( new_string ) !! if ( new_string == bits_all ) then !! write(*,*) \"TO_STRING transferred BITS0 properly\" // & !! \" into NEW_STRING.\" !! end if !! end program example_to_string !!``` import :: bitset_type class ( bitset_type ), intent ( in ) :: self character (:), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine to_string_abstract elemental function value_abstract ( self , pos ) result ( value ) !! Version: experimental !! !! Returns 1 if the `pos` position is set, 0 otherwise. If `pos` is negative !! or greater than `bits(set) - 1` the result is 0. !! !!#### Example !! !!```fortran !! program example_value !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! call set0 % not() !! if ( set0 % all() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % clear(165) !! if ( set0 % value(165) == 0 ) write(*,*) 'Bit 165 is cleared.' !! call set0 % set(165) !! if ( set0 % value(165) == 1 ) write(*,*) 'Bit 165 is set.' !! end program example_value !!``` import :: bitset_type , bits_kind integer :: value class ( bitset_type ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function value_abstract subroutine write_bitset_string_abstract ( self , string , status ) !! Version: experimental !! !! Writes a bitset literal to the allocatable default character `string`, !! representing the individual bit values in the `bitset_type`, `self`. !! If `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `alloc_fault` if allocation of !! the output string failed. !! !!#### Example !! !!```fortran !! program example_write_bitset !! character(*), parameter :: & !! bits_0 = 'S33B000000000000000000000000000000000', & !! bits_1 = 'S33B000000000000000000000000000000001', & !! bits_33 = 'S33B100000000000000000000000000000000' !! character(:), allocatable :: test_0, test_1, test_2 !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % read_bitset( bits_0, status ) !! call set1 % read_bitset( bits_1, status ) !! call set2 % read_bitset( bits_2, status ) !! call set0 % write_bitset( test_0, status ) !! call set1 % write_bitset( test_1, status ) !! call set2 % write_bitset( test_2, status ) !! if ( bits_0 == test_0 .and. bits_1 == test_1 .and. & !! bits_2 == test_2 ) then !! write(*,*) 'READ_BITSET to WRITE_BITSET strings worked.' !! end if !! open( newunit=unit, file='test.txt', status='replace', & !! form='formatted', action='write' ) !! call set2 % write_bitset(unit, advance='no') !! call set1 % write_bitset(unit, advance='no') !! call set0 % write_bitset(unit) !! close( unit ) !! open( newunit=unit, file='test.txt', status='old', & !! form='formatted', action='read' ) !! call set3 % read_bitset(unit, advance='no') !! call set4 % read_bitset(unit, advance='no') !! call set5 % read_bitset(unit) !! if ( set3 == set0 .and. set4 == set1 .and. set5 == set2 ) then !! write(*,*) WRITE_BITSET to READ_BITSET through unit worked.' !! end if !! end program example_write_bitset !!``` import :: bitset_type class ( bitset_type ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine write_bitset_string_abstract subroutine write_bitset_unit_abstract ( self , unit , advance , & status ) !! Version: experimental !! !! Writes a bitset literal to the I/O unit, `unit`, representing the !! individual bit values in the `bitset_t`, `self`. If an error occurs then !! processing stops with a message to `error_unit`. By default or if !! `advance` is present with the value 'YES', advancing output is used. !! If `advance` is present with the value 'NO', then the current record !! is not advanced by the write. If `status` is absent, an error results !! in an error stop with an informative stop code. If `status` is !! present it has the default value of `success`, the value !! `alloc_fault` if allocation of the output string failed, !! `write_failure` if the `write` statement outputting the literal failed. import :: bitset_type class ( bitset_type ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine write_bitset_unit_abstract end interface type , extends ( bitset_type ) :: bitset_large !! Version: experimental !! !! Type for bitsets with more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private , allocatable :: blocks (:) contains procedure , pass ( self ) :: all => all_large procedure , pass ( self ) :: any => any_large procedure , pass ( self ) :: bit_count => bit_count_large procedure , pass ( self ) :: clear_bit => clear_bit_large procedure , pass ( self ) :: clear_range => clear_range_large procedure , pass ( self ) :: flip_bit => flip_bit_large procedure , pass ( self ) :: flip_range => flip_range_large procedure , pass ( self ) :: from_string => from_string_large procedure , pass ( self ) :: init_zero => init_zero_large procedure , pass ( self ) :: input => input_large procedure , pass ( self ) :: none => none_large procedure , pass ( self ) :: not => not_large procedure , pass ( self ) :: output => output_large procedure , pass ( self ) :: & read_bitset_string => read_bitset_string_large procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_large procedure , pass ( self ) :: set_bit => set_bit_large procedure , pass ( self ) :: set_range => set_range_large procedure , pass ( self ) :: test => test_large procedure , pass ( self ) :: to_string => to_string_large procedure , pass ( self ) :: value => value_large procedure , pass ( self ) :: & write_bitset_string => write_bitset_string_large procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_large end type bitset_large interface elemental module function all_large ( self ) result ( all ) !! Version: experimental !! !! Returns `.true.` if all bits in `self` are 1, `.false.` otherwise. logical :: all class ( bitset_large ), intent ( in ) :: self end function all_large elemental module function any_large ( self ) result ( any ) !! Version: experimental !! !! Returns `.true.` if any bit in `self` is 1, `.false.` otherwise. logical :: any class ( bitset_large ), intent ( in ) :: self end function any_large elemental module function bit_count_large ( self ) result ( bit_count ) !! Version: experimental !! !! Returns the number of non-zero bits in `self`. integer ( bits_kind ) :: bit_count class ( bitset_large ), intent ( in ) :: self end function bit_count_large elemental module subroutine clear_bit_large ( self , pos ) !! Version: experimental !! !! Sets to zero the bit at `pos` position in `self`. If `pos` is less than !! zero or greater than `bits(self)-1` it is ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine clear_bit_large pure module subroutine clear_range_large ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets to zero all bits from the `start_pos` to `stop_pos` positions in `self`. !! If `stop_pos < start_pos` then no bits are modified. Positions outside !! the range 0 to `bits(set)-1` are ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine clear_range_large elemental module subroutine flip_bit_large ( self , pos ) !! Version: experimental !! !! Flips the bit value at the `pos` position in `self`, provided the position is !! valid. If `pos` is less than 0 or greater than `bits(self)-1`, no value is !! changed. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine flip_bit_large pure module subroutine flip_range_large ( self , start_pos , stop_pos ) !! Version: experimental !! !! Flips all valid bits from the `start_pos` to the `stop_pos` positions in !! `self`. If `stop_pos < start_pos` no bits are flipped. Positions less than !! 0 or greater than `bits(self)-1` are ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine flip_range_large module subroutine from_string_large ( self , string , status ) !! Version: experimental !! !! Initializes the bitset `self` treating `string` as a binary literal !! `status` may have the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if allocation of the bitset failed !! * `char_string_too_large_error` - if `string` was too large, or !! * `char_string_invalid_error` - if string had an invalid character. class ( bitset_large ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine from_string_large module subroutine init_zero_large ( self , bits , status ) !! Version: experimental !! !! Creates the bitset, `self`, of size `bits`, with all bits initialized to !! zero. `bits` must be non-negative. If an error occurs and `status` is !! absent then processing stops with an informative stop code. `status` !! will have one of the values; !! * `success` - if no problems were found, !! * `alloc_fault` - if memory allocation failed !! * `array_size_invalid_error` - if `bits` is either negative or larger !! than 64 with `self` of class `bitset_64`, or class ( bitset_large ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status end subroutine init_zero_large module subroutine input_large ( self , unit , status ) !! Version: experimental !! !! Reads the components of the bitset, `self`, from the unformatted I/O !! unit, `unit`, assuming that the components were written using `output`. !! If an error occurs and `status` is absent then processing stops with !! an informative stop code. `status` has one of the values: !! * `success` - if no problem was found !! * `alloc_fault` - if it failed allocating memory for `self`, or !! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative !! or greater than 64 for a `bitset_64` input. !! * `read_failure` - if it failed during the reads from `unit` class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine input_large elemental module function none_large ( self ) result ( none ) !! Version: experimental !! !! Returns `.true.` if none of the bits in `self` have the value 1. logical :: none class ( bitset_large ), intent ( in ) :: self end function none_large elemental module subroutine not_large ( self ) !! Version: experimental !! !! Sets the bits in `self` to their logical complement class ( bitset_large ), intent ( inout ) :: self end subroutine not_large module subroutine output_large ( self , unit , status ) !! Version: experimental !! !! Writes the components of the bitset, `self`, to the unformatted I/O !! unit, `unit`, in a unformatted sequence compatible with `input`. If !! `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `write_failure` if the write failed. class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine output_large module subroutine read_bitset_string_large ( self , string , status ) !! Version: experimental !! !! Uses the bitset literal in the default character `string`, to define !! the bitset, `self`. The literal may be preceded by an an arbitrary !! sequence of blank characters. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` !! is present it has one of the values !! * `success` - if no problems occurred, !! * `alloc_fault` - if allocation of memory for SELF failed, !! * `array_size_invalid_error - if `bits(self)` in `string` is greater !! than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the bitset literal has an invalid !! character, !! * `char_string_too_small_error - if the string ends before all the bits !! are read. !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, class ( bitset_large ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine read_bitset_string_large module subroutine read_bitset_unit_large ( self , unit , advance , status ) !! Version: experimental !! !! Uses the bitset literal at the current position in the formatted !! file with I/O unit, `unit`, to define the bitset, `self`. The literal !! may be preceded by an an arbitrary sequence of blank characters. !! If `advance` is present it must be either 'YES' or 'NO'. If absent !! it has the default value of 'YES' to determine whether advancing !! I/O occurs. If `status` is absent an error results in an error stop !! with an informative stop code. If `status` is present it has one of !! the values: !! * `success` - if no problem occurred, !! * `alloc_fault` - if allocation of `self` failed, !! * `array_size_invalid_error` - if `bits(self)` in the bitset literal !! is greater than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the read of the bitset literal found !! an invalid character, !! * `eof_failure` - if a `read` statement reached an end-of-file before !! completing the read of the bitset literal, !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! * `read_failure` - if a `read` statement fails, class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine read_bitset_unit_large elemental module subroutine set_bit_large ( self , pos ) !! Version: experimental !! !! Sets the value at the `pos` position in `self`, provided the position is !! valid. If the position is less than 0 or greater than `bits(self)-1` !! then `self` is unchanged. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine set_bit_large pure module subroutine set_range_large ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets all valid bits to 1 from the `start_pos` to the `stop_pos` positions !! in `self`. If `stop_pos < start_pos` no bits are changed. Positions outside !! the range 0 to `bits(self)-1` are ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine set_range_large elemental module function test_large ( self , pos ) result ( test ) !! Version: experimental !! !! Returns `.true.` if the `pos` position is set, `.false.` otherwise. If `pos` !! is negative or greater than `bits(self) - 1` the result is `.false.`. logical :: test class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function test_large module subroutine to_string_large ( self , string , status ) !! Version: experimental !! !! Represents the value of `self` as a binary literal in `string` !! Status may have the values `success` or `alloc_fault`. class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine to_string_large elemental module function value_large ( self , pos ) result ( value ) !! Version: experimental !! !! Returns 1 if the `pos` position is set, 0 otherwise. If `pos` is negative !! or greater than `bits(set) - 1` the result is 0. integer :: value class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function value_large module subroutine write_bitset_string_large ( self , string , status ) !! Version: experimental !! !! Writes a bitset literal to the allocatable default character `string`, !! representing the individual bit values in the bitset_large, `self`. !! If `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success, or the value `alloc_fault` if allocation of !! the output string failed. class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine write_bitset_string_large module subroutine write_bitset_unit_large ( self , unit , advance , status ) !! Version: experimental !! !! Writes a bitset literal to the I/O unit, `unit`, representing the !! individual bit values in the bitset, `self`. By default or if !! `advance` is present with the value 'YES', advancing output is used. !! If `advance` is present with the value 'NO', then the current record !! is not advanced by the write. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` is !! present it has the default value of `success`, the value !! `alloc_fault` if allocation of the output string failed, or !! `write_failure` if the `write` statement outputting the literal failed. class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine write_bitset_unit_large end interface interface assignment ( = ) !! Version: experimental !! !! Used to define assignment for `bitset_large`. !! ([Specification](../page/specs/stdlib_bitsets.html#-compare-two-bitsets-to-determine-whether-the-bits-have-the-same-value)) !! !!#### Example !! !!```fortran !! program example_assignment !! use stdlib_bitsets !! logical(int8) :: logical1(64) = .true. !! logical(int32), allocatable :: logical2(:) !! type(bitset_64) :: set0, set1 !! set0 = logical1 !! if ( set0 % bits() /= 64 ) then !! error stop procedure // & !! ' initialization with logical(int8) failed to set' // & !! ' the right size.' !! else if ( .not. set0 % all() ) then !! error stop procedure // ' initialization with' // & !! ' logical(int8) failed to set the right values.' !! else !! write(*,*) 'Initialization with logical(int8) succeeded.' !! end if !! set1 = set0 !! if ( set1 == set0 ) & !! write(*,*) 'Initialization by assignment succeeded' !! logical2 = set1 !! if ( all( logical2 ) ) then !! write(*,*) 'Initialization of logical(int32) succeeded.' !! end if !! end program example_assignment !!``` # : for k1 in INT_KINDS pure module subroutine assign_log$ { k1 }$_ large ( self , logical_vector ) !! Version: experimental !! !! Used to define assignment from an array of type `logical(${k1}$)` to a !! `bitset_large`. type ( bitset_large ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) end subroutine assign_log$ { k1 }$_ large pure module subroutine log ${ k1 }$_ assign_large ( logical_vector , set ) !! Version: experimental !! !! Used to define assignment to an array of type `logical(${k1}$)` from a !! `bitset_large`. logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_large ), intent ( in ) :: set end subroutine log ${ k1 }$_ assign_large # : endfor end interface assignment ( = ) type , extends ( bitset_type ) :: bitset_64 !! Version: experimental !! !! Type for bitsets with no more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private :: block = 0 contains procedure , pass ( self ) :: all => all_64 procedure , pass ( self ) :: any => any_64 procedure , pass ( self ) :: bit_count => bit_count_64 procedure , pass ( self ) :: clear_bit => clear_bit_64 procedure , pass ( self ) :: clear_range => clear_range_64 procedure , pass ( self ) :: flip_bit => flip_bit_64 procedure , pass ( self ) :: flip_range => flip_range_64 procedure , pass ( self ) :: from_string => from_string_64 procedure , pass ( self ) :: init_zero => init_zero_64 procedure , pass ( self ) :: input => input_64 procedure , pass ( self ) :: none => none_64 procedure , pass ( self ) :: not => not_64 procedure , pass ( self ) :: output => output_64 procedure , pass ( self ) :: read_bitset_string => read_bitset_string_64 procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_64 procedure , pass ( self ) :: set_bit => set_bit_64 procedure , pass ( self ) :: set_range => set_range_64 procedure , pass ( self ) :: test => test_64 procedure , pass ( self ) :: to_string => to_string_64 procedure , pass ( self ) :: value => value_64 procedure , pass ( self ) :: write_bitset_string => write_bitset_string_64 procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_64 end type bitset_64 interface elemental module function all_64 ( self ) result ( all ) !! Version: experimental !! !! Returns `.true.` if all bits in `self` are 1, `.false.` otherwise. logical :: all class ( bitset_64 ), intent ( in ) :: self end function all_64 elemental module function any_64 ( self ) result ( any ) !! Version: experimental !! !! Returns `.true.` if any bit in `self` is 1, `.false.` otherwise. logical :: any class ( bitset_64 ), intent ( in ) :: self end function any_64 elemental module function bit_count_64 ( self ) result ( bit_count ) !! Version: experimental !! !! Returns the number of non-zero bits in `self`. integer ( bits_kind ) :: bit_count class ( bitset_64 ), intent ( in ) :: self end function bit_count_64 elemental module subroutine clear_bit_64 ( self , pos ) !! Version: experimental !! !! Sets to zero the bit at `pos` position in `self`. If `pos` is less than !! zero or greater than `bits(self)-1` it is ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine clear_bit_64 pure module subroutine clear_range_64 ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets to zero all bits from the `start_pos` to `stop_pos` positions in `self`. !! If `stop_pos < start_pos` then no bits are modified. Positions outside !! the range 0 to `bits(set)-1` are ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine clear_range_64 elemental module subroutine flip_bit_64 ( self , pos ) !! Version: experimental !! !! Flips the bit value at the `pos` position in `self`, provided the position is !! valid. If `pos` is less than 0 or greater than `bits(self)-1`, no value is !! changed. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine flip_bit_64 pure module subroutine flip_range_64 ( self , start_pos , stop_pos ) !! Version: experimental !! !! Flips all valid bits from the `start_pos` to the `stop_pos` positions in !! `self`. If `stop_pos < start_pos` no bits are flipped. Positions less than !! 0 or greater than `bits(self)-1` are ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine flip_range_64 module subroutine from_string_64 ( self , string , status ) !! Version: experimental !! !! Initializes the bitset `self` treating `string` as a binary literal !! `status` may have the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if allocation of the bitset failed !! * `char_string_too_large_error` - if `string` was too large, or !! * `char_string_invalid_error` - if string had an invalid character. class ( bitset_64 ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine from_string_64 module subroutine init_zero_64 ( self , bits , status ) !! Version: experimental !! !! Creates the bitset, `self`, of size `bits`, with all bits initialized to !! zero. `bits` must be non-negative. If an error occurs and `status` is !! absent then processing stops with an informative stop code. `status` !! will have one of the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if memory allocation failed !! * `array_size_invalid_error` - if `bits` is either negative or larger !! than 64 with `self` of class `bitset_64`. class ( bitset_64 ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status end subroutine init_zero_64 module subroutine input_64 ( self , unit , status ) !! Version: experimental !! !! Reads the components of the bitset, `self`, from the unformatted I/O !! unit, `unit`, assuming that the components were written using `output`. !! If an error occurs and `status` is absent then processing stops with !! an informative stop code. `status` has one of the values: !! * `success` - if no problem was found !! * `alloc_fault` - if it failed allocating memory for `self`, or !! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative !! or greater than 64 for a `bitset_64` input. !! * `read_failure` - if it failed during the reads from `unit` class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine input_64 elemental module function none_64 ( self ) result ( none ) !! Version: experimental !! !! Returns `.true.` if none of the bits in `self` have the value 1. logical :: none class ( bitset_64 ), intent ( in ) :: self end function none_64 elemental module subroutine not_64 ( self ) !! Version: experimental !! !! Sets the bits in `self` to their logical complement. class ( bitset_64 ), intent ( inout ) :: self end subroutine not_64 module subroutine output_64 ( self , unit , status ) !! Version: experimental !! !! Writes the components of the bitset, `self`, to the unformatted I/O !! unit, `unit`, in a unformatted sequence compatible with `input`. If !! `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `write_failure` if the write failed. class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine output_64 module subroutine read_bitset_string_64 ( self , string , status ) !! Version: experimental !! !! Uses the bitset literal in the default character `string`, to define !! the bitset, `self`. The literal may be preceded by an an arbitrary !! sequence of blank characters. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` !! is present it has one of the values: !! * `success` - if no problems occurred, !! * `alloc_fault` - if allocation of memory for SELF failed, !! * `array_size_invalid_error - if `bits(self)` in `string` is greater !! than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the bitset literal has an invalid !! character, !! * `char_string_too_small_error - if the string ends before all the bits !! are read. !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, class ( bitset_64 ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine read_bitset_string_64 module subroutine read_bitset_unit_64 ( self , unit , advance , status ) !! Version: experimental !! !! Uses the bitset literal at the current position in the formatted !! file with I/O unit, `unit`, to define the bitset, `self`. The literal !! may be preceded by an an arbitrary sequence of blank characters. !! If `advance` is present it must be either 'YES' or 'NO'. If absent !! it has the default value of 'YES' to determine whether advancing !! I/O occurs. If `status` is absent an error results in an error stop !! with an informative stop code. If `status` is present it has one of !! the values: !! * `success` - if no problem occurred, !! * `alloc_fault` - if allocation of `self` failed, !! * `array_size_invalid_error` - if `bits(self)` in the bitset literal !! is greater than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the read of the bitset literal found !! an invalid character, !! * `eof_failure` - if a `read` statement reached an end-of-file before !! completing the read of the bitset literal, !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! * `read_failure` - if a `read` statement fails, class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine read_bitset_unit_64 elemental module subroutine set_bit_64 ( self , pos ) !! Version: experimental !! !! Sets the value at the `pos` position in `self`, provided the position is !! valid. If the position is less than 0 or greater than `bits(self)-1` !! then `self` is unchanged. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine set_bit_64 pure module subroutine set_range_64 ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets all valid bits to 1 from the `start_pos` to the `stop_pos` positions !! in `self`. If `stop_pos < start_pos` no bits are changed. Positions outside !! the range 0 to `bits(self)-1` are ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine set_range_64 elemental module function test_64 ( self , pos ) result ( test ) !! Version: experimental !! !! Returns `.true.` if the `pos` position is set, `.false.` otherwise. If `pos` !! is negative or greater than `bits(self)-1` the result is `.false.`. logical :: test class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function test_64 module subroutine to_string_64 ( self , string , status ) !! Version: experimental !! !! Represents the value of `self` as a binary literal in `string`. !! Status may have the values `success` or `alloc_fault` class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine to_string_64 elemental module function value_64 ( self , pos ) result ( value ) !! Version: experimental !! !! Returns 1 if the `pos` position is set, 0 otherwise. If `pos` is negative !! or greater than `bits(set)-1` the result is 0. integer :: value class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function value_64 module subroutine write_bitset_string_64 ( self , string , status ) !! Version: experimental !! !! Writes a bitset literal to the allocatable default character `string`, !! representing the individual bit values in the `bitset_64`, `self`. !! If `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `alloc_fault` if allocation of !! the output string failed. class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine write_bitset_string_64 module subroutine write_bitset_unit_64 ( self , unit , advance , status ) !! Version: experimental !! !! Writes a bitset literal to the I/O unit, `unit`, representing the !! individual bit values in the bitset, `self`. By default or if !! `advance` is present with the value 'YES', advancing output is used. !! If `advance` is present with the value 'NO', then the current record !! is not advanced by the write. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` is !! present it has the default value of `success`, the value !! `alloc_fault` if allocation of the output string failed, or !! `write_failure` if the `write` statement outputting the literal failed. class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine write_bitset_unit_64 end interface interface assignment ( = ) # : for k1 in INT_KINDS module subroutine assign_log$ { k1 }$_ 64 ( self , logical_vector ) !! Version: experimental !! !! Used to define assignment from an array of type `logical(${k1}$)` to a !! `bitset_64`. type ( bitset_64 ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) end subroutine assign_log$ { k1 }$_ 64 pure module subroutine log ${ k1 }$_ assign_64 ( logical_vector , set ) !! Version: experimental !! !! Used to define assignment to an array of type `logical(${k1}$)` from a !! `bitset_64`. logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_64 ), intent ( in ) :: set end subroutine log ${ k1 }$_ assign_64 # : endfor end interface assignment ( = ) interface and !! Version: experimental !! !! Sets the bits in `set1` to the bitwise `and` of the original bits in `set1` !! and `set2`. The sets must have the same number of bits !! otherwise the result is undefined. !! ([Specification](../page/specs/stdlib_bitsets.html#and-bitwise-and-of-the-bits-of-two-bitsets)) !! !!#### Example !! !!```fortran !! program example_and !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call and( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of AND worked.' !! call set0 % not() !! call and( set0, set1 ) ! all none !! if ( none(set0) ) write(*,*) 'Second test of AND worked.' !! call set1 % not() !! call and( set0, set1 ) ! none all !! if ( none(set0) ) write(*,*) 'Third test of AND worked.' !! call set0 % not() !! call and( set0, set1 ) ! all all !! if ( all(set0) ) write(*,*) 'Fourth test of AND worked.' !! end program example_and !!``` elemental module subroutine and_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine and_large elemental module subroutine and_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine and_64 end interface and interface and_not !! Version: experimental !! !! Sets the bits in `set1` to the bitwise and of the original bits in `set1` !! with the bitwise negation of `set2`. The sets must have the same !! number of bits otherwise the result is undefined. !! !! ([Specification](../page/specs/stdlib_bitsets.html#and_not-bitwise-and-of-one-bitset-with-the-negation-of-another)) !! !!#### Example !! !!```fortran !! program example_and_not !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call and_not( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of AND_NOT worked.' !! call set0 % not() !! call and_not( set0, set1 ) ! all none !! if ( all(set0) ) write(*,*) 'Second test of AND_NOT worked.' !! call set0 % not() !! call set1 % not() !! call and_not( set0, set1 ) ! none all !! if ( none(set0) ) write(*,*) 'Third test of AND_NOT worked.' !! call set0 % not() !! call and_not( set0, set1 ) ! all all !! if ( none(set0) ) write(*,*) 'Fourth test of AND_NOT worked.' !! end program example_and_not !!``` elemental module subroutine and_not_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine and_not_large elemental module subroutine and_not_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine and_not_64 end interface and_not interface extract !! Version: experimental !! !! Creates a new bitset, `new`, from a range, `start_pos` to `stop_pos`, in !! bitset `old`. If `start_pos` is greater than `stop_pos` the new bitset is !! empty. If `start_pos` is less than zero or `stop_pos` is greater than !! `bits(old)-1` then if `status` is present it has the value !! `index_invalid_error` and `new` is undefined, otherwise processing stops !! with an informative message. !! ([Specification](../page/specs/stdlib_bitsets.html#extract-create-a-new-bitset-from-a-range-in-an-old-bitset)) !! !!#### Example !! !!```fortran !! program example_extract !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set0 % set(100,150) !! call extract( set1, set0, 100, 150) !! if ( set1 % bits() == 51 ) & !! write(*,*) 'SET1 has the proper size.' !! if ( set1 % all() ) write(*,*) 'SET1 has the proper values.' !! end program example_extract !!``` module subroutine extract_large ( new , old , start_pos , stop_pos , status ) type ( bitset_large ), intent ( out ) :: new type ( bitset_large ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status end subroutine extract_large module subroutine extract_64 ( new , old , start_pos , stop_pos , status ) type ( bitset_64 ), intent ( out ) :: new type ( bitset_64 ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status end subroutine extract_64 end interface extract interface or !! Version: experimental !! !! Sets the bits in `set1` to the bitwise `or` of the original bits in `set1` !! and `set2`. The sets must have the same number of bits otherwise !! the result is undefined. !! ([Specification](../page/specs/stdlib_bitsets.html#or-bitwise-or-of-the-bits-of-two-bitsets)) !! !!#### Example !! !!```fortran !! program example_or !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call or( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of OR worked.' !! call set0 % not() !! call or( set0, set1 ) ! all none !! if ( all(set0) ) write(*,*) 'Second test of OR worked.' !! call set0 % not() !! call set1 % not() !! call or( set0, set1 ) ! none all !! if ( all(set0) ) write(*,*) 'Third test of OR worked.' !! call set0 % not() !! call or( set0, set1 ) ! all all !! if ( all(set0) ) write(*,*) 'Fourth test of OR worked.' !! end program example_or !!``` elemental module subroutine or_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine or_large elemental module subroutine or_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine or_64 end interface or interface xor !! Version: experimental !! !! Sets the bits in `set1` to the bitwise `xor` of the original bits in `set1` !! and `set2`. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#xor-bitwise-exclusive-or)) !! !!#### Example !! !!```fortran !! program example_xor !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call xor( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of XOR worked.' !! call set0 % not() !! call xor( set0, set1 ) ! all none !! if ( all(set0) ) write(*,*) 'Second test of XOR worked.' !! call set0 % not() !! call set1 % not() !! call xor( set0, set1 ) ! none all !! if ( all(set0) ) write(*,*) 'Third test of XOR worked.' !! call set0 % not() !! call xor( set0, set1 ) ! all all !! if ( none(set0) ) write(*,*) 'Fourth test of XOR worked.' !! end program example_xor !!``` elemental module subroutine xor_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine xor_large elemental module subroutine xor_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine xor_64 end interface xor interface operator ( == ) !! Version: experimental !! !! Returns `.true.` if all bits in `set1` and `set2` have the same value, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#-compare-two-bitsets-to-determine-whether-the-bits-have-the-same-value)) !! !!#### Example !! !!```fortran !! program example_equality !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 == set0 .and. set1 == set1 .and. set2 == set2 .and. & !! .not. set0 == set1 .and. .not. set0 == set2 .and. .not. & !! set1 == set2 ) then !! write(*,*) 'Passed 64 bit equality tests.' !! else !! error stop 'Failed 64 bit equality tests.' !! end if !! end program example_equality !!``` elemental module function eqv_large ( set1 , set2 ) result ( eqv ) logical :: eqv type ( bitset_large ), intent ( in ) :: set1 , set2 end function eqv_large elemental module function eqv_64 ( set1 , set2 ) result ( eqv ) logical :: eqv type ( bitset_64 ), intent ( in ) :: set1 , set2 end function eqv_64 end interface operator ( == ) interface operator ( /= ) !! Version: experimental !! !! Returns `.true.` if not all bits in `set1` and `set2` have the same value, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#-compare-two-bitsets-to-determine-whether-any-bits-differ-in-value)) !! !!#### Example !! !!```fortran !! program example_inequality !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 /= set1 .and. set0 /= set2 .and. set1 /= set2 .and. & !! .not. set0 /= set0 .and. .not. set1 /= set1 .and. .not. & !! set2 /= set2 ) then !! write(*,*) 'Passed 64 bit inequality tests.' !! else !! error stop 'Failed 64 bit inequality tests.' !! end if !! end program example_inequality !!``` elemental module function neqv_large ( set1 , set2 ) result ( neqv ) logical :: neqv type ( bitset_large ), intent ( in ) :: set1 , set2 end function neqv_large elemental module function neqv_64 ( set1 , set2 ) result ( neqv ) logical :: neqv type ( bitset_64 ), intent ( in ) :: set1 , set2 end function neqv_64 end interface operator ( /= ) interface operator ( > ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` differ and the !! highest order different bit is set to 1 in `set1` and to 0 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#gt-compare-two-bitsets-to-determine-whether-the-first-is-greater-than-the-other)) !! !!#### Example !! !!```fortran !! program example_gt !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set1 > set0 .and. set2 > set1 .and. set2 > set0 .and. & !! .not. set0 > set0 .and. .not. set0 > set1 .and. .not. & !! set1 > set2 ) then !! write(*,*) 'Passed 64 bit greater than tests.' !! else !! error stop 'Failed 64 bit greater than tests.' !! end if !! end program example_gt !!``` elemental module function gt_large ( set1 , set2 ) result ( gt ) logical :: gt type ( bitset_large ), intent ( in ) :: set1 , set2 end function gt_large elemental module function gt_64 ( set1 , set2 ) result ( gt ) logical :: gt type ( bitset_64 ), intent ( in ) :: set1 , set2 end function gt_64 end interface operator ( > ) interface operator ( >= ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` are the same or the !! highest order different bit is set to 1 in `set1` and to 0 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !! ([Specification](../page/specs/stdlib_bitsets.html#gt-compare-two-bitsets-to-determine-whether-the-first-is-greater-than-or-equal-to-the-second)) !! !!#### Example !! !!```fortran !! program example_ge !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set1 >= set0 .and. set2 >= set1 .and. set2 >= set0 .and. & !! set0 >= set0 .and. set1 >= set1 .and. set2 >= set2 .and. & !! .not. set0 >= set1 .and. .not. set0 >= set2 .and. .not. & !! set1 >= set2 ) then !! write(*,*) 'Passed 64 bit greater than or equals tests.' !! else !! error stop 'Failed 64 bit greater than or equals tests.' !! end if !! end program example_ge !!``` elemental module function ge_large ( set1 , set2 ) result ( ge ) logical :: ge type ( bitset_large ), intent ( in ) :: set1 , set2 end function ge_large elemental module function ge_64 ( set1 , set2 ) result ( ge ) logical :: ge type ( bitset_64 ), intent ( in ) :: set1 , set2 end function ge_64 end interface operator ( >= ) interface operator ( < ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` differ and the !! highest order different bit is set to 0 in `set1` and to 1 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#lt-compare-two-bitsets-to-determine-whether-the-first-is-less-than-the-other)) !! !!#### Example !! !!```fortran !! program example_lt !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 < set1 .and. set1 < set2 .and. set0 < set2 .and. & !! .not. set0 < set0 .and. .not. set2 < set0 .and. .not. & !! set2 < set1 ) then !! write(*,*) 'Passed 64 bit less than tests.' !! else !! error stop 'Failed 64 bit less than tests.' !! end if !! end program example_lt !!``` elemental module function lt_large ( set1 , set2 ) result ( lt ) logical :: lt type ( bitset_large ), intent ( in ) :: set1 , set2 end function lt_large elemental module function lt_64 ( set1 , set2 ) result ( lt ) logical :: lt type ( bitset_64 ), intent ( in ) :: set1 , set2 end function lt_64 end interface operator ( < ) interface operator ( <= ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` are the same or the !! highest order different bit is set to 0 in `set1` and to 1 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#lt-compare-two-bitsets-to-determine-whether-the-first-is-less-than-or-equal-to-the-other)) !! !!#### Example !! !!```fortran !! program example_le !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 <= set1 .and. set1 <= set2 .and. set0 <= set2 .and. & !! set0 <= set0 .and. set1 <= set1 .and. set2 <= set2 .and. & !! .not. set1 <= set0 .and. .not. set2 <= set0 .and. .not. & !! set2 <= set1 ) then !! write(*,*) 'Passed 64 bit less than or equal tests.' !! else !! error stop 'Failed 64 bit less than or equal tests.' !! end if !! end program example_le !!``` elemental module function le_large ( set1 , set2 ) result ( le ) logical :: le type ( bitset_large ), intent ( in ) :: set1 , set2 end function le_large elemental module function le_64 ( set1 , set2 ) result ( le ) logical :: le type ( bitset_64 ), intent ( in ) :: set1 , set2 end function le_64 end interface operator ( <= ) interface error_handler module subroutine error_handler ( message , error , status , & module , procedure ) character ( * ), intent ( in ) :: message integer , intent ( in ) :: error integer , intent ( out ), optional :: status character ( * ), intent ( in ), optional :: module character ( * ), intent ( in ), optional :: procedure end subroutine error_handler end interface error_handler contains elemental function bits ( self ) !! Version: experimental !! !! Returns the number of bit positions in `self`. integer ( bits_kind ) :: bits class ( bitset_type ), intent ( in ) :: self bits = self % num_bits return end function bits module subroutine error_handler ( message , error , status , module , procedure ) character ( * ), intent ( in ) :: message integer , intent ( in ) :: error integer , intent ( out ), optional :: status character ( * ), intent ( in ), optional :: module character ( * ), intent ( in ), optional :: procedure if ( present ( status ) ) then status = error else if ( present ( module ) ) then if ( present ( procedure ) ) then write ( error_unit , '(a)' ) trim ( module ) // ' % ' // & trim ( procedure ) // ': ' // trim ( message ) else write ( error_unit , '(a)' ) trim ( module ) // ' % N/A: ' // & trim ( message ) end if else if ( present ( procedure ) ) then write ( error_unit , '(a)' ) trim ( procedure ) // ': ' // & trim ( message ) else write ( error_unit , '(a)' ) trim ( message ) end if select case ( error ) case ( alloc_fault ) error stop 'A memory allocation failed.' case ( array_size_invalid_error ) error stop \"An array size was invalid.\" case ( char_string_invalid_error ) error stop \"A character string had an invalid character.\" case ( char_string_too_large_error ) error stop \"A character string was too large.\" case ( char_string_too_small_error ) error stop \"A character string was too small.\" case ( eof_failure ) error stop \"An End-Of-File failure occurred on a READ \" // & \"statement.\" case ( index_invalid_error ) error stop \"An index was invalid.\" case ( integer_overflow_error ) error stop \"An integer overflow error occurred.\" case ( read_failure ) error stop \"A failure occurred in a READ statement.\" case ( write_failure ) error stop \"A failure occurred on a WRITE statement.\" end select end if end subroutine error_handler end module stdlib_bitsets","tags":"","loc":"sourcefile/stdlib_bitsets.fypp.html"},{"title":"stdlib_sorting_radix_sort.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_sorting ) stdlib_sorting_radix_sort implicit none integer , parameter :: radix_bits = 8 integer , parameter :: radix_mask = 255 integer ( kind = int16 ), parameter :: radix_bits_i16 = 8_int16 integer ( kind = int16 ), parameter :: radix_mask_i16 = 255_int16 integer ( kind = int32 ), parameter :: radix_bits_i32 = 8_int32 integer ( kind = int32 ), parameter :: radix_mask_i32 = 255_int32 integer ( kind = int64 ), parameter :: radix_bits_i64 = 8_int64 integer ( kind = int64 ), parameter :: radix_mask_i64 = 255_int64 contains ! For int8, radix sort becomes counting sort, so buffer is not needed pure subroutine radix_sort_u8_helper ( N , arr ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int8 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int_index ) :: i integer :: bin_idx integer ( kind = int_index ), dimension ( - 128 : 127 ) :: counts counts (:) = 0 do i = 1 , N bin_idx = arr ( i ) counts ( bin_idx ) = counts ( bin_idx ) + 1 end do i = 1 do bin_idx = - 128 , 127 do while ( counts ( bin_idx ) > 0 ) arr ( i ) = int ( bin_idx , kind = int8 ) i = i + 1 counts ( bin_idx ) = counts ( bin_idx ) - 1 end do end do end subroutine pure subroutine radix_sort_u16_helper ( N , arr , buf ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int16 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int16 ), dimension ( N ), intent ( inout ) :: buf integer ( kind = int_index ) :: i integer :: b , b0 , b1 integer ( kind = int_index ), dimension ( 0 : radix_mask ) :: c0 , c1 c0 (:) = 0 c1 (:) = 0 do i = 1 , N b0 = iand ( arr ( i ), radix_mask_i16 ) b1 = ishft ( arr ( i ), - radix_bits_i16 ) c0 ( b0 ) = c0 ( b0 ) + 1 c1 ( b1 ) = c1 ( b1 ) + 1 end do do b = 1 , radix_mask c0 ( b ) = c0 ( b ) + c0 ( b - 1 ) c1 ( b ) = c1 ( b ) + c1 ( b - 1 ) end do do i = N , 1 , - 1 b0 = iand ( arr ( i ), radix_mask_i16 ) buf ( c0 ( b0 )) = arr ( i ) c0 ( b0 ) = c0 ( b0 ) - 1 end do do i = N , 1 , - 1 b1 = ishft ( buf ( i ), - radix_bits_i16 ) arr ( c1 ( b1 )) = buf ( i ) c1 ( b1 ) = c1 ( b1 ) - 1 end do end subroutine pure subroutine radix_sort_u32_helper ( N , arr , buf ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int32 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int32 ), dimension ( N ), intent ( inout ) :: buf integer ( kind = int_index ) :: i integer :: b , b0 , b1 , b2 , b3 integer ( kind = int_index ), dimension ( 0 : radix_mask ) :: c0 , c1 , c2 , c3 c0 (:) = 0 c1 (:) = 0 c2 (:) = 0 c3 (:) = 0 do i = 1 , N b0 = iand ( arr ( i ), radix_mask_i32 ) b1 = iand ( ishft ( arr ( i ), - radix_bits_i32 ), radix_mask_i32 ) b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i32 ), radix_mask_i32 ) b3 = ishft ( arr ( i ), - 3 * radix_bits_i32 ) c0 ( b0 ) = c0 ( b0 ) + 1 c1 ( b1 ) = c1 ( b1 ) + 1 c2 ( b2 ) = c2 ( b2 ) + 1 c3 ( b3 ) = c3 ( b3 ) + 1 end do do b = 1 , radix_mask c0 ( b ) = c0 ( b ) + c0 ( b - 1 ) c1 ( b ) = c1 ( b ) + c1 ( b - 1 ) c2 ( b ) = c2 ( b ) + c2 ( b - 1 ) c3 ( b ) = c3 ( b ) + c3 ( b - 1 ) end do do i = N , 1 , - 1 b0 = iand ( arr ( i ), radix_mask_i32 ) buf ( c0 ( b0 )) = arr ( i ) c0 ( b0 ) = c0 ( b0 ) - 1 end do do i = N , 1 , - 1 b1 = iand ( ishft ( buf ( i ), - radix_bits_i32 ), radix_mask_i32 ) arr ( c1 ( b1 )) = buf ( i ) c1 ( b1 ) = c1 ( b1 ) - 1 end do do i = N , 1 , - 1 b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i32 ), radix_mask_i32 ) buf ( c2 ( b2 )) = arr ( i ) c2 ( b2 ) = c2 ( b2 ) - 1 end do do i = N , 1 , - 1 b3 = ishft ( buf ( i ), - 3 * radix_bits_i32 ) arr ( c3 ( b3 )) = buf ( i ) c3 ( b3 ) = c3 ( b3 ) - 1 end do end subroutine radix_sort_u32_helper pure subroutine radix_sort_u64_helper ( N , arr , buffer ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int64 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int64 ), dimension ( N ), intent ( inout ) :: buffer integer ( kind = int_index ) :: i integer ( kind = int64 ) :: b , b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7 integer ( kind = int_index ), dimension ( 0 : radix_mask ) :: c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 c0 (:) = 0 c1 (:) = 0 c2 (:) = 0 c3 (:) = 0 c4 (:) = 0 c5 (:) = 0 c6 (:) = 0 c7 (:) = 0 do i = 1 , N b0 = iand ( arr ( i ), radix_mask_i64 ) b1 = iand ( ishft ( arr ( i ), - radix_bits_i64 ), radix_mask_i64 ) b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i64 ), radix_mask_i64 ) b3 = iand ( ishft ( arr ( i ), - 3 * radix_bits_i64 ), radix_mask_i64 ) b4 = iand ( ishft ( arr ( i ), - 4 * radix_bits_i64 ), radix_mask_i64 ) b5 = iand ( ishft ( arr ( i ), - 5 * radix_bits_i64 ), radix_mask_i64 ) b6 = iand ( ishft ( arr ( i ), - 6 * radix_bits_i64 ), radix_mask_i64 ) b7 = ishft ( arr ( i ), - 7 * radix_bits_i64 ) c0 ( b0 ) = c0 ( b0 ) + 1 c1 ( b1 ) = c1 ( b1 ) + 1 c2 ( b2 ) = c2 ( b2 ) + 1 c3 ( b3 ) = c3 ( b3 ) + 1 c4 ( b4 ) = c4 ( b4 ) + 1 c5 ( b5 ) = c5 ( b5 ) + 1 c6 ( b6 ) = c6 ( b6 ) + 1 c7 ( b7 ) = c7 ( b7 ) + 1 end do do b = 1 , radix_mask c0 ( b ) = c0 ( b ) + c0 ( b - 1 ) c1 ( b ) = c1 ( b ) + c1 ( b - 1 ) c2 ( b ) = c2 ( b ) + c2 ( b - 1 ) c3 ( b ) = c3 ( b ) + c3 ( b - 1 ) c4 ( b ) = c4 ( b ) + c4 ( b - 1 ) c5 ( b ) = c5 ( b ) + c5 ( b - 1 ) c6 ( b ) = c6 ( b ) + c6 ( b - 1 ) c7 ( b ) = c7 ( b ) + c7 ( b - 1 ) end do do i = N , 1 , - 1 b0 = iand ( arr ( i ), radix_mask_i64 ) buffer ( c0 ( b0 )) = arr ( i ) c0 ( b0 ) = c0 ( b0 ) - 1 end do do i = N , 1 , - 1 b1 = iand ( ishft ( buffer ( i ), - radix_bits_i64 ), radix_mask_i64 ) arr ( c1 ( b1 )) = buffer ( i ) c1 ( b1 ) = c1 ( b1 ) - 1 end do do i = N , 1 , - 1 b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i64 ), radix_mask_i64 ) buffer ( c2 ( b2 )) = arr ( i ) c2 ( b2 ) = c2 ( b2 ) - 1 end do do i = N , 1 , - 1 b3 = iand ( ishft ( buffer ( i ), - 3 * radix_bits_i64 ), radix_mask_i64 ) arr ( c3 ( b3 )) = buffer ( i ) c3 ( b3 ) = c3 ( b3 ) - 1 end do do i = N , 1 , - 1 b4 = iand ( ishft ( arr ( i ), - 4 * radix_bits_i64 ), radix_mask_i64 ) buffer ( c4 ( b4 )) = arr ( i ) c4 ( b4 ) = c4 ( b4 ) - 1 end do do i = N , 1 , - 1 b5 = iand ( ishft ( buffer ( i ), - 5 * radix_bits_i64 ), radix_mask_i64 ) arr ( c5 ( b5 )) = buffer ( i ) c5 ( b5 ) = c5 ( b5 ) - 1 end do do i = N , 1 , - 1 b6 = iand ( ishft ( arr ( i ), - 6 * radix_bits_i64 ), radix_mask_i64 ) buffer ( c6 ( b6 )) = arr ( i ) c6 ( b6 ) = c6 ( b6 ) - 1 end do do i = N , 1 , - 1 b7 = ishft ( buffer ( i ), - 7 * radix_bits_i64 ) arr ( c7 ( b7 )) = buffer ( i ) c7 ( b7 ) = c7 ( b7 ) - 1 end do end subroutine radix_sort_u64_helper pure module subroutine int8_radix_sort ( array , reverse ) integer ( kind = int8 ), dimension (:), intent ( inout ) :: array logical , intent ( in ), optional :: reverse integer ( kind = int8 ) :: item integer ( kind = int_index ) :: i , N N = size ( array , kind = int_index ) call radix_sort_u8_helper ( N , array ) if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if end subroutine int8_radix_sort pure module subroutine int16_radix_sort ( array , work , reverse ) integer ( kind = int16 ), dimension (:), intent ( inout ) :: array integer ( kind = int16 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , start , middle , end integer ( kind = int16 ), dimension (:), pointer :: buffer integer ( kind = int16 ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"int16_radix_sort: work array is too small.\" end if use_internal_buffer = . false . buffer => work else use_internal_buffer = . true . allocate ( buffer ( N )) end if call radix_sort_u16_helper ( N , array , buffer ) ! After calling `radix_sort_u_helper. The array is sorted as unsigned integers. ! In the view of signed array, the negative numbers are sorted but in the tail of the array. ! Use binary search to find the boundary, and move them to correct position. if ( array ( 1 ) >= 0 . and . array ( N ) < 0 ) then start = 1 end = N middle = ( 1 + N ) / 2 do while (. true .) if ( array ( middle ) >= 0 ) then start = middle + 1 else end = middle end if middle = ( start + end ) / 2 if ( start == end ) exit end do buffer ( 1 :( N - middle + 1 )) = array ( middle : N ) buffer ( N - middle + 2 : N ) = array ( 1 : middle - 1 ) array (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine int16_radix_sort pure module subroutine int32_radix_sort ( array , work , reverse ) integer ( kind = int32 ), dimension (:), intent ( inout ) :: array integer ( kind = int32 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , start , middle , end integer ( kind = int32 ), dimension (:), pointer :: buffer integer ( kind = int32 ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"int32_radix_sort: work array is too small.\" end if use_internal_buffer = . false . buffer => work else use_internal_buffer = . true . allocate ( buffer ( N )) end if call radix_sort_u32_helper ( N , array , buffer ) if ( array ( 1 ) >= 0 . and . array ( N ) < 0 ) then start = 1 end = N middle = ( 1 + N ) / 2 do while (. true .) if ( array ( middle ) >= 0 ) then start = middle + 1 else end = middle end if middle = ( start + end ) / 2 if ( start == end ) exit end do buffer ( 1 :( N - middle + 1 )) = array ( middle : N ) buffer ( N - middle + 2 : N ) = array ( 1 : middle - 1 ) array (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine int32_radix_sort module subroutine sp_radix_sort ( array , work , reverse ) use iso_c_binding real ( kind = sp ), dimension (:), intent ( inout ), target :: array real ( kind = sp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , pos , rev_pos integer ( kind = int32 ), dimension (:), pointer :: arri32 integer ( kind = int32 ), dimension (:), pointer :: buffer real ( kind = sp ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"sp_radix_sort: work array is too small.\" end if use_internal_buffer = . false . call c_f_pointer ( c_loc ( work ), buffer , [ N ]) else use_internal_buffer = . true . allocate ( buffer ( N )) end if call c_f_pointer ( c_loc ( array ), arri32 , [ N ]) call radix_sort_u32_helper ( N , arri32 , buffer ) ! After calling `radix_sort_u_helper. The array is sorted as unsigned integers. ! The positive real number is sorted, guaranteed by IEEE-754 standard. ! But the negative real number is sorted in a reversed order, and also in the tail of array. ! Remark that -0.0 is the minimum nagative integer, so using radix sort, -0.0 is naturally lesser than 0.0. ! In IEEE-754 standard, the bit representation of `Inf` is greater than all positive real numbers, ! and the `-Inf` is lesser than all negative real numbers. So the order of `Inf, -Inf` is ok. ! The bit representation of `NaN` may be positive or negative integers in different machine, ! thus if the array contains `NaN`, the result is undefined. if ( arri32 ( 1 ) >= 0 . and . arri32 ( N ) < 0 ) then pos = 1 rev_pos = N do while ( arri32 ( rev_pos ) < 0 ) buffer ( pos ) = arri32 ( rev_pos ) pos = pos + 1 rev_pos = rev_pos - 1 end do buffer ( pos : N ) = arri32 ( 1 : rev_pos ) arri32 (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine sp_radix_sort pure module subroutine int64_radix_sort ( array , work , reverse ) integer ( kind = int64 ), dimension (:), intent ( inout ) :: array integer ( kind = int64 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , start , middle , end integer ( kind = int64 ), dimension (:), pointer :: buffer integer ( kind = int64 ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"int64_radix_sort: work array is too small.\" end if use_internal_buffer = . false . buffer => work else use_internal_buffer = . true . allocate ( buffer ( N )) end if call radix_sort_u64_helper ( N , array , buffer ) if ( array ( 1 ) >= 0 . and . array ( N ) < 0 ) then start = 1 end = N middle = ( 1 + N ) / 2 do while (. true .) if ( array ( middle ) >= 0 ) then start = middle + 1 else end = middle end if middle = ( start + end ) / 2 if ( start == end ) exit end do buffer ( 1 :( N - middle + 1 )) = array ( middle : N ) buffer ( N - middle + 2 : N ) = array ( 1 : middle - 1 ) array (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine int64_radix_sort module subroutine dp_radix_sort ( array , work , reverse ) use iso_c_binding real ( kind = dp ), dimension (:), intent ( inout ), target :: array real ( kind = dp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , pos , rev_pos integer ( kind = int64 ), dimension (:), pointer :: arri64 integer ( kind = int64 ), dimension (:), pointer :: buffer real ( kind = dp ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"sp_radix_sort: work array is too small.\" end if use_internal_buffer = . false . call c_f_pointer ( c_loc ( work ), buffer , [ N ]) else use_internal_buffer = . true . allocate ( buffer ( N )) end if call c_f_pointer ( c_loc ( array ), arri64 , [ N ]) call radix_sort_u64_helper ( N , arri64 , buffer ) if ( arri64 ( 1 ) >= 0 . and . arri64 ( N ) < 0 ) then pos = 1 rev_pos = N do while ( arri64 ( rev_pos ) < 0 ) buffer ( pos ) = arri64 ( rev_pos ) pos = pos + 1 rev_pos = rev_pos - 1 end do buffer ( pos : N ) = arri64 ( 1 : rev_pos ) arri64 (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine dp_radix_sort end submodule stdlib_sorting_radix_sort","tags":"","loc":"sourcefile/stdlib_sorting_radix_sort.f90.html"},{"title":"stdlib_linalg_kronecker.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_kronecker implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES pure module function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ ( A , B ) result ( C ) ${ t1 }$ , intent ( in ) :: A (:,:), B (:,:) ${ t1 }$ :: C ( size ( A , dim = 1 ) * size ( B , dim = 1 ), size ( A , dim = 2 ) * size ( B , dim = 2 )) integer :: m1 , n1 , maxM1 , maxN1 , maxM2 , maxN2 maxM1 = size ( A , dim = 1 ) maxN1 = size ( A , dim = 2 ) maxM2 = size ( B , dim = 1 ) maxN2 = size ( B , dim = 2 ) do n1 = 1 , maxN1 do m1 = 1 , maxM1 ! We use the Wikipedia convention for ordering of the matrix elements ! https://en.wikipedia.org/wiki/Kronecker_product C (( m1 - 1 ) * maxM2 + 1 : m1 * maxM2 , ( n1 - 1 ) * maxN2 + 1 : n1 * maxN2 ) = A ( m1 , n1 ) * B (:,:) end do end do end function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule stdlib_linalg_kronecker","tags":"","loc":"sourcefile/stdlib_linalg_kronecker.fypp.html"},{"title":"stdlib_math_logspace.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_math ) stdlib_math_logspace implicit none contains # !========================================================= # != logspace(start, end) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"default\" ) module procedure ${ RName }$ res = logspace ( start , end , DEFAULT_LOGSPACE_LENGTH , real ( DEFAULT_LOGSPACE_BASE , ${ k1 }$ )) end procedure # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"default\" ) module procedure ${ RName }$ res = logspace ( start , end , DEFAULT_LOGSPACE_LENGTH , DEFAULT_LOGSPACE_BASE ) end procedure # !========================================================= # != logspace(start, end, n) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n\" ) module procedure ${ RName }$ res = logspace ( start , end , n , real ( DEFAULT_LOGSPACE_BASE , ${ k1 }$ )) end procedure # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n\" ) module procedure ${ RName }$ res = logspace ( start , end , n , DEFAULT_LOGSPACE_BASE ) end procedure # !========================================================= # != logspace(start, end, n, base) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_rbase\" ) module procedure ${ RName }$ ${ t1 }$ :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_cbase\" ) module procedure ${ RName }$ ${ t1 }$ :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_ibase\" ) module procedure ${ RName }$ ${ t1 }$ :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : endfor # ! Integer support: ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! RName = ${RName}$ # : for k1 in REAL_KINDS # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_r\" + str ( k1 ) + \"base\" ) module procedure ${ RName }$ integer :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_c\" + str ( k1 ) + \"base\" ) module procedure ${ RName }$ integer :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : endfor # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_ibase\" ) module procedure ${ RName }$ integer :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure end submodule","tags":"","loc":"sourcefile/stdlib_math_logspace.fypp.html"},{"title":"stdlib_error.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_error !! Provides support for catching and handling errors !! ([Specification](../page/specs/stdlib_error.html)) use , intrinsic :: iso_fortran_env , only : stderr => error_unit use stdlib_optval , only : optval implicit none private interface ! f{08,18}estop.f90 module subroutine error_stop ( msg , code ) !! version: experimental !! !! Provides a call to `error stop` and allows the user to specify a code and message !! ([Specification](..//page/specs/stdlib_error.html#description_1)) character ( * ), intent ( in ) :: msg integer , intent ( in ), optional :: code end subroutine error_stop end interface public :: check , error_stop contains subroutine check ( condition , msg , code , warn ) !! version: experimental !! !! Checks the value of a logical condition !! ([Specification](../page/specs/stdlib_error.html#description)) !! !!##### Behavior !! !! If `condition == .false.` and: !! !! * No other arguments are provided, it stops the program with the default !! message and exit code `1`; !! * `msg` is provided, it prints the value of `msg`; !! * `code` is provided, it stops the program with the given exit code; !! * `warn` is provided and `.true.`, it doesn't stop the program and prints !! the message. !! !!##### Examples !! !!* If `a /= 5`, stops the program with exit code `1` !! and prints `Check failed.` !!``` fortran !! call check(a == 5) !!``` !! !!* As above, but prints `a == 5 failed`. !!``` fortran !! call check(a == 5, msg='a == 5 failed.') !!``` !! !!* As above, but doesn't stop the program. !!``` fortran !! call check(a == 5, msg='a == 5 failed.', warn=.true.) !!``` !! !!* As example #2, but stops the program with exit code `77` !!``` fortran !! call check(a == 5, msg='a == 5 failed.', code=77) !!``` ! ! Arguments ! --------- logical , intent ( in ) :: condition character ( * ), intent ( in ), optional :: msg integer , intent ( in ), optional :: code logical , intent ( in ), optional :: warn character ( * ), parameter :: msg_default = 'Check failed.' if (. not . condition ) then if ( optval ( warn , . false .)) then write ( stderr , * ) optval ( msg , msg_default ) else call error_stop ( optval ( msg , msg_default ), optval ( code , 1 )) end if end if end subroutine check end module stdlib_error","tags":"","loc":"sourcefile/stdlib_error.f90.html"},{"title":"stdlib_stats.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set IR_KINDS_TYPES_OUTPUT = list(zip(INT_KINDS,INT_TYPES, ['dp']*len(INT_KINDS))) + list(zip(REAL_KINDS, REAL_TYPES, REAL_KINDS)) module stdlib_stats !! Provides support for various statistical methods. This includes currently !! descriptive statistics !! ([Specification](../page/specs/stdlib_stats.html)) use stdlib_kinds , only : sp , dp , xdp , qp , & int8 , int16 , int32 , int64 implicit none private ! Public API public :: corr , cov , mean , median , moment , var interface corr !! version: experimental !! !! Pearson correlation of array elements !! ([Specification](../page/specs/stdlib_stats.html#corr-pearson-correlation-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor end interface corr interface cov !! version: experimental !! !! Covariance of array elements !! ([Specification](../page/specs/stdlib_stats.html#cov-covariance-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor end interface cov interface mean !! version: experimental !! !! Mean of array elements !! ([Specification](../page/specs/stdlib_stats.html#mean-mean-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor end interface mean interface median !! version: experimental !! !! Median of array elements !! ([Specification](../page/specs/stdlib_stats.html#median-median-of-array-elements)) # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median_all\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_all_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ name }$ # : endfor # : endfor end interface interface var !! version: experimental !! !! Variance of array elements !! ([Specification](../page/specs/stdlib_stats.html#var-variance-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor end interface var interface moment !! version: experimental !! !! Central moment of array elements !! ([Specification](../page/specs/stdlib_stats.html#moment-central-moments-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ), optional :: mask real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor end interface moment end module stdlib_stats","tags":"","loc":"sourcefile/stdlib_stats.fypp.html"},{"title":"stdlib_linalg_svd.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_svd !! Singular-Value Decomposition use stdlib_linalg_constants use stdlib_linalg_lapack , only : gesdd use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR , LINALG_SUCCESS implicit none ( type , external ) character ( * ), parameter :: this = 'svd' !> List of internal GESDD tasks: !> Return full matrices U, V^T to separate storage character , parameter :: GESDD_FULL_MATRICES = 'A' !> Return shrunk matrices U, V^T to k = min(m,n) character , parameter :: GESDD_SHRINK_MATRICES = 'S' !> Overwrite A storage with U (if M>=N) or VT (if M Do not return either U or VT (singular values array only) character , parameter :: GESDD_SINGVAL_ONLY = 'N' contains !> Process GESDD output flag elemental subroutine handle_gesdd_info ( err , info , m , n ) !> Error handler type ( linalg_state_type ), intent ( inout ) :: err !> GESDD return flag integer ( ilp ), intent ( in ) :: info !> Input matrix size integer ( ilp ), intent ( in ) :: m , n select case ( info ) case ( 0 ) ! Success! err % state = LINALG_SUCCESS case ( - 1 ) err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'Invalid task ID on input to GESDD.' ) case ( - 5 , - 3 : - 2 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix size: a=' ,[ m , n ]) case ( - 8 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix U size, with a=' ,[ m , n ]) case ( - 10 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix V size, with a=' ,[ m , n ]) case ( - 4 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'A contains invalid/NaN values.' ) case ( 1 :) err = linalg_state_type ( this , LINALG_ERROR , 'SVD computation did not converge.' ) case default err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'Unknown error returned by GESDD.' ) end select end subroutine handle_gesdd_info # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" !> Singular values of matrix A module function stdlib_linalg_svdvals_$ { ri }$ ( a , err ) result ( s ) !!### Summary !! Compute singular values S from the singular-value decomposition of a matrix A = U \\cdot S \\cdot \\V^T . !! !!### Description !! !! This function returns the array of singular values from the singular value decomposition of a `real` !! or `complex` matrix A = U \\cdot S \\cdot V^T . !! !! param: a Input matrix of size [m,n]. !! param: err [optional] State return flag. !! !!### Return value !! !! param: s `real` array of size [min(m,n)] returning a list of singular values. !! !> Input matrix A[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Array of singular values real ( ${ rk }$ ), allocatable :: s (:) !> Create ${ rt }$ , pointer :: amat (:,:) integer ( ilp ) :: m , n , k !> Create an internal pointer so the intent of A won't affect the next call amat => a m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) k = min ( m , n ) !> Allocate return storage allocate ( s ( k )) !> Compute singular values call stdlib_linalg_svd_$ { ri }$ ( amat , s , overwrite_a = . false ., err = err ) end function stdlib_linalg_svdvals_$ { ri }$ !> SVD of matrix A = U S V^T, returning S and optionally U and V^T module subroutine stdlib_linalg_svd_$ { ri }$ ( a , s , u , vt , overwrite_a , full_matrices , err ) !!### Summary !! Compute singular value decomposition of a matrix A = U \\cdot S \\cdot \\V^T !! !!### Description !! !! This function computes the singular value decomposition of a `real` or `complex` matrix A , !! and returns the array of singular values, and optionally the left matrix U containing the !! left unitary singular vectors, and the right matrix V^T , containing the right unitary !! singular vectors. !! !! param: a Input matrix of size [m,n]. !! param: s Output `real` array of size [min(m,n)] returning a list of singular values. !! param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns. !! param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: full_matrices [optional] If `.true.` (default), matrices U and V^T have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with `k=min(m,n)`. !! param: err [optional] State return flag. !! !> Input matrix A[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Array of singular values real ( ${ rk }$ ), intent ( out ) :: s (:) !> The columns of U contain the left singular vectors ${ rt }$ , optional , intent ( out ), target :: u (:,:) !> The rows of V^T contain the right singular vectors ${ rt }$ , optional , intent ( out ), target :: vt (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise !> they are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) logical ( lk ), optional , intent ( in ) :: full_matrices !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , lda , ldu , ldvt , info , k , lwork , liwork , lrwork integer ( ilp ), allocatable :: iwork (:) logical ( lk ) :: overwrite_a_ , full_storage , compute_uv , temp_u , temp_vt , can_overwrite_amat character :: task ${ rt }$ , target :: work_dummy ( 1 ), u_dummy ( 1 , 1 ), vt_dummy ( 1 , 1 ) ${ rt }$ , allocatable :: work (:) real ( ${ rk }$ ), allocatable :: rwork (:) ${ rt }$ , pointer :: amat (:,:), umat (:,:), vtmat (:,:) !> Matrix determinant size m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) k = min ( m , n ) lda = m if (. not . k > 0 ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid or matrix size: a=' ,[ m , n ]) call linalg_error_handling ( err0 , err ) return elseif (. not . size ( s , kind = ilp ) >= k ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'singular value array has insufficient size:' ,& ' s=' , shape ( s , kind = ilp ), ', k=' , k ) call linalg_error_handling ( err0 , err ) return endif ! Integer storage liwork = 8 * k allocate ( iwork ( liwork )) ! Can A be overwritten? By default, do not overwrite overwrite_a_ = . false . if ( present ( overwrite_a )) overwrite_a_ = overwrite_a ! Initialize a matrix temporary? if ( overwrite_a_ ) then amat => a else allocate ( amat ( m , n ), source = a ) endif ! Check if we can overwrite amat with data that will be lost can_overwrite_amat = (. not . overwrite_a_ ) . and . merge (. not . present ( u ),. not . present ( vt ), m >= n ) ! Full-size matrices if ( present ( full_matrices )) then full_storage = full_matrices else full_storage = . true . endif ! Decide if U, VT matrices should be computed compute_uv = present ( u ) . or . present ( vt ) ! U, VT storage if ( present ( u )) then ! User input umat => u temp_u = . false . elseif (( m >= n . and . . not . overwrite_a_ ) . or . . not . compute_uv ) then ! U not wanted, and A can be overwritten: do not allocate umat => u_dummy temp_u = . false . elseif (. not . full_storage ) then ! Allocate with minimum size allocate ( umat ( m , k )) temp_u = . true . else ! Allocate with regular size allocate ( umat ( m , m )) temp_u = . true . end if if ( present ( vt )) then ! User input vtmat => vt temp_vt = . false . elseif (( m < n . and . . not . overwrite_a_ ) . or . . not . compute_uv ) then ! amat can be overwritten, VT not wanted: VT is returned upon A vtmat => vt_dummy temp_vt = . false . elseif (. not . full_storage ) then ! Allocate with minimum size allocate ( vtmat ( k , n )) temp_vt = . true . else ! Allocate with regular size allocate ( vtmat ( n , n )) temp_vt = . true . end if ldu = size ( umat , 1 , kind = ilp ) ldvt = size ( vtmat , 1 , kind = ilp ) ! Decide SVD task if (. not . compute_uv ) then task = GESDD_SINGVAL_ONLY elseif ( can_overwrite_amat ) then ! A is a copy: we can overwrite its storage task = GESDD_OVERWRITE_A elseif (. not . full_storage ) then task = GESDD_SHRINK_MATRICES else task = GESDD_FULL_MATRICES end if ! Compute workspace # : if rt . startswith ( 'complex' ) if ( task == GESDD_SINGVAL_ONLY ) then lrwork = max ( 1 , 7 * k ) else lrwork = max ( 1 , 5 * k * ( k + 1 ), 2 * k * ( k + max ( m , n )) + k ) endif allocate ( rwork ( lrwork )) # : else lrwork = - 1_ilp ! not needed # : endif ! First call: request working storage space lwork = - 1_ilp call gesdd ( task , m , n , amat , lda , s , umat , ldu , vtmat , ldvt ,& work_dummy , lwork , #{ if rt . startswith ( 'complex' ) }# rwork , #{ endif }# iwork , info ) call handle_gesdd_info ( err0 , info , m , n ) ! Compute SVD if ( info == 0 ) then !> Prepare working storage lwork = nint ( real ( work_dummy ( 1 ), kind = ${ rk }$ ), kind = ilp ) allocate ( work ( lwork )) !> Compute SVD call gesdd ( task , m , n , amat , lda , s , umat , ldu , vtmat , ldvt ,& work , lwork , #{ if rt . startswith ( 'complex' ) }# rwork , #{ endif }# iwork , info ) call handle_gesdd_info ( err0 , info , m , n ) endif ! Finalize storage and process output flag if (. not . overwrite_a_ ) deallocate ( amat ) if ( temp_u ) deallocate ( umat ) if ( temp_vt ) deallocate ( vtmat ) call linalg_error_handling ( err0 , err ) end subroutine stdlib_linalg_svd_$ { ri }$ # : endif # : endfor end submodule stdlib_linalg_svd","tags":"","loc":"sourcefile/stdlib_linalg_svd.fypp.html"},{"title":"stdlib_linalg_state.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_linalg_state !! Version: experimental !! !! Provides a state/error handling derived type for advanced error handling of !! BLAS/LAPACK based linear algebra procedures. All procedures are pure. !! ([Specification](../page/specs/stdlib_linalg.html)) use stdlib_linalg_constants , only : ilp use stdlib_kinds , only : int8 , int16 , int32 , int64 , sp , dp , xdp , qp , lk use stdlib_io , only : FMT_REAL_SP , FMT_REAL_DP , FMT_REAL_QP , FMT_COMPLEX_SP , FMT_COMPLEX_DP , & FMT_COMPLEX_QP , FMT_REAL_XDP , FMT_COMPLEX_XDP implicit none ( type , external ) private !> Version: experimental !> !> A fixed-storage state variable for error handling of linear algebra routines public :: linalg_state_type !> Version: experimental !> !> Error state handling: if the user requested the error state variable on !> output, just return it to the user. Otherwise, halt the program on error. public :: linalg_error_handling !> Version: experimental !> !> Interfaces for comparison operators of error states with integer flags public :: operator ( == ), operator ( /= ) public :: operator ( < ), operator ( <= ) public :: operator ( > ), operator ( >= ) !> State return types integer ( ilp ), parameter , public :: LINALG_SUCCESS = 0_ilp integer ( ilp ), parameter , public :: LINALG_VALUE_ERROR = - 1_ilp integer ( ilp ), parameter , public :: LINALG_ERROR = - 2_ilp integer ( ilp ), parameter , public :: LINALG_INTERNAL_ERROR = - 3_ilp !> Use fixed-size character storage for performance integer ( ilp ), parameter :: MSG_LENGTH = 512_ilp integer ( ilp ), parameter :: NAME_LENGTH = 32_ilp !> `linalg_state_type` defines a state return type for a !> linear algebra routine. State contains a status flag, a comment, and a !> procedure specifier that can be used to mark where the error happened type :: linalg_state_type !> The current exit state integer ( ilp ) :: state = LINALG_SUCCESS !> Message associated to the current state character ( len = MSG_LENGTH ) :: message = repeat ( ' ' , MSG_LENGTH ) !> Location of the state change character ( len = NAME_LENGTH ) :: where_at = repeat ( ' ' , NAME_LENGTH ) contains !> Cleanup procedure :: destroy => state_destroy !> Print error message procedure :: print => state_print procedure :: print_msg => state_message !> State properties procedure :: ok => state_is_ok procedure :: error => state_is_error end type linalg_state_type !> Comparison operators interface operator ( == ) module procedure state_eq_flag module procedure flag_eq_state end interface interface operator ( /= ) module procedure state_neq_flag module procedure flag_neq_state end interface interface operator ( < ) module procedure state_lt_flag module procedure flag_lt_state end interface interface operator ( <= ) module procedure state_le_flag module procedure flag_le_state end interface interface operator ( > ) module procedure state_gt_flag module procedure flag_gt_state end interface interface operator ( >= ) module procedure state_ge_flag module procedure flag_ge_state end interface interface linalg_state_type module procedure new_state module procedure new_state_nowhere end interface linalg_state_type contains !> Interface to print linalg state flags pure function linalg_message ( flag ) result ( msg ) integer ( ilp ), intent ( in ) :: flag character ( len = :), allocatable :: msg select case ( flag ) case ( LINALG_SUCCESS ); msg = 'Success!' case ( LINALG_VALUE_ERROR ); msg = 'Value Error' case ( LINALG_ERROR ); msg = 'Algebra Error' case ( LINALG_INTERNAL_ERROR ); msg = 'Internal Error' case default ; msg = 'ERROR/INVALID FLAG' end select end function linalg_message !> Flow control: on output flag present, return it; otherwise, halt on error pure subroutine linalg_error_handling ( ierr , ierr_out ) type ( linalg_state_type ), intent ( in ) :: ierr type ( linalg_state_type ), optional , intent ( out ) :: ierr_out character ( len = :), allocatable :: err_msg if ( present ( ierr_out )) then ! Return error flag ierr_out = ierr elseif ( ierr % error ()) then err_msg = ierr % print () error stop err_msg end if end subroutine linalg_error_handling !> Formatted message pure function state_message ( this ) result ( msg ) class ( linalg_state_type ), intent ( in ) :: this character ( len = :), allocatable :: msg if ( this % state == LINALG_SUCCESS ) then msg = 'Success!' else msg = linalg_message ( this % state ) // ': ' // trim ( this % message ) end if end function state_message !> Produce a nice error string pure function state_print ( this ) result ( msg ) class ( linalg_state_type ), intent ( in ) :: this character ( len = :), allocatable :: msg if ( len_trim ( this % where_at ) > 0 ) then msg = '[' // trim ( this % where_at ) // '] returned ' // state_message ( this ) elseif ( this % error ()) then msg = 'Error encountered: ' // state_message ( this ) else msg = state_message ( this ) end if end function state_print !> Cleanup the object elemental subroutine state_destroy ( this ) class ( linalg_state_type ), intent ( inout ) :: this this % state = LINALG_SUCCESS this % message = repeat ( ' ' , len ( this % message )) this % where_at = repeat ( ' ' , len ( this % where_at )) end subroutine state_destroy !> Check if the current state is successful elemental logical ( lk ) function state_is_ok ( this ) class ( linalg_state_type ), intent ( in ) :: this state_is_ok = this % state == LINALG_SUCCESS end function state_is_ok !> Check if the current state is an error state elemental logical ( lk ) function state_is_error ( this ) class ( linalg_state_type ), intent ( in ) :: this state_is_error = this % state /= LINALG_SUCCESS end function state_is_error !> Compare an error state with an integer flag elemental logical ( lk ) function state_eq_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_eq_flag = err % state == flag end function state_eq_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_eq_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_eq_state = err % state == flag end function flag_eq_state !> Compare the error state with an integer flag elemental logical ( lk ) function state_neq_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_neq_flag = . not . state_eq_flag ( err , flag ) end function state_neq_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_neq_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_neq_state = . not . state_eq_flag ( err , flag ) end function flag_neq_state !> Compare the error state with an integer flag elemental logical ( lk ) function state_lt_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_lt_flag = err % state < flag end function state_lt_flag !> Compare the error state with an integer flag elemental logical ( lk ) function state_le_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_le_flag = err % state <= flag end function state_le_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_lt_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_lt_state = err % state < flag end function flag_lt_state !> Compare an integer flag with the error state elemental logical ( lk ) function flag_le_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_le_state = err % state <= flag end function flag_le_state !> Compare the error state with an integer flag elemental logical ( lk ) function state_gt_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_gt_flag = err % state > flag end function state_gt_flag !> Compare the error state with an integer flag elemental logical ( lk ) function state_ge_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_ge_flag = err % state >= flag end function state_ge_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_gt_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_gt_state = err % state > flag end function flag_gt_state !> Compare an integer flag with the error state elemental logical ( lk ) function flag_ge_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_ge_state = err % state >= flag end function flag_ge_state !> Error creation message, with location location pure type ( linalg_state_type ) function new_state ( where_at , flag , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ) !> Location character ( len =* ), intent ( in ) :: where_at !> Input error flag integer , intent ( in ) :: flag !> Optional rank-agnostic arguments class ( * ), optional , intent ( in ), dimension (..) :: a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 !> Create state with no message new_state = new_state_nowhere ( flag , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ) !> Add location if ( len_trim ( where_at ) > 0 ) new_state % where_at = adjustl ( where_at ) end function new_state !> Error creation message, from N input variables (numeric or strings) pure type ( linalg_state_type ) function new_state_nowhere ( flag , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ) & result ( new_state ) !> Input error flag integer , intent ( in ) :: flag !> Optional rank-agnostic arguments class ( * ), optional , intent ( in ), dimension (..) :: a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ! Init object call new_state % destroy () !> Set error flag new_state % state = flag !> Set chain new_state % message = \"\" call appendr ( new_state % message , a1 ) call appendr ( new_state % message , a2 ) call appendr ( new_state % message , a3 ) call appendr ( new_state % message , a4 ) call appendr ( new_state % message , a5 ) call appendr ( new_state % message , a6 ) call appendr ( new_state % message , a7 ) call appendr ( new_state % message , a8 ) call appendr ( new_state % message , a9 ) call appendr ( new_state % message , a10 ) call appendr ( new_state % message , a11 ) call appendr ( new_state % message , a12 ) call appendr ( new_state % message , a13 ) call appendr ( new_state % message , a14 ) call appendr ( new_state % message , a15 ) call appendr ( new_state % message , a16 ) call appendr ( new_state % message , a17 ) call appendr ( new_state % message , a18 ) call appendr ( new_state % message , a19 ) call appendr ( new_state % message , a20 ) end function new_state_nowhere !> Append a generic value to the error flag (rank-agnostic) pure subroutine appendr ( msg , a , prefix ) class ( * ), optional , intent ( in ) :: a (..) character ( len =* ), intent ( inout ) :: msg character , optional , intent ( in ) :: prefix if ( present ( a )) then select rank ( v => a ) rank ( 0 ) call append ( msg , v , prefix ) rank ( 1 ) call appendv ( msg , v ) rank default msg = trim ( msg ) // ' ' end select endif end subroutine appendr ! Append a generic value to the error flag pure subroutine append ( msg , a , prefix ) class ( * ), intent ( in ) :: a character ( len =* ), intent ( inout ) :: msg character , optional , intent ( in ) :: prefix character ( len = MSG_LENGTH ) :: buffer , buffer2 character ( len = 2 ) :: sep integer :: ls ! Do not add separator if this is the first instance sep = ' ' ls = merge ( 1 , 0 , len_trim ( msg ) > 0 ) if ( present ( prefix )) then ls = ls + 1 sep ( ls : ls ) = prefix end if select type ( aa => a ) !> String type type is ( character ( len =* )) msg = trim ( msg ) // sep (: ls ) // aa !> Numeric types #:for k1, t1 in KINDS_TYPES type is ( ${ t1 }$ ) # : if 'complex' in t1 write ( buffer , FMT_REAL_$ { k1 }$ ) aa % re write ( buffer2 , FMT_REAL_$ { k1 }$ ) aa % im msg = trim ( msg ) // sep (: ls ) // '(' // trim ( adjustl ( buffer )) // ',' // trim ( adjustl ( buffer2 )) // ')' # : else # : if 'real' in t1 write ( buffer , FMT_REAL_$ { k1 }$ ) aa # : else write ( buffer , '(i0)' ) aa # : endif msg = trim ( msg ) // sep (: ls ) // trim ( adjustl ( buffer )) # : endif #:endfor class default msg = trim ( msg ) // ' ' end select end subroutine append !> Append a generic vector to the error flag pure subroutine appendv ( msg , a ) class ( * ), intent ( in ) :: a (:) character ( len =* ), intent ( inout ) :: msg integer :: j , ls character ( len = MSG_LENGTH ) :: buffer , buffer2 , buffer_format character ( len = 2 ) :: sep if ( size ( a ) <= 0 ) return ! Default: separate elements with one space sep = ' ' ls = 1 ! Open bracket msg = trim ( msg ) // ' [' ! Do not call append(msg(aa(j))), it will crash gfortran select type ( aa => a ) !> Strings (cannot use string_type due to `sequence`) type is ( character ( len =* )) msg = trim ( msg ) // adjustl ( aa ( 1 )) do j = 2 , size ( a ) msg = trim ( msg ) // sep (: ls ) // adjustl ( aa ( j )) end do !> Numeric types #:for k1, t1 in KINDS_TYPES type is ( ${ t1 }$ ) # : if 'complex' in t1 write ( buffer , FMT_REAL_$ { k1 }$ ) aa ( 1 )% re write ( buffer2 , FMT_REAL_$ { k1 }$ ) aa ( 1 )% im msg = trim ( msg ) // '(' // trim ( adjustl ( buffer )) // ',' // trim ( adjustl ( buffer2 )) // ')' do j = 2 , size ( a ) write ( buffer , FMT_REAL_$ { k1 }$ ) aa ( j )% re write ( buffer2 , FMT_REAL_$ { k1 }$ ) aa ( j )% im msg = trim ( msg ) // sep (: ls ) // '(' // trim ( adjustl ( buffer )) // ',' // trim ( adjustl ( buffer2 )) // ')' end do # : else # : if 'real' in t1 buffer_format = FMT_REAL_$ { k1 }$ # : else buffer_format = '(i0)' # : endif write ( buffer , buffer_format ) aa ( 1 ) msg = trim ( msg ) // adjustl ( buffer ) do j = 2 , size ( a ) write ( buffer , buffer_format ) aa ( j ) msg = trim ( msg ) // sep (: ls ) // adjustl ( buffer ) end do msg = trim ( msg ) // sep (: ls ) // trim ( adjustl ( buffer )) # : endif #:endfor class default msg = trim ( msg ) // ' ' end select ! Close bracket msg = trim ( msg ) // ']' end subroutine appendv end module stdlib_linalg_state","tags":"","loc":"sourcefile/stdlib_linalg_state.fypp.html"},{"title":"stdlib_linalg_blas_aux.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_aux use stdlib_linalg_constants implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_dcabs1 public :: stdlib_icamax public :: stdlib_idamax public :: stdlib_isamax public :: stdlib_izamax public :: stdlib_lsame public :: stdlib_scabs1 public :: stdlib_xerbla public :: stdlib_xerbla_array #:if WITH_QP public :: stdlib_qcabs1 #:endif #:if WITH_QP public :: stdlib_iqamax #:endif #:if WITH_QP public :: stdlib_iwamax #:endif contains pure real ( dp ) function stdlib_dcabs1 ( z ) !! DCABS1 computes |Re(.)| + |Im(.)| of a double complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , real , aimag stdlib_dcabs1 = abs ( real ( z , KIND = dp )) + abs ( aimag ( z )) return end function stdlib_dcabs1 pure integer ( ilp ) function stdlib_isamax ( n , sx , incx ) !! ISAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_isamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_isamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = abs ( sx ( 1 )) do i = 2 , n if ( abs ( sx ( i )) > smax ) then stdlib_isamax = i smax = abs ( sx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = abs ( sx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( sx ( ix )) > smax ) then stdlib_isamax = i smax = abs ( sx ( ix )) end if ix = ix + incx end do end if return end function stdlib_isamax pure integer ( ilp ) function stdlib_izamax ( n , zx , incx ) !! IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix stdlib_izamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_izamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = stdlib_dcabs1 ( zx ( 1 )) do i = 2 , n if ( stdlib_dcabs1 ( zx ( i )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = stdlib_dcabs1 ( zx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_dcabs1 ( zx ( ix )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( ix )) end if ix = ix + incx end do end if return end function stdlib_izamax pure logical ( lk ) function stdlib_lsame ( ca , cb ) !! LSAME returns .TRUE. if CA is the same letter as CB regardless of !! case. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character , intent ( in ) :: ca , cb ! ===================================================================== ! Intrinsic Functions intrinsic :: ichar ! Local Scalars integer ( ilp ) :: inta , intb , zcode ! test if the characters are equal stdlib_lsame = ca == cb if ( stdlib_lsame ) return ! now test for equivalence if both characters are alphabetic. zcode = ichar ( 'Z' ) ! use 'z' rather than 'a' so that ascii can be detected on prime ! machines, on which ichar returns a value with bit 8 set. ! ichar('a') on prime machines returns 193 which is the same as ! ichar('a') on an ebcdic machine. inta = ichar ( ca ) intb = ichar ( cb ) if ( zcode == 90 . or . zcode == 122 ) then ! ascii is assumed - zcode is the ascii code of either lower or ! upper case 'z'. if ( inta >= 97 . and . inta <= 122 ) inta = inta - 32 if ( intb >= 97 . and . intb <= 122 ) intb = intb - 32 else if ( zcode == 233 . or . zcode == 169 ) then ! ebcdic is assumed - zcode is the ebcdic code of either lower or ! upper case 'z'. if ( inta >= 129 . and . inta <= 137 . or . inta >= 145 . and . inta <= 153 . or . inta >= 162 . and . & inta <= 169 ) inta = inta + 64 if ( intb >= 129 . and . intb <= 137 . or . intb >= 145 . and . intb <= 153 . or . intb >= 162 . and . & intb <= 169 ) intb = intb + 64 else if ( zcode == 218 . or . zcode == 250 ) then ! ascii is assumed, on prime machines - zcode is the ascii code ! plus 128 of either lower or upper case 'z'. if ( inta >= 225 . and . inta <= 250 ) inta = inta - 32 if ( intb >= 225 . and . intb <= 250 ) intb = intb - 32 end if stdlib_lsame = inta == intb ! return end function stdlib_lsame pure real ( sp ) function stdlib_scabs1 ( z ) !! SCABS1 computes |Re(.)| + |Im(.)| of a complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scabs1 = abs ( real ( z , KIND = sp )) + abs ( aimag ( z )) return end function stdlib_scabs1 pure subroutine stdlib_xerbla ( srname , info ) !! XERBLA is an error handler for the LAPACK routines. !! It is called by an LAPACK routine if an input parameter has an !! invalid value. A message is printed and execution stops. !! Installers may consider modifying the STOP statement in order to !! call system-specific exception-handling facilities. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character ( len =* ), intent ( in ) :: srname integer ( ilp ), intent ( in ) :: info ! ===================================================================== ! Intrinsic Functions intrinsic :: len_trim ! Executable Statements 9999 format ( ' ** ON ENTRY TO ' , a , ' PARAMETER NUMBER ' , i2 , ' HAD ' , 'AN ILLEGAL VALUE' ) end subroutine stdlib_xerbla pure subroutine stdlib_xerbla_array ( srname_array , srname_len , info ) !! XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK !! and BLAS error handler. Rather than taking a Fortran string argument !! as the function's name, XERBLA_ARRAY takes an array of single !! characters along with the array's length. XERBLA_ARRAY then copies !! up to 32 characters of that array into a Fortran string and passes !! that to XERBLA. If called with a non-positive SRNAME_LEN, !! XERBLA_ARRAY will call XERBLA with a string of all blank characters. !! Say some macro or other device makes XERBLA_ARRAY available to C99 !! by a name lapack_xerbla and with a common Fortran calling convention. !! Then a C99 program could invoke XERBLA via: !! { !! int flen = strlen(__func__); !! lapack_xerbla(__func__, !! } !! Providing XERBLA_ARRAY is not necessary for intercepting LAPACK !! errors. XERBLA_ARRAY calls XERBLA. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: srname_len , info ! Array Arguments character ( 1 ), intent ( in ) :: srname_array ( srname_len ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i ! Local Arrays character * 32 srname ! Intrinsic Functions intrinsic :: min , len ! Executable Statements srname = '' do i = 1 , min ( srname_len , len ( srname ) ) srname ( i : i ) = srname_array ( i ) end do call stdlib_xerbla ( srname , info ) return end subroutine stdlib_xerbla_array #:if WITH_QP pure real ( qp ) function stdlib_qcabs1 ( z ) !! DCABS1: computes |Re(.)| + |Im(.)| of a double complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , real , aimag stdlib_qcabs1 = abs ( real ( z , KIND = qp )) + abs ( aimag ( z )) return end function stdlib_qcabs1 #:endif #:if WITH_QP pure integer ( ilp ) function stdlib_iqamax ( n , dx , incx ) !! IDAMAX: finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dmax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_iqamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_iqamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = abs ( dx ( 1 )) do i = 2 , n if ( abs ( dx ( i )) > dmax ) then stdlib_iqamax = i dmax = abs ( dx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = abs ( dx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( dx ( ix )) > dmax ) then stdlib_iqamax = i dmax = abs ( dx ( ix )) end if ix = ix + incx end do end if return end function stdlib_iqamax #:endif #:if WITH_QP pure integer ( ilp ) function stdlib_iwamax ( n , zx , incx ) !! IZAMAX: finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dmax integer ( ilp ) :: i , ix stdlib_iwamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_iwamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = stdlib_qcabs1 ( zx ( 1 )) do i = 2 , n if ( stdlib_qcabs1 ( zx ( i )) > dmax ) then stdlib_iwamax = i dmax = stdlib_qcabs1 ( zx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = stdlib_qcabs1 ( zx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_qcabs1 ( zx ( ix )) > dmax ) then stdlib_iwamax = i dmax = stdlib_qcabs1 ( zx ( ix )) end if ix = ix + incx end do end if return end function stdlib_iwamax #:endif pure integer ( ilp ) function stdlib_icamax ( n , cx , incx ) !! ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix stdlib_icamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_icamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = stdlib_scabs1 ( cx ( 1 )) do i = 2 , n if ( stdlib_scabs1 ( cx ( i )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = stdlib_scabs1 ( cx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_scabs1 ( cx ( ix )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( ix )) end if ix = ix + incx end do end if return end function stdlib_icamax pure integer ( ilp ) function stdlib_idamax ( n , dx , incx ) !! IDAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_idamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_idamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = abs ( dx ( 1 )) do i = 2 , n if ( abs ( dx ( i )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = abs ( dx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( dx ( ix )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( ix )) end if ix = ix + incx end do end if return end function stdlib_idamax end module stdlib_linalg_blas_aux","tags":"","loc":"sourcefile/stdlib_linalg_blas_aux.fypp.html"},{"title":"stdlib_bitsets_large.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_bitsets ) stdlib_bitsets_large implicit none contains elemental module function all_large ( self ) result ( all ) ! Returns .TRUE. if all bits in SELF are 1, .FALSE. otherwise. logical :: all class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: block , full_blocks , pos all = . true . full_blocks = bits ( self ) / block_size do block = 1_bits_kind , full_blocks if ( self % blocks ( block ) /= - 1_block_kind ) then all = . false . return end if end do if ( full_blocks == size ( self % blocks ) ) return do pos = 0_bits_kind , modulo ( bits ( self ), block_size ) - 1 if ( . not . btest ( self % blocks ( full_blocks + 1 ), pos ) ) then all = . false . return end if end do end function all_large elemental module subroutine and_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise AND of the original bits in SET1 ! and SET2. It is required that SET1 have the same number of bits as ! SET2 otherwise the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = iand ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) end do end subroutine and_large elemental module subroutine and_not_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise and of the original bits in SET1 ! with the bitwise negation of SET2. SET1 and SET2 must have the same ! number of bits otherwise the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = & iand ( set1 % blocks ( block_ ), not ( set2 % blocks ( block_ ) ) ) end do end subroutine and_not_large elemental module function any_large ( self ) result ( any ) ! Returns .TRUE. if any bit in SELF is 1, .FALSE. otherwise. logical :: any class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( self % blocks , kind = bits_kind ) if ( self % blocks ( block_ ) /= 0 ) then any = . true . return end if end do any = . false . end function any_large # : for k1 in INT_KINDS pure module subroutine assign_log$ { k1 }$_ large ( self , logical_vector ) ! Used to define assignment from an array of type logical for bitset_large type ( bitset_large ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) integer ( bits_kind ) :: blocks integer ( bits_kind ) :: log_size integer ( bits_kind ) :: index log_size = size ( logical_vector , kind = bits_kind ) self % num_bits = log_size if ( log_size == 0 ) then blocks = 0 else blocks = ( log_size - 1 ) / block_size + 1 end if allocate ( self % blocks ( blocks ) ) self % blocks (:) = 0 do index = 0_bits_kind , log_size - 1 if ( logical_vector ( index + 1 ) ) then call self % set ( index ) end if end do end subroutine assign_log$ { k1 }$_ large pure module subroutine log ${ k1 }$_ assign_large ( logical_vector , set ) ! Used to define assignment to an array of type logical for bitset_large logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_large ), intent ( in ) :: set integer ( bits_kind ) :: index allocate ( logical_vector ( set % num_bits ) ) do index = 0_bits_kind , set % num_bits - 1 if ( set % value ( index ) == 1 ) then logical_vector ( index + 1 ) = . true . else logical_vector ( index + 1 ) = . false . end if end do end subroutine log ${ k1 }$_ assign_large # : endfor elemental module function bit_count_large ( self ) result ( bit_count ) ! Returns the number of non-zero bits in SELF. integer ( bits_kind ) :: bit_count class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: nblocks , pos nblocks = size ( self % blocks , kind = bits_kind ) bit_count = sum ( popcnt ( self % blocks ( 1 : nblocks - 1 ) ) ) do pos = 0_bits_kind , self % num_bits - ( nblocks - 1 ) * block_size - 1 if ( btest ( self % blocks ( nblocks ), pos ) ) bit_count = bit_count + 1 end do end function bit_count_large elemental module subroutine clear_bit_large ( self , pos ) ! ! Sets to zero the POS position in SELF. If POS is less than zero or ! greater than BITS(SELF)-1 it is ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer :: clear_block , block_bit if ( pos < 0 . OR . ( pos > self % num_bits - 1 ) ) return clear_block = pos / block_size + 1 block_bit = pos - ( clear_block - 1 ) * block_size self % blocks ( clear_block ) = & ibclr ( self % blocks ( clear_block ), block_bit ) end subroutine clear_bit_large pure module subroutine clear_range_large ( self , start_pos , stop_pos ) ! ! Sets to zero all bits from the START_POS to STOP_POS positions in SELF. ! If STOP_POS < START_POS then no bits are modified. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: bit , block_ , first_block , last_block , & true_first , true_last true_first = max ( 0_bits_kind , start_pos ) true_last = min ( self % num_bits - 1 , stop_pos ) if ( true_last < true_first ) return first_block = true_first / block_size + 1 last_block = true_last / block_size + 1 if ( first_block == last_block ) then ! TRUE_FIRST and TRUE_LAST are in the same block call mvbits ( all_zeros , & true_first - ( first_block - 1 ) * block_size , & true_last - true_first + 1 , & self % blocks ( first_block ), & true_first - ( first_block - 1 ) * block_size ) return end if ! Do \"partial\" black containing FIRST bit = true_first - ( first_block - 1 ) * block_size call mvbits ( all_zeros , & bit , & block_size - bit , & self % blocks ( first_block ), & bit ) ! Do \"partial\" black containing LAST bit = true_last - ( last_block - 1 ) * block_size call mvbits ( all_zeros , & 0 , & bit + 1 , & self % blocks ( last_block ), & 0 ) ! Do intermediate blocks do block_ = first_block + 1 , last_block - 1 self % blocks ( block_ ) = all_zeros end do end subroutine clear_range_large elemental module function eqv_large ( set1 , set2 ) result ( eqv ) ! ! Returns .TRUE. if all bits in SET1 and SET2 have the same value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: eqv type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block , common_blocks eqv = . false . common_blocks = size ( set1 % blocks , kind = bits_kind ) do block = 1 , common_blocks if ( set1 % blocks ( block ) /= set2 % blocks ( block ) ) return end do eqv = . true . end function eqv_large module subroutine extract_large ( new , old , start_pos , stop_pos , status ) ! Creates a new bitset, NEW, from a range, START_POS to STOP_POS, in bitset ! OLD. If START_POS is greater than STOP_POS the new bitset is empty. ! If START_POS is less than zero or STOP_POS is greater than BITS(OLD)-1 ! then if STATUS is present it has the value INDEX_INVALID_ERROR, ! otherwise processing stops with an informative message. type ( bitset_large ), intent ( out ) :: new type ( bitset_large ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits , blocks , ex_block , i , j , k , old_block character ( * ), parameter :: procedure = 'EXTRACT' if ( start_pos < 0 ) then call error_handler ( 'had a START_POS less than 0.' , & index_invalid_error , status , & module_name , procedure ) return end if if ( stop_pos >= old % num_bits ) then call error_handler ( 'had a STOP_POS greater than BITS(OLD)-1.' , & index_invalid_error , status , & module_name , procedure ) return end if bits = stop_pos - start_pos + 1 if ( bits <= 0 ) then new % num_bits = 0 allocate ( new % blocks ( 0 ) ) return end if blocks = (( bits - 1 ) / block_size ) + 1 new % num_bits = bits allocate ( new % blocks ( blocks ) ) new % blocks (:) = 0 do i = 0_bits_kind , bits - 1 ex_block = i / block_size + 1 j = i - ( ex_block - 1 ) * block_size old_block = ( start_pos + i ) / block_size + 1 k = ( start_pos + i ) - ( old_block - 1 ) * block_size if ( btest ( old % blocks ( old_block ), k ) ) then new % blocks ( ex_block ) = ibset ( new % blocks ( ex_block ), j ) end if end do if ( present ( status ) ) status = success end subroutine extract_large elemental module subroutine flip_bit_large ( self , pos ) ! ! Flips the value at the POS position in SELF, provided the position is ! valid. If POS is less than 0 or greater than BITS(SELF)-1, no value is ! changed. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( bits_kind ) :: flip_block , block_bit if ( pos < 0 . OR . pos > self % num_bits - 1 ) return flip_block = pos / block_size + 1 block_bit = pos - ( flip_block - 1 ) * block_size if ( btest ( self % blocks ( flip_block ), block_bit ) ) then self % blocks ( flip_block ) = ibclr ( self % blocks ( flip_block ), & block_bit ) else self % blocks ( flip_block ) = ibset ( self % blocks ( flip_block ), & block_bit ) end if end subroutine flip_bit_large pure module subroutine flip_range_large ( self , start_pos , stop_pos ) ! ! Flips all valid bits from the START_POS to the STOP_POS positions in ! SELF. If STOP_POS < START_POS no bits are flipped. Positions less than ! 0 or greater than BITS(SELF)-1 are ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: bit , block_ , end_bit , first_block , last_block , & start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) if ( end_bit < start_bit ) return first_block = start_bit / block_size + 1 last_block = end_bit / block_size + 1 if ( first_block == last_block ) then ! FIRST and LAST are in the same block call mvbits ( not ( self % blocks ( first_block )), & start_bit - ( first_block - 1 ) * block_size , & end_bit - start_bit + 1 , & self % blocks ( first_block ), & start_bit - ( first_block - 1 ) * block_size ) return end if ! Do \"partial\" black containing FIRST bit = start_bit - ( first_block - 1 ) * block_size call mvbits ( not ( self % blocks ( first_block ) ), & bit , & block_size - bit , & self % blocks ( first_block ), & bit ) ! Do \"partial\" black containing LAST bit = end_bit - ( last_block - 1 ) * block_size call mvbits ( not ( self % blocks ( last_block ) ), & 0 , & bit + 1 , & self % blocks ( last_block ), & 0 ) ! Do remaining blocks do block_ = first_block + 1 , last_block - 1 self % blocks ( block_ ) = not ( self % blocks ( block_ ) ) end do end subroutine flip_range_large module subroutine from_string_large ( self , string , status ) ! Initializes the bitset `self` treating `string` as a binary literal ! `status` may have the values: ! `success` - if no problems were found, ! `alloc_fault` - if allocation of the bitset failed ! `char_string_too_large_error` - if `string` was too large, or ! `char_string_invalid_error` - if string had an invalid character. class ( bitset_large ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'FROM_STRING' integer ( int64 ) :: bit integer ( int64 ) :: bits character ( 1 ) :: char bits = len ( string , kind = int64 ) if ( bits > huge ( 0_bits_kind ) ) then call error_handler ( 'STRING was too long for a ' // & 'BITSET_LARGE SELF.' , & char_string_too_large_error , status , & module_name , procedure ) return end if call init_zero_large ( self , int ( bits , kind = bits_kind ), status ) if ( present ( status ) ) then if ( status /= success ) return end if do bit = 1_bits_kind , bits char = string ( bit : bit ) if ( char == '0' ) then call self % clear ( int ( bits - bit , kind = bits_kind ) ) else if ( char == '1' ) then call self % set ( int ( bits - bit , kind = bits_kind ) ) else call error_handler ( 'STRING had a character other than ' // & '0 or 1.' , & char_string_invalid_error , status , & module_name , procedure ) return end if end do if ( present ( status ) ) status = success end subroutine from_string_large elemental module function ge_large ( set1 , set2 ) result ( ge ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: ge type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( bgt ( set1 % blocks ( block_ ), set2 % blocks ( block_ ) ) ) then ge = . true . return else ge = . false . return end if end do ge = . true . end function ge_large elemental module function gt_large ( set1 , set2 ) result ( gt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: gt type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( bgt ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) ) then gt = . true . return else gt = . false . return end if end do gt = . false . end function gt_large module subroutine init_zero_large ( self , bits , status ) ! ! Creates the bitset, `self`, of size `bits`, with all bits initialized to ! zero. `bits` must be non-negative. If an error occurs and `status` is ! absent then processing stops with an informative stop code. `status` ! will have one of the values; ! * `success` - if no problems were found, ! * `array_size_invalid_error` - if `bits` is either negative or larger ! than 64 with `self` of class `bitset_64`, or ! * `alloc_fault` - if memory allocation failed ! class ( bitset_large ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"INIT\" integer :: blocks , ierr message = '' if ( bits < 0 ) then call error_handler ( 'BITS had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if if ( bits == 0 ) then self % num_bits = 0 allocate ( self % blocks ( 0 ), stat = ierr , errmsg = message ) if ( ierr /= 0 ) go to 998 return else blocks = (( bits - 1 ) / block_size ) + 1 end if self % num_bits = bits allocate ( self % blocks ( blocks ), stat = ierr , errmsg = message ) if ( ierr /= 0 ) go to 998 self % blocks (:) = all_zeros if ( present ( status ) ) status = success return 998 call error_handler ( 'Allocation failure for SELF.' , & alloc_fault , status , & module_name , procedure ) end subroutine init_zero_large module subroutine input_large ( self , unit , status ) ! ! Reads the components of the bitset, `self`, from the unformatted I/O ! unit, `unit`, assuming that the components were written using `output`. ! If an error occurs and `status` is absent then processing stops with ! an informative stop code. `status` has one of the values: ! * `success` - if no problem was found ! * `alloc_fault` - if it failed during allocation of memory for `self`, or ! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative ! or greater than 64 for a `bitset_64` input. ! * `read_failure` - if it failed during the reads from `unit` ! class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = 'INPUT' integer :: stat read ( unit , iostat = ierr , iomsg = message ) bits if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( bits < 0 ) then call error_handler ( 'BITS in UNIT had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'Allocation failure for SELF.' , & alloc_fault , status , module_name , procedure ) return end if if ( bits < 1 ) return read ( unit , iostat = ierr , iomsg = message ) self % blocks (:) if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( present ( status ) ) status = success end subroutine input_large elemental module function le_large ( set1 , set2 ) result ( le ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: le type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( blt ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) ) then le = . true . return else le = . false . return end if end do le = . true . end function le_large elemental module function lt_large ( set1 , set2 ) result ( lt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: lt type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( blt ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) ) then lt = . true . return else lt = . false . return end if end do lt = . false . end function lt_large elemental module function neqv_large ( set1 , set2 ) result ( neqv ) ! ! Returns .TRUE. if any bits in SET1 and SET2 differ in value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: neqv type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ neqv = . true . do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) if ( set1 % blocks ( block_ ) /= set2 % blocks ( block_ ) ) return end do neqv = . false . end function neqv_large elemental module function none_large ( self ) result ( none ) ! ! Returns .TRUE. if none of the bits in SELF have the value 1. ! logical :: none class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: block none = . true . do block = 1_bits_kind , size ( self % blocks , kind = bits_kind ) if ( self % blocks ( block ) /= 0 ) then none = . false . return end if end do end function none_large elemental module subroutine not_large ( self ) ! ! Sets the bits in SELF to their logical complement ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ) :: bit , full_blocks , block integer :: remaining_bits if ( self % num_bits == 0 ) return full_blocks = self % num_bits / block_size do block = 1_bits_kind , full_blocks self % blocks ( block ) = not ( self % blocks ( block ) ) end do remaining_bits = self % num_bits - full_blocks * block_size do bit = 0 , remaining_bits - 1 if ( btest ( self % blocks ( block ), bit ) ) then self % blocks ( block ) = ibclr ( self % blocks ( block ), bit ) else self % blocks ( block ) = ibset ( self % blocks ( block ), bit ) end if end do end subroutine not_large elemental module subroutine or_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise OR of the original bits in SET1 ! and SET2. SET1 and SET2 must have the same number of bits otherwise ! the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1 , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = ior ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) end do end subroutine or_large module subroutine output_large ( self , unit , status ) ! ! Writes the components of the bitset, SELF, to the unformatted I/O ! unit, UNIT, in a unformatted sequence compatible with INPUT. If ! STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value WRITE_FAILURE if the write failed. ! class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"OUTPUT\" write ( unit , iostat = ierr , iomsg = message ) self % num_bits if ( ierr /= 0 ) go to 999 if ( self % num_bits < 1 ) return write ( unit , iostat = ierr , iomsg = message ) self % blocks (:) if ( ierr /= 0 ) go to 999 return 999 call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) end subroutine output_large module subroutine read_bitset_string_large ( self , string , status ) ! ! Uses the bitset literal in the default character `string`, to define ! the bitset, `self`. The literal may be preceded by an an arbitrary ! sequence of blank characters. If `status` is absent an error results ! in an error stop with an informative stop code. If `status` ! is present it has one of the values ! * `success` - if no problems occurred, ! * `alloc_fault` - if allocation of memory for SELF failed, ! * `array_size_invalid_error - if `bits(self)` in `string` is greater ! than 64 for a `bitset_64`, ! * `char_string_invalid_error` - if the bitset literal has an invalid ! character, ! * `char_string_too_small_error - if the string ends before all the bits ! are read. ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! class ( bitset_large ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits integer ( bits_kind ) :: digits , pos character ( * ), parameter :: procedure = \"READ_BITSET\" integer :: stat pos = 1 find_start : do pos = 1_bits_kind , len ( string , kind = bits_kind ) if ( string ( pos : pos ) /= ' ' ) exit end do find_start if ( pos > len ( string ) - 8 ) go to 999 if ( string ( pos : pos ) /= 's' . AND . string ( pos : pos ) /= 'S' ) go to 999 pos = pos + 1 bits = 0 digits = 0 do select case ( iachar ( string ( pos : pos ) ) ) case ( ia0 : ia9 ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) go to 996 if ( digits > max_digits ) go to 996 bits = bits * 10 + iachar ( string ( pos : pos ) ) - ia0 if ( bits < 0 ) go to 996 case ( iachar ( 'b' ), iachar ( 'B' )) exit case default call error_handler ( 'There was an invalid character ' // & 'in STRING' , & char_string_invalid_error , status , & module_name , procedure ) return end select pos = pos + 1 end do if ( bits + pos > len ( string ) ) then call error_handler ( 'STRING was too small for the number of ' // & 'bits specified by STRING.' , & char_string_too_small_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'There was an allocation fault for SELF.' , & alloc_fault , status , module_name , procedure ) return end if pos = pos + 1 bit = bits - 1 do if ( string ( pos : pos ) == '0' ) then call self % clear ( bit ) else if ( string ( pos : pos ) == '1' ) then call self % set ( bit ) else go to 999 end if pos = pos + 1 bit = bit - 1 if ( bit < 0 ) exit end do if ( present ( status ) ) status = success return 996 call error_handler ( 'There was an integer overflow in reading' // & 'size of bitset literal from UNIT' , & integer_overflow_error , status , & module_name , procedure ) return 999 call error_handler ( 'There was an invalid character in STRING' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_string_large module subroutine read_bitset_unit_large ( self , unit , advance , status ) ! ! Uses the bitset literal at the current position in the formatted ! file with I/O unit, `unit`, to define the bitset, `self`. The literal ! may be preceded by an arbitrary sequence of blank characters. ! If `advance` is present it must be either 'YES' or 'NO'. If absent ! it has the default value of 'YES' to determine whether advancing ! I/O occurs. If `status` is absent an error results in an error stop ! with an informative stop code. If `status` is present it has one of ! the values: ! * `success` - if no problem occurred, ! * `alloc_fault` - if allocation of `self` failed, ! * `array_size_invalid_error` - if `bits(self)` in the bitset literal ! is greater than 64 for a `bitset_64`. ! * `char_string_invalid_error` - if the read of the bitset literal found ! an invalid character, ! * `eof_failure` - if a `read` statement reaches an end-of-file before ! completing the read of the bitset literal, ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! * `read_failure` - if a `read` statement fails, ! class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits , digits integer :: ierr character ( len = 128 ) :: message character ( * ), parameter :: procedure = \"READ_BITSET\" character ( len = 1 ) :: char do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char select case ( char ) case ( ' ' ) cycle case ( 's' , 'S' ) exit case default go to 999 end select end do bits = 0 digits = 0 do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == 'b' . or . char == 'B' ) exit select case ( char ) case ( '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) & go to 996 if ( digits > max_digits ) go to 996 bits = 10 * bits + iachar ( char ) - iachar ( '0' ) if ( bits < 0 ) go to 996 case default go to 999 end select end do if ( bits < 0 . OR . digits == 0 . OR . digits > max_digits ) go to 999 call self % init ( bits , status ) if ( present ( status ) ) then call error_handler ( 'There was an allocation fault for SELF.' , & alloc_fault , status , module_name , procedure ) return end if do bit = 1 , bits - 1 read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if end do read ( unit , & advance = optval ( advance , 'YES' ), & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if if ( present ( status ) ) status = success return 996 call error_handler ( 'Integer overflow in reading size of ' // & 'bitset literal from UNIT.' , & read_failure , status , module_name , procedure ) return 997 call error_handler ( 'Failure on read of UNIT.' , & read_failure , status , module_name , procedure ) return 998 call error_handler ( 'End of File of UNIT before finishing a ' // & 'bitset literal.' , & eof_failure , status , module_name , procedure ) return 999 call error_handler ( 'Invalid character in bitset literal in UNIT ' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_unit_large elemental module subroutine set_bit_large ( self , pos ) ! ! Sets the value at the POS position in SELF, provided the position is ! valid. If the position is less than 0 or greater than BITS(SELF)-1 ! then SELF is unchanged. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( bits_kind ) :: set_block , block_bit if ( pos < 0 . OR . pos > self % num_bits - 1 ) return set_block = pos / block_size + 1 block_bit = pos - ( set_block - 1 ) * block_size self % blocks ( set_block ) = ibset ( self % blocks ( set_block ), block_bit ) end subroutine set_bit_large pure module subroutine set_range_large ( self , start_pos , stop_pos ) ! ! Sets all valid bits to 1 from the START_POS to the STOP_POS positions ! in SELF. If STOP_POS < START_POS no bits are changed. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: bit , block_ , end_bit , first_block , last_block , & start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) if ( end_bit < start_bit ) return first_block = start_bit / block_size + 1 last_block = end_bit / block_size + 1 if ( first_block == last_block ) then ! FIRST and LAST are in the same block call mvbits ( all_ones , & start_bit - ( first_block - 1 ) * block_size , & end_bit - start_bit + 1 , & self % blocks ( first_block ), & start_bit - ( first_block - 1 ) * block_size ) return end if ! Do \"partial\" black containing FIRST bit = start_bit - ( first_block - 1 ) * block_size call mvbits ( all_ones , & bit , & block_size - bit , & self % blocks ( first_block ), & bit ) ! Do \"partial\" black containing LAST bit = end_bit - ( last_block - 1 ) * block_size call mvbits ( all_ones , & 0 , & bit + 1 , & self % blocks ( last_block ), & 0 ) ! Do remaining blocks do block_ = first_block + 1 , last_block - 1 self % blocks ( block_ ) = all_ones end do end subroutine set_range_large elemental module function test_large ( self , pos ) result ( test ) ! ! Returns .TRUE. if the POS position is set, .FALSE. otherwise. If POS ! is negative or greater than BITS(SELF) - 1 the result is .FALSE.. ! logical :: test class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( bits_kind ) :: bit_block if ( pos < 0 . or . pos >= self % num_bits ) then test = . false . else bit_block = pos / block_size + 1 test = btest ( self % blocks ( bit_block ), & pos - ( bit_block - 1 ) * block_size ) end if end function test_large module subroutine to_string_large ( self , string , status ) ! ! Represents the value of SELF as a binary literal in STRING ! Status may have the values SUCCESS or ALLOC_FAULT ! class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'TO_STRING' integer ( bits_kind ) :: bit , bit_count , pos integer :: stat bit_count = self % num_bits allocate ( character ( len = bit_count ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if do bit = 0_bits_kind , bit_count - 1 pos = bit_count - bit if ( self % test ( bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success end subroutine to_string_large elemental module function value_large ( self , pos ) result ( value ) ! ! Returns 1 if the POS position is set, 0 otherwise. If POS is negative ! or greater than BITS(SELF) - 1 the result is 0. ! integer :: value class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos integer :: bit_block if ( pos < 0 . or . pos >= self % num_bits ) then value = 0 else bit_block = pos / block_size + 1 if ( btest ( self % blocks ( bit_block ), & pos - ( bit_block - 1 ) * block_size ) ) then value = 1 else value = 0 end if end if end function value_large module subroutine write_bitset_string_large ( self , string , status ) ! ! Writes a bitset literal to the allocatable default character STRING, ! representing the individual bit values in the bitset_t, SELF. ! If STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value ALLOC_FAULT if allocation of ! the output string failed. ! class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , & bit_count , & count_digits , & pos integer :: stat character ( * ), parameter :: procedure = 'WRITE_BITSET' bit_count = bits ( self ) call digit_count ( self % num_bits , count_digits ) allocate ( character ( len = count_digits + bit_count + 2 ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if write ( string , \"('S', i0)\" ) self % num_bits string ( count_digits + 2 : count_digits + 2 ) = \"B\" do bit = 0_bits_kind , bit_count - 1 pos = count_digits + 2 + bit_count - bit if ( self % test ( bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success contains subroutine digit_count ( bits , digits ) integer ( bits_kind ), intent ( in ) :: bits integer ( bits_kind ), intent ( out ) :: digits integer ( bits_kind ) :: factor factor = bits if ( factor <= 0 ) then digits = 1 return end if do digits = 1 , 127 factor = factor / 10 if ( factor == 0 ) return end do end subroutine digit_count end subroutine write_bitset_string_large module subroutine write_bitset_unit_large ( self , unit , advance , status ) ! ! Writes a bitset literal to the I/O unit, UNIT, representing the ! individual bit values in the bitset_t, SELF. By default or if ! ADVANCE is present with the value 'YES', advancing output is used. ! If ADVANCE is present with the value 'NO', then the current record ! is not advanced by the write. If STATUS is absent an error results ! in an error stop with an informative stop code. If STATUS is ! present it has the default value of SUCCESS, the value ! ALLOC_FAULT if allocation of the output string failed, or ! WRITE_FAILURE if the WRITE statement outputting the literal failed. ! class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer :: ierr character (:), allocatable :: string character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"WRITE_BITSET\" call self % write_bitset ( string , status ) if ( present ( status ) ) then if ( status /= success ) return end if write ( unit , & FMT = '(A)' , & advance = optval ( advance , 'YES' ), & iostat = ierr , & iomsg = message ) & string if ( ierr /= 0 ) then call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) return endif end subroutine write_bitset_unit_large elemental module subroutine xor_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise XOR of the original bits in SET1 ! and SET2. SET1 and SET2 must have the same number of bits otherwise ! the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = ieor ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) end do end subroutine xor_large end submodule stdlib_bitsets_large","tags":"","loc":"sourcefile/stdlib_bitsets_large.fypp.html"},{"title":"stdlib_hash_64bit_fnv.fypp – Fortran-lang/stdlib","text":"FNV_1_HASH and FNV_1A_HASH are translations to Fortran 2008 of the FNV-1 and FNV-1a hash functions of Glenn Fowler, Landon Curt Noll,\n and Phong Vo, that has been released into the public domain. Permission\n has been granted, by Landon Curt Noll, for the use of these algorithms\n in the Fortran Standard Library. A description of these functions is\n available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function.\n The functions have been modified from their normal form to also encode\n the size of the structure in the hash. Source Code !!------------------------------------------------------------------------------ !! `FNV_1_HASH` and `FNV_1A_HASH` are translations to Fortran 2008 of the !! `FNV-1` and `FNV-1a` hash functions of Glenn Fowler, Landon Curt Noll, !! and Phong Vo, that has been released into the public domain. Permission !! has been granted, by Landon Curt Noll, for the use of these algorithms !! in the Fortran Standard Library. A description of these functions is !! available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function. !! The functions have been modified from their normal form to also encode !! the size of the structure in the hash. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_64bit ) stdlib_hash_64bit_fnv ! An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt ! Noll, and Kiem-Phong-Vo, ! https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function implicit none integer ( int_hash ), parameter :: & offset_basis = int ( z 'CBF29CE484222325' , int_hash ), & prime = int ( z '100000001B3' , int_hash ) contains pure module function int8_fnv_1 ( key ) result ( hash_code ) integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) hash_code = hash_code * prime if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if end do end function int8_fnv_1 #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1 ( key ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 ) ) ) end function ${ k1 }$_ fnv_1 #:endfor elemental module function character_fnv_1 ( key ) result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , & 0_int8 , & bytes_char * & len ( key , kind = int64 ) ) ) end function character_fnv_1 pure module function int8_fnv_1a ( key ) result ( hash_code ) integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if hash_code = hash_code * prime end do end function int8_fnv_1a #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1a ( key ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 ))) end function ${ k1 }$_ fnv_1a #:endfor elemental module function character_fnv_1a ( key ) result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & ( bits_char / bits_int8 ) * & len ( key , kind = int64 ) ) ) end function character_fnv_1a end submodule stdlib_hash_64bit_fnv","tags":"","loc":"sourcefile/stdlib_hash_64bit_fnv.fypp.html"},{"title":"stdlib_kinds.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" !> Version: experimental !> !> The specification of this module is available [here](../page/specs/stdlib_kinds.html). module stdlib_kinds use iso_fortran_env , only : int8 , int16 , int32 , int64 use iso_c_binding , only : c_bool implicit none private public :: sp , dp , xdp , qp , int8 , int16 , int32 , int64 , lk , c_bool !> Single precision real numbers integer , parameter :: sp = selected_real_kind ( 6 ) !> Double precision real numbers integer , parameter :: dp = selected_real_kind ( 15 ) !> Extended double precision real numbers integer , parameter :: xdp = #{ if WITH_XDP }# selected_real_kind ( 18 ) #{ else }# - 1 #{ endif }# !> Quadruple precision real numbers integer , parameter :: qp = #{ if WITH_QP }# selected_real_kind ( 33 ) #{ else }# - 1 #{ endif }# !> Default logical kind parameter integer , parameter :: lk = kind (. true .) end module stdlib_kinds","tags":"","loc":"sourcefile/stdlib_kinds.fypp.html"},{"title":"stdlib_io_npy.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifer: MIT #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES !> Description of the npy format taken from !> https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html !> !>## Format Version 1.0 !> !> The first 6 bytes are a magic string: exactly \\x93NUMPY. !> !> The next 1 byte is an unsigned byte: !> the major version number of the file format, e.g. \\x01. !> !> The next 1 byte is an unsigned byte: !> the minor version number of the file format, e.g. \\x00. !> Note: the version of the file format is not tied to the version of the numpy package. !> !> The next 2 bytes form a little-endian unsigned short int: !> the length of the header data HEADER_LEN. !> !> The next HEADER_LEN bytes form the header data describing the array’s format. !> It is an ASCII string which contains a Python literal expression of a dictionary. !> It is terminated by a newline (\\n) and padded with spaces (\\x20) to make the total !> of len(magic string) + 2 + len(length) + HEADER_LEN be evenly divisible by 64 for !> alignment purposes. !> !> The dictionary contains three keys: !> !> - “descr”: dtype.descr !> An object that can be passed as an argument to the numpy.dtype constructor !> to create the array’s dtype. !> !> - “fortran_order”: bool !> Whether the array data is Fortran-contiguous or not. Since Fortran-contiguous !> arrays are a common form of non-C-contiguity, we allow them to be written directly !> to disk for efficiency. !> !> - “shape”: tuple of int !> The shape of the array. !> !> For repeatability and readability, the dictionary keys are sorted in alphabetic order. !> This is for convenience only. A writer SHOULD implement this if possible. A reader MUST !> NOT depend on this. !> !> Following the header comes the array data. If the dtype contains Python objects !> (i.e. dtype.hasobject is True), then the data is a Python pickle of the array. !> Otherwise the data is the contiguous (either C- or Fortran-, depending on fortran_order) !> bytes of the array. Consumers can figure out the number of bytes by multiplying the !> number of elements given by the shape (noting that shape=() means there is 1 element) !> by dtype.itemsize. !> !>## Format Version 2.0 !> !> The version 1.0 format only allowed the array header to have a total size of 65535 bytes. !> This can be exceeded by structured arrays with a large number of columns. !> The version 2.0 format extends the header size to 4 GiB. numpy.save will automatically !> save in 2.0 format if the data requires it, else it will always use the more compatible !> 1.0 format. !> !> The description of the fourth element of the header therefore has become: !> “The next 4 bytes form a little-endian unsigned int: the length of the header data !> HEADER_LEN.” !> !>## Format Version 3.0 !> !> This version replaces the ASCII string (which in practice was latin1) with a !> utf8-encoded string, so supports structured types with any unicode field names. module stdlib_io_npy use stdlib_kinds , only : int8 , int16 , int32 , int64 , sp , dp , xdp , qp implicit none private public :: save_npy , load_npy !> Version: experimental !> !> Save multidimensional array in npy format !> ([Specification](../page/specs/stdlib_io.html#save_npy)) interface save_npy # : for k1 , t1 in KINDS_TYPES # : for rank in RANKS module subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) character ( len =* ), intent ( in ) :: filename ${ t1 }$ , intent ( in ) :: array ${ ranksuffix ( rank ) }$ integer , intent ( out ), optional :: iostat character ( len = :), allocatable , intent ( out ), optional :: iomsg end subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor # : endfor end interface save_npy !> Version: experimental !> !> Load multidimensional array in npy format !> ([Specification](../page/specs/stdlib_io.html#load_npy)) interface load_npy # : for k1 , t1 in KINDS_TYPES # : for rank in RANKS module subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) character ( len =* ), intent ( in ) :: filename ${ t1 }$ , allocatable , intent ( out ) :: array ${ ranksuffix ( rank ) }$ integer , intent ( out ), optional :: iostat character ( len = :), allocatable , intent ( out ), optional :: iomsg end subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor # : endfor end interface load_npy character ( len =* ), parameter :: nl = achar ( 10 ) character ( len =* ), parameter :: & type_iint8 = \" 0 ) then error stop module_name // \" % \" // procedure // & \": Internal Error at stdlib_hashmaps: \" // & \"System uses 2 bytes per character, so \" // & \"key_size can't be an odd number.\" end if key_as_char = ishft ( key_size , - 1 ) case ( 4 ) if ( iand ( key_size , 3_int64 ) > 0 ) then error stop module_name // \" % \" // procedure // & \": Internal Error at stdlib_hashmaps: \" // & \"System uses 4 bytes per character, and \" // & \"key_size is not a multiple of four.\" end if key_as_char = ishft ( key_size , - 2 ) case default error stop module_name // \" % \" // procedure // & \": Internal Error: \" // & \"System doesn't use a power of two for its \" // & \"character size as expected by stdlib_hashmaps.\" end select allocate ( character ( len = key_as_char ) :: value ) value ( 1 : key_as_char ) = transfer ( key % value , value ) end subroutine get_char_key subroutine get_other ( other , value ) !! Version: Experimental !! !! Gets the contents of the other as a CLASS(*) string !! Arguments: !! other - the input other data !! value - the contents of other mapped to a CLASS(*) variable type ( other_type ), intent ( in ) :: other class ( * ), allocatable , intent ( out ) :: value allocate ( value , source = other % value ) end subroutine get_other subroutine get_int8_key ( key , value ) !! Version: Experimental !! !! Gets the contents of the key as an INTEGER(INT8) vector !! Arguments: !! key - the input key !! value - the contents of key mapped to an INTEGER(INT8) vector type ( key_type ), intent ( in ) :: key integer ( int8 ), allocatable , intent ( out ) :: value (:) value = key % value end subroutine get_int8_key pure subroutine get_int32_key ( key , value ) !! Version: Experimental !! !! Gets the contents of the key as an INTEGER(INT32) vector !! Arguments: !! key - the input key !! value - the contents of key mapped to an INTEGER(INT32) vector type ( key_type ), intent ( in ) :: key integer ( int32 ), allocatable , intent ( out ) :: value (:) value = transfer ( key % value , value ) end subroutine get_int32_key subroutine set_char_key ( key , value ) !! Version: Experimental !! !! Sets the contents of the key from a CHARACTER string !! Arguments: !! key - the output key !! value - the input CHARACTER string type ( key_type ), intent ( out ) :: key character ( * ), intent ( in ) :: value key % value = transfer ( value , key % value , & bytes_char * len ( value ) ) end subroutine set_char_key subroutine set_other ( other , value ) !! Version: Experimental !! !! Sets the contents of the other data from a CLASS(*) variable !! Arguments: !! other - the output other data !! value - the input CLASS(*) variable type ( other_type ), intent ( out ) :: other class ( * ), intent ( in ) :: value allocate ( other % value , source = value ) end subroutine set_other subroutine set_int8_key ( key , value ) !! Version: Experimental !! !! Sets the contents of the key from an INTEGER(INT8) vector !! Arguments: !! key - the output key !! value - the input INTEGER(INT8) vector type ( key_type ), intent ( out ) :: key integer ( int8 ), intent ( in ) :: value (:) key % value = value end subroutine set_int8_key pure subroutine set_int32_key ( key , value ) !! Version: Experimental !! !! Sets the contents of the key from an INTEGER(INT32) vector !! Arguments: !! key - the output key !! value - the input INTEGER(INT32) vector type ( key_type ), intent ( out ) :: key integer ( int32 ), intent ( in ) :: value (:) key % value = transfer ( value , key % value ) end subroutine set_int32_key pure function fnv_1_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1 algorithm !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1_hasher fnv_1_hasher = fnv_1_hash ( key % value ) end function fnv_1_hasher pure function fnv_1a_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1a algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#fnv_1a_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1a_hasher fnv_1a_hasher = fnv_1a_hash ( key % value ) end function fnv_1a_hasher pure function seeded_nmhash32_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32 hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32_hasher seeded_nmhash32_hasher = nmhash32 ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32_hasher pure function seeded_nmhash32x_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32X hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32x_hasher-calculates-a-hash-code-from-a-key)) !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32x_hasher seeded_nmhash32x_hasher = nmhash32x ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32x_hasher pure function seeded_water_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the waterhash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_water_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_water_hasher seeded_water_hasher = water_hash ( key % value , & int ( z 'DEADBEEF1EADBEEF' , int64 ) ) end function seeded_water_hasher end module stdlib_hashmap_wrappers","tags":"","loc":"sourcefile/stdlib_hashmap_wrappers.f90.html"},{"title":"stdlib_strings.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" !> This module implements basic string handling routines. !> !> The specification of this module is available [here](../page/specs/stdlib_strings.html). module stdlib_strings use stdlib_ascii , only : whitespace use stdlib_string_type , only : string_type , char , verify , repeat , len use stdlib_optval , only : optval use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 , lk , c_bool implicit none private public :: to_string public :: strip , chomp public :: starts_with , ends_with public :: slice , find , replace_all , padl , padr , count , zfill !> Version: experimental !> !> Format or transfer other types as a string. !> ([Specification](../page/specs/stdlib_strings.html#to_string)) interface to_string # : set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES # : set IL_KINDS_TYPES = INT_KINDS_TYPES + LOG_KINDS_TYPES # : for k1 , t1 in RC_KINDS_TYPES pure module function to_string_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ), optional :: format character ( len = :), allocatable :: string end function to_string_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in IL_KINDS_TYPES pure module function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ ( value ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len = #{ if t1 [ 0 ] == \"l\" }# 1 ) #{ else }# :), allocatable #{ endif }# :: string end function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ pure module function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ) :: format character ( len = :), allocatable :: string end function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end interface to_string !> Remove leading and trailing whitespace characters. !> !> Version: experimental interface strip module procedure :: strip_string module procedure :: strip_char end interface strip !> Remove trailing characters in set from string. !> If no character set is provided trailing whitespace is removed. !> !> Version: experimental interface chomp module procedure :: chomp_string module procedure :: chomp_char module procedure :: chomp_set_string_char module procedure :: chomp_set_char_char module procedure :: chomp_substring_string_string module procedure :: chomp_substring_char_string module procedure :: chomp_substring_string_char module procedure :: chomp_substring_char_char end interface chomp !> Check whether a string starts with substring or not !> !> Version: experimental interface starts_with module procedure :: starts_with_string_string module procedure :: starts_with_string_char module procedure :: starts_with_char_string module procedure :: starts_with_char_char end interface starts_with !> Check whether a string ends with substring or not !> !> Version: experimental interface ends_with module procedure :: ends_with_string_string module procedure :: ends_with_string_char module procedure :: ends_with_char_string module procedure :: ends_with_char_char end interface ends_with !> Extracts characters from the input string to return a new string !> !> Version: experimental interface slice module procedure :: slice_string module procedure :: slice_char end interface slice !> Finds the starting index of substring 'pattern' in the input 'string' !> [Specifications](link to the specs - to be completed) !> !> Version: experimental interface find module procedure :: find_string_string module procedure :: find_string_char module procedure :: find_char_string module procedure :: find_char_char end interface find !> Replaces all the occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Version: experimental interface replace_all module procedure :: replace_all_string_string_string module procedure :: replace_all_string_string_char module procedure :: replace_all_string_char_string module procedure :: replace_all_char_string_string module procedure :: replace_all_string_char_char module procedure :: replace_all_char_string_char module procedure :: replace_all_char_char_string module procedure :: replace_all_char_char_char end interface replace_all !> Version: experimental !> !> Left pad the input string !> [Specifications](../page/specs/stdlib_strings.html#padl) interface padl module procedure :: padl_string_default module procedure :: padl_string_pad_with module procedure :: padl_char_default module procedure :: padl_char_pad_with end interface padl !> Version: experimental !> !> Right pad the input string !> [Specifications](../page/specs/stdlib_strings.html#padr) interface padr module procedure :: padr_string_default module procedure :: padr_string_pad_with module procedure :: padr_char_default module procedure :: padr_char_pad_with end interface padr !> Version: experimental !> !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> [Specifications](../page/specs/stdlib_strings.html#count) interface count module procedure :: count_string_string module procedure :: count_string_char module procedure :: count_char_string module procedure :: count_char_char end interface count !> Version: experimental !> !> Left pad the input string with zeros. !> [Specifications](../page/specs/stdlib_strings.html#zfill) interface zfill module procedure :: zfill_string module procedure :: zfill_char end interface zfill contains !> Remove leading and trailing whitespace characters. pure function strip_string ( string ) result ( stripped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: stripped_string stripped_string = strip ( char ( string )) end function strip_string !> Remove leading and trailing whitespace characters. pure function strip_char ( string ) result ( stripped_string ) character ( len =* ), intent ( in ) :: string character ( len = :), allocatable :: stripped_string integer :: first , last first = verify ( string , whitespace ) if ( first == 0 ) then stripped_string = \"\" else last = verify ( string , whitespace , back = . true .) stripped_string = string ( first : last ) end if end function strip_char !> Remove trailing characters in set from string. !> Default character set variant where trailing whitespace is removed. pure function chomp_string ( string ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: chomped_string integer :: last last = verify ( string , whitespace , back = . true .) chomped_string = char ( string , 1 , last ) end function chomp_string !> Remove trailing characters in set from string. !> Default character set variant where trailing whitespace is removed. pure function chomp_char ( string ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string character ( len = :), allocatable :: chomped_string integer :: last last = verify ( string , whitespace , back = . true .) chomped_string = string ( 1 : last ) end function chomp_char !> Remove trailing characters in set from string. pure function chomp_set_string_char ( string , set ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string character ( len = 1 ), intent ( in ) :: set (:) type ( string_type ) :: chomped_string chomped_string = chomp ( char ( string ), set ) end function chomp_set_string_char !> Remove trailing characters in set from string. pure function chomp_set_char_char ( string , set ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string character ( len = 1 ), intent ( in ) :: set (:) character ( len = :), allocatable :: chomped_string integer :: last last = verify ( string , set_to_string ( set ), back = . true .) chomped_string = string ( 1 : last ) end function chomp_set_char_char !> Remove trailing substrings from string. pure function chomp_substring_string_string ( string , substring ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring type ( string_type ) :: chomped_string chomped_string = chomp ( char ( string ), char ( substring )) end function chomp_substring_string_string !> Remove trailing substrings from string. pure function chomp_substring_string_char ( string , substring ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring type ( string_type ) :: chomped_string chomped_string = chomp ( char ( string ), substring ) end function chomp_substring_string_char !> Remove trailing substrings from string. pure function chomp_substring_char_string ( string , substring ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring character ( len = :), allocatable :: chomped_string chomped_string = chomp ( string , char ( substring )) end function chomp_substring_char_string !> Remove trailing substrings from string. pure function chomp_substring_char_char ( string , substring ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring character ( len = :), allocatable :: chomped_string integer :: last , nsub last = len ( string ) nsub = len ( substring ) if ( nsub > 0 ) then do while ( string ( last - nsub + 1 : last ) == substring ) last = last - nsub end do end if chomped_string = string ( 1 : last ) end function chomp_substring_char_char !> Implementation to transfer a set of characters to a string representing the set. !> !> This function is internal and not part of the public API. pure function set_to_string ( set ) result ( string ) character ( len = 1 ), intent ( in ) :: set (:) character ( len = size ( set )) :: string string = transfer ( set , string ) end function set_to_string !> Check whether a string starts with substring or not pure function starts_with_char_char ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match integer :: nsub nsub = len ( substring ) if ( len ( string ) < nsub ) then match = . false . return end if match = string ( 1 : nsub ) == substring end function starts_with_char_char !> Check whether a string starts with substring or not elemental function starts_with_string_char ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match match = starts_with ( char ( string ), substring ) end function starts_with_string_char !> Check whether a string starts with substring or not elemental function starts_with_char_string ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = starts_with ( string , char ( substring )) end function starts_with_char_string !> Check whether a string starts with substring or not elemental function starts_with_string_string ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = starts_with ( char ( string ), char ( substring )) end function starts_with_string_string !> Check whether a string ends with substring or not pure function ends_with_char_char ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match integer :: last , nsub last = len ( string ) nsub = len ( substring ) if ( last < nsub ) then match = . false . return end if match = string ( last - nsub + 1 : last ) == substring end function ends_with_char_char !> Check whether a string ends with substring or not elemental function ends_with_string_char ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match match = ends_with ( char ( string ), substring ) end function ends_with_string_char !> Check whether a string ends with substring or not elemental function ends_with_char_string ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = ends_with ( string , char ( substring )) end function ends_with_char_string !> Check whether a string ends with substring or not elemental function ends_with_string_string ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = ends_with ( char ( string ), char ( substring )) end function ends_with_string_string !> 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 elemental function slice_string ( string , first , last , stride ) result ( sliced_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ), optional :: first , last , stride type ( string_type ) :: sliced_string sliced_string = string_type ( slice ( char ( string ), first , last , stride )) end function slice_string !> 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 pure function slice_char ( string , first , last , stride ) result ( sliced_string ) character ( len =* ), intent ( in ) :: string integer , intent ( in ), optional :: first , last , stride integer :: first_index , last_index , stride_vector , strides_taken , length_string , i , j character ( len = :), allocatable :: sliced_string length_string = len ( string ) first_index = 0 ! first_index = -infinity last_index = length_string + 1 ! last_index = +infinity stride_vector = 1 if ( present ( stride )) then if ( stride /= 0 ) then if ( stride < 0 ) then first_index = length_string + 1 ! first_index = +infinity last_index = 0 ! last_index = -infinity end if stride_vector = stride end if else if ( present ( first ) . and . present ( last )) then if ( last < first ) then stride_vector = - 1 end if end if end if if ( present ( first )) then first_index = first end if if ( present ( last )) then last_index = last end if if ( stride_vector > 0 ) then first_index = max ( first_index , 1 ) last_index = min ( last_index , length_string ) else first_index = min ( first_index , length_string ) last_index = max ( last_index , 1 ) end if strides_taken = floor ( real ( last_index - first_index ) / real ( stride_vector ) ) allocate ( character ( len = max ( 0 , strides_taken + 1 )) :: sliced_string ) j = 1 do i = first_index , last_index , stride_vector sliced_string ( j : j ) = string ( i : i ) j = j + 1 end do end function slice_char !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_string_string ( string , pattern , occurrence , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: res res = find ( char ( string ), char ( pattern ), occurrence , consider_overlapping ) end function find_string_string !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_string_char ( string , pattern , occurrence , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: res res = find ( char ( string ), pattern , occurrence , consider_overlapping ) end function find_string_char !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_char_string ( string , pattern , occurrence , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: res res = find ( string , char ( pattern ), occurrence , consider_overlapping ) end function find_char_string !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_char_char ( string , pattern , occurrence , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: lps_array ( len ( pattern )) integer :: res , s_i , p_i , length_string , length_pattern , occurrence_ occurrence_ = optval ( occurrence , 1 ) res = 0 length_string = len ( string ) length_pattern = len ( pattern ) if ( length_pattern > 0 . and . length_pattern <= length_string & & . and . occurrence_ > 0 ) then lps_array = compute_lps ( pattern ) s_i = 1 p_i = 1 do while ( s_i <= length_string ) if ( string ( s_i : s_i ) == pattern ( p_i : p_i )) then if ( p_i == length_pattern ) then occurrence_ = occurrence_ - 1 if ( occurrence_ == 0 ) then res = s_i - length_pattern + 1 exit else if ( optval ( consider_overlapping , . true .)) then p_i = lps_array ( p_i ) else p_i = 0 end if end if s_i = s_i + 1 p_i = p_i + 1 else if ( p_i > 1 ) then p_i = lps_array ( p_i - 1 ) + 1 else s_i = s_i + 1 end if end do end if end function find_char_char !> Computes longest prefix suffix for each index of the input 'string' !> !> Returns an array of integers pure function compute_lps ( string ) result ( lps_array ) character ( len =* ), intent ( in ) :: string integer :: lps_array ( len ( string )) integer :: i , j , length_string length_string = len ( string ) if ( length_string > 0 ) then lps_array ( 1 ) = 0 i = 2 j = 1 do while ( i <= length_string ) if ( string ( j : j ) == string ( i : i )) then lps_array ( i ) = j i = i + 1 j = j + 1 else if ( j > 1 ) then j = lps_array ( j - 1 ) + 1 else lps_array ( i ) = 0 i = i + 1 end if end do end if end function compute_lps !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_string_string ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), & & char ( pattern ), char ( replacement ))) end function replace_all_string_string_string !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_string_char ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), char ( pattern ), replacement )) end function replace_all_string_string_char !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_char_string ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), pattern , char ( replacement ))) end function replace_all_string_char_string !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_string_string ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement character ( len = :), allocatable :: res res = replace_all ( string , char ( pattern ), char ( replacement )) end function replace_all_char_string_string !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_char_char ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), pattern , replacement )) end function replace_all_string_char_char !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_string_char ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement character ( len = :), allocatable :: res res = replace_all ( string , char ( pattern ), replacement ) end function replace_all_char_string_char !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_char_string ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement character ( len = :), allocatable :: res res = replace_all ( string , pattern , char ( replacement )) end function replace_all_char_char_string !> Replaces all the occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_char_char ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement character ( len = :), allocatable :: res integer :: lps_array ( len ( pattern )) integer :: s_i , p_i , last , length_string , length_pattern res = \"\" length_string = len ( string ) length_pattern = len ( pattern ) last = 1 if ( length_pattern > 0 . and . length_pattern <= length_string ) then lps_array = compute_lps ( pattern ) s_i = 1 p_i = 1 do while ( s_i <= length_string ) if ( string ( s_i : s_i ) == pattern ( p_i : p_i )) then if ( p_i == length_pattern ) then res = res // & & string ( last : s_i - length_pattern ) // & & replacement last = s_i + 1 p_i = 0 end if s_i = s_i + 1 p_i = p_i + 1 else if ( p_i > 1 ) then p_i = lps_array ( p_i - 1 ) + 1 else s_i = s_i + 1 end if end do end if res = res // string ( last : length_string ) end function replace_all_char_char_char !> Left pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padl_string_default ( string , output_length ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length type ( string_type ) :: res res = string_type ( padl ( char ( string ), output_length , \" \" )) end function padl_string_default !> Left pad the input string with the 'pad_with' character !> !> Returns a new string pure function padl_string_pad_with ( string , output_length , pad_with ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with type ( string_type ) :: res res = string_type ( padl ( char ( string ), output_length , pad_with )) end function padl_string_pad_with !> Left pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padl_char_default ( string , output_length ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: res res = padl ( string , output_length , \" \" ) end function padl_char_default !> Left pad the input string with the 'pad_with' character !> !> Returns a new string pure function padl_char_pad_with ( string , output_length , pad_with ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with character ( len = max ( len ( string ), output_length )) :: res integer :: string_length string_length = len ( string ) if ( string_length < output_length ) then res = repeat ( pad_with , output_length - string_length ) res ( output_length - string_length + 1 : output_length ) = string else res = string end if end function padl_char_pad_with !> Right pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padr_string_default ( string , output_length ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: char_output type ( string_type ) :: res ! We're taking advantage of `char_output` being longer than `string` and ! initialized with whitespaces. By casting `string` to a `character` ! type and back to `string_type`, we're effectively right-padding ! `string` with spaces, so we don't need to pad explicitly. char_output = char ( string ) res = string_type ( char_output ) end function padr_string_default !> Right pad the input string with the 'pad_with' character !> !> Returns a new string pure function padr_string_pad_with ( string , output_length , pad_with ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with type ( string_type ) :: res res = string_type ( padr ( char ( string ), output_length , pad_with )) end function padr_string_pad_with !> Right pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padr_char_default ( string , output_length ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: res res = string end function padr_char_default !> Right pad the input string with the 'pad_with' character !> !> Returns a new string pure function padr_char_pad_with ( string , output_length , pad_with ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with character ( len = max ( len ( string ), output_length )) :: res integer :: string_length string_length = len ( string ) res = string if ( string_length < output_length ) then res ( string_length + 1 : output_length ) = & repeat ( pad_with , output_length - string_length ) end if end function padr_char_pad_with !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_string_string ( string , pattern , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: res res = count ( char ( string ), char ( pattern ), consider_overlapping ) end function count_string_string !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_string_char ( string , pattern , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: res res = count ( char ( string ), pattern , consider_overlapping ) end function count_string_char !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_char_string ( string , pattern , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: res res = count ( string , char ( pattern ), consider_overlapping ) end function count_char_string !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_char_char ( string , pattern , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: lps_array ( len ( pattern )) integer :: res , s_i , p_i , length_string , length_pattern res = 0 length_string = len ( string ) length_pattern = len ( pattern ) if ( length_pattern > 0 . and . length_pattern <= length_string ) then lps_array = compute_lps ( pattern ) s_i = 1 p_i = 1 do while ( s_i <= length_string ) if ( string ( s_i : s_i ) == pattern ( p_i : p_i )) then if ( p_i == length_pattern ) then res = res + 1 if ( optval ( consider_overlapping , . true .)) then p_i = lps_array ( p_i ) else p_i = 0 end if end if s_i = s_i + 1 p_i = p_i + 1 else if ( p_i > 1 ) then p_i = lps_array ( p_i - 1 ) + 1 else s_i = s_i + 1 end if end do end if end function count_char_char !> Left pad the input string with zeros !> !> Returns a new string pure function zfill_string ( string , output_length ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length type ( string_type ) :: res res = string_type ( padl ( char ( string ), output_length , \"0\" )) end function zfill_string !> Left pad the input string with zeros !> !> Returns a new string pure function zfill_char ( string , output_length ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: res res = padl ( string , output_length , \"0\" ) end function zfill_char end module stdlib_strings","tags":"","loc":"sourcefile/stdlib_strings.fypp.html"},{"title":"stdlib_hash_32bit_water.fypp – Fortran-lang/stdlib","text":"WATER_HASH is a translation to Fortran 2008 of the waterhash algorithm\n of Tommy Ettinger. Tommy Ettinger's original C++ code, waterhash.h , is\n available at the URL: https://github.com/tommyettinger/waterhash under the unlicense , https://github.com/tommyettinger/waterhash/blob/master/LICENSE.\n \" waterhash is a variant on Wang Yi's wyhash , with 32 bit output,\n using at most 64 bit arithmetic. wyhash is available at the URL: https://github.com/wangyi-fudan/wyhash also under the unlicense: https://github.com/wangyi-fudan/wyhash/blob/master/LICENSE .\n Original Author: Wang Yi godspeed_china@yeah.net Waterhash Variant Author: Tommy Ettinger tommy.ettinger@gmail.com The unlicense reads as follows:\n This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or\n distribute this software, either in source code form or as a compiled\n binary, for any purpose, commercial or non-commercial, and by any\n means. In jurisdictions that recognize copyright laws, the author or authors\n of this software dedicate any and all copyright interest in the\n software to the public domain. We make this dedication for the benefit\n of the public at large and to the detriment of our heirs and\n successors. We intend this dedication to be an overt act of\n relinquishment in perpetuity of all present and future rights to this\n software under copyright law. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to http://unlicense.org WATER_HASH is distributed as part of the stdlib_32_bit_hash_functions.f90 module and its stdlib_hash_32bit_water.f90 submodule with the Fortran\n Standard Library at URL: https://github.com/fortran-lang/stdlib.\n The Fortran Standard Library, including this code, is distributed under the\n MIT License as described in the LICENSE file distributed with the library. WATER_HASH differs from waterhash.h not only in its use of Fortran,\n but also in its use of signed two's complement arithmetic in contrast to\n the unsigned arithmetic of Ettinger and Wang Yi, and in making some of the\n uses of TRANSFER endian dependent, in an attempt to make the quality of\n the hash endian independent. To be useful this code must be processed by a processor that implements two\n Fortran 2008 extensions to Fortran 2003: submodules, and 64 bit ( INT64 )\n integers. The processor must also use two's complement integers\n (all Fortran 95+ processors use two's complement arithmetic) with\n wrap around overflow at runtime and for BOZ constants. The latest releases\n of the following processors are known to implement the required Fortran\n 2008 extensions and default to runtime wrap around overflow: FLANG,\n gfortran, ifort, and NAG Fortran. Older versions of gfortran will require\n the compiler flag, -fno-range-check , to ensure wrap around semantics\n for BOZ constants, and only versions of the NAG compiler starting with\n version 17, have implemented submodules. The latest releases of Cray\n Fortran and IBM Fortran are known to implement the Fortran 2008 extensions,\n but whether they also implement wrap around overflow is unknown. This implementation has only been tested on little endian processors. It\n will generate different hashes on big endian processors, but they are\n believed to be of comparable quality to those generated for little endian\n processors. No version of this hash is suitable as a cryptographic hash. Source Code !!------------------------------------------------------------------------------ !! `WATER_HASH` is a translation to Fortran 2008 of the `waterhash` algorithm !! of Tommy Ettinger. Tommy Ettinger's original C++ code, `waterhash.h`, is !! available at the URL: https://github.com/tommyettinger/waterhash under the !! `unlicense`, https://github.com/tommyettinger/waterhash/blob/master/LICENSE. !! \"`waterhash` is a variant on Wang Yi's `wyhash`, with 32 bit output, !! using at most 64 bit arithmetic. `wyhash` is available at the URL: !! `https://github.com/wangyi-fudan/wyhash` also under the unlicense: !! `https://github.com/wangyi-fudan/wyhash/blob/master/LICENSE`. !! Original Author: Wang Yi !! Waterhash Variant Author: Tommy Ettinger !! !! The `unlicense` reads as follows: !! This is free and unencumbered software released into the public domain. !! !! Anyone is free to copy, modify, publish, use, compile, sell, or !! distribute this software, either in source code form or as a compiled !! binary, for any purpose, commercial or non-commercial, and by any !! means. !! !! In jurisdictions that recognize copyright laws, the author or authors !! of this software dedicate any and all copyright interest in the !! software to the public domain. We make this dedication for the benefit !! of the public at large and to the detriment of our heirs and !! successors. We intend this dedication to be an overt act of !! relinquishment in perpetuity of all present and future rights to this !! software under copyright law. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, !! EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR !! OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, !! ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR !! OTHER DEALINGS IN THE SOFTWARE. !! !! For more information, please refer to !! !! `WATER_HASH` is distributed as part of the `stdlib_32_bit_hash_functions.f90` !! module and its `stdlib_hash_32bit_water.f90` submodule with the Fortran !! Standard Library at URL: https://github.com/fortran-lang/stdlib. !! The Fortran Standard Library, including this code, is distributed under the !! MIT License as described in the `LICENSE` file distributed with the library. !! `WATER_HASH` differs from `waterhash.h` not only in its use of Fortran, !! but also in its use of signed two's complement arithmetic in contrast to !! the unsigned arithmetic of Ettinger and Wang Yi, and in making some of the !! uses of `TRANSFER` endian dependent, in an attempt to make the quality of !! the hash endian independent. !! !! To be useful this code must be processed by a processor that implements two !! Fortran 2008 extensions to Fortran 2003: submodules, and 64 bit (`INT64`) !! integers. The processor must also use two's complement integers !! (all Fortran 95+ processors use two's complement arithmetic) with !! wrap around overflow at runtime and for BOZ constants. The latest releases !! of the following processors are known to implement the required Fortran !! 2008 extensions and default to runtime wrap around overflow: FLANG, !! gfortran, ifort, and NAG Fortran. Older versions of gfortran will require !! the compiler flag, `-fno-range-check`, to ensure wrap around semantics !! for BOZ constants, and only versions of the NAG compiler starting with !! version 17, have implemented submodules. The latest releases of Cray !! Fortran and IBM Fortran are known to implement the Fortran 2008 extensions, !! but whether they also implement wrap around overflow is unknown. !! !! This implementation has only been tested on little endian processors. It !! will generate different hashes on big endian processors, but they are !! believed to be of comparable quality to those generated for little endian !! processors. !! !! No version of this hash is suitable as a cryptographic hash. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_32bit ) stdlib_hash_32bit_water implicit none contains pure module function int8_water_hash ( key , seed ) result ( hash_code ) integer ( int32 ) :: hash_code integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int64 ), intent ( in ) :: seed integer ( int32 ) :: dummy ( 2 ) integer ( int64 ) :: h integer ( int64 ) :: i integer ( int64 ) :: len integer ( int64 ), parameter :: & waterp0 = int ( z 'a0761d65' , kind = int64 ), & waterp1 = int ( z 'e7037ed1' , kind = int64 ), & waterp2 = int ( z '8ebc6af1' , kind = int64 ), & waterp3 = int ( z '589965cd' , kind = int64 ), & waterp4 = int ( z '1d8e4e27' , kind = int64 ), & waterp5 = int ( z 'eb44accb' , kind = int64 ) len = size ( key , kind = int64 ) h = seed do i = 0_int64 , len - 16 , 16 h = watermum ( watermum ( ieor ( waterr32 ( key ( i :)), waterp1 ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )) + h , & watermum ( ieor ( waterr32 ( key ( i + 8 :)), waterp3 ), & ieor ( waterr32 ( key ( i + 12 :)), waterp4 ))) end do h = h + waterp5 select case ( iand ( len , 15_int64 ) ) case ( 1 ) h = watermum ( ieor ( waterp2 , h ), & ieor ( waterr08 ( key ( i :)), waterp1 )) case ( 2 ) h = watermum ( ieor ( waterp3 , h ), & ieor ( waterr16 ( key ( i :)), waterp4 )) case ( 3 ) h = watermum ( ieor ( waterr16 ( key ( i :)), h ), & ieor ( waterr08 ( key ( i + 2 :)), waterp2 )) case ( 4 ) h = watermum ( ieor ( waterr16 ( key ( i :)), h ), & ieor ( waterr16 ( key ( i + 2 :)), waterp3 )) case ( 5 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr08 ( key ( i + 4 :)), waterp1 )) case ( 6 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr16 ( key ( i + 4 :)), waterp1 )) case ( 7 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( ior ( ishft ( waterr16 ( key ( i + 4 :)), 8 ), & waterr08 ( key ( i + 6 :))), waterp1 )) case ( 8 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp0 )) case ( 9 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterp4 ), & ieor ( waterr08 ( key ( i + 8 :)), waterp3 ))) case ( 10 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( h , ieor ( waterr16 ( key ( i + 8 :)), waterp3 ))) case ( 11 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( h , & ieor ( ior ( ishft ( waterr16 ( key ( i + 8 :)), 8 ), & waterr08 ( key ( i + 10 :))), & waterp3 ))) case ( 12 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & waterp4 )) case ( 13 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & ieor ( waterr08 ( key ( i + 12 :)), waterp4 ))) case ( 14 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & ieor ( waterr16 ( key ( i + 12 :)), waterp4 ))) case ( 15 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & ieor ( ior ( ishft ( waterr16 ( key ( i + 12 :)), 8 ), & waterr08 ( key ( i + 14 :))), & waterp4 ))) end select h = ieor ( h , ishft ( h , 16 ) ) * ieor ( len , waterp0 ) h = h - ishft ( h , - 32 ) dummy ( 1 : 2 ) = transfer ( h , dummy , 2 ) if ( little_endian ) then hash_code = dummy ( 1 ) else hash_code = dummy ( 2 ) end if contains pure function watermum ( a , b ) result ( r ) integer ( int64 ) :: r integer ( int64 ), intent ( in ) :: a , b r = a * b r = r - ishft ( r , - 32 ) end function watermum pure function waterr08 ( p ) result ( v ) integer ( int64 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( [ p ( 1 ), 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], v ) else v = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , p ( 1 ) ], v ) end if end function waterr08 pure function waterr16 ( p ) result ( v ) integer ( int64 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( [ p ( 1 ), p ( 2 ), 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], v ) else v = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , p ( 2 ), p ( 1 ) ], v ) end if end function waterr16 pure function waterr32 ( p ) result ( v ) integer ( int64 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( [ p ( 1 ), p ( 2 ), p ( 3 ), p ( 4 ), & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], v ) else v = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & p ( 4 ), p ( 3 ), p ( 2 ), p ( 1 ) ], v ) end if end function waterr32 end function int8_water_hash #:for k1 in INT_KINDS pure module function ${ k1 }$_ water_hash ( key , seed ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int64 ), intent ( in ) :: seed integer ( int_hash ) :: hash_code hash_code = int8_water_hash ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ water_hash #:endfor elemental module function character_water_hash ( key , seed ) & result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed integer ( int_hash ) :: hash_code hash_code = int8_water_hash ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_water_hash module subroutine new_water_hash_seed ( seed ) integer ( int64 ), intent ( inout ) :: seed integer ( int64 ) :: old_seed real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) old_seed = seed find_seed : do call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) seed = transfer ( part , seed ) if ( seed /= old_seed ) return end do find_seed end subroutine new_water_hash_seed end submodule stdlib_hash_32bit_water","tags":"","loc":"sourcefile/stdlib_hash_32bit_water.fypp.html"},{"title":"stdlib_specialfunctions.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_specialfunctions use stdlib_kinds , only : sp , dp , xdp , qp implicit none private public :: legendre public :: dlegendre interface legendre !! version: experimental !! !! Legendre polynomial pure elemental module function legendre_fp64 ( n , x ) result ( leg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: leg end function end interface interface dlegendre !! version: experimental !! !! First derivative Legendre polynomial pure elemental module function dlegendre_fp64 ( n , x ) result ( dleg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: dleg end function end interface end module stdlib_specialfunctions","tags":"","loc":"sourcefile/stdlib_specialfunctions.f90.html"},{"title":"stdlib_sorting_sort.fypp – Fortran-lang/stdlib","text":"This file is subjec† both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The generic subroutine, SORT , is substantially a\ntranslation to Fortran 2008, of the introsort of David Musser.\nDavid Musser has given permission to include a variant of introsort in the Fortran Standard Library under the MIT license provided\nwe cite: Musser, D.R., “Introspective Sorting and Selection Algorithms,”\n Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). as the official source of the algorithm. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME #:set SIGN_NAME = [\"increase\", \"decrease\"] #:set SIGN_TYPE = [\">\", \"<\"] #:set SIGN_OPP_TYPE = [\"<\", \">\"] #:set SIGN_NAME_TYPE = list(zip(SIGN_NAME, SIGN_TYPE, SIGN_OPP_TYPE)) !! Licensing: !! !! This file is subjec† both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! The generic subroutine, `SORT`, is substantially a !! translation to Fortran 2008, of the `introsort` of David Musser. !! David Musser has given permission to include a variant of `introsort` !! in the Fortran Standard Library under the MIT license provided !! we cite: !! !! Musser, D.R., “Introspective Sorting and Selection Algorithms,” !! Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). !! !! as the official source of the algorithm. submodule ( stdlib_sorting ) stdlib_sorting_sort !! This submodule implements the overloaded sorting subroutine `SORT` !! that can be used to sort four kinds of `INTEGER` arrays and three kinds !! of `REAL` arrays. Sorting is in order of increasing value, with the worst !! case run time performance of `O(N Ln(N))`. !! !! `SORT` uses the `INTROSORT` sorting algorithm of David Musser, !! http://www.cs.rpi.edu/~musser/gp/introsort.ps. `introsort` is a hybrid !! unstable comparison algorithm combining `quicksort`, `insertion sort`, and !! `heap sort`. While this algorithm is always O(N Ln(N)) it is relatively !! fast on randomly ordered data, but inconsistent in performance on partly !! sorted data, sometimes having `merge sort` performance, sometimes having !! better than `quicksort` performance. implicit none contains #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME pure module subroutine ${ name1 }$_ sort ( array , reverse ) ${ t1 }$ , intent ( inout ) :: array ( 0 :) logical , intent ( in ), optional :: reverse if ( optval ( reverse , . false .)) then call ${ name1 }$_ decrease_sort ( array ) else call ${ name1 }$_ increase_sort ( array ) endif end subroutine ${ name1 }$_ sort #:endfor #:for sname, signt, signoppt in SIGN_NAME_TYPE #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME pure subroutine ${ name1 }$_${ sname }$_ sort ( array ) ! `${name1}$_${sname}$_sort( array )` sorts the input `ARRAY` of type `${t1}$` ! using a hybrid sort based on the `introsort` of David Musser. As with ! `introsort`, `${name1}$_${sname}$_sort( array )` is an unstable hybrid comparison ! algorithm using `quicksort` for the main body of the sort tree, ! supplemented by `insertion sort` for the outer branches, but if ! `quicksort` is converging too slowly the algorithm resorts ! to `heapsort`. The algorithm is of order O(N Ln(N)) for all inputs. ! Because it relies on `quicksort`, the coefficient of the O(N Ln(N)) ! behavior is typically small compared to other sorting algorithms. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int32 ) :: depth_limit depth_limit = 2 * int ( floor ( log ( real ( size ( array , kind = int_index ), & kind = dp ) ) / log ( 2.0_dp ) ), & kind = int32 ) call introsort ( array , depth_limit ) contains pure recursive subroutine introsort ( array , depth_limit ) ! It devolves to `insertionsort` if the remaining number of elements ! is fewer than or equal to `INSERT_SIZE`, `heapsort` if the completion ! of the `quicksort` is too slow as estimated from `DEPTH_LIMIT`, ! otherwise sorting is done by a `quicksort`. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int32 ), intent ( in ) :: depth_limit integer ( int_index ), parameter :: insert_size = 16_int_index integer ( int_index ) :: index if ( size ( array , kind = int_index ) <= insert_size ) then ! May be best at the end of SORT processing the whole array ! See Musser, D.R., “Introspective Sorting and Selection ! Algorithms,” Software—Practice and Experience, Vol. 27(8), ! 983–993 (August 1997). call insertion_sort ( array ) else if ( depth_limit == 0 ) then call heap_sort ( array ) else call partition ( array , index ) call introsort ( array ( 0 : index - 1 ), depth_limit - 1 ) call introsort ( array ( index + 1 :), depth_limit - 1 ) end if end subroutine introsort pure subroutine partition ( array , index ) ! quicksort partition using median of three. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ), intent ( out ) :: index ${ t2 }$ :: u , v , w , x , y integer ( int_index ) :: i , j ! Determine median of three and exchange it with the end. u = array ( 0 ) v = array ( size ( array , kind = int_index ) / 2 - 1 ) w = array ( size ( array , kind = int_index ) - 1 ) if ( ( u ${ signt }$ v ) . neqv . ( u ${ signt }$ w ) ) then x = u y = array ( 0 ) array ( 0 ) = array ( size ( array , kind = int_index ) - 1 ) array ( size ( array , kind = int_index ) - 1 ) = y else if ( ( v ${ signoppt }$ u ) . neqv . ( v ${ signoppt }$ w ) ) then x = v y = array ( size ( array , kind = int_index ) / 2 - 1 ) array ( size ( array , kind = int_index ) / 2 - 1 ) = & array ( size ( array , kind = int_index ) - 1 ) array ( size ( array , kind = int_index ) - 1 ) = y else x = w end if ! Partition the array. i = - 1_int_index do j = 0_int_index , size ( array , kind = int_index ) - 2 if ( array ( j ) ${ signoppt }$ = x ) then i = i + 1 y = array ( i ) array ( i ) = array ( j ) array ( j ) = y end if end do y = array ( i + 1 ) array ( i + 1 ) = array ( size ( array , kind = int_index ) - 1 ) array ( size ( array , kind = int_index ) - 1 ) = y index = i + 1 end subroutine partition pure subroutine insertion_sort ( array ) ! Bog standard insertion sort. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: i , j ${ t2 }$ :: key do j = 1_int_index , size ( array , kind = int_index ) - 1 key = array ( j ) i = j - 1 do while ( i >= 0 ) if ( array ( i ) ${ signoppt }$ = key ) exit array ( i + 1 ) = array ( i ) i = i - 1 end do array ( i + 1 ) = key end do end subroutine insertion_sort pure subroutine heap_sort ( array ) ! A bog standard heap sort ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: i , heap_size ${ t2 }$ :: y heap_size = size ( array , kind = int_index ) ! Build the max heap do i = ( heap_size - 2 ) / 2_int_index , 0_int_index , - 1_int_index call max_heapify ( array , i , heap_size ) end do do i = heap_size - 1 , 1_int_index , - 1_int_index ! Swap the first element with the current final element y = array ( 0 ) array ( 0 ) = array ( i ) array ( i ) = y ! Sift down using max_heapify call max_heapify ( array , 0_int_index , i ) end do end subroutine heap_sort pure recursive subroutine max_heapify ( array , i , heap_size ) ! Transform the array into a max heap ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ), intent ( in ) :: i , heap_size integer ( int_index ) :: l , r , largest ${ t2 }$ :: y largest = i l = 2_int_index * i + 1_int_index r = l + 1_int_index if ( l < heap_size ) then if ( array ( l ) ${ signt }$ array ( largest ) ) largest = l end if if ( r < heap_size ) then if ( array ( r ) ${ signt }$ array ( largest ) ) largest = r end if if ( largest /= i ) then y = array ( i ) array ( i ) = array ( largest ) array ( largest ) = y call max_heapify ( array , largest , heap_size ) end if end subroutine max_heapify end subroutine ${ name1 }$_${ sname }$_ sort #:endfor #:endfor end submodule stdlib_sorting_sort","tags":"","loc":"sourcefile/stdlib_sorting_sort.fypp.html"},{"title":"stdlib_io_npy_save.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifer: MIT #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES !> Implementation of saving multidimensional arrays to npy files submodule ( stdlib_io_npy ) stdlib_io_npy_save use stdlib_error , only : error_stop use stdlib_strings , only : to_string implicit none contains !> Generate magic header string for npy format pure function magic_header ( major , minor ) result ( str ) !> Major version of npy format integer , intent ( in ) :: major !> Minor version of npy format integer , intent ( in ) :: minor !> Magic string for npy format character ( len = 8 ) :: str str = magic_number // magic_string // achar ( major ) // achar ( minor ) end function magic_header !> Generate header for npy format pure function npy_header ( vtype , vshape ) result ( str ) !> Type of variable character ( len =* ), intent ( in ) :: vtype !> Shape of variable integer , intent ( in ) :: vshape (:) !> Header string for npy format character ( len = :), allocatable :: str integer , parameter :: len_v10 = 8 + 2 , len_v20 = 8 + 4 , block_size = 64 str = & \"{'descr': '\" // vtype // & \"', 'fortran_order': True, 'shape': \" // & shape_str ( vshape ) // \", }\" if ( len ( str ) + len_v10 >= 65535 ) then str = str // & & repeat ( \" \" , block_size - mod ( len ( str ) + len_v20 + 1 , block_size )) // nl str = magic_header ( 2 , 0 ) // to_bytes_i4 ( int ( len ( str ))) // str else str = str // & & repeat ( \" \" , block_size - mod ( len ( str ) + len_v10 + 1 , block_size )) // nl str = magic_header ( 1 , 0 ) // to_bytes_i2 ( int ( len ( str ))) // str end if end function npy_header !> Write integer as byte string in little endian encoding pure function to_bytes_i4 ( val ) result ( str ) !> Integer value to convert to bytes integer , intent ( in ) :: val !> String of bytes character ( len = 4 ) :: str str = achar ( mod ( val , 256 ** 1 )) // & & achar ( mod ( val , 256 ** 2 ) / 256 ** 1 ) // & & achar ( mod ( val , 256 ** 3 ) / 256 ** 2 ) // & & achar ( val / 256 ** 3 ) end function to_bytes_i4 !> Write integer as byte string in little endian encoding, 2-byte truncated version pure function to_bytes_i2 ( val ) result ( str ) !> Integer value to convert to bytes integer , intent ( in ) :: val !> String of bytes character ( len = 2 ) :: str str = achar ( mod ( val , 2 ** 8 )) // & & achar ( mod ( val , 2 ** 16 ) / 2 ** 8 ) end function to_bytes_i2 !> Print array shape as tuple of int pure function shape_str ( vshape ) result ( str ) !> Shape of variable integer , intent ( in ) :: vshape (:) !> Shape string for npy format character ( len = :), allocatable :: str integer :: i str = \"(\" do i = 1 , size ( vshape ) str = str // to_string ( vshape ( i )) // \", \" enddo str = str // \")\" end function shape_str #:for k1, t1 in KINDS_TYPES # : for rank in RANKS !> Save ${rank}$-dimensional array in npy format module subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) !> Name of the npy file to load from character ( len =* ), intent ( in ) :: filename !> Array to be loaded from the npy file ${ t1 }$ , intent ( in ) :: array ${ ranksuffix ( rank ) }$ !> Error status of loading, zero on success integer , intent ( out ), optional :: iostat !> Associated error message in case of non-zero status code character ( len = :), allocatable , intent ( out ), optional :: iomsg character ( len =* ), parameter :: vtype = type_$ { t1 [ 0 ] }{ k1 }$ integer :: io , stat open ( newunit = io , file = filename , form = \"unformatted\" , access = \"stream\" , iostat = stat ) if ( stat == 0 ) then write ( io , iostat = stat ) npy_header ( vtype , shape ( array )) end if if ( stat == 0 ) then write ( io , iostat = stat ) array end if close ( io , iostat = stat ) if ( present ( iostat )) then iostat = stat else if ( stat /= 0 ) then call error_stop ( \"Failed to write array to file '\" // filename // \"'\" ) end if if ( present ( iomsg )) then if ( stat /= 0 ) then iomsg = \"Failed to write array to file '\" // filename // \"'\" end if end if end subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor #:endfor end submodule stdlib_io_npy_save","tags":"","loc":"sourcefile/stdlib_io_npy_save.fypp.html"},{"title":"stdlib_linalg_blas_w.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:if WITH_QP module stdlib_linalg_blas_w use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c use stdlib_linalg_blas_d use stdlib_linalg_blas_z use stdlib_linalg_blas_q implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_waxpy public :: stdlib_wcopy public :: stdlib_wdotc public :: stdlib_wdotu public :: stdlib_wdrot public :: stdlib_wdscal public :: stdlib_wgbmv public :: stdlib_wgemm public :: stdlib_wgemv public :: stdlib_wgerc public :: stdlib_wgeru public :: stdlib_whbmv public :: stdlib_whemm public :: stdlib_whemv public :: stdlib_wher public :: stdlib_wher2 public :: stdlib_wher2k public :: stdlib_wherk public :: stdlib_whpmv public :: stdlib_whpr public :: stdlib_whpr2 public :: stdlib_wrotg public :: stdlib_wscal public :: stdlib_wswap public :: stdlib_wsymm public :: stdlib_wsyr2k public :: stdlib_wsyrk public :: stdlib_wtbmv public :: stdlib_wtbsv public :: stdlib_wtpmv public :: stdlib_wtpsv public :: stdlib_wtrmm public :: stdlib_wtrmv public :: stdlib_wtrsm public :: stdlib_wtrsv ! 128-bit real constants real ( qp ), parameter , private :: negone = - 1.00_qp real ( qp ), parameter , private :: zero = 0.00_qp real ( qp ), parameter , private :: half = 0.50_qp real ( qp ), parameter , private :: one = 1.00_qp real ( qp ), parameter , private :: two = 2.00_qp real ( qp ), parameter , private :: three = 3.00_qp real ( qp ), parameter , private :: four = 4.00_qp real ( qp ), parameter , private :: eight = 8.00_qp real ( qp ), parameter , private :: ten = 1 0.00_qp ! 128-bit complex constants complex ( qp ), parameter , private :: czero = ( 0.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: chalf = ( 0.5_qp , 0.0_qp ) complex ( qp ), parameter , private :: cone = ( 1.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: cnegone = ( - 1.0_qp , 0.0_qp ) ! 128-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( qp ), parameter , private :: rradix = real ( radix ( zero ), qp ) real ( qp ), parameter , private :: ulp = epsilon ( zero ) real ( qp ), parameter , private :: eps = ulp * half real ( qp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( qp ), parameter , private :: safmax = one / safmin real ( qp ), parameter , private :: smlnum = safmin / ulp real ( qp ), parameter , private :: bignum = safmax * ulp real ( qp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( qp ), parameter , private :: rtmax = sqrt ( bignum ) ! 128-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( qp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( qp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( qp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( qp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure subroutine stdlib_waxpy ( n , za , zx , incx , zy , incy ) !! ZAXPY: constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) complex ( qp ), intent ( inout ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_qcabs1 ( za ) == 0.0_qp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zy ( i ) + za * zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zy ( iy ) + za * zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_waxpy pure subroutine stdlib_wcopy ( n , zx , incx , zy , incy ) !! ZCOPY: copies a vector, x, to a vector, y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) complex ( qp ), intent ( out ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_wcopy pure complex ( qp ) function stdlib_wdotc ( n , zx , incx , zy , incy ) !! ZDOTC: forms the dot product of two complex vectors !! ZDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: ztemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ztemp = ( 0.0_qp , 0.0_qp ) stdlib_wdotc = ( 0.0_qp , 0.0_qp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( i )) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( ix )) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_wdotc = ztemp return end function stdlib_wdotc pure complex ( qp ) function stdlib_wdotu ( n , zx , incx , zy , incy ) !! ZDOTU: forms the dot product of two complex vectors !! ZDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: ztemp integer ( ilp ) :: i , ix , iy ztemp = ( 0.0_qp , 0.0_qp ) stdlib_wdotu = ( 0.0_qp , 0.0_qp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + zx ( i ) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + zx ( ix ) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_wdotu = ztemp return end function stdlib_wdotu pure subroutine stdlib_wdrot ( n , zx , incx , zy , incy , c , s ) !! Applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( qp ), intent ( in ) :: c , s ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( qp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * zx ( i ) + s * zy ( i ) zy ( i ) = c * zy ( i ) - s * zx ( i ) zx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * zx ( ix ) + s * zy ( iy ) zy ( iy ) = c * zy ( iy ) - s * zx ( ix ) zx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_wdrot pure subroutine stdlib_wdscal ( n , da , zx , incx ) !! ZDSCAL: scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: cmplx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = cmplx ( da , 0.0_qp , KIND = qp ) * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = cmplx ( da , 0.0_qp , KIND = qp ) * zx ( i ) end do end if return end subroutine stdlib_wdscal pure subroutine stdlib_wgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! ZGBMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_wgbmv pure subroutine stdlib_wgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZGEMM: performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_wgemm pure subroutine stdlib_wgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZGEMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_wgemv pure subroutine stdlib_wgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERC: performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_wgerc pure subroutine stdlib_wgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERU: performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_wgeru pure subroutine stdlib_whbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! ZHBMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: real , conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = qp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = qp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = qp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = qp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_whbmv pure subroutine stdlib_whemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHEMM: performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = qp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = qp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = qp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = qp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = qp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_whemm pure subroutine stdlib_whemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZHEMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = qp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = qp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = qp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = qp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_whemv pure subroutine stdlib_wher ( uplo , n , alpha , x , incx , a , lda ) !! ZHER: performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = qp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( j ) * temp , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( jx ) * temp , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( temp * x ( j ), KIND = qp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( temp * x ( jx ), KIND = qp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_wher pure subroutine stdlib_wher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! ZHER2: performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = qp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = qp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_wher2 pure subroutine stdlib_wher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHER2K: performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha real ( qp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = qp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) end do end if else if ( beta == real ( czero , KIND = qp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = qp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = qp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = qp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = qp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = qp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = qp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = qp ) end if else if ( beta == real ( czero , KIND = qp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = qp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = qp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = qp ) end if else if ( beta == real ( czero , KIND = qp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_wher2k pure subroutine stdlib_wherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZHERK: performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , cmplx , conjg , max ! Local Scalars complex ( qp ) :: temp real ( qp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = qp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( temp * a ( i , l ), KIND = qp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = qp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( temp * a ( j , l ), KIND = qp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = qp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = qp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_wherk pure subroutine stdlib_whpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! ZHPMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( in ) :: ap ( * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = qp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = qp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = qp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = qp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_whpmv pure subroutine stdlib_whpr ( uplo , n , alpha , x , incx , ap ) !! ZHPR: performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: ap ( * ) complex ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = qp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( j ) * temp , KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( jx ) * temp , KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( temp * x ( j ), KIND = qp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( temp * x ( jx ), KIND = qp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_whpr pure subroutine stdlib_whpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! ZHPR2: performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: ap ( * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = qp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = qp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_whpr2 pure subroutine stdlib_wrotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in DROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by DROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._qp ) ! Scaling Constants ! Scalar Arguments real ( qp ), intent ( out ) :: c complex ( qp ), intent ( inout ) :: a complex ( qp ), intent ( in ) :: b complex ( qp ), intent ( out ) :: s ! Local Scalars real ( qp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( qp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( qp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = qp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = qp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = qp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = qp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_wrotg pure subroutine stdlib_wscal ( n , za , zx , incx ) !! ZSCAL: scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = za * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = za * zx ( i ) end do end if return end subroutine stdlib_wscal pure subroutine stdlib_wswap ( n , zx , incx , zy , incy ) !! ZSWAP: interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: ztemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = zx ( i ) zx ( i ) = zy ( i ) zy ( i ) = ztemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = zx ( ix ) zx ( ix ) = zy ( iy ) zy ( iy ) = ztemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_wswap pure subroutine stdlib_wsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYMM: performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_wsymm pure subroutine stdlib_wsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYR2K: performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_wsyr2k pure subroutine stdlib_wsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZSYRK: performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_wsyrk pure subroutine stdlib_wtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_wtbmv pure subroutine stdlib_wtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_wtbsv pure subroutine stdlib_wtpmv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: ap ( * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_wtpmv pure subroutine stdlib_wtpsv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: ap ( * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_wtpsv pure subroutine stdlib_wtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRMM: performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_wtrmm pure subroutine stdlib_wtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_wtrmv pure subroutine stdlib_wtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRSM: solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_wtrsm pure subroutine stdlib_wtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_wtrsv end module stdlib_linalg_blas_w #:endif","tags":"","loc":"sourcefile/stdlib_linalg_blas_w.fypp.html"},{"title":"stdlib_hash_64bit_pengy.fypp – Fortran-lang/stdlib","text":"PENGY_HASH is a translation to Fortran 2008 and signed two's complement\n arithmetic of the pengyhash algorithm of Alberto Fajardo, copyright 2020.\n Alberto Fajardo's original C code, pengyhash.c , is available at the URL:\n https://github.com/tinypeng/pengyhash/blob/master/pengyhash.c\n under the BSD 2-Clause License:\n https://github.com/tinypeng/pengyhash/blob/master/LICENSE The BSD 2-Clause license is as follows: BSD 2-Clause License pengyhash\n Copyright (c) 2020 Alberto Fajardo\n All rights reserved. Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n POSSIBILITY OF SUCH DAMAGE. Source Code !!------------------------------------------------------------------------------ !! `PENGY_HASH` is a translation to Fortran 2008 and signed two's complement !! arithmetic of the `pengyhash` algorithm of Alberto Fajardo, copyright 2020. !! Alberto Fajardo's original C code, `pengyhash.c`, is available at the URL: !! https://github.com/tinypeng/pengyhash/blob/master/pengyhash.c !! under the BSD 2-Clause License: !! https://github.com/tinypeng/pengyhash/blob/master/LICENSE !! !! The BSD 2-Clause license is as follows: !! !! BSD 2-Clause License !! !! pengyhash !! Copyright (c) 2020 Alberto Fajardo !! All rights reserved. !! !! Redistribution and use in source and binary forms, with or without !! modification, are permitted provided that the following conditions are met: !! !! 1. Redistributions of source code must retain the above copyright notice, !! this list of conditions and the following disclaimer. !! !! 2. Redistributions in binary form must reproduce the above copyright notice, !! this list of conditions and the following disclaimer in the documentation !! and/or other materials provided with the distribution. !! !! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" !! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE !! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE !! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE !! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR !! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF !! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS !! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN !! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) !! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE !! POSSIBILITY OF SUCH DAMAGE. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_64bit ) stdlib_hash_64bit_pengy implicit none contains pure module function int8_pengy_hash ( key , seed ) result ( hash_code ) integer ( int64 ) :: hash_code integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: b ( 0 : 3 ) integer ( int64 ) :: i integer ( int64 ) :: index integer ( int64 ) :: len integer ( int64 ) :: s ( 0 : 3 ) integer ( int64 ) :: seed2 integer ( int8 ) :: dummy ( 0 : 31 ) b ( 0 : 3 ) = 0_int64 len = size ( key , kind = int64 ) s ( 0 : 3 ) = [ 0_int64 , 0_int64 , 0_int64 , len ] index = 0_int64 do while ( len >= 32 ) b ( 0 : 3 ) = transfer ( key ( index : index + 31 ), 0_int64 , 4 ) s ( 0 ) = s ( 0 ) + s ( 1 ) + b ( 3 ) s ( 1 ) = s ( 0 ) + ishftc ( s ( 1 ), 14 ) s ( 2 ) = s ( 2 ) + s ( 3 ) + b ( 2 ) s ( 3 ) = s ( 2 ) + ishftc ( s ( 3 ), 23 ) s ( 0 ) = s ( 0 ) + s ( 3 ) + b ( 1 ) s ( 3 ) = ieor ( s ( 0 ), ishftc ( s ( 3 ), 16 ) ) s ( 2 ) = s ( 2 ) + s ( 1 ) + b ( 0 ) s ( 1 ) = ieor ( s ( 2 ), ishftc ( s ( 1 ), 40 ) ) len = len - 32 index = index + 32 end do dummy ( 0 : 31 ) = transfer ( b , 0_int8 , 32 ) dummy ( 0 : len - 1 ) = key ( index : index + len - 1 ) b ( 0 : 3 ) = transfer ( dummy , 0_int64 , 4 ) if ( little_endian ) then seed2 = transfer ( [ seed , 0_int32 ], 0_int64 ) else seed2 = transfer ( [ 0_int32 , seed ], 0_int64 ) end if do i = 0 , 5 s ( 0 ) = s ( 0 ) + s ( 1 ) + b ( 3 ) s ( 1 ) = s ( 0 ) + ishftc ( s ( 1 ), 14 ) + seed2 s ( 2 ) = s ( 2 ) + s ( 3 ) + b ( 2 ) s ( 3 ) = s ( 2 ) + ishftc ( s ( 3 ), 23 ) s ( 0 ) = s ( 0 ) + s ( 3 ) + b ( 1 ) s ( 3 ) = ieor ( s ( 0 ), ishftc ( s ( 3 ), 16 ) ) s ( 2 ) = s ( 2 ) + s ( 1 ) + b ( 0 ) s ( 1 ) = ieor ( s ( 2 ), ishftc ( s ( 1 ), 40 ) ) end do hash_code = s ( 0 ) + s ( 1 ) + s ( 2 ) + s ( 3 ) end function int8_pengy_hash #:for k1 in INT_KINDS pure module function ${ k1 }$_ pengy_hash ( key , seed ) result ( hash_code ) !! PENGY_HASH hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code hash_code = int8_pengy_hash ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ pengy_hash #:endfor elemental module function character_pengy_hash ( key , seed ) & result ( hash_code ) !! PENGY_HASH hash function for default character keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code hash_code = int8_pengy_hash ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_pengy_hash module subroutine new_pengy_hash_seed ( seed ) ! Random SEED generator for PENGY_HASH integer ( int32 ), intent ( inout ) :: seed real ( dp ) :: sample integer ( int32 ) :: old_seed old_seed = seed find_seed : do call random_number ( sample ) seed = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) if ( seed /= old_seed ) return end do find_seed end subroutine new_pengy_hash_seed end submodule stdlib_hash_64bit_pengy","tags":"","loc":"sourcefile/stdlib_hash_64bit_pengy.fypp.html"},{"title":"stdlib_stats_mean.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_mean use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = sum ( x ) / real ( size ( x , kind = int64 ), ${ k1 }$ ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = sum ( real ( x , dp )) / real ( size ( x , kind = int64 ), dp ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( x , dim ) / real ( size ( x , dim ), ${ k1 }$ ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( real ( x , dp ), dim ) / real ( size ( x , dim ), dp ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res res = sum ( x , mask ) / real ( count ( mask , kind = int64 ), ${ k1 }$ ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res res = sum ( real ( x , dp ), mask ) / real ( count ( mask , kind = int64 ), dp ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( x , dim , mask ) / real ( count ( mask , dim ), ${ k1 }$ ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( real ( x , dp ), dim , mask ) / real ( count ( mask , dim ), dp ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_mean.fypp.html"},{"title":"stdlib_linalg_blas.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_d #:if WITH_QP use stdlib_linalg_blas_q #:endif use stdlib_linalg_blas_c use stdlib_linalg_blas_z #:if WITH_QP use stdlib_linalg_blas_w #:endif implicit none ( type , external ) public interface axpy !! AXPY constant times a vector plus a vector. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine caxpy ( n , ca , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: ca , cx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( inout ) :: cy ( * ) end subroutine caxpy #else module procedure stdlib_caxpy #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine daxpy ( n , da , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: da , dx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( inout ) :: dy ( * ) end subroutine daxpy #else module procedure stdlib_daxpy #endif #:if WITH_QP module procedure stdlib_qaxpy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine saxpy ( n , sa , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: sa , sx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( inout ) :: sy ( * ) end subroutine saxpy #else module procedure stdlib_saxpy #endif #:if WITH_QP module procedure stdlib_waxpy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zaxpy ( n , za , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: za , zx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( inout ) :: zy ( * ) end subroutine zaxpy #else module procedure stdlib_zaxpy #endif end interface axpy interface copy !! COPY copies a vector x to a vector y. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ccopy ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( out ) :: cy ( * ) end subroutine ccopy #else module procedure stdlib_ccopy #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dcopy ( n , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( out ) :: dy ( * ) end subroutine dcopy #else module procedure stdlib_dcopy #endif #:if WITH_QP module procedure stdlib_qcopy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine scopy ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( out ) :: sy ( * ) end subroutine scopy #else module procedure stdlib_scopy #endif #:if WITH_QP module procedure stdlib_wcopy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zcopy ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( out ) :: zy ( * ) end subroutine zcopy #else module procedure stdlib_zcopy #endif end interface copy interface dot !! DOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. #ifdef STDLIB_EXTERNAL_BLAS pure real ( dp ) function ddot ( n , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: dx ( * ), dy ( * ) end function ddot #else module procedure stdlib_ddot #endif #:if WITH_QP module procedure stdlib_qdot #:endif #ifdef STDLIB_EXTERNAL_BLAS pure real ( sp ) function sdot ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) end function sdot #else module procedure stdlib_sdot #endif end interface dot interface dotc !! DOTC forms the dot product of two complex vectors !! DOTC = X^H * Y #ifdef STDLIB_EXTERNAL_BLAS pure complex ( sp ) function cdotc ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) end function cdotc #else module procedure stdlib_cdotc #endif #:if WITH_QP module procedure stdlib_wdotc #:endif #ifdef STDLIB_EXTERNAL_BLAS pure complex ( dp ) function zdotc ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) end function zdotc #else module procedure stdlib_zdotc #endif end interface dotc interface dotu !! DOTU forms the dot product of two complex vectors !! DOTU = X^T * Y #ifdef STDLIB_EXTERNAL_BLAS pure complex ( sp ) function cdotu ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) end function cdotu #else module procedure stdlib_cdotu #endif #:if WITH_QP module procedure stdlib_wdotu #:endif #ifdef STDLIB_EXTERNAL_BLAS pure complex ( dp ) function zdotu ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) end function zdotu #else module procedure stdlib_zdotu #endif end interface dotu interface gbmv !! GBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans complex ( sp ), intent ( inout ) :: y ( * ) end subroutine cgbmv #else module procedure stdlib_cgbmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans real ( dp ), intent ( inout ) :: y ( * ) end subroutine dgbmv #else module procedure stdlib_dgbmv #endif #:if WITH_QP module procedure stdlib_qgbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans real ( sp ), intent ( inout ) :: y ( * ) end subroutine sgbmv #else module procedure stdlib_sgbmv #endif #:if WITH_QP module procedure stdlib_wgbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zgbmv #else module procedure stdlib_zgbmv #endif end interface gbmv interface gemm !! GEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine cgemm #else module procedure stdlib_cgemm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dgemm #else module procedure stdlib_dgemm #endif #:if WITH_QP module procedure stdlib_qgemm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine sgemm #else module procedure stdlib_sgemm #endif #:if WITH_QP module procedure stdlib_wgemm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zgemm #else module procedure stdlib_zgemm #endif end interface gemm interface gemv !! GEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans complex ( sp ), intent ( inout ) :: y ( * ) end subroutine cgemv #else module procedure stdlib_cgemv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans real ( dp ), intent ( inout ) :: y ( * ) end subroutine dgemv #else module procedure stdlib_dgemv #endif #:if WITH_QP module procedure stdlib_qgemv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans real ( sp ), intent ( inout ) :: y ( * ) end subroutine sgemv #else module procedure stdlib_sgemv #endif #:if WITH_QP module procedure stdlib_wgemv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zgemv #else module procedure stdlib_zgemv #endif end interface gemv interface ger !! GER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dger ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n real ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine dger #else module procedure stdlib_dger #endif #:if WITH_QP module procedure stdlib_qger #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sger ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n real ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine sger #else module procedure stdlib_sger #endif end interface ger interface gerc !! GERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgerc ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine cgerc #else module procedure stdlib_cgerc #endif #:if WITH_QP module procedure stdlib_wgerc #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgerc ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine zgerc #else module procedure stdlib_zgerc #endif end interface gerc interface geru !! GERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgeru ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine cgeru #else module procedure stdlib_cgeru #endif #:if WITH_QP module procedure stdlib_wgeru #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgeru ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine zgeru #else module procedure stdlib_zgeru #endif end interface geru interface hbmv !! HBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: y ( * ) end subroutine chbmv #else module procedure stdlib_chbmv #endif #:if WITH_QP module procedure stdlib_whbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zhbmv #else module procedure stdlib_zhbmv #endif end interface hbmv interface hemm !! HEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine chemm #else module procedure stdlib_chemm #endif #:if WITH_QP module procedure stdlib_whemm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zhemm #else module procedure stdlib_zhemm #endif end interface hemm interface hemv !! HEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: y ( * ) end subroutine chemv #else module procedure stdlib_chemv #endif #:if WITH_QP module procedure stdlib_whemv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zhemv #else module procedure stdlib_zhemv #endif end interface hemv interface her !! HER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cher ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ) end subroutine cher #else module procedure stdlib_cher #endif #:if WITH_QP module procedure stdlib_wher #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zher ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ) end subroutine zher #else module procedure stdlib_zher #endif end interface her interface her2 !! HER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine cher2 #else module procedure stdlib_cher2 #endif #:if WITH_QP module procedure stdlib_wher2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine zher2 #else module procedure stdlib_zher2 #endif end interface her2 interface her2k !! HER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine cher2k #else module procedure stdlib_cher2k #endif #:if WITH_QP module procedure stdlib_wher2k #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zher2k #else module procedure stdlib_zher2k #endif end interface her2k interface herk !! HERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine cherk #else module procedure stdlib_cherk #endif #:if WITH_QP module procedure stdlib_wherk #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zherk #else module procedure stdlib_zherk #endif end interface herk interface hpmv !! HPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: y ( * ) end subroutine chpmv #else module procedure stdlib_chpmv #endif #:if WITH_QP module procedure stdlib_whpmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zhpmv #else module procedure stdlib_zhpmv #endif end interface hpmv interface hpr !! HPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chpr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ) end subroutine chpr #else module procedure stdlib_chpr #endif #:if WITH_QP module procedure stdlib_whpr #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhpr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ) end subroutine zhpr #else module procedure stdlib_zhpr #endif end interface hpr interface hpr2 !! HPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: ap ( * ) end subroutine chpr2 #else module procedure stdlib_chpr2 #endif #:if WITH_QP module procedure stdlib_whpr2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: ap ( * ) end subroutine zhpr2 #else module procedure stdlib_zhpr2 #endif end interface hpr2 interface nrm2 !! NRM2 returns the euclidean norm of a vector via the function !! name, so that !! NRM2 := sqrt( x'*x ) #ifdef STDLIB_EXTERNAL_BLAS pure real ( dp ) function dnrm2 ( n , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n real ( dp ), intent ( in ) :: x ( * ) end function dnrm2 #else module procedure stdlib_dnrm2 #endif #:if WITH_QP module procedure stdlib_qnrm2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure real ( sp ) function snrm2 ( n , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n real ( sp ), intent ( in ) :: x ( * ) end function snrm2 #else module procedure stdlib_snrm2 #endif end interface nrm2 interface rot !! ROT applies a plane rotation. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drot ( n , dx , incx , dy , incy , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) end subroutine drot #else module procedure stdlib_drot #endif #:if WITH_QP module procedure stdlib_qrot #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srot ( n , sx , incx , sy , incy , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) end subroutine srot #else module procedure stdlib_srot #endif end interface rot interface rotg !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in SROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by SROTG !! if the signs of a and b are not the same. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine crotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( out ) :: c complex ( sp ), intent ( inout ) :: a complex ( sp ), intent ( in ) :: b complex ( sp ), intent ( out ) :: s end subroutine crotg #else module procedure stdlib_crotg #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( inout ) :: a , b real ( dp ), intent ( out ) :: c , s end subroutine drotg #else module procedure stdlib_drotg #endif #:if WITH_QP module procedure stdlib_qrotg #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( inout ) :: a , b real ( sp ), intent ( out ) :: c , s end subroutine srotg #else module procedure stdlib_srotg #endif #:if WITH_QP module procedure stdlib_wrotg #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zrotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( out ) :: c complex ( dp ), intent ( inout ) :: a complex ( dp ), intent ( in ) :: b complex ( dp ), intent ( out ) :: s end subroutine zrotg #else module procedure stdlib_zrotg #endif end interface rotg interface rotm !! ROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See ROTMG for a description of data storage in DPARAM. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drotm ( n , dx , incx , dy , incy , dparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: dparam ( 5 ) real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) end subroutine drotm #else module procedure stdlib_drotm #endif #:if WITH_QP module procedure stdlib_qrotm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srotm ( n , sx , incx , sy , incy , sparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sparam ( 5 ) real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) end subroutine srotm #else module procedure stdlib_srotm #endif end interface rotm interface rotmg !! ROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( dp ), intent ( in ) :: dy1 real ( dp ), intent ( out ) :: dparam ( 5 ) end subroutine drotmg #else module procedure stdlib_drotmg #endif #:if WITH_QP module procedure stdlib_qrotmg #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srotmg ( sd1 , sd2 , sx1 , sy1 , sparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( inout ) :: sd1 , sd2 , sx1 real ( sp ), intent ( in ) :: sy1 real ( sp ), intent ( out ) :: sparam ( 5 ) end subroutine srotmg #else module procedure stdlib_srotmg #endif end interface rotmg interface sbmv !! SBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: y ( * ) end subroutine dsbmv #else module procedure stdlib_dsbmv #endif #:if WITH_QP module procedure stdlib_qsbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: y ( * ) end subroutine ssbmv #else module procedure stdlib_ssbmv #endif end interface sbmv interface scal !! SCAL scales a vector by a constant. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cscal ( n , ca , cx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , n complex ( sp ), intent ( inout ) :: cx ( * ) end subroutine cscal #else module procedure stdlib_cscal #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dscal ( n , da , dx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n real ( dp ), intent ( inout ) :: dx ( * ) end subroutine dscal #else module procedure stdlib_dscal #endif #:if WITH_QP module procedure stdlib_qscal #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sscal ( n , sa , sx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n real ( sp ), intent ( inout ) :: sx ( * ) end subroutine sscal #else module procedure stdlib_sscal #endif #:if WITH_QP module procedure stdlib_wscal #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zscal ( n , za , zx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n complex ( dp ), intent ( inout ) :: zx ( * ) end subroutine zscal #else module procedure stdlib_zscal #endif end interface scal interface sdot !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! SDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. #ifdef STDLIB_EXTERNAL_BLAS pure real ( dp ) function dsdot ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) end function dsdot #else module procedure stdlib_dsdot #endif #:if WITH_QP module procedure stdlib_qsdot #:endif end interface sdot interface spmv !! SPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: y ( * ) end subroutine dspmv #else module procedure stdlib_dspmv #endif #:if WITH_QP module procedure stdlib_qspmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: y ( * ) end subroutine sspmv #else module procedure stdlib_sspmv #endif end interface spmv interface spr !! SPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dspr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: ap ( * ) end subroutine dspr #else module procedure stdlib_dspr #endif #:if WITH_QP module procedure stdlib_qspr #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sspr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: ap ( * ) end subroutine sspr #else module procedure stdlib_sspr #endif end interface spr interface spr2 !! SPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: ap ( * ) end subroutine dspr2 #else module procedure stdlib_dspr2 #endif #:if WITH_QP module procedure stdlib_qspr2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: ap ( * ) end subroutine sspr2 #else module procedure stdlib_sspr2 #endif end interface spr2 interface srot !! SROT applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csrot ( n , cx , incx , cy , incy , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: c , s complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) end subroutine csrot #else module procedure stdlib_csrot #endif end interface srot interface sscal !! SSCAL scales a complex vector by a real constant. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csscal ( n , sa , cx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n complex ( sp ), intent ( inout ) :: cx ( * ) end subroutine csscal #else module procedure stdlib_csscal #endif end interface sscal interface swap !! SWAP interchanges two vectors. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cswap ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) end subroutine cswap #else module procedure stdlib_cswap #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dswap ( n , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) end subroutine dswap #else module procedure stdlib_dswap #endif #:if WITH_QP module procedure stdlib_qswap #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sswap ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) end subroutine sswap #else module procedure stdlib_sswap #endif #:if WITH_QP module procedure stdlib_wswap #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zswap ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) end subroutine zswap #else module procedure stdlib_zswap #endif end interface swap interface symm !! SYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine csymm #else module procedure stdlib_csymm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dsymm #else module procedure stdlib_dsymm #endif #:if WITH_QP module procedure stdlib_qsymm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine ssymm #else module procedure stdlib_ssymm #endif #:if WITH_QP module procedure stdlib_wsymm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zsymm #else module procedure stdlib_zsymm #endif end interface symm interface symv !! SYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: y ( * ) end subroutine dsymv #else module procedure stdlib_dsymv #endif #:if WITH_QP module procedure stdlib_qsymv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: y ( * ) end subroutine ssymv #else module procedure stdlib_ssymv #endif end interface symv interface syr !! SYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyr ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine dsyr #else module procedure stdlib_dsyr #endif #:if WITH_QP module procedure stdlib_qsyr #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyr ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine ssyr #else module procedure stdlib_ssyr #endif end interface syr interface syr2 !! SYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine dsyr2 #else module procedure stdlib_dsyr2 #endif #:if WITH_QP module procedure stdlib_qsyr2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine ssyr2 #else module procedure stdlib_ssyr2 #endif end interface syr2 interface syr2k !! SYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine csyr2k #else module procedure stdlib_csyr2k #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dsyr2k #else module procedure stdlib_dsyr2k #endif #:if WITH_QP module procedure stdlib_qsyr2k #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine ssyr2k #else module procedure stdlib_ssyr2k #endif #:if WITH_QP module procedure stdlib_wsyr2k #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zsyr2k #else module procedure stdlib_zsyr2k #endif end interface syr2k interface syrk !! SYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine csyrk #else module procedure stdlib_csyrk #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dsyrk #else module procedure stdlib_dsyrk #endif #:if WITH_QP module procedure stdlib_qsyrk #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine ssyrk #else module procedure stdlib_ssyrk #endif #:if WITH_QP module procedure stdlib_wsyrk #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zsyrk #else module procedure stdlib_zsyrk #endif end interface syrk interface tbmv !! TBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctbmv #else module procedure stdlib_ctbmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtbmv #else module procedure stdlib_dtbmv #endif #:if WITH_QP module procedure stdlib_qtbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stbmv #else module procedure stdlib_stbmv #endif #:if WITH_QP module procedure stdlib_wtbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztbmv #else module procedure stdlib_ztbmv #endif end interface tbmv interface tbsv !! TBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctbsv #else module procedure stdlib_ctbsv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtbsv #else module procedure stdlib_dtbsv #endif #:if WITH_QP module procedure stdlib_qtbsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stbsv #else module procedure stdlib_stbsv #endif #:if WITH_QP module procedure stdlib_wtbsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztbsv #else module procedure stdlib_ztbsv #endif end interface tbsv interface tpmv !! TPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctpmv #else module procedure stdlib_ctpmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtpmv #else module procedure stdlib_dtpmv #endif #:if WITH_QP module procedure stdlib_qtpmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stpmv #else module procedure stdlib_stpmv #endif #:if WITH_QP module procedure stdlib_wtpmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztpmv #else module procedure stdlib_ztpmv #endif end interface tpmv interface tpsv !! TPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctpsv #else module procedure stdlib_ctpsv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtpsv #else module procedure stdlib_dtpsv #endif #:if WITH_QP module procedure stdlib_qtpsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stpsv #else module procedure stdlib_stpsv #endif #:if WITH_QP module procedure stdlib_wtpsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztpsv #else module procedure stdlib_ztpsv #endif end interface tpsv interface trmm !! TRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine ctrmm #else module procedure stdlib_ctrmm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine dtrmm #else module procedure stdlib_dtrmm #endif #:if WITH_QP module procedure stdlib_qtrmm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine strmm #else module procedure stdlib_strmm #endif #:if WITH_QP module procedure stdlib_wtrmm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine ztrmm #else module procedure stdlib_ztrmm #endif end interface trmm interface trmv !! TRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctrmv #else module procedure stdlib_ctrmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtrmv #else module procedure stdlib_dtrmv #endif #:if WITH_QP module procedure stdlib_qtrmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine strmv #else module procedure stdlib_strmv #endif #:if WITH_QP module procedure stdlib_wtrmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztrmv #else module procedure stdlib_ztrmv #endif end interface trmv interface trsm !! TRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine ctrsm #else module procedure stdlib_ctrsm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine dtrsm #else module procedure stdlib_dtrsm #endif #:if WITH_QP module procedure stdlib_qtrsm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine strsm #else module procedure stdlib_strsm #endif #:if WITH_QP module procedure stdlib_wtrsm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine ztrsm #else module procedure stdlib_ztrsm #endif end interface trsm interface trsv !! TRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctrsv #else module procedure stdlib_ctrsv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtrsv #else module procedure stdlib_dtrsv #endif #:if WITH_QP module procedure stdlib_qtrsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine strsv #else module procedure stdlib_strsv #endif #:if WITH_QP module procedure stdlib_wtrsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztrsv #else module procedure stdlib_ztrsv #endif end interface trsv end module stdlib_linalg_blas","tags":"","loc":"sourcefile/stdlib_linalg_blas.fypp.html"},{"title":"stdlib_linalg_least_squares.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set RHS_SUFFIX = [\"one\",\"many\"] #:set RHS_SYMBOL = [ranksuffix(r) for r in [1,2]] #:set RHS_EMPTY = [emptyranksuffix(r) for r in [1,2]] #:set ALL_RHS = list(zip(RHS_SYMBOL,RHS_SUFFIX,RHS_EMPTY)) submodule ( stdlib_linalg ) stdlib_linalg_least_squares !! Least-squares solution to Ax=b use stdlib_linalg_constants use stdlib_linalg_lapack , only : gelsd , stdlib_ilaenv use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR implicit none ( type , external ) character ( * ), parameter :: this = 'lstsq' contains elemental subroutine handle_gelsd_info ( info , lda , n , ldb , nrhs , err ) integer ( ilp ), intent ( in ) :: info , lda , n , ldb , nrhs type ( linalg_state_type ), intent ( out ) :: err ! Process output select case ( info ) case ( 0 ) ! Success case (: - 1 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid problem size a=' ,[ lda , n ], & ', b=' ,[ ldb , nrhs ]) case ( 1 :) err = linalg_state_type ( this , LINALG_ERROR , 'SVD did not converge.' ) case default err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select end subroutine handle_gelsd_info # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" ! Workspace needed by gelsd elemental subroutine ${ ri }$ gelsd_space ( m , n , nrhs , lrwork , liwork , lcwork ) integer ( ilp ), intent ( in ) :: m , n , nrhs integer ( ilp ), intent ( out ) :: lrwork , liwork , lcwork integer ( ilp ) :: smlsiz , mnmin , nlvl mnmin = min ( m , n ) ! Maximum size of the subproblems at the bottom of the computation (~25) smlsiz = stdlib_ilaenv ( 9 , '${ri}$gelsd' , ' ' , 0 , 0 , 0 , 0 ) ! The exact minimum amount of workspace needed depends on M, N and NRHS. nlvl = max ( 0 , ilog2 ( mnmin / ( smlsiz + 1 )) + 1 ) ! Real space # : if rt . startswith ( 'complex' ) lrwork = 10 * mnmin + 2 * mnmin * smlsiz + 8 * mnmin * nlvl + 3 * smlsiz * nrhs + max (( smlsiz + 1 ) ** 2 , n * ( 1 + nrhs ) + 2 * nrhs ) # : else lrwork = 12 * mnmin + 2 * mnmin * smlsiz + 8 * mnmin * nlvl + mnmin * nrhs + ( smlsiz + 1 ) ** 2 # : endif lrwork = max ( 1 , lrwork ) ! Complex space lcwork = 2 * mnmin + nrhs * mnmin ! Integer space liwork = max ( 1 , 3 * mnmin * nlvl + 11 * mnmin ) ! For good performance, the workspace should generally be larger. ! Allocate 25% more space than strictly needed. lrwork = ceiling ( 1.25 * lrwork , kind = ilp ) lcwork = ceiling ( 1.25 * lcwork , kind = ilp ) liwork = ceiling ( 1.25 * liwork , kind = ilp ) end subroutine ${ ri }$ gelsd_space # : endif # : endfor # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" ! Compute the integer, real, [complex] working space requested byu the least squares procedure pure module subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ ( a , b , lrwork , liwork #{ if rt . startswith ( 'c' ) }# , lcwork #{ endif }# ) !> Input matrix a[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> Right hand side vector or array, b[m] or b[m,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Size of the working space arrays integer ( ilp ), intent ( out ) :: lrwork , liwork integer ( ilp ) #{ if rt . startswith ( 'c' ) }# , intent ( out ) #{ endif }# :: lcwork integer ( ilp ) :: m , n , nrhs m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) nrhs = size ( b , kind = ilp ) / size ( b , 1 , kind = ilp ) call ${ ri }$ gelsd_space ( m , n , nrhs , lrwork , liwork , lcwork ) end subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ ! Compute the least-squares solution to a real system of linear equations Ax = b module function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ ( a , b , cond , overwrite_a , rank , err ) result ( x ) !!### Summary !! Compute least-squares solution to a real system of linear equations Ax = b !! !!### Description !! !! This function computes the least-squares solution of a linear matrix problem. !! !! param: a Input matrix of size [m,n]. !! param: b Right-hand-side vector of size [m] or matrix of size [m,nrhs]. !! param: cond [optional] Real input threshold indicating that singular values `s_i <= cond*maxval(s)` !! do not contribute to the matrix rank. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: rank [optional] integer flag returning matrix rank. !! param: err [optional] State return flag. !! return: x Solution vector of size [n] or solution matrix of size [n,nrhs]. !! !> Input matrix a[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[m] or b[m,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ integer ( ilp ) :: n , nrhs , ldb n = size ( a , 2 , kind = ilp ) ldb = size ( b , 1 , kind = ilp ) nrhs = size ( b , kind = ilp ) / ldb ! Initialize solution with the shape of the rhs # : if ndsuf == \"one\" allocate ( x ( n )) # : else allocate ( x ( n , nrhs )) # : endif call stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ ( a , b , x ,& cond = cond , overwrite_a = overwrite_a , rank = rank , err = err ) end function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ ! Compute the least-squares solution to a real system of linear equations Ax = b module subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ ( a , b , x , real_storage , int_storage , & #{ if rt . startswith ( 'c' ) }# cmpl_storage , #{ endif }# cond , singvals , overwrite_a , rank , err ) !!### Summary !! Compute least-squares solution to a real system of linear equations Ax = b !! !!### Description !! !! This function computes the least-squares solution of a linear matrix problem. !! !! param: a Input matrix of size [m,n]. !! param: b Right-hand-side vector of size [n] or matrix of size [n,nrhs]. !! param: x Solution vector of size at [>=n] or solution matrix of size [>=n,nrhs]. !! param: real_storage [optional] Real working space !! param: int_storage [optional] Integer working space # : if rt . startswith ( 'c' ) !! param: cmpl_storage [optional] Complex working space # : endif !! param: cond [optional] Real input threshold indicating that singular values `s_i <= cond*maxval(s)` !! do not contribute to the matrix rank. !! param: singvals [optional] Real array of size [min(m,n)] returning a list of singular values. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: rank [optional] integer flag returning matrix rank. !! param: err [optional] State return flag. !! !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] real working storage space real ( ${ rk }$ ), optional , intent ( inout ), target :: real_storage (:) !> [optional] integer working storage space integer ( ilp ), optional , intent ( inout ), target :: int_storage (:) # : if rt . startswith ( 'c' ) !> [optional] complex working storage space ${ rt }$ , optional , intent ( inout ), target :: cmpl_storage (:) # : endif !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD real ( ${ rk }$ ), optional , intent ( out ), target :: singvals (:) !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , lda , ldb , nrhs , ldx , nrhsx , info , mnmin , mnmax , arank , lrwork , liwork , lcwork integer ( ilp ) :: nrs , nis , ncs , nsvd integer ( ilp ), pointer :: iwork (:) logical ( lk ) :: copy_a , large_enough_x real ( ${ rk }$ ) :: acond , rcond real ( ${ rk }$ ), pointer :: rwork (:), singular (:) ${ rt }$ , pointer :: xmat (:,:), amat (:,:), cwork (:) ! Problem sizes m = size ( a , 1 , kind = ilp ) lda = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) ldb = size ( b , 1 , kind = ilp ) nrhs = size ( b , kind = ilp ) / ldb ldx = size ( x , 1 , kind = ilp ) nrhsx = size ( x , kind = ilp ) / ldx mnmin = min ( m , n ) mnmax = max ( m , n ) if ( lda < 1 . or . n < 1 . or . ldb < 1 . or . ldb /= m . or . ldx < n ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'insufficient sizes: a=' ,[ lda , n ], & 'b=' ,[ ldb , nrhs ], ' x=' ,[ ldx , nrhsx ]) call linalg_error_handling ( err0 , err ) if ( present ( rank )) rank = 0 return end if ! Can A be overwritten? By default, do not overwrite if ( present ( overwrite_a )) then copy_a = . not . overwrite_a else copy_a = . true . _ lk endif ! Initialize a matrix temporary if ( copy_a ) then allocate ( amat ( lda , n ), source = a ) else amat => a endif ! If x is large enough to store b, use it as temporary rhs storage. large_enough_x = ldx >= m if ( large_enough_x ) then xmat ( 1 : ldx , 1 : nrhs ) => x else allocate ( xmat ( m , nrhs )) endif # : if ndsuf == \"one\" xmat ( 1 : m , 1 ) = b # : else xmat ( 1 : m , 1 : nrhs ) = b # : endif ! Singular values array (in decreasing order) if ( present ( singvals )) then singular => singvals nsvd = size ( singular , kind = ilp ) else allocate ( singular ( mnmin )) nsvd = mnmin endif ! rcond is used to determine the effective rank of A. ! Singular values S(i) <= RCOND*maxval(S) are treated as zero. ! Use same default value as NumPy if ( present ( cond )) then rcond = cond else rcond = epsilon ( 0.0 _${ rk }$ ) * mnmax endif if ( rcond < 0 ) rcond = epsilon ( 0.0 _${ rk }$ ) * mnmax ! Get working space size call ${ ri }$ gelsd_space ( m , n , nrhs , lrwork , liwork , lcwork ) ! Real working space if ( present ( real_storage )) then rwork => real_storage else allocate ( rwork ( lrwork )) endif nrs = size ( rwork , kind = ilp ) ! Integer working space if ( present ( int_storage )) then iwork => int_storage else allocate ( iwork ( liwork )) endif nis = size ( iwork , kind = ilp ) # : if rt . startswith ( 'complex' ) ! Complex working space if ( present ( cmpl_storage )) then cwork => cmpl_storage else allocate ( cwork ( lcwork )) endif ncs = size ( cwork , kind = ilp ) # : endif if ( nrs < lrwork . or . nis < liwork #{ if rt . startswith ( 'c' ) }# . or . ncs < lcwork #{ endif }# & . or . nsvd < mnmin ) then ! Halt on insufficient space err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'insufficient working space: ' ,& 'real=' , nrs , ' should be >=' , lrwork , & ', int=' , nis , ' should be >=' , liwork , & #{ if rt . startswith ( 'complex' ) }# ', cmplx=' , ncs , ' should be >=' , lcwork , & #{ endif }# ', singv=' , nsvd , ' should be >=' , mnmin ) else ! Solve system using singular value decomposition call gelsd ( m , n , nrhs , amat , lda , xmat , ldb , singular , rcond , arank , & # : if rt . startswith ( 'complex' ) cwork , ncs , rwork , iwork , info ) # : else rwork , nrs , iwork , info ) # : endif ! The condition number of A in the 2-norm = S(1)/S(min(m,n)). acond = singular ( 1 ) / singular ( mnmin ) ! Process output call handle_gelsd_info ( info , lda , n , ldb , nrhs , err0 ) endif ! Process output and return if (. not . large_enough_x ) then # : if ndsuf == \"one\" x ( 1 : n ) = xmat ( 1 : n , 1 ) # : else x ( 1 : n , 1 : nrhs ) = xmat ( 1 : n , 1 : nrhs ) # : endif deallocate ( xmat ) endif if ( copy_a ) deallocate ( amat ) if ( present ( rank )) rank = arank if (. not . present ( real_storage )) deallocate ( rwork ) if (. not . present ( int_storage )) deallocate ( iwork ) # : if rt . startswith ( 'complex' ) if (. not . present ( cmpl_storage )) deallocate ( cwork ) # : endif if (. not . present ( singvals )) deallocate ( singular ) call linalg_error_handling ( err0 , err ) end subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ # : endif # : endfor # : endfor ! Simple integer log2 implementation elemental integer ( ilp ) function ilog2 ( x ) integer ( ilp ), intent ( in ) :: x integer ( ilp ) :: remndr if ( x > 0 ) then remndr = x ilog2 = - 1_ilp do while ( remndr > 0 ) ilog2 = ilog2 + 1_ilp remndr = shiftr ( remndr , 1 ) end do else ilog2 = - huge ( 0_ilp ) endif end function ilog2 end submodule stdlib_linalg_least_squares","tags":"","loc":"sourcefile/stdlib_linalg_least_squares.fypp.html"},{"title":"stdlib_hash_64bit_spookyv2.fypp – Fortran-lang/stdlib","text":"SPOOKY_HASH is a translation to Fortran 2008 of the unsigned 64 bit SpookyHash V2 function of Bob Jenkins https://burtleburtle.net/bob/hash/spooky.html to signed 64 bit\n operations. Bob Jenkins has put his code in the public domain and has\n given permission to treat this code as public domain in the USA,\n provided the code can be used under other licenses and he is given\n appropriate credit.\n The code was designed for Little-Endian processors. The output is\n different on Big Endian processors, but still probably as good quality. Source Code !!------------------------------------------------------------------------------ !! `SPOOKY_HASH` is a translation to Fortran 2008 of the unsigned 64 bit !! `SpookyHash` V2 function of Bob Jenkins !! to signed 64 bit !! operations. Bob Jenkins has put his code in the public domain and has !! given permission to treat this code as public domain in the USA, !! provided the code can be used under other licenses and he is given !! appropriate credit. !! The code was designed for Little-Endian processors. The output is !! different on Big Endian processors, but still probably as good quality. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_64bit ) stdlib_hash_64bit_spookyv2 ! I have tried to make this portable while retaining efficiency. I assume ! processors with two's complement integers from 8, 16, 32, and 64 bits. ! The code is a transliteration of the 64 bit SpookyHash V2 of Bob Jenkins ! ! The code was designed for Little-Endian processors. The output is ! different on Big Endian processors, but still probably as good quality. implicit none contains module function int8_spooky_hash ( key , seed ) result ( hash_code ) integer ( int8 ), intent ( in ) :: key (:) integer ( int64 ), intent ( in ) :: seed ( 2 ) integer ( int64 ) :: hash_code ( 2 ) hash_code (:) = seed call spookyhash_128 ( key , hash_code ) end function int8_spooky_hash #:for k1 in INT_KINDS module function ${ k1 }$_ spooky_hash ( key , seed ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int64 ), intent ( in ) :: seed ( 2 ) integer ( int64 ) :: hash_code ( 2 ) integer ( int64 ) :: hash2 ( 2 ) hash2 (:) = seed call spookyhash_128 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), hash2 ) hash_code = hash2 end function ${ k1 }$_ spooky_hash #:endfor module function character_spooky_hash ( key , seed ) result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed ( 2 ) integer ( int64 ) :: hash_code ( 2 ) integer ( int64 ) :: hash2 ( 2 ) hash2 (:) = seed call spookyhash_128 ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), hash2 ) hash_code = hash2 end function character_spooky_hash ! ! short hash ... it could be used on any message, ! but it's used by Spooky just for short messages. ! subroutine spookyhash_short ( key , hash_inout ) integer ( int8 ), intent ( in ), target :: key ( 0 :) integer ( int64 ), intent ( inout ) :: hash_inout ( 2 ) integer ( int64 ) :: a , b , c , d integer ( int64 ) :: length , p8 , remainder p8 = 0 length = size ( key , kind = int64 ) ! The number of bytes after all the INT256s remainder = iand ( length , 31_int64 ) a = hash_inout ( 1 ) b = hash_inout ( 2 ) c = sc_const d = sc_const if ( length > 15 ) then block integer ( int64 ) :: bend , step integer ( int64 ) :: buf ( 0 : 2 * sc_numVars - 1 ) bend = ishft ( length , - 4 ) ! The number of complete INT128s buf ( 0 : 2 * bend - 1 ) = transfer ( key ( 0 : 16 * bend - 1 ), 0_int64 , 2 * bend ) ! Number of Int64's in number of complete INT256s bend = ishft ( ishft ( length , - 5 ), 2 ) ! handle all complete sets of 32 bytes do step = 0_int64 , bend - 1 , 4 c = c + buf ( step ) d = d + buf ( step + 1 ) call shortmix ( a , b , c , d ) a = a + buf ( step + 2 ) b = b + buf ( step + 3 ) end do ! Completed all INT64s in complete INT256s p8 = p8 + 8 * bend ! Number of INT8s in complete INT256s ! Handle the case of 16+ remaining bytes. if ( remainder >= 16 ) then c = c + buf ( step ) d = d + buf ( step + 1 ) call shortmix ( a , b , c , d ) p8 = p8 + 16 remainder = remainder - 16 end if end block end if ! Handle the last 0..15 bytes, and its length V2 d = d + shiftl ( length , 56_int64 ) select case ( remainder ) case ( 15 ) go to 115 case ( 14 ) go to 114 case ( 13 ) go to 113 case ( 12 ) go to 112 case ( 11 ) go to 111 case ( 10 ) go to 110 case ( 9 ) go to 109 case ( 8 ) go to 108 case ( 7 ) go to 107 case ( 6 ) go to 106 case ( 5 ) go to 105 case ( 4 ) go to 104 case ( 3 ) go to 103 case ( 2 ) go to 102 case ( 1 ) go to 101 case ( 0 ) go to 100 end select 115 d = d + shiftl ( map_to_64 ( key ( p8 + 14 ) ), 48_int64 ) 114 d = d + shiftl ( map_to_64 ( key ( p8 + 13 ) ), 40_int64 ) 113 d = d + shiftl ( map_to_64 ( key ( p8 + 12 ) ), 32_int64 ) 112 if ( little_endian ) then d = d + transfer ( [ transfer ( key ( p8 + 8 : p8 + 11 ), 0_int32 ), & 0_int32 ], 0_int64 ) else d = d + transfer ( [ 0_int32 , & transfer ( key ( p8 + 8 : p8 + 11 ), 0_int32 ) ], & 0_int64 ) end if c = c + transfer ( key ( p8 + 0 : p8 + 7 ), 0_int64 ) go to 888 111 d = d + shiftl ( map_to_64 ( key ( p8 + 10 ) ), 16_int32 ) 110 d = d + shiftl ( map_to_64 ( key ( p8 + 9 ) ), 8_int32 ) 109 d = d + map_to_64 ( key ( p8 + 8 ) ) 108 c = c + transfer ( key ( p8 + 0 : p8 + 7 ), 0_int64 ) go to 888 107 c = c + shiftl ( map_to_64 ( key ( p8 + 6 ) ), 48_int64 ) 106 c = c + shiftl ( map_to_64 ( key ( p8 + 5 ) ), 40_int64 ) 105 c = c + shiftl ( map_to_64 ( key ( p8 + 4 ) ), 32_int64 ) 104 if ( little_endian ) then c = c + transfer ( [ transfer ( key ( p8 + 0 : p8 + 3 ), 0_int32 ), & 0_int32 ], 0_int64 ) else c = c + transfer ( [ 0_int32 , & transfer ( key ( p8 + 0 : p8 + 3 ), 0_int32 ) ], 0_int64 ) end if go to 888 103 c = c + shiftl ( map_to_64 ( key ( p8 + 2 ) ), 16_int64 ) 102 c = c + shiftl ( map_to_64 ( key ( p8 + 1 ) ), 8_int64 ) 101 c = c + map_to_64 ( key ( p8 + 0 ) ) go to 888 100 c = c + sc_const d = d + sc_const 888 call short_end ( a , b , c , d ) hash_inout ( 1 ) = a hash_inout ( 2 ) = b close ( 40 ) contains pure function map_to_64 ( key ) integer ( int8 ), intent ( in ) :: key integer ( int64 ) :: map_to_64 if ( little_endian ) then map_to_64 = transfer ( [ key , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], & 0_int64 ) else map_to_64 = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , key ], & 0_int64 ) end if end function map_to_64 pure subroutine shortmix ( h0 , h1 , h2 , h3 ) ! ! The goal is for each bit of the input to expand into 128 bits of ! apparent entropy before it is fully overwritten. ! n trials both set and cleared at least m bits of h0 h1 h2 h3 ! n: 2 m: 29 ! n: 3 m: 46 ! n: 4 m: 57 ! n: 5 m: 107 ! n: 6 m: 146 ! n: 7 m: 152 ! when run forwards or backwards ! for all 1-bit and 2-bit diffs ! with diffs defined by either xor or subtraction ! with a base of all zeros plus a counter, or plus another bit, or random ! integer ( int64 ), intent ( inout ) :: h0 , h1 , h2 , h3 h2 = ishftc ( h2 , 50 ) h2 = h2 + h3 h0 = ieor ( h0 , h2 ) h3 = ishftc ( h3 , 52 ) h3 = h3 + h0 h1 = ieor ( h1 , h3 ) h0 = ishftc ( h0 , 30 ) h0 = h0 + h1 h2 = ieor ( h2 , h0 ) h1 = ishftc ( h1 , 41 ) h1 = h1 + h2 h3 = ieor ( h3 , h1 ) h2 = ishftc ( h2 , 54 ) h2 = h2 + h3 h0 = ieor ( h0 , h2 ) h3 = ishftc ( h3 , 48 ) h3 = h3 + h0 h1 = ieor ( h1 , h3 ) h0 = ishftc ( h0 , 38 ) h0 = h0 + h1 h2 = ieor ( h2 , h0 ) h1 = ishftc ( h1 , 37 ) h1 = h1 + h2 h3 = ieor ( h3 , h1 ) h2 = ishftc ( h2 , 62 ) h2 = h2 + h3 h0 = ieor ( h0 , h2 ) h3 = ishftc ( h3 , 34 ) h3 = h3 + h0 h1 = ieor ( h1 , h3 ) h0 = ishftc ( h0 , 5 ) h0 = h0 + h1 h2 = ieor ( h2 , h0 ) h1 = ishftc ( h1 , 36 ) h1 = h1 + h2 h3 = ieor ( h3 , h1 ) end subroutine shortmix pure subroutine short_end ( h0 , h1 , h2 , h3 ) ! ! Mix all 4 inputs together so that h0, h1 are a hash of them all. ! ! For two inputs differing in just the input bits ! Where \"differ\" means xor or subtraction ! And the base value is random, or a counting value starting at that bit ! The final result will have each bit of h0, h1 flip ! For every input bit, ! with probability 50 +- .3% (it is probably better than that) ! For every pair of input bits, ! with probability 50 +- .75% (the worst case is approximately that) ! integer ( int64 ), intent ( inout ) :: h0 , h1 , h2 , h3 h3 = ieor ( h3 , h2 ) h2 = ishftc ( h2 , 15 ) h3 = h3 + h2 h0 = ieor ( h0 , h3 ) h3 = ishftc ( h3 , 52 ) h0 = h0 + h3 h1 = ieor ( h1 , h0 ) h0 = ishftc ( h0 , 26 ) h1 = h1 + h0 h2 = ieor ( h2 , h1 ) h1 = ishftc ( h1 , 51 ) h2 = h2 + h1 h3 = ieor ( h3 , h2 ) h2 = ishftc ( h2 , 28 ) h3 = h3 + h2 h0 = ieor ( h0 , h3 ) h3 = ishftc ( h3 , 9 ) h0 = h0 + h3 h1 = ieor ( h1 , h0 ) h0 = ishftc ( h0 , 47 ) h1 = h1 + h0 h2 = ieor ( h2 , h1 ) h1 = ishftc ( h1 , 54 ) h2 = h2 + h1 h3 = ieor ( h3 , h2 ) h2 = ishftc ( h2 , 32 ) h3 = h3 + h2 h0 = ieor ( h0 , h3 ) h3 = ishftc ( h3 , 25 ) h0 = h0 + h3 h1 = ieor ( h1 , h0 ) h0 = ishftc ( h0 , 63 ) h1 = h1 + h0 end subroutine short_end end subroutine spookyhash_short ! do the whole hash in one call module subroutine spookyHash_128 ( key , hash_inout ) integer ( int8 ), intent ( in ), target :: key ( 0 :) integer ( int64 ), intent ( inout ) :: hash_inout ( 2 ) integer ( int64 ) :: buf ( sc_numvars ) integer ( int64 ) :: h ( 0 : 11 ) integer ( int64 ) :: bend , i , length , p8 , remain , remainder , tail integer ( int8 ) :: buf8 ( 8 ) length = size ( key , kind = int64 ) if ( length < sc_buffsize ) then call spookyhash_short ( key , hash_inout ) return end if h ( [ 0 , 3 , 6 , 9 ] ) = hash_inout ( 1 ) h ( [ 1 , 4 , 7 , 10 ] ) = hash_inout ( 2 ) h ( [ 2 , 5 , 8 , 11 ] ) = sc_const ! Number of bytes in number of complete internal states bend = ( length / sc_blocksize ) * sc_blocksize ! Handle all SC_BLOCKSIZE blocks of bytes do i = 0 , bend - 1 , sc_blocksize buf (:) = transfer ( key ( i : i + sc_blocksize - 1 ), 0_int64 , sc_numVars ) call spookyhash_mix ( buf , h ) end do ! all complete internal states processed ! handle the last partial block of sc_blocksize bytes remainder = ( length - bend ) ! 0 <= remainder < sc_blocksize == 96 remain = remainder / 8 ! Number of INT64's in partial block buf ( 1 : remain ) = transfer ( key ( bend : bend + remain * 8 - 1 ), 0_int64 , remain ) buf ( remain + 1 : sc_numvars ) = 0_int64 tail = remainder - 8 * remain ! Number of INT8s after INT64s p8 = bend + remain * 8 ! # of bytes until tail start buf8 ( 1 : tail ) = key ( p8 : p8 + tail - 1 ) buf8 ( tail + 1 : 8 ) = 0_int8 buf ( remain + 1 ) = transfer ( buf8 , 0_int64 ) buf8 ( 1 : 7 ) = 0_int8 buf8 ( 8 ) = int ( remainder , kind = int8 ) ! 0 <= remainder < 96 buf ( sc_numvars ) = ieor ( buf ( sc_numvars ), transfer ( buf8 , 0_int64 ) ) ! do some final mixing call spookyhash_end ( buf , h ) hash_inout ( 1 : 2 ) = h ( 0 : 1 ) end subroutine spookyHash_128 ! ! This is used if the input is 96 bytes long or longer. ! ! The internal state is fully overwritten every 96 bytes. ! Every input bit appears to cause at least 128 bits of entropy ! before 96 other bytes are combined, when run forward or backward ! For every input bit, ! Two inputs differing in just that input bit ! Where \"differ\" means xor or subtraction ! And the base value is random ! When run forward or backwards one Mix ! I tried 3 pairs of each; they all differed by at least 212 bits. ! pure subroutine spookyhash_mix ( data , s ) integer ( int64 ), intent ( in ) :: data ( 0 :) integer ( int64 ), intent ( inout ) :: s ( 0 : 11 ) s ( 0 ) = s ( 0 ) + data ( 0 ) s ( 2 ) = ieor ( s ( 2 ), s ( 10 ) ) s ( 11 ) = ieor ( s ( 11 ), s ( 0 ) ) s ( 0 ) = ishftc ( s ( 0 ), 11 ) s ( 11 ) = s ( 11 ) + s ( 1 ) s ( 1 ) = s ( 1 ) + data ( 1 ) s ( 3 ) = ieor ( s ( 3 ), s ( 11 ) ) s ( 0 ) = ieor ( s ( 0 ), s ( 1 ) ) s ( 1 ) = ishftc ( s ( 1 ), 32 ) s ( 0 ) = s ( 0 ) + s ( 2 ) s ( 2 ) = s ( 2 ) + data ( 2 ) s ( 4 ) = ieor ( s ( 4 ), s ( 0 ) ) s ( 1 ) = ieor ( s ( 1 ), s ( 2 ) ) s ( 2 ) = ishftc ( s ( 2 ), 43 ) s ( 1 ) = s ( 1 ) + s ( 3 ) s ( 3 ) = s ( 3 ) + data ( 3 ) s ( 5 ) = ieor ( s ( 5 ), s ( 1 ) ) s ( 2 ) = ieor ( s ( 2 ), s ( 3 ) ) s ( 3 ) = ishftc ( s ( 3 ), 31 ) s ( 2 ) = s ( 2 ) + s ( 4 ) s ( 4 ) = s ( 4 ) + data ( 4 ) s ( 6 ) = ieor ( s ( 6 ), s ( 2 ) ) s ( 3 ) = ieor ( s ( 3 ), s ( 4 ) ) s ( 4 ) = ishftc ( s ( 4 ), 17 ) s ( 3 ) = s ( 3 ) + s ( 5 ) s ( 5 ) = s ( 5 ) + data ( 5 ) s ( 7 ) = ieor ( s ( 7 ), s ( 3 ) ) s ( 4 ) = ieor ( s ( 4 ), s ( 5 ) ) s ( 5 ) = ishftc ( s ( 5 ), 28 ) s ( 4 ) = s ( 4 ) + s ( 6 ) s ( 6 ) = s ( 6 ) + data ( 6 ) s ( 8 ) = ieor ( s ( 8 ), s ( 4 ) ) s ( 5 ) = ieor ( s ( 5 ), s ( 6 ) ) s ( 6 ) = ishftc ( s ( 6 ), 39 ) s ( 5 ) = s ( 5 ) + s ( 7 ) s ( 7 ) = s ( 7 ) + data ( 7 ) s ( 9 ) = ieor ( s ( 9 ), s ( 5 ) ) s ( 6 ) = ieor ( s ( 6 ), s ( 7 ) ) s ( 7 ) = ishftc ( s ( 7 ), 57 ) s ( 6 ) = s ( 6 ) + s ( 8 ) s ( 8 ) = s ( 8 ) + data ( 8 ) s ( 10 ) = ieor ( s ( 10 ), s ( 6 ) ) s ( 7 ) = ieor ( s ( 7 ), s ( 8 ) ) s ( 8 ) = ishftc ( s ( 8 ), 55 ) s ( 7 ) = s ( 7 ) + s ( 9 ) s ( 9 ) = s ( 9 ) + data ( 9 ) s ( 11 ) = ieor ( s ( 11 ), s ( 7 ) ) s ( 8 ) = ieor ( s ( 8 ), s ( 9 ) ) s ( 9 ) = ishftc ( s ( 9 ), 54 ) s ( 8 ) = s ( 8 ) + s ( 10 ) s ( 10 ) = s ( 10 ) + data ( 10 ) s ( 0 ) = ieor ( s ( 0 ), s ( 8 ) ) s ( 9 ) = ieor ( s ( 9 ), s ( 10 ) ) s ( 10 ) = ishftc ( s ( 10 ), 22 ) s ( 9 ) = s ( 9 ) + s ( 11 ) s ( 11 ) = s ( 11 ) + data ( 11 ) s ( 1 ) = ieor ( s ( 1 ), s ( 9 ) ) s ( 10 ) = ieor ( s ( 10 ), s ( 11 ) ) s ( 11 ) = ishftc ( s ( 11 ), 46 ) s ( 10 ) = s ( 10 ) + s ( 0 ) end subroutine spookyhash_mix pure subroutine spookyhash_end ( data , h ) integer ( int64 ), intent ( in ) :: data ( 0 :) integer ( int64 ), intent ( inout ) :: h ( 0 : 11 ) h = h + data ( 0 : 11 ) call endpartial ( h ) call endpartial ( h ) call endpartial ( h ) contains ! ! Mix all 12 inputs together so that h0, h1 are a hash of them all. ! ! For two inputs differing in just the input bits ! Where \"differ\" means xor or subtraction ! And the base value is random, or a counting value starting at that bit ! The final result will have each bit of h0, h1 flip ! For every input bit, ! with probability 50 +- .3% ! For every pair of input bits, ! with probability 50 +- 3% ! ! This does not rely on the last Mix() call having already mixed some. ! Two iterations was almost good enough for a 64-bit result, but a ! 128-bit result is reported, so End() does three iterations. ! pure subroutine endpartial ( h ) integer ( int64 ), intent ( inout ) :: h ( 0 : 11 ) h ( 11 ) = h ( 11 ) + h ( 1 ) h ( 2 ) = ieor ( h ( 2 ), h ( 11 ) ) h ( 1 ) = ishftc ( h ( 1 ), 44 ) h ( 0 ) = h ( 0 ) + h ( 2 ) h ( 3 ) = ieor ( h ( 3 ), h ( 0 ) ) h ( 2 ) = ishftc ( h ( 2 ), 15 ) h ( 1 ) = h ( 1 ) + h ( 3 ) h ( 4 ) = ieor ( h ( 4 ), h ( 1 ) ) h ( 3 ) = ishftc ( h ( 3 ), 34 ) h ( 2 ) = h ( 2 ) + h ( 4 ) h ( 5 ) = ieor ( h ( 5 ), h ( 2 ) ) h ( 4 ) = ishftc ( h ( 4 ), 21 ) h ( 3 ) = h ( 3 ) + h ( 5 ) h ( 6 ) = ieor ( h ( 6 ), h ( 3 ) ) h ( 5 ) = ishftc ( h ( 5 ), 38 ) h ( 4 ) = h ( 4 ) + h ( 6 ) h ( 7 ) = ieor ( h ( 7 ), h ( 4 ) ) h ( 6 ) = ishftc ( h ( 6 ), 33 ) h ( 5 ) = h ( 5 ) + h ( 7 ) h ( 8 ) = ieor ( h ( 8 ), h ( 5 ) ) h ( 7 ) = ishftc ( h ( 7 ), 10 ) h ( 6 ) = h ( 6 ) + h ( 8 ) h ( 9 ) = ieor ( h ( 9 ), h ( 6 ) ) h ( 8 ) = ishftc ( h ( 8 ), 13 ) h ( 7 ) = h ( 7 ) + h ( 9 ) h ( 10 ) = ieor ( h ( 10 ), h ( 7 ) ) h ( 9 ) = ishftc ( h ( 9 ), 38 ) h ( 8 ) = h ( 8 ) + h ( 10 ) h ( 11 ) = ieor ( h ( 11 ), h ( 8 ) ) h ( 10 ) = ishftc ( h ( 10 ), 53 ) h ( 9 ) = h ( 9 ) + h ( 11 ) h ( 0 ) = ieor ( h ( 0 ), h ( 9 ) ) h ( 11 ) = ishftc ( h ( 11 ), 42 ) h ( 10 ) = h ( 10 ) + h ( 0 ) h ( 1 ) = ieor ( h ( 1 ), h ( 10 ) ) h ( 0 ) = ishftc ( h ( 0 ), 54 ) end subroutine endpartial end subroutine spookyhash_end pure module subroutine spookysubhash_init ( self , seed ) type ( spooky_subhash ), intent ( out ) :: self integer ( int64 ), intent ( in ) :: seed ( 2 ) self % state ( 0 : 1 ) = seed self % length = 0 self % remainder = 0_int8 end subroutine spookysubhash_init ! add a message fragment to the state module subroutine spookyhash_update ( spooky , key ) type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int8 ) :: dummy ( 0 : 7 ) integer ( int64 ) :: h ( 0 : 11 ) integer ( int64 ) :: bend , & length , & new_length , & p8 , & remainder length = size ( key , kind = int64 ) new_length = length + spooky % remainder ! Is this message fragment too short? If it is, stuff it away. if ( new_Length < sc_buffsize ) then remainder = spooky % remainder spooky % data ( remainder : remainder + length - 1 ) = key spooky % length = length + spooky % length dummy = transfer ( new_length , 0_int8 , 8 ) if ( little_endian ) then spooky % remainder = transfer ( [ dummy ( 0 ), 0_int8 ], 0_int16 ) else spooky % remainder = transfer ( [ 0_int8 , dummy ( 7 ) ], 0_int16 ) end if return end if ! init the variables if ( spooky % length < sc_buffsize ) then h ( [ 0 , 3 , 6 , 9 ] ) = spooky % state ( 0 ) h ( [ 1 , 4 , 7 , 10 ] ) = spooky % state ( 1 ) h ( [ 2 , 5 , 8 , 11 ] ) = sc_const else h ( 0 : 11 ) = spooky % state ( 0 : 11 ) end if spooky % length = length + spooky % length ! if we've got anything stuffed away, use it now if ( spooky % remainder /= 0_int16 ) then block integer ( int16 ) :: prefix prefix = sc_buffsize - spooky % remainder remainder = spooky % remainder spooky % data ( remainder : remainder + prefix - 1 ) = key ( 0 : prefix - 1 ) call spookyhash_mix ( transfer ( spooky % data ( 0 : sc_blocksize - 1 ), & 0_int64 , sc_numvars ), h ) call spookyhash_mix ( & transfer ( spooky % data ( sc_blocksize : 2 * sc_blocksize - 1 ), & 0_int64 , sc_numvars ), h ) p8 = prefix length = length - prefix end block else p8 = 0 end if ! handle all whole blocks of sc_blocksize bytes requiring aligned bytes bend = p8 + 8 * ( length / sc_blocksize ) * sc_numVars remainder = length - ( bend - p8 ) do while ( p8 < bend ) spooky % data ( 0 : sc_blocksize - 1 ) = key ( p8 : p8 + sc_blocksize - 1 ) call spookyhash_mix ( transfer ( spooky % data ( 0 : sc_blocksize - 1 ), & 0_int64 , sc_numvars ), h ) p8 = p8 + sc_blocksize end do ! stuff away the last few bytes spooky % remainder = remainder if ( remainder > 0 ) then spooky % data ( 0 : remainder - 1 ) = & key ( bend : bend + remainder - 1 ) end if ! stuff away the variables spooky % state ( 0 : 11 ) = h ( 0 : 11 ) end subroutine spookyhash_update ! report the hash for the concatenation of all message fragments so far module subroutine spookyhash_final ( spooky , hash_code ) type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int64 ), intent ( inout ) :: hash_code ( 2 ) integer ( int64 ) :: h ( 0 : 11 ) integer ( int64 ) :: index , remainder integer ( int8 ) :: dummy ( 2 ) ! init the variables if ( spooky % length < sc_buffsize ) then hash_code = spooky % state ( 0 : 1 ) call spookyhash_short ( spooky % data ( 0 : spooky % length - 1 ), & hash_code ) return end if remainder = spooky % remainder h ( 0 : 11 ) = spooky % state ( 0 : 11 ) if ( remainder >= sc_blocksize ) then ! m_data can contain two blocks; handle any whole first block call spookyhash_mix ( transfer ( spooky % data , 0_int64 , & 2 * sc_numvars ), h ) index = sc_blocksize remainder = remainder - sc_blocksize else index = 0 end if ! mix in the last partial block, and the length mod sc_blocksize spooky % data ( sc_blocksize + remainder :) = 0_int8 dummy = transfer ( remainder , 0_int8 , 2 ) if ( little_endian ) then spooky % data ( sc_blocksize - 1 ) = dummy ( 1 ) else spooky % data ( sc_blocksize - 1 ) = dummy ( 2 ) end if ! do some final mixing call spookyhash_end ( transfer ( spooky % data , 0_int64 , 2 * sc_numvars ), h ) hash_code ( 1 : 2 ) = h ( 0 : 1 ) end subroutine spookyhash_final pure function rot_64_32 ( a , k ) integer ( int64 ) :: rot_64_32 integer ( int64 ), intent ( in ) :: a integer , intent ( in ) :: k rot_64_32 = iand ( ior ( shiftl ( a , k ), shiftr ( a , 32 - k ) ), two_32 - 1 ) end function rot_64_32 module subroutine new_spooky_hash_seed ( seed ) ! Random SEED generator for integer ( int64 ), intent ( inout ) :: seed ( 2 ) integer ( int64 ) :: old_seed ( 2 ) real ( dp ) :: sample ( 4 ) integer ( int32 ) :: part ( 4 ) old_seed = seed find_seed : do call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) seed = transfer ( part , seed , 2 ) if ( seed ( 1 ) /= old_seed ( 1 ) . or . seed ( 2 ) /= old_seed ( 2 ) ) return end do find_seed end subroutine new_spooky_hash_seed end submodule stdlib_hash_64bit_spookyv2","tags":"","loc":"sourcefile/stdlib_hash_64bit_spookyv2.fypp.html"},{"title":"stdlib_stats_distribution_uniform.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set ALL_KINDS_TYPES = INT_KINDS_TYPES + RC_KINDS_TYPES module stdlib_stats_distribution_uniform use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 use stdlib_error , only : error_stop use stdlib_random , only : dist_rand implicit none private real ( dp ), parameter :: MESENNE_NUMBER = 1.0_dp / ( 2.0_dp ** 53 - 1.0_dp ) integer ( int64 ), parameter :: INT_ONE = 1_int64 public :: rvs_uniform public :: pdf_uniform public :: cdf_uniform public :: shuffle interface rvs_uniform !! version: experimental !! !! Get uniformly distributed random variate for integer, real and complex !! variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! rvs_uniform-uniform-distribution-random-variates)) module procedure rvs_unif_0_rsp ! 0 dummy variable # : for k1 , t1 in ALL_KINDS_TYPES module procedure rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ! 1 dummy variable # : endfor # : for k1 , t1 in ALL_KINDS_TYPES module procedure rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ! 2 dummy variables # : endfor # : for k1 , t1 in ALL_KINDS_TYPES module procedure rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ! 3 dummy variables # : endfor end interface rvs_uniform interface pdf_uniform !! version: experimental !! !! Get uniform distribution probability density (pdf) for integer, real and !! complex variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! pdf_uniform-uniform-probability-density-function)) # : for k1 , t1 in ALL_KINDS_TYPES module procedure pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface pdf_uniform interface cdf_uniform !! version: experimental !! !! Get uniform distribution cumulative distribution function (cdf) for integer, !! real and complex variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! cdf_uniform-uniform-cumulative-distribution-function)) !! # : for k1 , t1 in ALL_KINDS_TYPES module procedure cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cdf_uniform interface shuffle !! version: experimental !! !! Fisher-Yates shuffle algorithm for a rank one array of integer, real and !! complex variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! shuffle-using-fisher-yates-algorithm-to-generate-a-random-permutation-of-a-list)) !! # : for k1 , t1 in ALL_KINDS_TYPES module procedure shuffle_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface shuffle contains # : for k1 , t1 in INT_KINDS_TYPES impure elemental function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) result ( res ) ! ! Uniformly distributed integer in [0, scale] ! Bitmask with rejection ! https://www.pcg-random.org/posts/bounded-rands.html ! ! Fortran 90 translated from c by Jim-215-fisher ! ${ t1 }$ , intent ( in ) :: scale ${ t1 }$ :: res , u , mask integer :: zeros , bits_left , bits if ( scale <= 0 _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_1): Uniform\" & // \" distribution scale parameter must be positive\" ) zeros = leadz ( scale ) bits = bit_size ( scale ) - zeros mask = shiftr ( not ( 0 _${ k1 }$ ), zeros ) L1 : do u = dist_rand ( scale ) res = iand ( u , mask ) if ( res <= scale ) exit L1 bits_left = zeros L2 : do if ( bits_left < bits ) exit L2 u = shiftr ( u , bits ) res = iand ( u , mask ) if ( res <= scale ) exit L1 bits_left = bits_left - bits end do L2 end do L1 end function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES impure elemental function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Uniformly distributed integer in [loc, loc + scale] ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res if ( scale <= 0 _${ k1 }$ ) call error_stop ( \"Error(rvs_unif): Uniform\" & // \" distribution scale parameter must be positive\" ) res = loc + rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) end function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ ( ) result ( res ) ! ! Uniformly distributed float in [0,1] ! Based on the paper by Frederic Goualard, \"Generating Random Floating- ! Point Numbers By Dividing Integers: a Case Study\", Proceedings of ! ICCS 2020, June 2020, Amsterdam, Netherlands ! ${ t1 }$ :: res integer ( int64 ) :: tmp tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) ! Get random from [0,2^53-1] res = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) ! convert to [0,1] end function rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) result ( res ) ! ! Uniformly distributed float in [0, scale] ! ${ t1 }$ , intent ( in ) :: scale ${ t1 }$ :: res if ( scale == 0. _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_1): \" & // \"Uniform distribution scale parameter must be non-zero\" ) res = scale * rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ ( ) end function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Uniformly distributed float in [loc, loc + scale] ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res if ( scale == 0. _${ k1 }$ ) call error_stop ( \"Error(rvs_unif): \" & // \"Uniform distribution scale parameter must be non-zero\" ) res = loc + scale * rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ ( ) end function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) result ( res ) ! ! Uniformly distributed complex in [(0,0i), (scale, i(scale))] ! The real part and imaginary part are independent of each other, so that ! the joint distribution is on an unit square [(0,0i), (scale,i(scale))] ! ${ t1 }$ , intent ( in ) :: scale ${ t1 }$ :: res real ( ${ k1 }$ ) :: r1 , tr , ti if ( scale == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) call error_stop ( \"Error(rvs_uni_\" & // \"1): Uniform distribution scale parameter must be non-zero\" ) r1 = rvs_unif_0_r$ { k1 }$ ( ) if ( scale % re == 0.0 _${ k1 }$ ) then ti = scale % im * r1 tr = 0.0 _${ k1 }$ else if ( scale % im == 0.0 _${ k1 }$ ) then tr = scale % re * r1 ti = 0.0 _${ k1 }$ else tr = scale % re * r1 r1 = rvs_unif_0_r$ { k1 }$ ( ) ti = scale % im * r1 end if res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Uniformly distributed complex in [(loc,iloc), (loc + scale, i(loc + ! scale))]. ! The real part and imaginary part are independent of each other, so that ! the joint distribution is on an unit square [(loc,iloc), (loc + scale, ! i(loc + scale))] ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res real ( ${ k1 }$ ) :: r1 , tr , ti if ( scale == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) call error_stop ( \"Error(rvs_uni_\" & // \"): Uniform distribution scale parameter must be non-zero\" ) r1 = rvs_unif_0_r$ { k1 }$ ( ) if ( scale % re == 0.0 _${ k1 }$ ) then tr = loc % re ti = loc % im + scale % im * r1 else if ( scale % im == 0.0 _${ k1 }$ ) then tr = loc % re + scale % re * r1 ti = loc % im else tr = loc % re + scale % re * r1 r1 = rvs_unif_0_r$ { k1 }$ ( ) ti = loc % im + scale % im * r1 end if res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) integer , intent ( in ) :: array_size ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res ( array_size ) ${ t1 }$ :: u , mask , nn integer :: i , zeros , bits_left , bits if ( scale == 0 _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_array): \" & // \"Uniform distribution scale parameter must be non-zero\" ) zeros = leadz ( scale ) bits = bit_size ( scale ) - zeros mask = shiftr ( not ( 0 _${ k1 }$ ), zeros ) do i = 1 , array_size L1 : do u = dist_rand ( scale ) nn = iand ( u , mask ) if ( nn <= scale ) exit L1 bits_left = zeros L2 : do if ( bits_left < bits ) exit L2 u = shiftr ( u , bits ) nn = iand ( u , mask ) if ( nn <= scale ) exit L1 bits_left = bits_left - bits end do L2 end do L1 res ( i ) = loc + nn end do end function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) integer , intent ( in ) :: array_size ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res ( array_size ) ${ t1 }$ :: t integer ( int64 ) :: tmp integer :: i if ( scale == 0. _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_array):\" & // \" Uniform distribution scale parameter must be non-zero\" ) do i = 1 , array_size tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) t = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) res ( i ) = loc + scale * t end do end function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) integer , intent ( in ) :: array_size ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res ( array_size ) real ( ${ k1 }$ ) :: r1 , tr , ti integer ( int64 ) :: tmp integer :: i if ( scale == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) call error_stop ( \"Error(rvs_unif\" & // \"_array): Uniform distribution scale parameter must be non-zero\" ) do i = 1 , array_size tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) r1 = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) if ( scale % re == 0.0 _${ k1 }$ ) then tr = loc % re ti = loc % im + scale % im * r1 else if ( scale % im == 0.0 _${ k1 }$ ) then tr = loc % re + scale % re * r1 ti = loc % im else tr = loc % re + scale % re * r1 tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) r1 = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) ti = loc % im + scale % im * r1 end if res ( i ) = cmplx ( tr , ti , kind = ${ k1 }$ ) end do end function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES elemental function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real :: res if ( scale == 0 _${ k1 }$ ) then res = 0.0 else if ( x < loc . or . x > ( loc + scale )) then res = 0.0 else res = 1. / ( scale + 1 _${ k1 }$ ) end if end function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( scale == zero ) then res = zero else if ( x < loc . or . x > ( loc + scale )) then res = zero else res = one / scale end if end function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res , tr , ti real ( ${ k1 }$ ), parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ tr = loc % re + scale % re ; ti = loc % im + scale % im if ( scale == ( zero , zero )) then res = zero else if (( x % re >= loc % re . and . x % re <= tr ) . and . & ( x % im >= loc % im . and . x % im <= ti )) then res = one / ( scale % re * scale % im ) else res = zero end if end function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES elemental function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real :: res if ( scale == 0 _${ k1 }$ ) then res = 0.0 else if ( x < loc ) then res = 0.0 else if ( x >= loc . and . x <= ( loc + scale )) then res = real (( x - loc + 1 _${ k1 }$ )) / real (( scale + 1 _${ k1 }$ )) else res = 1.0 end if end function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( scale == zero ) then res = zero else if ( x < loc ) then res = zero else if ( x >= loc . and . x <= ( loc + scale )) then res = ( x - loc ) / scale else res = one end if end function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res real ( ${ k1 }$ ), parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ logical :: r1 , r2 , i1 , i2 if ( scale == ( zero , zero )) then res = zero return end if r1 = x % re < loc % re r2 = x % re > ( loc % re + scale % re ) i1 = x % im < loc % im i2 = x % im > ( loc % im + scale % im ) if ( r1 . or . i1 ) then res = zero else if ((. not . r1 ) . and . (. not . r2 ) . and . i2 ) then res = ( x % re - loc % re ) / scale % re else if ((. not . i1 ) . and . (. not . i2 ) . and . r2 ) then res = ( x % im - loc % im ) / scale % im else if ((. not . r1 ) . and . (. not . r2 ) . and . (. not . i1 ) . and . (. not . i2 )) & then res = (( x % re - loc % re ) / scale % re ) * (( x % im - loc % im ) / & scale % im ) else if ( r2 . and . i2 ) then res = one end if end function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in ALL_KINDS_TYPES function shuffle_$ { t1 [ 0 ] }{ k1 }$ ( list ) result ( res ) ${ t1 }$ , intent ( in ) :: list (:) ${ t1 }$ :: res ( size ( list )) ${ t1 }$ :: tmp integer :: n , i , j n = size ( list ) res = list do i = 1 , n - 1 j = rvs_uniform ( n - i ) + i tmp = res ( i ) res ( i ) = res ( j ) res ( j ) = tmp end do end function shuffle_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_stats_distribution_uniform","tags":"","loc":"sourcefile/stdlib_stats_distribution_uniform.fypp.html"},{"title":"stdlib_hash_64bit.fypp – Fortran-lang/stdlib","text":"Source Code #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int8\", \"int16\", \"int32\", \"int64\"] module stdlib_hash_64bit use , intrinsic :: iso_fortran_env , only : & character_storage_size use stdlib_kinds , only : & dp , & int8 , & int16 , & int32 , & int64 implicit none private integer , parameter , public :: & int_hash = int64 !! The number of bits in the output hash ! The number of bits used by each integer type integer , parameter , public :: & ! Should be 8 bits_int8 = bit_size ( 0_int8 ), & ! Should be 16 bits_int16 = bit_size ( 0_int16 ), & ! Should be 32 bits_int32 = bit_size ( 0_int32 ), & ! Should be 64 bits_int64 = bit_size ( 0_int64 ) integer , parameter , public :: & ! Should be 1 bytes_int8 = bits_int8 / bits_int8 , & ! Should be 2 bytes_int16 = bits_int16 / bits_int8 , & ! Should be 4 bytes_int32 = bits_int32 / bits_int8 , & ! Should be 8 bytes_int64 = bits_int64 / bits_int8 integer , parameter , public :: & bits_char = character_storage_size , & bytes_char = bits_char / bits_int8 ! Dealing with different endians logical , parameter , public :: & little_endian = ( 1 == transfer ( [ 1_int8 , 0_int8 ], 0_int16 ) ) public :: & fibonacci_hash , & fnv_1_hash , & fnv_1a_hash , & new_pengy_hash_seed , & new_spooky_hash_seed , & odd_random_integer , & pengy_hash , & spooky_hash , & spookyhash_128 , & universal_mult_hash ! pow64_over_phi is the odd number that most closely approximates 2**64/phi, ! where phi is the golden ratio 1.618... integer ( int64 ), parameter :: & pow64_over_phi = int ( z '9E3779B97F4A7C15' , int64 ) integer ( int_hash ), parameter :: & two_32 = 2_int_hash ** 32 ! constants used by Bob Jenkins' SpookyHash integer ( int32 ), parameter :: & sc_numvars = 12 , & sc_blocksize = sc_numvars * 8 , & sc_buffsize = 2 * sc_blocksize , & sc_constsub = int ( z 'deadbeef' , int32 ) ! twos complement \"deadbeef\" integer ( int64 ), parameter :: & sc_const = transfer ( [ sc_constsub , sc_constsub ], 0_int64 ) type :: spooky_subhash integer ( int8 ) :: data ( 0 : 2 * sc_blocksize - 1 ) integer ( int64 ) :: state ( 0 : sc_numvars - 1 ) integer ( int64 ) :: length integer ( int16 ) :: remainder end type spooky_subhash interface fnv_1_hash !! Version: experimental !! !! FNV_1 interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#fnv_1-calculates-a-hash-code-from-a-key)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1 ( key ) result ( hash_code ) !! FNV_1 hash function for rank 1 arrays of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code end function ${ k1 }$_ fnv_1 # : endfor elemental module function character_fnv_1 ( key ) result ( hash_code ) !! FNV_1 hash function for character strings character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code end function character_fnv_1 end interface fnv_1_hash interface fnv_1a_hash !! Version: experimental !! !! FNV_1A interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#fnv_1a-calculates-a-hash-code-from-a-key)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1a ( key ) result ( hash_code ) !! FNV_1A hash function for rank 1 arrays of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code end function ${ k1 }$_ fnv_1a # : endfor elemental module function character_fnv_1a ( key ) result ( hash_code ) !! FNV_1A hash function for character strings character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code end function character_fnv_1a end interface fnv_1a_hash interface spooky_hash !! Version: experimental !! !! SPOOKY_HASH interfaces !!([Specification](../page/specs/stdlib_hash_procedures.html#spooky_hash-maps-a-character-string-or-integer-vector-to-an-integer)) # : for k1 in INT_KINDS module function ${ k1 }$_ spooky_hash ( key , seed ) & result ( hash_code ) !! SPOOKY HASH function for rank 1 arrays of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key ( 0 :) integer ( int_hash ), intent ( in ) :: seed ( 2 ) integer ( int_hash ) :: hash_code ( 2 ) end function ${ k1 }$_ spooky_hash # : endfor module function character_spooky_hash ( key , seed ) & result ( hash_code ) !! SPOOKY hash function for character strings character ( * ), intent ( in ) :: key integer ( int_hash ), intent ( in ) :: seed ( 2 ) integer ( int_hash ) :: hash_code ( 2 ) end function character_spooky_hash end interface spooky_hash interface module subroutine spookyHash_128 ( key , hash_inout ) !! Version: experimental !! integer ( int8 ), intent ( in ), target :: key ( 0 :) integer ( int_hash ), intent ( inout ) :: hash_inout ( 2 ) end subroutine spookyHash_128 end interface interface spooky_init !! Version: experimental !! pure module subroutine spookysubhash_init ( self , seed ) type ( spooky_subhash ), intent ( out ) :: self integer ( int_hash ), intent ( in ) :: seed ( 2 ) end subroutine spookysubhash_init end interface spooky_init interface spooky_update module subroutine spookyhash_update ( spooky , key ) !! Version: experimental !! type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int8 ), intent ( in ) :: key ( 0 :) end subroutine spookyhash_update end interface spooky_update interface spooky_final module subroutine spookyhash_final ( spooky , hash_code ) !! Version: experimental !! type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int_hash ), intent ( inout ) :: hash_code ( 2 ) end subroutine spookyhash_final end interface spooky_final interface module subroutine new_spooky_hash_seed ( seed ) !! Version: experimental !! !! Random seed generator for SPOOKY_HASH integer ( int64 ), intent ( inout ) :: seed ( 2 ) end subroutine new_spooky_hash_seed end interface interface pengy_hash !! Version: experimental !! !! PENGY_HASH interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#pengy_hash-maps-a-character-string-or-integer-vector-to-an-integer)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ pengy_hash ( key , seed ) result ( hash_code ) !! PENGY_HASH hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code end function ${ k1 }$_ pengy_hash # : endfor elemental module function character_pengy_hash ( key , seed ) & result ( hash_code ) !! MIR HASH STRICT function for character strings character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code end function character_pengy_hash end interface pengy_hash interface module subroutine new_pengy_hash_seed ( seed ) !! Version: experimental !! !! Random seed generator for MIR_HASH_STRICT integer ( int32 ), intent ( inout ) :: seed end subroutine new_pengy_hash_seed end interface contains elemental function fibonacci_hash ( key , nbits ) result ( sample ) !! Version: experimental !! !! Maps the 64 bit integer `key` to an unsigned integer value with only `nbits` !! bits where `nbits` is less than 64 !! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * pow64_over_phi , - 64 + nbits ) end function fibonacci_hash elemental function universal_mult_hash ( key , seed , nbits ) result ( sample ) !! Version: experimental !! !! Uses the \"random\" odd 64 bit integer `seed` to map the 64 bit integer `key` to !! an unsigned integer value with only `nbits` bits where `nbits` is less than 64. !! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * seed , - 64 + nbits ) end function universal_mult_hash subroutine odd_random_integer ( harvest ) !! Version: experimental !! !! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over !! the odd integers of the 64 bit kind. !! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-odd-integer)) integer ( int64 ), intent ( out ) :: harvest real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , int32 ) harvest = transfer ( part , harvest ) harvest = ishft ( harvest , 1 ) + 1_int64 end subroutine odd_random_integer subroutine random_integer ( harvest ) !! Version: experimental !! !! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over !! the values of the 64 bit kind. integer ( int64 ), intent ( out ) :: harvest real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , int32 ) harvest = transfer ( part , harvest ) end subroutine random_integer end module stdlib_hash_64bit","tags":"","loc":"sourcefile/stdlib_hash_64bit.fypp.html"},{"title":"stdlib_stats_corr.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_corr use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_linalg , only : diag use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ k1 }$ ) :: res if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( ${ k1 }$ ) :: res if ( count ( mask ) < 2 ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( dp ) :: res if ( count ( mask ) < 2 ) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j ${ t1 }$ :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) ${ t1 }$ :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = x ( i , :) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( transpose ( center ), center ) # : else res = matmul ( transpose ( conjg ( center )), center ) # : endif case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = x (:, i ) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( center , transpose ( center )) # : else res = matmul ( center , transpose ( conjg ( center ))) # : endif case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select mean_ = 1 / sqrt ( diag ( res )) do i = 1 , size ( res , 1 ) do j = 1 , size ( res , 2 ) res ( j , i ) = res ( j , i ) * mean_ ( i ) * mean_ ( j ) end do end do end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j real ( dp ) :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) real ( dp ) :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = real ( x ( i , :), dp ) - mean_ end do res = matmul ( transpose ( center ), center ) case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = real ( x (:, i ), dp ) - mean_ end do res = matmul ( center , transpose ( center )) case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select mean_ = 1 / sqrt ( diag ( res )) do i = 1 , size ( res , 1 ) do j = 1 , size ( res , 2 ) res ( j , i ) = res ( j , i ) * mean_ ( i ) * mean_ ( j ) end do end do end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j ${ t1 }$ :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) ${ t1 }$ :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j real ( dp ) :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) real ( dp ) :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& 0._dp , mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& 0._dp , mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select end function ${ RName }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_corr.fypp.html"},{"title":"stdlib_sorting.fypp – Fortran-lang/stdlib","text":"This file is subject both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Two of the generic subroutines, ORD_SORT and SORT_INDEX , are\nsubstantially translations to Fortran 2008 of the \"Rust\" sort sorting\nroutines in slice.rs The rust sort implementation is distributed with the header: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\n file at the top-level directory of this distribution and at\n http://rust-lang.org/COPYRIGHT. Licensed under the Apache License, Version 2.0 or the MIT license , at your\n option. This file may not be copied, modified, or distributed\n except according to those terms. so the license for the original slice.rs code is compatible with the use\nof modified versions of the code in the Fortran Standard Library under\nthe MIT license. One of the generic subroutines, SORT , is substantially a\ntranslation to Fortran 2008, of the introsort of David Musser.\nDavid Musser has given permission to include a variant of introsort in the Fortran Standard Library under the MIT license provided\nwe cite: Musser, D.R., “Introspective Sorting and Selection Algorithms,”\n Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). as the official source of the algorithm. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #:set INT_INDEX_TYPES_ALT_NAME = list(zip([\"int_index\", \"int_index_low\"], [\"integer(int_index)\", \"integer(int_index_low)\"], [\"default\", \"low\"])) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME !! Licensing: !! !! This file is subject both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! Two of the generic subroutines, `ORD_SORT` and `SORT_INDEX`, are !! substantially translations to Fortran 2008 of the `\"Rust\" sort` sorting !! routines in !! [`slice.rs`](https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs) !! The `rust sort` implementation is distributed with the header: !! !! Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT !! file at the top-level directory of this distribution and at !! http://rust-lang.org/COPYRIGHT. !! !! Licensed under the Apache License, Version 2.0 or the MIT license !! , at your !! option. This file may not be copied, modified, or distributed !! except according to those terms. !! !! so the license for the original`slice.rs` code is compatible with the use !! of modified versions of the code in the Fortran Standard Library under !! the MIT license. !! !! One of the generic subroutines, `SORT`, is substantially a !! translation to Fortran 2008, of the `introsort` of David Musser. !! David Musser has given permission to include a variant of `introsort` !! in the Fortran Standard Library under the MIT license provided !! we cite: !! !! Musser, D.R., “Introspective Sorting and Selection Algorithms,” !! Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). !! !! as the official source of the algorithm. module stdlib_sorting !! This module implements overloaded sorting subroutines named `ORD_SORT`, !! `SORT_INDEX`, and `SORT`, that each can be used to sort four kinds !! of `INTEGER` arrays, three kinds of `REAL` arrays, `character(len=*)` arrays, !! and arrays of `type(string_type)`. !! ([Specification](../page/specs/stdlib_sorting.html)) !! !! By default sorting is in order of !! increasing value, but there is an option to sort in decreasing order. !! All the subroutines have worst case run time performance of `O(N Ln(N))`, !! but on largely sorted data `ORD_SORT` and `SORT_INDEX` can have a run time !! performance of `O(N)`. !! !! `ORD_SORT` is a translation of the `\"Rust\" sort` sorting algorithm in !! `slice.rs`: !! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs !! which in turn is inspired by the `timsort` algorithm of Tim Peters, !! http://svn.python.org/projects/python/trunk/Objects/listsort.txt. !! `ORD_SORT` is a hybrid stable comparison algorithm combining `merge sort`, !! and `insertion sort`. It is always at worst O(N Ln(N)) in sorting random !! data, having a performance about 25% slower than `SORT` on such !! data, but has much better performance than `SORT` on partially !! sorted data, having O(N) performance on uniformly non-increasing or !! non-decreasing data. !! !! `SORT_INDEX` is a modification of `ORD_SORT` so that in addition to !! sorting the input array, it returns the indices that map to a !! stable sort of the original array. These indices are !! intended to be used to sort data that is correlated with the input !! array, e.g., different arrays in a database, different columns of a !! rank 2 array, different elements of a derived type. It is less !! efficient than `ORD_SORT` at sorting a simple array. !! !! `SORT` uses the `INTROSORT` sorting algorithm of David Musser, !! http://www.cs.rpi.edu/~musser/gp/introsort.ps. `introsort` is a hybrid !! unstable comparison algorithm combining `quicksort`, `insertion sort`, and !! `heap sort`. While this algorithm is always O(N Ln(N)) it is relatively !! fast on randomly ordered data, but inconsistent in performance on partly !! sorted data, sometimes having `merge sort` performance, sometimes having !! better than `quicksort` performance. `UNORD_SOORT` is about 25% !! more efficient than `ORD_SORT` at sorting purely random data, but af an !! order of `Ln(N)` less efficient at sorting partially sorted data. use stdlib_kinds , only : & int8 , & int16 , & int32 , & int64 , & sp , & dp , & xdp , & qp use stdlib_optval , only : optval use stdlib_string_type , only : string_type , assignment ( = ), operator ( > ), & operator ( >= ), operator ( < ), operator ( <= ) use stdlib_bitsets , only : bitset_64 , bitset_large , & assignment ( = ), operator ( > ), operator ( >= ), operator ( < ), operator ( <= ) implicit none private integer , parameter , public :: int_index = int64 !! Integer kind for indexing integer , parameter , public :: int_index_low = int32 !! Integer kind for indexing using less than `huge(1_int32)` values ! Constants for use by tim_sort integer , parameter :: & ! The maximum number of entries in a run stack, good for an array of ! 2**64 elements see ! https://svn.python.org/projects/python/trunk/Objects/listsort.txt max_merge_stack = int ( ceiling ( log ( 2._dp ** 64 ) / & log ( 1.6180339887_dp ) ) ) #:for ki, ti, namei in INT_INDEX_TYPES_ALT_NAME type run_type_$ { namei }$ !! Version: experimental !! !! Used to pass state around in a stack among helper functions for the !! `ORD_SORT` and `SORT_INDEX` algorithms ${ ti }$ :: base = 0 ${ ti }$ :: len = 0 end type run_type_$ { namei }$ #:endfor public ord_sort !! Version: experimental !! !! The generic subroutine implementing the `ORD_SORT` algorithm to return !! an input array with its elements sorted in order of (non-)decreasing !! value. Its use has the syntax: !! !! call ord_sort( array[, work, reverse] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`, !! `real(real128)`, `character(*)`, `type(string_type)`, !! `type(bitset_64)`, `type(bitset_large)`. If both the !! type of `array` is real and at least one of the elements is a !! `NaN`, then the ordering of the result is undefined. Otherwise it !! is defined to be the original elements in non-decreasing order. !! !! * work (optional): shall be a rank 1 array of the same type as !! `array`, and shall have at least `size(array)/2` elements. It is an !! `intent(out)` argument to be used as \"scratch\" memory !! for internal record keeping. If associated with an array in static !! storage, its use can significantly reduce the stack memory requirements !! for the code. Its value on return is undefined. !! !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `array` will be sorted in order of non-increasing values in stable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in stable order. !! !!#### Example !! !!```fortran !! ... !! ! Read arrays from sorted files !! call read_sorted_file( 'dummy_file1', array1 ) !! call read_sorted_file( 'dummy_file2', array2 ) !! ! Concatenate the arrays !! allocate( array( size(array1) + size(array2) ) ) !! array( 1:size(array1) ) = array1(:) !! array( size(array1)+1:size(array1)+size(array2) ) = array2(:) !! ! Sort the resulting array !! call ord_sort( array, work ) !! ! Process the sorted array !! call array_search( array, values ) !! ... !!``` public sort !! Version: experimental !! !! The generic subroutine implementing the `SORT` algorithm to return !! an input array with its elements sorted in order of (non-)decreasing !! value. Its use has the syntax: !! !! call sort( array[, reverse] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`, !! `real(real128)`, `character(*)`, `type(string_type)`, !! `type(bitset_64)`, `type(bitset_large)`. If both the type !! of `array` is real and at least one of the elements is a `NaN`, then !! the ordering of the result is undefined. Otherwise it is defined to be the !! original elements in non-decreasing order. !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `array` will be sorted in order of non-increasing values in unstable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in unstable order. !! !!#### Example !! !!```fortran !! ... !! ! Read random data from a file !! call read_file( 'dummy_file', array ) !! ! Sort the random data !! call sort( array ) !! ! Process the sorted data !! call array_search( array, values ) !! ... !!``` public radix_sort !! Version: experimental !! !! The generic subroutine implementing the LSD radix sort algorithm to return !! an input array with its elements sorted in order of (non-)decreasing !! value. Its use has the syntax: !! !! call radix_sort( array[, work, reverse] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`. !! If both the type of `array` is real and at least one of the !! elements is a `NaN`, then the ordering of the result is undefined. !! Otherwise it is defined to be the original elements in !! non-decreasing order. Especially, -0.0 is lesser than 0.0. !! !! * work (optional): shall be a rank 1 array of the same type as !! `array`, and shall have at least `size(array)` elements. It is an !! `intent(inout)` argument to be used as buffer. Its value on return is !! undefined. If it is not present, `radix_sort` will allocate a !! buffer for use, and deallocate it before return. If you do several !! similar `radix_sort`s, reusing the `work` array is a good parctice. !! This argument is not present for `int8_radix_sort` because it use !! counting sort, so no buffer is needed. !! !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `array` will be sorted in order of non-increasing values in stable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in stable order. !! !!#### Example !! !!```fortran !! ... !! ! Read random data from a file !! call read_file( 'dummy_file', array ) !! ! Sort the random data !! call radix_sort( array ) !! ... !!``` public sort_index !! Version: experimental !! !! The generic subroutine implementing the `SORT_INDEX` algorithm to !! return an index array whose elements would sort the input array in the !! desired direction. It is primarily intended to be used to sort a !! derived type array based on the values of a component of the array. !! Its use has the syntax: !! !! call sort_index( array, index[, work, iwork, reverse ] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`, !! `real(real128)`, `character(*)`, `type(string_type)`, !! `type(bitset_64)`, `type(bitset_large)`. If both the !! type of `array` is real and at least one of the elements is a `NaN`, !! then the ordering of the `array` and `index` results is undefined. !! Otherwise it is defined to be as specified by reverse. !! !! * index: a rank 1 array of sorting indices. It is an `intent(out)` !! argument of the type `integer(int_index)`. Its size shall be the !! same as `array`. On return, if defined, its elements would !! sort the input `array` in the direction specified by `reverse`. !! !! * work (optional): shall be a rank 1 array of the same type as !! `array`, and shall have at least `size(array)/2` elements. It is an !! `intent(out)` argument to be used as \"scratch\" memory !! for internal record keeping. If associated with an array in static !! storage, its use can significantly reduce the stack memory requirements !! for the code. Its value on return is undefined. !! !! * iwork (optional): shall be a rank 1 integer array of kind `int_index`, !! and shall have at least `size(array)/2` elements. It is an !! `intent(out)` argument to be used as \"scratch\" memory !! for internal record keeping. If associated with an array in static !! storage, its use can significantly reduce the stack memory requirements !! for the code. Its value on return is undefined. !! !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `index` will sort `array` in order of non-increasing values in stable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in stable order. !! !!#### Examples !! !! Sorting a related rank one array: !! !!```Fortran !! subroutine sort_related_data( a, b, work, index, iwork ) !! ! Sort `b` in terms or its related array `a` !! integer, intent(inout) :: a(:) !! integer(int32), intent(inout) :: b(:) ! The same size as a !! integer(int32), intent(out) :: work(:) !! integer(int_index), intent(out) :: index(:) !! integer(int_index), intent(out) :: iwork(:) !! ! Find the indices to sort a !! call sort_index(a, index(1:size(a)),& !! work(1:size(a)/2), iwork(1:size(a)/2)) !! ! Sort b based on the sorting of a !! b(:) = b( index(1:size(a)) ) !! end subroutine sort_related_data !!``` !! !! Sorting a rank 2 array based on the data in a column !! !!```Fortran !! subroutine sort_related_data( array, column, work, index, iwork ) !! ! Sort `a_data` in terms or its component `a` !! integer, intent(inout) :: a(:,:) !! integer(int32), intent(in) :: column !! integer(int32), intent(out) :: work(:) !! integer(int_index), intent(out) :: index(:) !! integer(int_index), intent(out) :: iwork(:) !! integer, allocatable :: dummy(:) !! integer :: i !! allocate(dummy(size(a, dim=1))) !! ! Extract a component of `a_data` !! dummy(:) = a(:, column) !! ! Find the indices to sort the column !! call sort_index(dummy, index(1:size(dummy)),& !! work(1:size(dummy)/2), iwork(1:size(dummy)/2)) !! ! Sort a based on the sorting of its column !! do i=1, size(a, dim=2) !! a(:, i) = a(index(1:size(a, dim=1)), i) !! end do !! end subroutine sort_related_data !!``` !! !! Sorting an array of a derived type based on the dsta in one component !!```fortran !! subroutine sort_a_data( a_data, a, work, index, iwork ) !! ! Sort `a_data` in terms or its component `a` !! type(a_type), intent(inout) :: a_data(:) !! integer(int32), intent(inout) :: a(:) !! integer(int32), intent(out) :: work(:) !! integer(int_index), intent(out) :: index(:) !! integer(int_index), intent(out) :: iwork(:) !! ! Extract a component of `a_data` !! a(1:size(a_data)) = a_data(:) % a !! ! Find the indices to sort the component !! call sort_index(a(1:size(a_data)), index(1:size(a_data)),& !! work(1:size(a_data)/2), iwork(1:size(a_data)/2)) !! ! Sort a_data based on the sorting of that component !! a_data(:) = a_data( index(1:size(a_data)) ) !! end subroutine sort_a_data !!``` interface ord_sort !! Version: experimental !! !! 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`. !! ([Specification](../page/specs/stdlib_sorting.html#ord_sort-sorts-an-input-array)) !! !! It is always at worst O(N Ln(N)) in sorting random !! data, having a performance about 25% slower than `SORT` on such !! data, but has much better performance than `SORT` on partially !! sorted data, having O(N) performance on uniformly non-increasing or !! non-decreasing data. #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ ord_sort ( array , work , reverse ) !! Version: experimental !! !! `${name1}$_ord_sort( array )` sorts the input `ARRAY` of type `${t1}$` !! using a hybrid sort based on the `\"Rust\" sort` algorithm found in `slice.rs` ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t2 }$ , intent ( out ), optional :: work ( 0 :) logical , intent ( in ), optional :: reverse end subroutine ${ name1 }$_ ord_sort #:endfor end interface ord_sort interface radix_sort !! Version: experimental !! !! 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](../page/specs/stdlib_sorting.html#radix_sort-sorts-an-input-array)) !! pure module subroutine int8_radix_sort ( array , reverse ) integer ( kind = int8 ), dimension (:), intent ( inout ) :: array logical , intent ( in ), optional :: reverse end subroutine int8_radix_sort pure module subroutine int16_radix_sort ( array , work , reverse ) integer ( kind = int16 ), dimension (:), intent ( inout ) :: array integer ( kind = int16 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine int16_radix_sort pure module subroutine int32_radix_sort ( array , work , reverse ) integer ( kind = int32 ), dimension (:), intent ( inout ) :: array integer ( kind = int32 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine int32_radix_sort pure module subroutine int64_radix_sort ( array , work , reverse ) integer ( kind = int64 ), dimension (:), intent ( inout ) :: array integer ( kind = int64 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine int64_radix_sort module subroutine sp_radix_sort ( array , work , reverse ) real ( kind = sp ), dimension (:), intent ( inout ), target :: array real ( kind = sp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine sp_radix_sort module subroutine dp_radix_sort ( array , work , reverse ) real ( kind = dp ), dimension (:), intent ( inout ), target :: array real ( kind = dp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine dp_radix_sort end interface radix_sort interface sort !! Version: experimental !! !! The generic subroutine interface implementing the `SORT` algorithm, based !! on the `introsort` of David Musser. !! ([Specification](../page/specs/stdlib_sorting.html#sort-sorts-an-input-array)) #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME pure module subroutine ${ name1 }$_ sort ( array , reverse ) !! Version: experimental !! !! `${name1}$_sort( array[, reverse] )` sorts the input `ARRAY` of type `${t1}$` !! using a hybrid sort based on the `introsort` of David Musser. !! The algorithm is of order O(N Ln(N)) for all inputs. !! Because it relies on `quicksort`, the coefficient of the O(N Ln(N)) !! behavior is small for random data compared to other sorting algorithms. ${ t1 }$ , intent ( inout ) :: array ( 0 :) logical , intent ( in ), optional :: reverse end subroutine ${ name1 }$_ sort #:endfor end interface sort interface sort_index !! Version: experimental !! !! 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. !! ([Specification](../page/specs/stdlib_sorting.html#sort_index-creates-an-array-of-sorting-indices-for-an-input-array-while-also-sorting-the-array)) !! !! The indices by default correspond to a !! non-decreasing sort, but if the optional argument `REVERSE` is present !! with a value of `.TRUE.` the indices correspond to a non-increasing sort. #:for ki, ti, namei in INT_INDEX_TYPES_ALT_NAME # : for t1 , t2 , name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ sort_index_$ { namei }$ ( array , index , work , iwork , & reverse ) !! Version: experimental !! !! `${name1}$_sort_index_${namei}$( array, index[, work, iwork, reverse] )` sorts !! an input `ARRAY` of type `${t1}$` !! using a hybrid sort based on the `\"Rust\" sort` algorithm found in `slice.rs` !! and returns the sorted `ARRAY` and an array `INDEX` of indices in the !! order that would sort the input `ARRAY` in the desired direction. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( out ) :: index ( 0 :) ${ t2 }$ , intent ( out ), optional :: work ( 0 :) ${ ti }$ , intent ( out ), optional :: iwork ( 0 :) logical , intent ( in ), optional :: reverse end subroutine ${ name1 }$_ sort_index_$ { namei }$ # : endfor #:endfor end interface sort_index end module stdlib_sorting","tags":"","loc":"sourcefile/stdlib_sorting.fypp.html"},{"title":"stdlib_quadrature_gauss.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_quadrature ) stdlib_quadrature_gauss use stdlib_specialfunctions , only : legendre , dlegendre implicit none real ( dp ), parameter :: pi = acos ( - 1._dp ) real ( dp ), parameter :: tolerance = 4._dp * epsilon ( 1._dp ) integer , parameter :: newton_iters = 100 contains pure module subroutine gauss_legendre_fp64 ( x , w , interval ) real ( dp ), intent ( out ) :: x (:), w (:) real ( dp ), intent ( in ), optional :: interval ( 2 ) associate ( n => size ( x ) - 1 ) select case ( n ) case ( 0 ) x = 0 w = 2 case ( 1 ) x ( 1 ) = - sqrt ( 1._dp / 3._dp ) x ( 2 ) = - x ( 1 ) w = 1 case default block integer :: i , j real ( dp ) :: leg , dleg , delta do i = 0 , ( n + 1 ) / 2 - 1 ! use Gauss-Chebyshev points as an initial guess x ( i + 1 ) = - cos (( 2 * i + 1 ) / ( 2._dp * n + 2._dp ) * pi ) do j = 1 , newton_iters leg = legendre ( n + 1 , x ( i + 1 )) dleg = dlegendre ( n + 1 , x ( i + 1 )) delta = - leg / dleg x ( i + 1 ) = x ( i + 1 ) + delta if ( abs ( delta ) <= tolerance * abs ( x ( i + 1 )) ) exit end do x ( n - i + 1 ) = - x ( i + 1 ) dleg = dlegendre ( n + 1 , x ( i + 1 )) w ( i + 1 ) = 2._dp / (( 1 - x ( i + 1 ) ** 2 ) * dleg ** 2 ) w ( n - i + 1 ) = w ( i + 1 ) end do if ( mod ( n , 2 ) == 0 ) then x ( n / 2 + 1 ) = 0 dleg = dlegendre ( n + 1 , 0.0_dp ) w ( n / 2 + 1 ) = 2._dp / ( dleg ** 2 ) end if end block end select end associate if ( present ( interval )) then associate ( a => interval ( 1 ) , b => interval ( 2 ) ) x = 0.5_dp * ( b - a ) * x + 0.5_dp * ( b + a ) w = 0.5_dp * ( b - a ) * w end associate end if end subroutine pure module subroutine gauss_legendre_lobatto_fp64 ( x , w , interval ) real ( dp ), intent ( out ) :: x (:), w (:) real ( dp ), intent ( in ), optional :: interval ( 2 ) associate ( n => size ( x ) - 1 ) select case ( n ) case ( 1 ) x ( 1 ) = - 1 x ( 2 ) = 1 w = 1 case default block integer :: i , j real ( dp ) :: leg , dleg , delta x ( 1 ) = - 1._dp x ( n + 1 ) = 1._dp w ( 1 ) = 2._dp / ( n * ( n + 1._dp )) w ( n + 1 ) = 2._dp / ( n * ( n + 1._dp )) do i = 1 , ( n + 1 ) / 2 - 1 ! initial guess from an approximate form given by SV Parter (1999) x ( i + 1 ) = - cos ( ( i + 0.25_dp ) * pi / n - 3 / ( 8 * n * pi * ( i + 0.25_dp ))) do j = 1 , newton_iters leg = legendre ( n + 1 , x ( i + 1 )) - legendre ( n - 1 , x ( i + 1 )) dleg = dlegendre ( n + 1 , x ( i + 1 )) - dlegendre ( n - 1 , x ( i + 1 )) delta = - leg / dleg x ( i + 1 ) = x ( i + 1 ) + delta if ( abs ( delta ) <= tolerance * abs ( x ( i + 1 )) ) exit end do x ( n - i + 1 ) = - x ( i + 1 ) leg = legendre ( n , x ( i + 1 )) w ( i + 1 ) = 2._dp / ( n * ( n + 1._dp ) * leg ** 2 ) w ( n - i + 1 ) = w ( i + 1 ) end do if ( mod ( n , 2 ) == 0 ) then x ( n / 2 + 1 ) = 0 leg = legendre ( n , 0.0_dp ) w ( n / 2 + 1 ) = 2._dp / ( n * ( n + 1._dp ) * leg ** 2 ) end if end block end select end associate if ( present ( interval )) then associate ( a => interval ( 1 ) , b => interval ( 2 ) ) x = 0.5_dp * ( b - a ) * x + 0.5_dp * ( b + a ) x ( 1 ) = interval ( 1 ) x ( size ( x )) = interval ( 2 ) w = 0.5_dp * ( b - a ) * w end associate end if end subroutine end submodule","tags":"","loc":"sourcefile/stdlib_quadrature_gauss.f90.html"},{"title":"stdlib_hashmap_chaining.f90 – Fortran-lang/stdlib","text":"The module STDLIB_HASHMAP_CHAINING implements a simple separate\nchaining hash map. The implementation is loosely based on a C\nimplementation by David Chase, http://chasewoerner.org/src/hasht/, for\nwhich he has given permission to use in the Fortran Standard Library. Source Code !! The module STDLIB_HASHMAP_CHAINING implements a simple separate !! chaining hash map. The implementation is loosely based on a C !! implementation by David Chase, http://chasewoerner.org/src/hasht/, for !! which he has given permission to use in the Fortran Standard Library. ! Note an error in the code caused attempts to deallocate already deallocated ! entries. This did not cause stat to be non-zero, but did cause system errors, ! on my Mac. I therefore decided to remove all deallocation error reporting. submodule ( stdlib_hashmaps ) stdlib_hashmap_chaining !! Version: Experimental !! !! Implements a simple separate chaining hash map. implicit none ! Error messages character ( len =* ), parameter :: & alloc_inv_fault = \"CHAINING_HASHMAP_TYPE % INVERSE allocation \" // & \"fault.\" , & alloc_slots_fault = \"CHAINING_HASHMAP_TYPE % SLOTS allocation \" // & \"fault.\" , & conflicting_key = \"KEY already exists in MAP.\" , & expand_slots_fail = \"CHAINING_HASHMAP_TYPE % SLOTS allocation > \" // & \"max bits.\" , & init_slots_pow_fail = \"SLOT_BITS is not between DEFAULT_BITS \" // & \"and MAX_BITS.\" , & invalid_inmap = \"INMAP was not a valid INVERSE index.\" , & map_consist_fault = \"The hash map found a inconsistency.\" character ( len =* ), parameter :: submodule_name = \"STDLIB_HASHMAP_CHAINING\" interface expand_slots !! Version: Experimental !! !! Interface to internal procedure that expands the number of map slots. module procedure expand_chaining_slots end interface expand_slots interface extend_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that expands a chaining map entry pool. module procedure extend_chaining_map_entry_pool end interface extend_map_entry_pool interface free_map !! Version: Experimental !! !! Interface to procedure that finalizes a chaining hash map. module procedure free_chaining_map end interface free_map interface free_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that finalizes a chaining hash map !! entry pool. module procedure free_map_entry_pool end interface free_map_entry_pool interface get_other_data !! Version: Experimental !! !! Interface to procedure that gets an entry's other data. module procedure get_other_chaining_data end interface get_other_data interface init !! Version: Experimental !! !! Interface to initialization procedure for a chaining hash map. module procedure init_chaining_map end interface init interface rehash !! Version: Experimental !! !! Interface to a procedure that changes the hash function that !! is used to map the keys into a chaining hash map. module procedure rehash_chaining_map end interface rehash interface remove !! Version: Experimental !! !! Interface to a procedure that removes the entry associated with a key module procedure remove_chaining_entry ! Chase's delent end interface remove interface set_other_data !! Version: Experimental !! !! Interface to a procedure that changes the other data associated with a key module procedure set_other_chaining_data end interface set_other_data contains ! Internal routine to make a duplicate map with more hash slots. ! Note David Chase had pointer returning functions, but the logic did not ! depend on the result value subroutine expand_chaining_slots ( map ) !! Version: Experimental !! !! Internal routine to make a duplicate map with more hash slots. !! Doubles the size of the map % slots array !! Arguments: !! map - the hash map whose hash slots are to be expanded ! type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_type ), pointer :: current_entry type ( chaining_map_entry_ptr ), allocatable :: dummy_slots (:) integer ( int_index ) :: min_size , new_size integer ( int_index ) :: old_size , & slot_index integer ( int32 ) :: bits , & stat character ( 256 ) :: errmsg character ( * ), parameter :: procedure = 'EXPAND_SLOTS' if ( map % nbits == max_bits ) then error stop submodule_name // ' % ' // procedure // ': ' // & expand_slots_fail end if old_size = size ( map % slots , kind = int_index ) determine_new_size : if ( map % num_entries <= old_size ) then ! Expand by factor of two to improve efficiency new_size = 2 * old_size bits = map % nbits + 1 else ! Expand so the number of slots is no more than 2**max_bits but otherwise ! at least the number of entries min_size = map % num_entries new_size = old_size bits = map % nbits do bits = bits + 1 new_size = new_size * 2 if ( bits >= max_bits . OR . new_size >= min_size ) exit end do end if determine_new_size allocate ( dummy_slots ( 0 : new_size - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if map % nbits = bits do slot_index = 0 , new_size - 1 dummy_slots ( slot_index ) % target => null () ! May be redundant end do map % total_probes = map % total_probes + map % probe_count map % probe_count = 0 ! This maps old slots entries to new slots, but we could also map inverse ! entries to new_slots do slot_index = 0 , old_size - 1 do while ( associated ( map % slots ( slot_index ) % target ) ) current_entry => map % slots ( slot_index ) % target map % slots ( slot_index ) % target => current_entry % next call remap ( dummy_slots , current_entry , map % nbits ) end do end do call move_alloc ( dummy_slots , map % slots ) contains subroutine remap ( slots , gentry , bits ) type ( chaining_map_entry_ptr ), intent ( inout ) :: slots ( 0 :) type ( chaining_map_entry_type ), intent ( inout ), target :: gentry integer ( int_hash ), intent ( in ) :: bits integer ( int_index ) :: hash_index type ( chaining_map_entry_type ), pointer :: where_loc hash_index = fibonacci_hash ( gentry % hash_val , bits ) where_loc => slots ( hash_index ) % target gentry % next => null () ! May be redundant if ( associated ( where_loc ) ) then do while ( associated ( where_loc % next ) ) where_loc => where_loc % next end do where_loc % next => gentry else slots ( hash_index ) % target => gentry end if end subroutine remap end subroutine expand_chaining_slots subroutine extend_chaining_map_entry_pool ( map ) ! gent_pool_new !! Version: Experimental !! !! Add more map_entrys to the pool head !! Arguments: !! pool - a chaining map entry pool type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_pool ), pointer :: pool allocate ( pool ) allocate ( pool % more_map_entries ( 0 : pool_size - 1 )) pool % next = 0 ! may be redundant pool % lastpool => map % cache map % cache => pool end subroutine extend_chaining_map_entry_pool ! Internal final routine to free a map and its memory module subroutine free_chaining_map ( map ) !! Version: Experimental !! !! Frees internal memory of an chaining map !! Arguments: !! map - the chaining hash map whose memory is to be freed ! type ( chaining_hashmap_type ), intent ( inout ) :: map integer ( int_index ) :: i type ( chaining_map_entry_type ), pointer :: next if ( allocated ( map % slots ) ) then remove_slot_links : do i = 0 , size ( map % slots ) - 1 if ( associated ( map % slots ( i ) % target ) ) then map % slots ( i ) % target => null () end if end do remove_slot_links deallocate ( map % slots ) end if if ( allocated ( map % inverse ) ) then remove_links : do i = 1 , size ( map % inverse , kind = int_index ) if ( associated ( map % inverse ( i ) % target ) ) then map % inverse ( i ) % target % next => null () end if map % inverse ( i ) % target => null () end do remove_links deallocate ( map % inverse ) end if free_free_list : do if ( associated ( map % free_list ) ) then next => map % free_list % next map % free_list => next cycle free_free_list else map % num_free = 0 exit free_free_list end if end do free_free_list if ( associated ( map % cache ) ) call free_map_entry_pool ( map % cache ) map % num_entries = 0 end subroutine free_chaining_map recursive subroutine free_map_entry_pool ( pool ) ! gent_pool_free !! Version: Experimental !! !! Recursively descends map entry pool list freeing each element !! Arguments: !! pool The map entry pool whose elements are to be freed ! type ( chaining_map_entry_pool ), intent ( inout ), pointer :: pool if ( . not . associated ( pool ) ) return call free_map_entry_pool ( pool % lastpool ) deallocate ( pool ) end subroutine free_map_entry_pool module subroutine get_all_chaining_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hash map !! Arguments: !! map - a chaining hash map !! all_keys - all the keys contained in a hash map ! class ( chaining_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) integer ( int32 ) :: num_keys integer ( int_index ) :: i , key_idx num_keys = map % entries () allocate ( all_keys ( num_keys ) ) if ( num_keys == 0 ) return if ( allocated ( map % inverse ) ) then key_idx = 1_int_index do i = 1_int_index , size ( map % inverse , kind = int_index ) if ( associated ( map % inverse ( i ) % target ) ) then all_keys ( key_idx ) = map % inverse ( i ) % target % key key_idx = key_idx + 1_int_index end if end do end if end subroutine get_all_chaining_keys module subroutine get_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - a chaining hash map !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'GET_OTHER_DATA' call in_chain_map ( map , inmap , key ) if ( inmap <= 0 . or . & inmap > size ( map % inverse , kind = int_index ) ) then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then if ( present ( exists ) ) exists = . true . call copy_other ( map % inverse ( inmap ) % target % other , other ) else if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault end if end if end subroutine get_other_chaining_data subroutine in_chain_map ( map , inmap , key ) !! Version: Experimental !! !! Returns the index into the INVERSE array associated with the KEY !! Arguments: !! map - the hash map of interest !! inmap - the returned index into the INVERSE array of entry pointers. !! A value of zero indicates that an entry with that key was not !! found. !! key - the key identifying the entry of interest ! class ( chaining_hashmap_type ), intent ( inout ) :: map integer ( int_index ), intent ( out ) :: inmap type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: hash_val , hash_index type ( chaining_map_entry_type ), pointer :: gentry , pentry , sentry if ( map % probe_count > inmap_probe_factor * map % call_count ) then if ( map % nbits < max_bits . AND . & map % num_entries > size ( map % slots , kind = int_index ) ) then call expand_slots ( map ) end if end if map % call_count = map % call_count + 1 hash_val = map % hasher ( key ) hash_index = fibonacci_hash ( hash_val , map % nbits ) pentry => map % slots ( hash_index ) % target sentry => pentry climb_chain : do gentry => pentry map % probe_count = map % probe_count + 1 if (. not . associated ( gentry ) ) then inmap = 0 return else if ( hash_val == gentry % hash_val ) then if ( key == gentry % key ) then ! The swap to front seems to confuse gfortran's pointers ! if ( .not. associated( pentry, sentry ) ) then ! ! swap to front ! pentry => gentry % next ! gentry % next => sentry ! sentry => gentry ! end if inmap = gentry % inmap return end if end if pentry => gentry % next end do climb_chain end subroutine in_chain_map module subroutine init_chaining_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited !! to a maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the chaining hash map to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the bits of two used to initialize the number of slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bits or !! greater than max_bits ! class ( chaining_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status character ( 256 ) :: errmsg integer ( int_index ) :: index character ( * ), parameter :: procedure = 'INIT' integer ( int_index ) :: slots integer ( int32 ) :: stat map % call_count = 0 map % probe_count = 0 map % total_probes = 0 map % hasher => hasher call free_chaining_map ( map ) if ( present ( slots_bits ) ) then if ( slots_bits < 6 . OR . slots_bits > max_bits ) then if ( present ( status ) ) then status = array_size_error return else error stop submodule_name // ' % ' // procedure // ': ' // & init_slots_pow_fail end if end if map % nbits = slots_bits else map % nbits = min ( default_bits , max_bits ) end if slots = 2_int_index ** map % nbits allocate ( map % slots ( 0 : slots - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if end if do index = 0 , size ( map % slots , kind = int_index ) - 1 map % slots ( index ) % target => null () ! May be redundant end do ! 5*s from Chase's g_new_map allocate ( map % inverse ( 1 : slots ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if end if do index = 1 , size ( map % inverse , kind = int_index ) map % inverse ( index ) % target => null () end do call extend_map_entry_pool ( map ) if ( present ( status ) ) status = success end subroutine init_chaining_map pure module function chaining_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - a chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map real :: chaining_loading chaining_loading = real ( map % num_entries ) / & real ( size ( map % slots , kind = int_index ) ) end function chaining_loading module subroutine map_chain_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! Arguments: !! map - the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict integer ( int_hash ) :: hash_index integer ( int_hash ) :: hash_val integer ( int_index ) :: inmap type ( chaining_map_entry_type ), pointer :: new_ent type ( chaining_map_entry_type ), pointer :: gentry , pentry , sentry character ( * ), parameter :: procedure = 'MAP_ENTRY' hash_val = map % hasher ( key ) if ( map % probe_count > map_probe_factor * map % call_count ) then call expand_slots ( map ) end if map % call_count = map % call_count + 1 hash_index = fibonacci_hash ( hash_val , map % nbits ) pentry => map % slots ( hash_index ) % target sentry => pentry do gentry => pentry map % probe_count = map % probe_count + 1 if ( . not . associated ( gentry ) ) then call allocate_chaining_map_entry ( map , new_ent ) new_ent % hash_val = hash_val ! Adding to tail of chain doesn't work on gfortran ! new_ent % next => sentry ! sentry => new_ent ! Adding to head of chain works on gfortran new_ent % next => map % slots ( hash_index ) % target map % slots ( hash_index ) % target => new_ent call copy_key ( key , new_ent % key ) if ( present ( other ) ) call copy_other ( other , new_ent % other ) if ( new_ent % inmap == 0 ) then map % num_entries = map % num_entries + 1 inmap = map % num_entries else inmap = new_ent % inmap end if if ( inmap == size ( map % inverse , kind = int_index ) ) then call expand_inverse ( map ) end if new_ent % inmap = inmap map % inverse ( inmap ) % target => new_ent if ( present ( conflict ) ) conflict = . false . return else if ( hash_val == gentry % hash_val ) then if ( key == gentry % key ) then inmap = gentry % inmap if ( . not . associated ( pentry , sentry ) ) then ! Swap to front pentry => gentry % next gentry % next => sentry sentry => gentry end if if ( present ( conflict ) ) then conflict = . true . else error stop submodule_name // ' % ' // procedure & // ': ' // conflicting_key end if return end if end if pentry => gentry % next end do contains subroutine allocate_chaining_map_entry ( map , bucket ) ! Chases gent_malloc ! allocates a hash bucket type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_type ), pointer , intent ( out ) :: bucket type ( chaining_map_entry_pool ), pointer :: pool pool => map % cache map % num_entries = map % num_entries + 1 if ( associated ( map % free_list ) ) then ! Get hash bucket from free_list bucket => map % free_list map % free_list => bucket % next map % num_free = map % num_free - 1 else ! Get hash bucket from pool if ( pool % next == pool_size ) then ! Expand pool call extend_map_entry_pool ( map ) pool => map % cache end if bucket => pool % more_map_entries ( pool % next ) pool % next = pool % next + 1 ! 0s based if ( map % num_entries > & size ( map % inverse , kind = int_index ) ) & then call expand_inverse ( map ) end if bucket % inmap = map % num_entries end if end subroutine allocate_chaining_map_entry subroutine expand_inverse ( map ) ! Increase size of map % inverse type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_ptr ), allocatable :: dummy_inverse (:) integer ( int32 ) :: stat character ( 256 ) :: errmsg character ( * ), parameter :: procedure = 'MAP_ENTRY' allocate ( dummy_inverse ( 1 : 2 * size ( map % inverse , & kind = int_index ) ), & stat = stat , & errmsg = errmsg ) if ( stat /= 0 ) then write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if dummy_inverse ( 1 : size ( map % inverse , kind = int_index )) = & map % inverse (:) call move_alloc ( dummy_inverse , map % inverse ) end subroutine expand_inverse end subroutine map_chain_entry module subroutine rehash_chaining_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( chaining_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher integer ( int_hash ) :: hash_val integer ( int_index ) :: i integer ( int_index ) :: index map % hasher => hasher do i = 0 , size ( map % slots , kind = int_index ) - 1 map % slots ( i ) % target => null () end do do i = 1 , map % num_entries + map % num_free if ( . not . associated ( map % inverse ( i ) % target ) ) cycle hash_val = map % hasher ( map % inverse ( i ) % target % key ) map % inverse ( i ) % target % hash_val = hash_val index = fibonacci_hash ( hash_val , map % nbits ) map % inverse ( i ) % target % inmap = i if ( associated ( map % slots ( index ) % target ) ) then map % inverse ( i ) % target % next => map % slots ( index ) % target map % slots ( index ) % target => map % inverse ( i ) % target else map % slots ( index ) % target => map % inverse ( i ) % target map % slots ( index ) % target % next => null () end if end do end subroutine rehash_chaining_map module subroutine remove_chaining_entry ( map , key , existed ) !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed type ( chaining_map_entry_type ), pointer :: bucket , aentry , bentry , centry integer ( int_hash ) :: hash_val integer ( int_index ) :: inmap , k , level call in_chain_map ( map , inmap , key ) if ( inmap < 1 . or . inmap > size ( map % inverse ) ) then if ( present ( existed ) ) existed = . false . return end if bucket => map % inverse ( inmap ) % target if ( . not . associated ( bucket ) ) then if ( present ( existed ) ) existed = . false . return end if if ( present ( existed ) ) existed = . true . hash_val = bucket % hash_val k = fibonacci_hash ( hash_val , map % nbits ) allocate ( aentry ) aentry => map % slots ( k ) % target if ( associated ( aentry ) ) then if ( aentry % inmap == inmap ) then bentry => aentry % next map % slots ( k ) % target => bentry aentry % next => map % free_list map % free_list => aentry map % inverse ( inmap ) % target => null () map % num_free = map % num_free + 1 map % num_entries = map % num_entries - 1 return end if else return end if level = 1 centry => map % slots ( k ) % target aentry => aentry % next FIND_SLOTS_ENTRY : do if ( . not . associated ( aentry ) ) return if ( aentry % inmap == inmap ) exit centry => aentry aentry => aentry % next level = level + 1 end do FIND_SLOTS_ENTRY bentry => aentry % next aentry % next => map % free_list map % free_list => aentry centry % next => bentry map % inverse ( inmap ) % target => null () map % num_free = map % num_free + 1 map % num_entries = map % num_entries - 1 end subroutine remove_chaining_entry module subroutine set_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'SET_OTHER_DATA' call in_chain_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then associate ( target => map % inverse ( inmap ) % target ) call copy_other ( other , target % other ) if ( present ( exists ) ) exists = . true . return end associate else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if end subroutine set_other_chaining_data module function total_chaining_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map integer ( int_depth ) :: total_depth type ( chaining_map_entry_type ), pointer :: current_key integer ( int_index ) :: slot , slots integer ( int_depth ) :: index total_depth = 0_int_depth slots = size ( map % slots , kind = int_index ) do slot = 0 , slots - 1 current_key => map % slots ( slot ) % target index = 0_int_depth do while ( associated ( current_key ) ) index = index + 1_int_depth total_depth = total_depth + index current_key => current_key % next end do end do end function total_chaining_depth module subroutine chaining_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY is present in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a logical flag indicating whether key is present in map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present integer ( int_index ) :: inmap call in_chain_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then present = . false . else present = associated ( map % inverse ( inmap ) % target ) end if end subroutine chaining_key_test end submodule stdlib_hashmap_chaining","tags":"","loc":"sourcefile/stdlib_hashmap_chaining.f90.html"},{"title":"stdlib_math_arange.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_math ) stdlib_math_arange contains # : for k1 , t1 in REAL_KINDS_TYPES !> `arange` creates a vector of the `${t1}$` type !> with evenly spaced values within a given interval. pure module function arange_$ { t1 [ 0 ] }$_${ k1 }$ ( start , end , step ) result ( result ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ), optional :: end , step ${ t1 }$ , allocatable :: result (:) ${ t1 }$ :: start_ , end_ , step_ integer :: i start_ = merge ( start , 1.0 _${ k1 }$ , present ( end )) end_ = optval ( end , start ) step_ = optval ( step , 1.0 _${ k1 }$ ) step_ = sign ( merge ( step_ , 1.0 _${ k1 }$ , step_ /= 0.0 _${ k1 }$ ), end_ - start_ ) allocate ( result ( floor (( end_ - start_ ) / step_ ) + 1 )) result = [( start_ + ( i - 1 ) * step_ , i = 1 , size ( result ), 1 )] end function arange_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES !> `arange` creates a vector of the `${t1}$` type !> with evenly spaced values within a given interval. pure module function arange_$ { t1 [ 0 ] }$_${ k1 }$ ( start , end , step ) result ( result ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ), optional :: end , step ${ t1 }$ , allocatable :: result (:) ${ t1 }$ :: start_ , end_ , step_ ${ t1 }$ :: i start_ = merge ( start , 1 _${ k1 }$ , present ( end )) end_ = optval ( end , start ) step_ = optval ( step , 1 _${ k1 }$ ) step_ = sign ( merge ( step_ , 1 _${ k1 }$ , step_ /= 0 _${ k1 }$ ), end_ - start_ ) allocate ( result (( end_ - start_ ) / step_ + 1 _${ k1 }$ )) result = [( i , i = start_ , end_ , step_ )] end function arange_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end submodule stdlib_math_arange","tags":"","loc":"sourcefile/stdlib_math_arange.fypp.html"},{"title":"stdlib_linalg_blas_q.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:if WITH_QP module stdlib_linalg_blas_q use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c use stdlib_linalg_blas_d use stdlib_linalg_blas_z implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_qasum public :: stdlib_qaxpy public :: stdlib_qcopy public :: stdlib_qdot public :: stdlib_qgbmv public :: stdlib_qgemm public :: stdlib_qgemv public :: stdlib_qger public :: stdlib_qnrm2 public :: stdlib_qrot public :: stdlib_qrotg public :: stdlib_qrotm public :: stdlib_qrotmg public :: stdlib_qsbmv public :: stdlib_qscal public :: stdlib_qsdot public :: stdlib_qspmv public :: stdlib_qspr public :: stdlib_qspr2 public :: stdlib_qswap public :: stdlib_qsymm public :: stdlib_qsymv public :: stdlib_qsyr public :: stdlib_qsyr2 public :: stdlib_qsyr2k public :: stdlib_qsyrk public :: stdlib_qtbmv public :: stdlib_qtbsv public :: stdlib_qtpmv public :: stdlib_qtpsv public :: stdlib_qtrmm public :: stdlib_qtrmv public :: stdlib_qtrsm public :: stdlib_qtrsv public :: stdlib_qzasum public :: stdlib_qznrm2 ! 128-bit real constants real ( qp ), parameter , private :: negone = - 1.00_qp real ( qp ), parameter , private :: zero = 0.00_qp real ( qp ), parameter , private :: half = 0.50_qp real ( qp ), parameter , private :: one = 1.00_qp real ( qp ), parameter , private :: two = 2.00_qp real ( qp ), parameter , private :: three = 3.00_qp real ( qp ), parameter , private :: four = 4.00_qp real ( qp ), parameter , private :: eight = 8.00_qp real ( qp ), parameter , private :: ten = 1 0.00_qp ! 128-bit complex constants complex ( qp ), parameter , private :: czero = ( 0.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: chalf = ( 0.5_qp , 0.0_qp ) complex ( qp ), parameter , private :: cone = ( 1.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: cnegone = ( - 1.0_qp , 0.0_qp ) ! 128-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( qp ), parameter , private :: rradix = real ( radix ( zero ), qp ) real ( qp ), parameter , private :: ulp = epsilon ( zero ) real ( qp ), parameter , private :: eps = ulp * half real ( qp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( qp ), parameter , private :: safmax = one / safmin real ( qp ), parameter , private :: smlnum = safmin / ulp real ( qp ), parameter , private :: bignum = safmax * ulp real ( qp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( qp ), parameter , private :: rtmax = sqrt ( bignum ) ! 128-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( qp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( qp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( qp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( qp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure real ( qp ) function stdlib_qasum ( n , dx , incx ) !! DASUM: takes the sum of the absolute values. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_qasum = zero dtemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + abs ( dx ( i )) end do if ( n < 6 ) then stdlib_qasum = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 dtemp = dtemp + abs ( dx ( i )) + abs ( dx ( i + 1 )) + abs ( dx ( i + 2 )) + abs ( dx ( i + 3 )) + abs ( dx ( i + & 4 )) + abs ( dx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dtemp = dtemp + abs ( dx ( i )) end do end if stdlib_qasum = dtemp return end function stdlib_qasum pure subroutine stdlib_qaxpy ( n , da , dx , incx , dy , incy ) !! DAXPY: constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) real ( qp ), intent ( inout ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( da == 0.0_qp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dy ( i ) + da * dx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 dy ( i ) = dy ( i ) + da * dx ( i ) dy ( i + 1 ) = dy ( i + 1 ) + da * dx ( i + 1 ) dy ( i + 2 ) = dy ( i + 2 ) + da * dx ( i + 2 ) dy ( i + 3 ) = dy ( i + 3 ) + da * dx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dy ( iy ) + da * dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qaxpy pure subroutine stdlib_qcopy ( n , dx , incx , dy , incy ) !! DCOPY: copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) real ( qp ), intent ( out ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 dy ( i ) = dx ( i ) dy ( i + 1 ) = dx ( i + 1 ) dy ( i + 2 ) = dx ( i + 2 ) dy ( i + 3 ) = dx ( i + 3 ) dy ( i + 4 ) = dx ( i + 4 ) dy ( i + 5 ) = dx ( i + 5 ) dy ( i + 6 ) = dx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qcopy pure real ( qp ) function stdlib_qdot ( n , dx , incx , dy , incy ) !! DDOT: forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stdlib_qdot = zero dtemp = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + dx ( i ) * dy ( i ) end do if ( n < 5 ) then stdlib_qdot = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 dtemp = dtemp + dx ( i ) * dy ( i ) + dx ( i + 1 ) * dy ( i + 1 ) + dx ( i + 2 ) * dy ( i + 2 ) + dx ( i + 3 ) * dy ( i + 3 ) + & dx ( i + 4 ) * dy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dtemp + dx ( ix ) * dy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_qdot = dtemp return end function stdlib_qdot pure subroutine stdlib_qgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! DGBMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_qgbmv pure subroutine stdlib_qgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DGEMM: performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_qgemm pure subroutine stdlib_qgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! DGEMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_qgemv pure subroutine stdlib_qger ( m , n , alpha , x , incx , y , incy , a , lda ) !! DGER: performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( qp ), intent ( inout ) :: a ( lda , * ) real ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_qger pure function stdlib_qnrm2 ( n , x , incx ) !! DNRM2: returns the euclidean norm of a vector via the function !! name, so that !! DNRM2 := sqrt( x'*x ) real ( qp ) :: stdlib_qnrm2 ! -- reference blas level1 routine (version 3.9.1_qp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._qp ) real ( qp ), parameter :: maxn = huge ( 0.0_qp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( qp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_qnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_qnrm2 = scl * sqrt ( sumsq ) return end function stdlib_qnrm2 pure subroutine stdlib_qrot ( n , dx , incx , dy , incy , c , s ) !! DROT: applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n dtemp = c * dx ( i ) + s * dy ( i ) dy ( i ) = c * dy ( i ) - s * dx ( i ) dx ( i ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = c * dx ( ix ) + s * dy ( iy ) dy ( iy ) = c * dy ( iy ) - s * dx ( ix ) dx ( ix ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qrot pure subroutine stdlib_qrotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._qp ) ! Scaling Constants ! Scalar Arguments real ( qp ), intent ( inout ) :: a , b real ( qp ), intent ( out ) :: c , s ! Local Scalars real ( qp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_qrotg pure subroutine stdlib_qrotm ( n , dx , incx , dy , incy , dparam ) !! QROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See QROTMG for a description of data storage in DPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dparam ( 5 ) real ( qp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dflag , dh11 , dh12 , dh21 , dh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_qp two = 2.0_qp dflag = dparam ( 1 ) if ( n <= 0 . or . ( dflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z * dh12 dy ( i ) = w * dh21 + z * dh22 end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w + z * dh12 dy ( i ) = w * dh21 + z end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z dy ( i ) = - w + dh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z * dh12 dy ( ky ) = w * dh21 + z * dh22 kx = kx + incx ky = ky + incy end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w + z * dh12 dy ( ky ) = w * dh21 + z kx = kx + incx ky = ky + incy end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z dy ( ky ) = - w + dh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_qrotm pure subroutine stdlib_qrotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) !! QROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( qp ), intent ( in ) :: dy1 ! Array Arguments real ( qp ), intent ( out ) :: dparam ( 5 ) ! ===================================================================== ! Local Scalars real ( qp ) :: dflag , dh11 , dh12 , dh21 , dh22 , dp1 , dp2 , dq1 , dq2 , dtemp , du , gam , gamsq , & one , rgamsq , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_qp one = 1.0_qp two = 2.0_qp gam = 409 6.0_qp gamsq = 1677721 6.0_qp rgamsq = 5.9604645e-8_qp if ( dd1 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else ! case-dd1-nonnegative dp2 = dd2 * dy1 if ( dp2 == zero ) then dflag = - two dparam ( 1 ) = dflag return end if ! regular-case.. dp1 = dd1 * dx1 dq2 = dp2 * dy1 dq1 = dp1 * dx1 if ( abs ( dq1 ) > abs ( dq2 )) then dh21 = - dy1 / dx1 dh12 = dp2 / dp1 du = one - dh12 * dh21 if ( du > zero ) then dflag = zero dd1 = dd1 / du dd2 = dd2 / du dx1 = dx1 * du else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero end if else if ( dq2 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else dflag = one dh11 = dp1 / dp2 dh22 = dx1 / dy1 du = one + dh11 * dh22 dtemp = dd2 / du dd2 = dd1 / du dd1 = dtemp dx1 = dy1 * du end if end if ! procedure..scale-check if ( dd1 /= zero ) then do while (( dd1 <= rgamsq ) . or . ( dd1 >= gamsq )) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( dd1 <= rgamsq ) then dd1 = dd1 * gam ** 2 dx1 = dx1 / gam dh11 = dh11 / gam dh12 = dh12 / gam else dd1 = dd1 / gam ** 2 dx1 = dx1 * gam dh11 = dh11 * gam dh12 = dh12 * gam end if enddo end if if ( dd2 /= zero ) then do while ( ( abs ( dd2 ) <= rgamsq ) . or . ( abs ( dd2 ) >= gamsq ) ) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( abs ( dd2 ) <= rgamsq ) then dd2 = dd2 * gam ** 2 dh21 = dh21 / gam dh22 = dh22 / gam else dd2 = dd2 / gam ** 2 dh21 = dh21 * gam dh22 = dh22 * gam end if end do end if end if if ( dflag < zero ) then dparam ( 2 ) = dh11 dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 dparam ( 5 ) = dh22 else if ( dflag == zero ) then dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 else dparam ( 2 ) = dh11 dparam ( 5 ) = dh22 end if dparam ( 1 ) = dflag return end subroutine stdlib_qrotmg pure subroutine stdlib_qsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! DSBMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_qsbmv pure subroutine stdlib_qscal ( n , da , dx , incx ) !! DSCAL: scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( inout ) :: dx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dx ( i ) = da * dx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 dx ( i ) = da * dx ( i ) dx ( i + 1 ) = da * dx ( i + 1 ) dx ( i + 2 ) = da * dx ( i + 2 ) dx ( i + 3 ) = da * dx ( i + 3 ) dx ( i + 4 ) = da * dx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dx ( i ) = da * dx ( i ) end do end if return end subroutine stdlib_qscal pure real ( qp ) function stdlib_qsdot ( n , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! DSDOT: = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: sx ( * ), sy ( * ) ! authors: ! ======== ! lawson, c. l., (jpl), hanson, r. j., (snla), ! kincaid, d. r., (u. of texas), krogh, f. t., (jpl) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real stdlib_qsdot = zero if ( n <= 0 ) return if ( incx == incy . and . incx > 0 ) then ! code for equal, positive, non-unit increments. ns = n * incx do i = 1 , ns , incx stdlib_qsdot = stdlib_qsdot + real ( sx ( i ), KIND = qp ) * real ( sy ( i ), KIND = qp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n stdlib_qsdot = stdlib_qsdot + real ( sx ( kx ), KIND = qp ) * real ( sy ( ky ), KIND = qp ) kx = kx + incx ky = ky + incy end do end if return end function stdlib_qsdot pure subroutine stdlib_qspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! DSPMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( in ) :: ap ( * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_qspmv pure subroutine stdlib_qspr ( uplo , n , alpha , x , incx , ap ) !! DSPR: performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: ap ( * ) real ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_qspr pure subroutine stdlib_qspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! DSPR2: performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: ap ( * ) real ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_qspr2 pure subroutine stdlib_qswap ( n , dx , incx , dy , incy ) !! DSWAP: interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp dtemp = dx ( i + 1 ) dx ( i + 1 ) = dy ( i + 1 ) dy ( i + 1 ) = dtemp dtemp = dx ( i + 2 ) dx ( i + 2 ) = dy ( i + 2 ) dy ( i + 2 ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dx ( ix ) dx ( ix ) = dy ( iy ) dy ( iy ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qswap pure subroutine stdlib_qsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYMM: performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_qsymm pure subroutine stdlib_qsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! DSYMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_qsymv pure subroutine stdlib_qsyr ( uplo , n , alpha , x , incx , a , lda ) !! DSYR: performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: a ( lda , * ) real ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_qsyr pure subroutine stdlib_qsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! DSYR2: performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: a ( lda , * ) real ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_qsyr2 pure subroutine stdlib_qsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYR2K: performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_qsyr2k pure subroutine stdlib_qsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! DSYRK: performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_qsyrk pure subroutine stdlib_qtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_qtbmv pure subroutine stdlib_qtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_qtbsv pure subroutine stdlib_qtpmv ( uplo , trans , diag , n , ap , x , incx ) !! DTPMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: ap ( * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_qtpmv pure subroutine stdlib_qtpsv ( uplo , trans , diag , n , ap , x , incx ) !! DTPSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: ap ( * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_qtpsv pure subroutine stdlib_qtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRMM: performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_qtrmm pure subroutine stdlib_qtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_qtrmv pure subroutine stdlib_qtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRSM: solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_qtrsm pure subroutine stdlib_qtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_qtrsv pure real ( qp ) function stdlib_qzasum ( n , zx , incx ) !! DZASUM: takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a quad precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: stemp integer ( ilp ) :: i , nincx stdlib_qzasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + stdlib_qcabs1 ( zx ( i )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + stdlib_qcabs1 ( zx ( i )) end do end if stdlib_qzasum = stemp return end function stdlib_qzasum pure function stdlib_qznrm2 ( n , x , incx ) !! DZNRM2: returns the euclidean norm of a vector via the function !! name, so that !! DZNRM2 := sqrt( x**H*x ) real ( qp ) :: stdlib_qznrm2 ! -- reference blas level1 routine (version 3.9.1_qp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._qp ) real ( qp ), parameter :: maxn = huge ( 0.0_qp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( qp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_qznrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = qp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_qznrm2 = scl * sqrt ( sumsq ) return end function stdlib_qznrm2 end module stdlib_linalg_blas_q #:endif","tags":"","loc":"sourcefile/stdlib_linalg_blas_q.fypp.html"},{"title":"stdlib_stats_moment_mask.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment_mask use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ ${ t1 }$ , allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ n = real ( count ( mask , dim ), ${ k1 }$ ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + merge ( ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - & center ) ** order ,& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do else allocate ( mean_ , source = mean ( x , ${ fi }$ , mask )) do i = 1 , size ( x , ${ fi }$ ) res = res + merge ( ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean_ ) ** order ,& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ real ( dp ), allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ n = real ( count ( mask , dim ), dp ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + merge (( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - & center ) ** order ,& 0._dp , mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do else allocate ( mean_ , source = mean ( x , ${ fi }$ , mask )) do i = 1 , size ( x , ${ fi }$ ) res = res + merge (( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean_ )& ** order ,& 0._dp , mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment_mask.fypp.html"},{"title":"stdlib_string_type.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" !> Implementation of a string type to hold an arbitrary sequence of characters. !> !> This module provides string type compatible with all Fortran instrinsic character !> procedures as well as overloaded operators for working with character variables. !> !> A string type can be easily constructed by creating a new instance from a !> character variable or literal by invoking its constructor or by assigning it !> to a string type. Generally, the string type behaves similar to a deferred !> length character in most regards but adds memory access safety. !> !> The specification of this module is available [here](../page/specs/stdlib_string_type.html). module stdlib_string_type use stdlib_ascii , only : to_lower_ => to_lower , to_upper_ => to_upper , & & to_title_ => to_title , to_sentence_ => to_sentence , reverse_ => reverse use stdlib_kinds , only : int8 , int16 , int32 , int64 , lk , c_bool use stdlib_optval , only : optval implicit none private public :: string_type public :: len , len_trim , trim , index , scan , verify , repeat , adjustr , adjustl public :: lgt , lge , llt , lle , char , ichar , iachar public :: to_lower , to_upper , to_title , to_sentence , reverse , move public :: assignment ( = ) public :: operator ( > ), operator ( >= ), operator ( < ), operator ( <= ) public :: operator ( == ), operator ( /= ), operator ( // ) public :: write ( formatted ), write ( unformatted ) public :: read ( formatted ), read ( unformatted ) integer , parameter :: long = selected_int_kind ( 18 ) !> String type holding an arbitrary sequence of characters. type :: string_type ! Use the sequence statement below as a hack to prevent extending this type. ! It is not used for storage association. sequence private character ( len = :), allocatable :: raw end type string_type !> Returns the length of the character sequence represented by the string. !> !> This method is elemental and returns a default integer scalar value. interface len module procedure :: len_string end interface len !> Constructor for new string instances interface string_type elemental module function new_string ( string ) result ( new ) character ( len =* ), intent ( in ), optional :: string type ( string_type ) :: new end function new_string # : for kind in INT_KINDS elemental module function new_string_from_integer_$ { kind }$ ( val ) result ( new ) integer ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new end function new_string_from_integer_$ { kind }$ # : endfor # : for kind in LOG_KINDS elemental module function new_string_from_logical_$ { kind }$ ( val ) result ( new ) logical ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new end function new_string_from_logical_$ { kind }$ # : endfor end interface string_type !> Returns the length of the character sequence without trailing spaces !> represented by the string. !> !> This method is elemental and returns a default integer scalar value. interface len_trim module procedure :: len_trim_string end interface len_trim !> Returns the character sequence hold by the string without trailing spaces. !> !> This method is elemental and returns a scalar character value. interface trim module procedure :: trim_string end interface trim !> Left-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. !> !> This method is elemental and returns a scalar character value. interface adjustl module procedure :: adjustl_string end interface adjustl !> Right-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. !> !> This method is elemental and returns a scalar character value. interface adjustr module procedure :: adjustr_string end interface adjustr !> Repeats the character sequence hold by the string by the number of !> specified copies. !> !> This method is elemental and returns a scalar character value. interface repeat module procedure :: repeat_string end interface repeat !> Returns the lowercase version of the character sequence hold by the input string !> !> This method is Elemental and returns a new string_type instance which holds this !> lowercase character sequence interface to_lower module procedure :: to_lower_string end interface to_lower !> Returns the uppercase version of the character sequence hold by the input string !> !> This method is Elemental and returns a new string_type instance which holds this !> uppercase character sequence interface to_upper module procedure :: to_upper_string end interface to_upper !> Returns the titlecase version of the character sequence hold by the input string !> !> This method is Elemental and returns a new string_type instance which holds this !> titlecase character sequence interface to_title module procedure :: to_title_string end interface to_title !> Returns the sentencecase version of the character sequence hold by the input string !> !> This method is elemental and returns a new string_type instance which holds this !> sentencecase character sequence interface to_sentence module procedure :: to_sentence_string end interface to_sentence !> Reverses the character sequence hold by the input string !> !> This method is elemental and returns a new string_type instance which holds this !> reverse character sequence interface reverse module procedure :: reverse_string end interface reverse !> Return the character sequence represented by the string. !> !> This method is elemental and returns a scalar character value. interface char module procedure :: char_string module procedure :: char_string_pos module procedure :: char_string_range end interface char !> Character-to-integer conversion function. !> !> This method is elemental and returns a default integer scalar value. interface ichar module procedure :: ichar_string end interface ichar !> Code in ASCII collating sequence. !> !> This method is elemental and returns a default integer scalar value. interface iachar module procedure :: iachar_string end interface iachar !> Position of a *substring* within a *string*. !> !> Returns the position of the start of the leftmost or rightmost occurrence !> of string *substring* in *string*, counting from one. If *substring* is not !> present in *string*, zero is returned. !> !> This method is elemental and returns a default integer scalar value. interface index module procedure :: index_string_string module procedure :: index_string_char module procedure :: index_char_string end interface index !> Scan a *string* for the presence of a *set* of characters. Scans a *string* for !> any of the characters in a *set* of characters. !> !> If *back* is either absent or *false*, this function returns the position !> of the leftmost character of *string* that is in *set*. If *back* is *true*, !> the rightmost position is returned. If no character of *set* is found in !> *string*, the result is zero. !> !> This method is elemental and returns a default integer scalar value. interface scan module procedure :: scan_string_string module procedure :: scan_string_char module procedure :: scan_char_string end interface scan !> 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. !> !> If *back* is either absent or *false*, this function returns the position !> of the leftmost character of *string* that is not in *set*. If *back* is *true*, !> the rightmost position is returned. If all characters of *string* are found !> in *set*, the result is zero. !> !> This method is elemental and returns a default integer scalar value. interface verify module procedure :: verify_string_string module procedure :: verify_string_char module procedure :: verify_char_string end interface verify !> Version: experimental !> !> Moves the allocated character scalar from 'from' to 'to' !> [Specifications](../page/specs/stdlib_string_type.html#move) interface move module procedure :: move_string_string module procedure :: move_string_char module procedure :: move_char_string module procedure :: move_char_char end interface move !> 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. !> !> This method is elemental and returns a default logical scalar value. interface lgt module procedure :: lgt_string_string module procedure :: lgt_string_char module procedure :: lgt_char_string end interface lgt !> 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. !> !> This method is elemental and returns a default logical scalar value. interface llt module procedure :: llt_string_string module procedure :: llt_string_char module procedure :: llt_char_string end interface llt !> 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. !> !> This method is elemental and returns a default logical scalar value. interface lge module procedure :: lge_string_string module procedure :: lge_string_char module procedure :: lge_char_string end interface lge !> 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. !> !> This method is elemental and returns a default logical scalar value. interface lle module procedure :: lle_string_string module procedure :: lle_string_char module procedure :: lle_char_string end interface lle !> Assign a character sequence to a string. interface assignment ( = ) module procedure :: assign_string_char end interface assignment ( = ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( > ) module procedure :: gt_string_string module procedure :: gt_string_char module procedure :: gt_char_string end interface operator ( > ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( < ) module procedure :: lt_string_string module procedure :: lt_string_char module procedure :: lt_char_string end interface operator ( < ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( >= ) module procedure :: ge_string_string module procedure :: ge_string_char module procedure :: ge_char_string end interface operator ( >= ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( <= ) module procedure :: le_string_string module procedure :: le_string_char module procedure :: le_char_string end interface operator ( <= ) !> Compare two character sequences for equality, the left-hand side, !> the right-hand side or both character sequences can be represented by !> a string. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( == ) module procedure :: eq_string_string module procedure :: eq_string_char module procedure :: eq_char_string end interface operator ( == ) !> Compare two character sequences for inequality, the left-hand side, !> the right-hand side or both character sequences can be represented by !> a string. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( /= ) module procedure :: ne_string_string module procedure :: ne_string_char module procedure :: ne_char_string end interface operator ( /= ) !> Concatenate two character sequences, the left-hand side, the right-hand side !> or both character sequences can be represented by a string. !> !> This operator is elemental and returns a scalar character value. interface operator ( // ) module procedure :: concat_string_string module procedure :: concat_string_char module procedure :: concat_char_string end interface operator ( // ) !> Write the character sequence hold by the string to a connected formatted !> unit. interface write ( formatted ) module procedure :: write_formatted end interface !> Write the character sequence hold by the string to a connected unformatted !> unit. interface write ( unformatted ) module procedure :: write_unformatted end interface !> Read a character sequence from a connected unformatted unit into the string. interface read ( formatted ) module procedure :: read_formatted end interface !> Read a character sequence from a connected unformatted unit into the string. interface read ( unformatted ) module procedure :: read_unformatted end interface contains !> Assign a character sequence to a string. elemental subroutine assign_string_char ( lhs , rhs ) type ( string_type ), intent ( inout ) :: lhs character ( len =* ), intent ( in ) :: rhs lhs % raw = rhs end subroutine assign_string_char !> Returns the length of the character sequence represented by the string. elemental function len_string ( string ) result ( length ) type ( string_type ), intent ( in ) :: string integer :: length if ( allocated ( string % raw )) then length = len ( string % raw ) else length = 0 end if end function len_string !> Returns the length of the character sequence without trailing spaces !> represented by the string. elemental function len_trim_string ( string ) result ( length ) type ( string_type ), intent ( in ) :: string integer :: length length = merge ( len_trim ( string % raw ), 0 , allocated ( string % raw )) end function len_trim_string !> Character-to-integer conversion function. elemental function ichar_string ( string ) result ( ich ) type ( string_type ), intent ( in ) :: string integer :: ich if ( allocated ( string % raw ) . and . len ( string ) > 0 ) then ich = ichar ( string % raw ( 1 : 1 )) else ich = 0 end if end function ichar_string !> Code in ASCII collating sequence. elemental function iachar_string ( string ) result ( ich ) type ( string_type ), intent ( in ) :: string integer :: ich if ( allocated ( string % raw ) . and . len ( string ) > 0 ) then ich = iachar ( string % raw ( 1 : 1 )) else ich = 0 end if end function iachar_string !> Return the character sequence represented by the string. pure function char_string ( string ) result ( character_string ) type ( string_type ), intent ( in ) :: string character ( len = len ( string )) :: character_string character_string = maybe ( string ) end function char_string !> Return the character sequence represented by the string. elemental function char_string_pos ( string , pos ) result ( character_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: pos character ( len = 1 ) :: character_string character_string = merge ( string % raw ( pos : pos ), ' ' , allocated ( string % raw )) end function char_string_pos !> Return the character sequence represented by the string. pure function char_string_range ( string , start , last ) result ( character_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: start integer , intent ( in ) :: last character ( len = last - start + 1 ) :: character_string character_string = merge ( string % raw ( int ( start , long ): int ( last , long )), & repeat ( ' ' , int ( len ( character_string ), long )), allocated ( string % raw )) end function char_string_range !> Returns the character sequence hold by the string without trailing spaces. elemental function trim_string ( string ) result ( trimmed_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: trimmed_string trimmed_string = trim ( maybe ( string )) end function trim_string !> Left-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. elemental function adjustl_string ( string ) result ( adjusted_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: adjusted_string adjusted_string = adjustl ( maybe ( string )) end function adjustl_string !> Right-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. elemental function adjustr_string ( string ) result ( adjusted_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: adjusted_string adjusted_string = adjustr ( maybe ( string )) end function adjustr_string !> Repeats the character sequence hold by the string by the number of !> specified copies. elemental function repeat_string ( string , ncopies ) result ( repeated_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: ncopies type ( string_type ) :: repeated_string repeated_string = repeat ( maybe ( string ), ncopies ) end function repeat_string !> Convert the character sequence hold by the input string to lower case elemental function to_lower_string ( string ) result ( lowercase_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: lowercase_string lowercase_string % raw = to_lower_ ( maybe ( string )) end function to_lower_string !> Convert the character sequence hold by the input string to upper case elemental function to_upper_string ( string ) result ( uppercase_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: uppercase_string uppercase_string % raw = to_upper_ ( maybe ( string )) end function to_upper_string !> Convert the character sequence hold by the input string to title case elemental function to_title_string ( string ) result ( titlecase_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: titlecase_string titlecase_string % raw = to_title_ ( maybe ( string )) end function to_title_string !> Convert the character sequence hold by the input string to sentence case elemental function to_sentence_string ( string ) result ( sentence_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: sentence_string sentence_string % raw = to_sentence_ ( maybe ( string )) end function to_sentence_string !> Reverse the character sequence hold by the input string elemental function reverse_string ( string ) result ( reversed_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: reversed_string reversed_string % raw = reverse_ ( maybe ( string )) end function reverse_string !> Position of a sequence of character within a character sequence. !> In this version both character sequences are represented by a string. elemental function index_string_string ( string , substring , back ) result ( pos ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical , intent ( in ), optional :: back integer :: pos pos = index ( maybe ( string ), maybe ( substring ), optval ( back , . false .)) end function index_string_string !> Position of a sequence of character within a character sequence. !> In this version the main character sequence is represented by a string. elemental function index_string_char ( string , substring , back ) result ( pos ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical , intent ( in ), optional :: back integer :: pos pos = index ( maybe ( string ), substring , optval ( back , . false .)) end function index_string_char !> Position of a sequence of character within a character sequence. !> In this version the sub character sequence is represented by a string. elemental function index_char_string ( string , substring , back ) result ( pos ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical , intent ( in ), optional :: back integer :: pos pos = index ( string , maybe ( substring ), optval ( back , . false .)) end function index_char_string !> 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. elemental function scan_string_string ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = scan ( maybe ( string ), maybe ( set ), optval ( back , . false .)) end function scan_string_string !> 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. elemental function scan_string_char ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = scan ( maybe ( string ), set , optval ( back , . false .)) end function scan_string_char !> 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. elemental function scan_char_string ( string , set , back ) result ( pos ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = scan ( string , maybe ( set ), optval ( back , . false .)) end function scan_char_string !> 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. elemental function verify_string_string ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = verify ( maybe ( string ), maybe ( set ), optval ( back , . false .)) end function verify_string_string !> 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. elemental function verify_string_char ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = verify ( maybe ( string ), set , optval ( back , . false .)) end function verify_string_char !> 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. elemental function verify_char_string ( string , set , back ) result ( pos ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = verify ( string , maybe ( set ), optval ( back , . false .)) end function verify_char_string !> Moves the allocated character scalar from 'from' to 'to' !> No output elemental subroutine move_string_string ( from , to ) type ( string_type ), intent ( inout ), target :: from type ( string_type ), intent ( inout ), target :: to type ( string_type ), pointer :: fromp fromp => from if ( associated ( fromp , to )) return call move_alloc ( from % raw , to % raw ) end subroutine move_string_string !> Moves the allocated character scalar from 'from' to 'to' !> No output pure subroutine move_string_char ( from , to ) type ( string_type ), intent ( inout ) :: from character ( len = :), intent ( out ), allocatable :: to call move_alloc ( from % raw , to ) end subroutine move_string_char !> Moves the allocated character scalar from 'from' to 'to' !> No output pure subroutine move_char_string ( from , to ) character ( len = :), intent ( inout ), allocatable :: from type ( string_type ), intent ( out ) :: to call move_alloc ( from , to % raw ) end subroutine move_char_string !> Moves the allocated character scalar from 'from' to 'to' !> No output pure subroutine move_char_char ( from , to ) character ( len = :), intent ( inout ), allocatable :: from character ( len = :), intent ( out ), allocatable :: to call move_alloc ( from , to ) end subroutine move_char_char !> Compare two character sequences for being greater. !> In this version both character sequences are by a string. elemental function gt_string_string ( lhs , rhs ) result ( is_gt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_gt is_gt = maybe ( lhs ) > maybe ( rhs ) end function gt_string_string !> Compare two character sequences for being greater. !> In this version the left-hand side character sequences is by a string. elemental function gt_string_char ( lhs , rhs ) result ( is_gt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_gt is_gt = maybe ( lhs ) > rhs end function gt_string_char !> Compare two character sequences for being greater. !> In this version the right-hand side character sequences is by a string. elemental function gt_char_string ( lhs , rhs ) result ( is_gt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_gt is_gt = lhs > maybe ( rhs ) end function gt_char_string !> Compare two character sequences for being less. !> In this version both character sequences are by a string. elemental function lt_string_string ( lhs , rhs ) result ( is_lt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lt is_lt = rhs > lhs end function lt_string_string !> Compare two character sequences for being less. !> In this version the left-hand side character sequences is by a string. elemental function lt_string_char ( lhs , rhs ) result ( is_lt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lt is_lt = rhs > lhs end function lt_string_char !> Compare two character sequences for being less. !> In this version the right-hand side character sequences is by a string. elemental function lt_char_string ( lhs , rhs ) result ( is_lt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lt is_lt = rhs > lhs end function lt_char_string !> Compare two character sequences for being greater or equal. !> In this version both character sequences are by a string. elemental function ge_string_string ( lhs , rhs ) result ( is_ge ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ge is_ge = . not . ( rhs > lhs ) end function ge_string_string !> Compare two character sequences for being greater or equal. !> In this version the left-hand side character sequences is by a string. elemental function ge_string_char ( lhs , rhs ) result ( is_ge ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_ge is_ge = . not . ( rhs > lhs ) end function ge_string_char !> Compare two character sequences for being greater or equal !> In this version the right-hand side character sequences is by a string. elemental function ge_char_string ( lhs , rhs ) result ( is_ge ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ge is_ge = . not . ( rhs > lhs ) end function ge_char_string !> Compare two character sequences for being less or equal. !> In this version both character sequences are by a string. elemental function le_string_string ( lhs , rhs ) result ( is_le ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_le is_le = . not . ( lhs > rhs ) end function le_string_string !> Compare two character sequences for being less or equal. !> In this version the left-hand side character sequences is by a string. elemental function le_string_char ( lhs , rhs ) result ( is_le ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_le is_le = . not . ( lhs > rhs ) end function le_string_char !> Compare two character sequences for being less or equal !> In this version the right-hand side character sequences is by a string. elemental function le_char_string ( lhs , rhs ) result ( is_le ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_le is_le = . not . ( lhs > rhs ) end function le_char_string !> Compare two character sequences for equality. !> In this version both character sequences are by a string. elemental function eq_string_string ( lhs , rhs ) result ( is_eq ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_eq is_eq = . not .( lhs > rhs ) if ( is_eq ) then is_eq = . not .( rhs > lhs ) end if end function eq_string_string !> Compare two character sequences for equality. !> In this version the left-hand side character sequences is by a string. elemental function eq_string_char ( lhs , rhs ) result ( is_eq ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_eq is_eq = . not .( lhs > rhs ) if ( is_eq ) then is_eq = . not .( rhs > lhs ) end if end function eq_string_char !> Compare two character sequences for equality. !> In this version the right-hand side character sequences is by a string. elemental function eq_char_string ( lhs , rhs ) result ( is_eq ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_eq is_eq = . not .( lhs > rhs ) if ( is_eq ) then is_eq = . not .( rhs > lhs ) end if end function eq_char_string !> Compare two character sequences for inequality. !> In this version both character sequences are by a string. elemental function ne_string_string ( lhs , rhs ) result ( is_ne ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ne is_ne = lhs > rhs if (. not . is_ne ) then is_ne = rhs > lhs end if end function ne_string_string !> Compare two character sequences for inequality. !> In this version the left-hand side character sequences is by a string. elemental function ne_string_char ( lhs , rhs ) result ( is_ne ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_ne is_ne = lhs > rhs if (. not . is_ne ) then is_ne = rhs > lhs end if end function ne_string_char !> Compare two character sequences for inequality. !> In this version the right-hand side character sequences is by a string. elemental function ne_char_string ( lhs , rhs ) result ( is_ne ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ne is_ne = lhs > rhs if (. not . is_ne ) then is_ne = rhs > lhs end if end function ne_char_string !> Lexically compare two character sequences for being greater. !> In this version both character sequences are by a string. elemental function lgt_string_string ( lhs , rhs ) result ( is_lgt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lgt is_lgt = lgt ( maybe ( lhs ), maybe ( rhs )) end function lgt_string_string !> Lexically compare two character sequences for being greater. !> In this version the left-hand side character sequences is by a string. elemental function lgt_string_char ( lhs , rhs ) result ( is_lgt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lgt is_lgt = lgt ( maybe ( lhs ), rhs ) end function lgt_string_char !> Lexically compare two character sequences for being greater. !> In this version the right-hand side character sequences is by a string. elemental function lgt_char_string ( lhs , rhs ) result ( is_lgt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lgt is_lgt = lgt ( lhs , maybe ( rhs )) end function lgt_char_string !> Lexically compare two character sequences for being less. !> In this version both character sequences are by a string. elemental function llt_string_string ( lhs , rhs ) result ( is_llt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_llt is_llt = llt ( maybe ( lhs ), maybe ( rhs )) end function llt_string_string !> Lexically compare two character sequences for being less. !> In this version the left-hand side character sequences is by a string. elemental function llt_string_char ( lhs , rhs ) result ( is_llt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_llt is_llt = llt ( maybe ( lhs ), rhs ) end function llt_string_char !> Lexically compare two character sequences for being less. !> In this version the right-hand side character sequences is by a string. elemental function llt_char_string ( lhs , rhs ) result ( is_llt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_llt is_llt = llt ( lhs , maybe ( rhs )) end function llt_char_string !> Lexically compare two character sequences for being greater or equal. !> In this version both character sequences are by a string. elemental function lge_string_string ( lhs , rhs ) result ( is_lge ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lge is_lge = lge ( maybe ( lhs ), maybe ( rhs )) end function lge_string_string !> Lexically compare two character sequences for being greater or equal. !> In this version the left-hand side character sequences is by a string. elemental function lge_string_char ( lhs , rhs ) result ( is_lge ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lge is_lge = lge ( maybe ( lhs ), rhs ) end function lge_string_char !> Lexically compare two character sequences for being greater or equal !> In this version the right-hand side character sequences is by a string. elemental function lge_char_string ( lhs , rhs ) result ( is_lge ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lge is_lge = lge ( lhs , maybe ( rhs )) end function lge_char_string !> Lexically compare two character sequences for being less or equal. !> In this version both character sequences are by a string. elemental function lle_string_string ( lhs , rhs ) result ( is_lle ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lle is_lle = lle ( maybe ( lhs ), maybe ( rhs )) end function lle_string_string !> Lexically compare two character sequences for being less or equal. !> In this version the left-hand side character sequences is by a string. elemental function lle_string_char ( lhs , rhs ) result ( is_lle ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lle is_lle = lle ( maybe ( lhs ), rhs ) end function lle_string_char !> Lexically compare two character sequences for being less or equal !> In this version the right-hand side character sequences is by a string. elemental function lle_char_string ( lhs , rhs ) result ( is_lle ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lle is_lle = lle ( lhs , maybe ( rhs )) end function lle_char_string !> Concatenate two character sequences. !> In this version both character sequences are by a string. elemental function concat_string_string ( lhs , rhs ) result ( string ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs type ( string_type ) :: string string % raw = maybe ( lhs ) // maybe ( rhs ) end function concat_string_string !> Concatenate two character sequences. !> In this version the left-hand side character sequences is by a string. elemental function concat_string_char ( lhs , rhs ) result ( string ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs type ( string_type ) :: string string % raw = maybe ( lhs ) // rhs end function concat_string_char !> Concatenate two character sequences. !> In this version the right-hand side character sequences is by a string. elemental function concat_char_string ( lhs , rhs ) result ( string ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs type ( string_type ) :: string string % raw = lhs // maybe ( rhs ) end function concat_char_string !> Write the character sequence hold by the string to a connected unformatted !> unit. subroutine write_unformatted ( string , unit , iostat , iomsg ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: unit integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg write ( unit , iostat = iostat , iomsg = iomsg ) int ( len ( string ), long ) if ( iostat == 0 ) then write ( unit , iostat = iostat , iomsg = iomsg ) maybe ( string ) end if end subroutine write_unformatted !> Write the character sequence hold by the string to a connected formatted !> unit. subroutine write_formatted ( string , unit , iotype , v_list , iostat , iomsg ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: unit character ( len =* ), intent ( in ) :: iotype integer , intent ( in ) :: v_list (:) integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg select case ( iotype ) case ( \"LISTDIRECTED\" ) write ( unit , '(a)' , iostat = iostat , iomsg = iomsg ) maybe ( string ) case ( \"NAMELIST\" ) error stop \"[Fatal] This implementation does not support namelist output\" case default ! DT* select case ( size ( v_list )) case ( 0 ) ! DT write ( unit , '(a)' , iostat = iostat , iomsg = iomsg ) maybe ( string ) case default error stop \"[Fatal] This implementation does not support v_list formatters\" end select end select end subroutine write_formatted !> Read a character sequence from a connected unformatted unit into the string. subroutine read_unformatted ( string , unit , iostat , iomsg ) type ( string_type ), intent ( inout ) :: string integer , intent ( in ) :: unit integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg character ( len = :), allocatable :: buffer integer ( long ) :: chunk read ( unit , iostat = iostat , iomsg = iomsg ) chunk if ( iostat == 0 ) then allocate ( character ( len = chunk ) :: buffer ) read ( unit , iostat = iostat , iomsg = iomsg ) buffer string % raw = buffer end if end subroutine read_unformatted !> Read a character sequence from a connected formatted unit into the string. subroutine read_formatted ( string , unit , iotype , v_list , iostat , iomsg ) type ( string_type ), intent ( inout ) :: string integer , intent ( in ) :: unit character ( len =* ), intent ( in ) :: iotype integer , intent ( in ) :: v_list (:) integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg character ( len = :), allocatable :: line call unused_dummy_argument ( v_list ) select case ( iotype ) case ( \"LISTDIRECTED\" ) call read_line ( unit , line , iostat , iomsg ) case ( \"NAMELIST\" ) error stop \"[Fatal] This implementation does not support namelist input\" case default ! DT* error stop \"[Fatal] This implementation does not support dt formatters\" end select string % raw = line contains !> Internal routine to read a whole record from a formatted unit subroutine read_line ( unit , line , iostat , iomsg ) integer , intent ( in ) :: unit character ( len = :), allocatable , intent ( out ) :: line integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg integer , parameter :: buffer_size = 512 character ( len = buffer_size ) :: buffer integer :: chunk line = '' do read ( unit , '(a)' , iostat = iostat , iomsg = iomsg , size = chunk , advance = 'no' ) & buffer if ( iostat > 0 ) exit line = line // buffer (: chunk ) if ( iostat < 0 ) exit end do if ( is_iostat_eor ( iostat )) then iostat = 0 end if end subroutine read_line end subroutine read_formatted !> Do nothing but mark an unused dummy argument as such to acknowledge compile !> time warning like: !> !> Warning: Unused dummy argument ‘dummy’ at (1) [-Wunused-dummy-argument] !> !> We deeply trust in the compiler to inline and optimize this piece of code away. elemental subroutine unused_dummy_argument ( dummy ) class ( * ), intent ( in ) :: dummy associate ( dummy => dummy ); end associate end subroutine unused_dummy_argument !> Safely return the character sequences represented by the string pure function maybe ( string ) result ( maybe_string ) type ( string_type ), intent ( in ) :: string character ( len = len ( string )) :: maybe_string if ( allocated ( string % raw )) then maybe_string = string % raw else maybe_string = '' end if end function maybe end module stdlib_string_type","tags":"","loc":"sourcefile/stdlib_string_type.fypp.html"},{"title":"stdlib_quadrature_simps.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_quadrature ) stdlib_quadrature_simps use stdlib_error , only : check implicit none ! internal use only interface simps38 # : for k1 , t1 in REAL_KINDS_TYPES module procedure simps38_dx_$ { k1 }$ module procedure simps38_x_$ { k1 }$ # : endfor end interface simps38 ! internal use only interface simps38_weights # : for k1 , t1 in REAL_KINDS_TYPES module procedure simps38_weights_$ { k1 }$ # : endfor end interface simps38_weights contains #:for k1, t1 in REAL_KINDS_TYPES pure recursive module function simps_dx_$ { k1 }$ ( y , dx , even ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , intent ( in ) :: dx integer , intent ( in ), optional :: even ${ t1 }$ :: integral integer :: n n = size ( y ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ k1 }$ case ( 2 ) integral = 0.5 _${ k1 }$ * dx * ( y ( 1 ) + y ( 2 )) case ( 3 ) integral = dx / 3.0 _${ k1 }$ * ( y ( 1 ) + 4 * y ( 2 ) + y ( 3 )) case ( 4 ) integral = simps38 ( y , dx ) ! case (5) not needed; handled by default case ( 6 ) ! needs special handling because of averaged 3/8's rule case if ( present ( even )) then if ( even < 0 ) then ! 3/8 rule on left integral = simps38 ( y ( 1 : 4 ), dx ) + simps ( y ( 4 : 6 ), dx ) return else if ( even > 0 ) then ! 3/8 rule on right integral = simps ( y ( 1 : 3 ), dx ) + simps38 ( y ( 3 : 6 ), dx ) return else ! fall through end if end if ! either `even` not present or is zero ! equivalent to averaging left and right integral = dx / 4 8.0 _${ k1 }$ * ( 17 * ( y ( 1 ) + y ( 6 )) + 59 * ( y ( 2 ) + y ( 5 )) + 44 * ( y ( 3 ) + y ( 4 ))) case default if ( mod ( n , 2 ) == 1 ) then integral = dx / 3.0 _${ k1 }$ * ( y ( 1 ) + 4 * sum ( y ( 2 : n - 1 : 2 )) + 2 * sum ( y ( 3 : n - 2 : 2 )) + y ( n )) else if ( present ( even )) then if ( even < 0 ) then ! 3/8th rule on left integral = simps38 ( y ( 1 : 4 ), dx ) + simps ( y ( 4 : n ), dx ) return else if ( even > 0 ) then ! 3/8 rule on right integral = simps ( y ( 1 : n - 3 ), dx ) + simps38 ( y ( n - 3 : n ), dx ) return else ! fall through end if end if ! either `even` not present or is zero ! equivalent to averaging left and right integral = dx / 4 8.0 _${ k1 }$ * ( 17 * ( y ( 1 ) + y ( n )) + 59 * ( y ( 2 ) + y ( n - 1 )) & + 43 * ( y ( 3 ) + y ( n - 2 )) + 49 * ( y ( 4 ) + y ( n - 3 )) + 48 * sum ( y ( 5 : n - 4 ))) end if end select end function simps_dx_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES recursive module function simps_x_$ { k1 }$ ( y , x , even ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , dimension (:), intent ( in ) :: x integer , intent ( in ), optional :: even ${ t1 }$ :: integral integer :: i integer :: n ${ t1 }$ :: h1 , h2 ${ t1 }$ :: a , b , c n = size ( y ) call check ( size ( x ) == n , \"simps: Arguments `x` and `y` must be the same size.\" ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ k1 }$ case ( 2 ) integral = 0.5 _${ k1 }$ * ( x ( 2 ) - x ( 1 )) * ( y ( 1 ) + y ( 2 )) case ( 3 ) h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) a = ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) b = ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) c = ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) integral = a * y ( 1 ) + b * y ( 2 ) + c * y ( 3 ) case ( 4 ) integral = simps38 ( y , x ) ! case (6) unneeded; handled by default case default if ( mod ( n , 2 ) == 1 ) then integral = 0.0 _${ k1 }$ do i = 1 , n - 2 , 2 h1 = x ( i + 1 ) - x ( i ) h2 = x ( i + 2 ) - x ( i + 1 ) a = ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) b = ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) c = ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) integral = integral + a * y ( i ) + b * y ( i + 1 ) + c * y ( i + 2 ) end do else if ( present ( even )) then if ( even < 0 ) then ! 3/8 rule on left integral = simps38 ( y ( 1 : 4 ), x ( 1 : 4 )) + simps ( y ( 4 : n ), x ( 4 : n )) return else if ( even > 0 ) then ! 3/8 rule on right integral = simps ( y ( 1 : n - 3 ), x ( 1 : n - 3 )) + simps38 ( y ( n - 3 : n ), x ( n - 3 : n )) return else ! fall through end if end if ! either `even` not present or is zero integral = 0.5 _${ k1 }$ * ( simps38 ( y ( 1 : 4 ), x ( 1 : 4 )) + simps ( y ( 4 : n ), x ( 4 : n )) & + simps ( y ( 1 : n - 3 ), x ( 1 : n - 3 )) + simps38 ( y ( n - 3 : n ), x ( n - 3 : n )) ) end if end select end function simps_x_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES pure recursive module function simps_weights_$ { k1 }$ ( x , even ) result ( w ) ${ t1 }$ , dimension (:), intent ( in ) :: x integer , intent ( in ), optional :: even ${ t1 }$ , dimension ( size ( x )) :: w integer :: i , n ${ t1 }$ :: h1 , h2 n = size ( x ) select case ( n ) case ( 0 ) ! no action needed case ( 1 ) w ( 1 ) = 0.0 _${ k1 }$ case ( 2 ) w = 0.5 _${ k1 }$ * ( x ( 2 ) - x ( 1 )) case ( 3 ) h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) w ( 1 ) = ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) w ( 2 ) = ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) w ( 3 ) = ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) case ( 4 ) w = simps38_weights ( x ) case default if ( mod ( n , 2 ) == 1 ) then w = 0.0 _${ k1 }$ do i = 1 , n - 2 , 2 h1 = x ( i + 1 ) - x ( i ) h2 = x ( i + 2 ) - x ( i + 1 ) w ( i ) = w ( i ) + ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) w ( i + 1 ) = w ( i + 1 ) + ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) w ( i + 2 ) = w ( i + 2 ) + ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) end do else if ( present ( even )) then if ( even < 0 ) then ! 3/8 rule on left w = 0.0 _${ k1 }$ w ( 1 : 4 ) = simps38_weights ( x ( 1 : 4 )) w ( 4 : n ) = w ( 4 : n ) + simps_weights ( x ( 4 : n )) ! position 4 needs both rules return else if ( even > 0 ) then ! 3/8 rule on right w = 0.0 _${ k1 }$ w ( 1 : n - 3 ) = simps_weights ( x ( 1 : n - 3 )) w ( n - 3 : n ) = w ( n - 3 : n ) + simps38_weights ( x ( n - 3 : n )) ! position n-3 needs both rules return else ! fall through end if end if ! either `even` not present or is zero w = 0.0 _${ k1 }$ ! 3/8 rule on left w ( 1 : 4 ) = simps38_weights ( x ( 1 : 4 )) w ( 4 : n ) = w ( 4 : n ) + simps_weights ( x ( 4 : n )) ! 3/8 rule on right w ( 1 : n - 3 ) = w ( 1 : n - 3 ) + simps_weights ( x ( 1 : n - 3 )) w ( n - 3 : n ) = w ( n - 3 : n ) + simps38_weights ( x ( n - 3 : n )) ! average w = 0.5 _${ k1 }$ * w end if end select end function simps_weights_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES pure function simps38_dx_$ { k1 }$ ( y , dx ) result ( integral ) ${ t1 }$ , dimension ( 4 ), intent ( in ) :: y ${ t1 }$ , intent ( in ) :: dx ${ t1 }$ :: integral integral = 3.0 _${ k1 }$ * dx / 8.0 _${ k1 }$ * ( y ( 1 ) + y ( 4 ) + 3 * ( y ( 2 ) + y ( 3 ))) end function simps38_dx_$ { k1 }$ #:endfor #: for k1, t1 in REAL_KINDS_TYPES pure function simps38_x_$ { k1 }$ ( y , x ) result ( integral ) ${ t1 }$ , dimension ( 4 ), intent ( in ) :: y ${ t1 }$ , dimension ( 4 ), intent ( in ) :: x ${ t1 }$ :: integral ${ t1 }$ :: h1 , h2 , h3 ${ t1 }$ :: a , b , c , d h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) h3 = x ( 4 ) - x ( 3 ) a = ( h1 + h2 + h3 ) * ( 3 * h1 ** 2 + 2 * h1 * h2 - 2 * h1 * h3 - h2 ** 2 + h3 ** 2 ) / ( 12 * h1 * ( h1 + h2 )) b = ( h1 + h2 - h3 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h1 * h2 * ( h2 + h3 )) c = ( h2 + h3 - h1 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h2 * h3 * ( h1 + h2 )) d = ( h1 + h2 + h3 ) * ( 3 * h3 ** 2 + 2 * h2 * h3 - 2 * h1 * h3 - h2 ** 2 + h1 ** 2 ) / ( 12 * h3 * ( h2 + h3 )) integral = a * y ( 1 ) + b * y ( 2 ) + c * y ( 3 ) + d * y ( 4 ) end function simps38_x_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES pure function simps38_weights_$ { k1 }$ ( x ) result ( w ) ${ t1 }$ , intent ( in ) :: x ( 4 ) ${ t1 }$ :: w ( size ( x )) ${ t1 }$ :: h1 , h2 , h3 h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) h3 = x ( 4 ) - x ( 3 ) w ( 1 ) = ( h1 + h2 + h3 ) * ( 3 * h1 ** 2 + 2 * h1 * h2 - 2 * h1 * h3 - h2 ** 2 + h3 ** 2 ) / ( 12 * h1 * ( h1 + h2 )) w ( 2 ) = ( h1 + h2 - h3 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h1 * h2 * ( h2 + h3 )) w ( 3 ) = ( h2 + h3 - h1 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h2 * h3 * ( h1 + h2 )) w ( 4 ) = ( h1 + h2 + h3 ) * ( 3 * h3 ** 2 + 2 * h2 * h3 - 2 * h1 * h3 - h2 ** 2 + h1 ** 2 ) / ( 12 * h3 * ( h2 + h3 )) end function simps38_weights_$ { k1 }$ #:endfor end submodule stdlib_quadrature_simps","tags":"","loc":"sourcefile/stdlib_quadrature_simps.fypp.html"},{"title":"stdlib_specialfunctions_gamma.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set R_KINDS_TYPES = [KT for KT in REAL_KINDS_TYPES if KT[0] in [\"sp\",\"dp\"]] #:set C_KINDS_TYPES = [KT for KT in CMPLX_KINDS_TYPES if KT[0] in [\"sp\",\"dp\"]] #:set CI_KINDS_TYPES = INT_KINDS_TYPES + C_KINDS_TYPES module stdlib_specialfunctions_gamma use iso_fortran_env , only : qp => real128 use stdlib_kinds , only : sp , dp , int8 , int16 , int32 , int64 use stdlib_error , only : error_stop implicit none private integer ( int8 ), parameter :: max_fact_int8 = 6_int8 integer ( int16 ), parameter :: max_fact_int16 = 8_int16 integer ( int32 ), parameter :: max_fact_int32 = 13_int32 integer ( int64 ), parameter :: max_fact_int64 = 21_int64 # : for k1 , t1 in R_KINDS_TYPES ${ t1 }$ , parameter :: tol_$ { k1 }$ = epsilon ( 1.0 _${ k1 }$ ) # : endfor real ( qp ), parameter :: tol_qp = epsilon ( 1.0_qp ) public :: gamma , log_gamma , log_factorial public :: lower_incomplete_gamma , log_lower_incomplete_gamma public :: upper_incomplete_gamma , log_upper_incomplete_gamma public :: regularized_gamma_p , regularized_gamma_q interface gamma !! Gamma function for integer and complex numbers !! # : for k1 , t1 in CI_KINDS_TYPES module procedure gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface gamma interface log_gamma !! Logarithm of gamma function !! # : for k1 , t1 in CI_KINDS_TYPES module procedure l_gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_gamma interface log_factorial !! Logarithm of factorial n!, integer variable !! # : for k1 , t1 in INT_KINDS_TYPES module procedure l_factorial_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_factorial interface lower_incomplete_gamma !! Lower incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface lower_incomplete_gamma interface log_lower_incomplete_gamma !! Logarithm of lower incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure l_ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure l_ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_lower_incomplete_gamma interface upper_incomplete_gamma !! Upper incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface upper_incomplete_gamma interface log_upper_incomplete_gamma !! Logarithm of upper incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure l_ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure l_ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_upper_incomplete_gamma interface regularized_gamma_p !! Regularized (normalized) lower incomplete gamma function, P !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure regamma_p_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure regamma_p_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface regularized_gamma_p interface regularized_gamma_q !! Regularized (normalized) upper incomplete gamma function, Q !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure regamma_q_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure regamma_q_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface regularized_gamma_q interface gpx ! Incomplete gamma G function. ! Internal use only ! # : for k1 , t1 in R_KINDS_TYPES module procedure gpx_$ { t1 [ 0 ] }{ k1 }$ !for real p and x # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure gpx_$ { t1 [ 0 ] }{ k1 }{ k2 }$ !for integer p and real x # : endfor # : endfor end interface gpx interface l_gamma ! Logarithm of gamma with integer argument for designated output kind. ! Internal use only ! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure l_gamma_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor end interface l_gamma contains # : for k1 , t1 in INT_KINDS_TYPES impure elemental function gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ${ t1 }$ , intent ( in ) :: z ${ t1 }$ :: res , i ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ if ( z <= zero ) call error_stop ( \"Error(gamma): Gamma function argument\" & // \" must be positive integer.\" ) if ( z > max_fact_$ { k1 }$ ) call error_stop ( \"Error(gamma): Gamma function\" & // \" integer argument is greater than the upper limit from which an\" & // \" integer overflow will be generated. Suggest switch to high \" & // \" precision or convert to real data type\" ) res = one do i = one , z - one res = res * i end do end function gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in C_KINDS_TYPES # : if k1 == \"sp\" # : set k2 = \"dp\" # : elif k1 == \"dp\" # : set k2 = \"qp\" # : endif # : set t2 = \"real({})\" . format ( k2 ) impure elemental function gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ${ t1 }$ , intent ( in ) :: z ${ t1 }$ :: res integer :: i real ( ${ k1 }$ ), parameter :: zero_k1 = 0.0 _${ k1 }$ ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , half = 0.5 _${ k2 }$ , & one = 1.0 _${ k2 }$ , pi = acos ( - one ), sqpi = sqrt ( pi ) complex ( ${ k2 }$ ) :: y , x , sum # : if k1 == \"sp\" # ! for single precision input, using double precision for calculation integer , parameter :: n = 10 ${ t2 }$ , parameter :: r = 1 0.900511 _${ k2 }$ ${ t2 }$ , parameter :: d ( 0 : n ) = [ 2.48574089138753566e-5 _${ k2 }$ , & 1.05142378581721974 _${ k2 }$ , & - 3.45687097222016235 _${ k2 }$ , & 4.51227709466894824 _${ k2 }$ , & - 2.98285225323576656 _${ k2 }$ , & 1.05639711577126713 _${ k2 }$ , & - 1.95428773191645870e-1 _${ k2 }$ , & 1.70970543404441224e-2 _${ k2 }$ , & - 5.71926117404305781e-4 _${ k2 }$ , & 4.63399473359905637e-6 _${ k2 }$ , & - 2.71994908488607704e-9 _${ k2 }$ ] ! parameters from above referenced source. # : elif k1 == \"dp\" # ! for double precision input, using quadruple precision for calculation integer , parameter :: n = 24 ${ t2 }$ , parameter :: r = 2 5.617904 _${ k2 }$ ${ t2 }$ , parameter :: d ( 0 : n ) = & [ 1.0087261714899910504854136977047144166e-11 _${ k2 }$ , & 1.6339627701280724777912729825256860624 _${ k2 }$ , & - 1.4205787702221583745972794018472259342e+1 _${ k2 }$ , & 5.6689501646428786119793943350900908698e+1 _${ k2 }$ , & - 1.3766376824252176069406853670529834070e+2 _${ k2 }$ , & 2.2739972766608392140035874845640820558e+2 _${ k2 }$ , & - 2.7058382145757164380300118233258834430e+2 _${ k2 }$ , & 2.39614374587263042692333711131832094166e+2 _${ k2 }$ , & - 1.6090450559507517723393498276315290189e+2 _${ k2 }$ , & 8.27378183187161305711485619113605553100e+1 _${ k2 }$ , & - 3.2678977082742592701862249152153110206e+1 _${ k2 }$ , & 9.89018079175824824537131521501652931756 _${ k2 }$ , & - 2.2762136356329318377213053650799013041 _${ k2 }$ , & 3.93265017303573867227590563182750070164e-1 _${ k2 }$ , & - 5.0051054352146209116457193223422284239e-2 _${ k2 }$ , & 4.57142601898244576789629257292603538238e-3 _${ k2 }$ , & - 2.8922592124650765614787233510990416584e-4 _${ k2 }$ , & 1.20833375377219592849746118012697473202e-5 _${ k2 }$ , & - 3.1220812187551248389268359432609135033e-7 _${ k2 }$ , & 4.55117045361638520378367871355819524460e-9 _${ k2 }$ , & - 3.2757632817493581828033170342853173968e-11 _${ k2 }$ , & 9.49784279240135747819870224486376897253e-14 _${ k2 }$ , & - 7.9480594917454410117072562195702526836e-17 _${ k2 }$ , & 1.04692819439870077791406760109955648941e-20 _${ k2 }$ , & - 5.8990280044857540075384586350723191533e-26 _${ k2 }$ ] ! parameters from above referenced source. # : endif if ( abs ( z % im ) < tol_$ { k1 }$ ) then res = cmplx ( gamma ( z % re ), kind = ${ k1 }$ ) return end if if ( z % re < zero_k1 ) then x = cmplx ( abs ( z % re ), - z % im , kind = ${ k1 }$ ) y = x - one else y = z - one end if sum = cmplx ( d ( 0 ), kind = ${ k2 }$ ) do i = 1 , n sum = sum + d ( i ) / ( y + i ) end do y = exp (( y + half ) * log ( y + half + r ) - y ) * sum y = y * 2 / sqpi !Re(z) > 0 return if ( z % re < zero_k1 ) then y = - pi / ( sin ( pi * x ) * x * y ) !Re(z) < 0 return end if res = y end function gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES impure elemental function l_gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ! ! Logarithm of gamma function for integer input ! ${ t1 }$ , intent ( in ) :: z real :: res ${ t1 }$ :: i ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ , two = 2 _${ k1 }$ if ( z <= zero ) call error_stop ( \"Error(log_gamma): Gamma function\" & // \" argument must be positive integer.\" ) select case ( z ) case ( one ) res = 0.0 case ( two :) res = 0.0 do i = one , z - one res = res + log ( real ( i )) end do end select end function l_gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function l_gamma_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( z , x ) result ( res ) ! ! Logarithm of gamma function for integer input with defined precision output ! ${ t1 }$ , intent ( in ) :: z ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res ${ t1 }$ :: i ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ , two = 2 _${ k1 }$ ${ t2 }$ , parameter :: zero_k2 = 0.0 _${ k2 }$ if ( z <= zero ) call error_stop ( \"Error(log_gamma): Gamma function\" & // \" argument must be positive integer.\" ) select case ( z ) case ( one ) res = zero_k2 case ( two :) res = zero_k2 do i = one , z - one res = res + log ( real ( i , ${ k2 }$ )) end do end select end function l_gamma_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in C_KINDS_TYPES # : if k1 == \"sp\" # : set k2 = \"dp\" # : elif k1 == \"dp\" # : set k2 = \"qp\" # : endif # : set t2 = \"real({})\" . format ( k2 ) impure elemental function l_gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ! ! log_gamma function for any complex number, excluding negative whole number ! \"Computation of special functions\", Shanjie Zhang & Jianmin Jin, 1996, p.48 ! \"Computing the principal branch of log-gamma\", D.E.G. Hare, ! J. of Algorithms, 25(2), 1997 p. 221–236 ! ! Fortran 90 program by Jim-215-Fisher ! ${ t1 }$ , intent ( in ) :: z ${ t1 }$ :: res , z1 , z2 real ( ${ k1 }$ ) :: d integer :: m , i complex ( ${ k2 }$ ) :: zr , zr2 , sum , s real ( ${ k1 }$ ), parameter :: z_limit = 10 _${ k1 }$ , zero_k1 = 0.0 _${ k1 }$ integer , parameter :: n = 20 ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ , & pi = acos ( - one ), ln2pi = log ( 2 * pi ) ${ t2 }$ , parameter :: a ( n ) = [ & . 833333333333333333333333333333333333333 3E-1 _${ k2 }$ ,& - . 277777777777777777777777777777777777777 8E-2 _${ k2 }$ ,& . 793650793650793650793650793650793650793 7E-3 _${ k2 }$ ,& - . 595238095238095238095238095238095238095 2E-3 _${ k2 }$ ,& . 841750841750841750841750841750841750841 8E-3 _${ k2 }$ ,& - . 191752691752691752691752691752691752691 8E-2 _${ k2 }$ ,& . 641025641025641025641025641025641025641 0E-2 _${ k2 }$ ,& - . 295506535947712418300653594771241830065 4E-1 _${ k2 }$ ,& . 179644372368830573164938490015889396694 4E+0 _${ k2 }$ ,& - . 139243221690590111642743221690590111642 7E+1 _${ k2 }$ ,& . 134028640441683919944789510006901311249 1E+2 _${ k2 }$ ,& - . 156848284626002017306365132452088973828 1E+3 _${ k2 }$ ,& . 219310333333333333333333333333333333333 3E+4 _${ k2 }$ ,& - . 361087712537249893571732652192422307364 8E+5 _${ k2 }$ ,& . 691472268851313067108395250775673467553 3E+6 _${ k2 }$ ,& - . 152382215394074161922833649588867805186 6E+8 _${ k2 }$ ,& . 382900751391414141414141414141414141414 1E+9 _${ k2 }$ ,& - . 108822660357843910890151491655251053747 3E+11 _${ k2 }$ ,& . 347320283765002252252252252252252252252 3E+12 _${ k2 }$ ,& - . 123696021422692744542517103492713248810 8E+14 _${ k2 }$ ] ! parameters from above reference z2 = z if ( z % re < zero_k1 ) then z2 = cmplx ( abs ( z % re ), - z % im , kind = ${ k1 }$ ) + 1 end if d = hypot ( z2 % re , z2 % im ) z1 = z2 m = 0 if ( d <= z_limit ) then !for small |z| m = ceiling ( z_limit - d ) z1 = z2 + m end if zr = one / z1 zr2 = zr * zr sum = ((( a ( 20 ) * zr2 + a ( 19 )) * zr2 + a ( 18 )) * zr2 + a ( 17 )) * zr2 sum = ((( sum + a ( 16 )) * zr2 + a ( 15 )) * zr2 + a ( 14 )) * zr2 sum = ((( sum + a ( 13 )) * zr2 + a ( 12 )) * zr2 + a ( 11 )) * zr2 sum = ((( sum + a ( 10 )) * zr2 + a ( 9 )) * zr2 + a ( 8 )) * zr2 sum = ((( sum + a ( 7 )) * zr2 + a ( 6 )) * zr2 + a ( 5 )) * zr2 sum = ((( sum + a ( 4 )) * zr2 + a ( 3 )) * zr2 + a ( 2 )) * zr2 sum = ( sum + a ( 1 )) * zr + ln2pi / 2 - z1 + ( z1 - 0.5 _${ k2 }$ ) * log ( z1 ) if ( m /= 0 ) then s = cmplx ( zero , zero , kind = ${ k2 }$ ) do i = 1 , m s = s + log ( cmplx ( z1 , kind = ${ k2 }$ ) - i ) end do sum = sum - s end if if ( z % re < zero_k1 ) then sum = log ( pi ) - log ( sin ( pi * z )) - sum m = ceiling (( 2 * z % re - 3 ) / 4 ) sum % im = sum % im + 2 * pi * m * sign ( 1.0 _${ k1 }$ , z % im ) end if res = cmplx ( sum , kind = ${ k1 }$ ) end function l_gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES impure elemental function l_factorial_$ { t1 [ 0 ] }{ k1 }$ ( n ) result ( res ) ! ! Log(n!) ! ${ t1 }$ , intent ( in ) :: n real :: res ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ , two = 2 _${ k1 }$ real , parameter :: zero_k2 = 0.0 if ( n < zero ) call error_stop ( \"Error(l_factorial): Logarithm of\" & // \" factorial function argument must be non-negative\" ) select case ( n ) case ( zero ) res = zero_k2 case ( one ) res = zero_k2 case ( two : ) res = l_gamma ( n + 1 , 1.0D0 ) end select end function l_factorial_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in R_KINDS_TYPES # : if k1 == \"sp\" # : set k2 = \"dp\" # : elif k1 == \"dp\" # : set k2 = \"qp\" # : endif # : set t2 = \"real({})\" . format ( k2 ) impure elemental function gpx_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of incomplete gamma G function with real argument p. ! ! Based on Rémy Abergel and Lionel Moisan \"Algorithm 1006, Fast and ! Accurate Evaluation of a Generalized Incomplete Gamma Function\", ACM ! Transactions on Mathematical Software, March 2020. ! ! Fortran 90 program by Jim-215-Fisher ! ${ t1 }$ , intent ( in ) :: p , x integer :: n , m ${ t2 }$ :: res , p_lim , a , b , g , c , d , y , ss ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ ${ t2 }$ , parameter :: dm = tiny ( 1.0 _${ k2 }$ ) * 10 ** 6 ${ t1 }$ , parameter :: zero_k1 = 0.0 _${ k1 }$ if ( p <= zero_k1 ) call error_stop ( \"Error(gpx): Incomplete gamma\" & // \" function must have a positive parameter p\" ) if ( x < - 9.0 _${ k1 }$ ) then p_lim = 5.0 _${ k1 }$ * ( sqrt ( abs ( x )) - 1.0 _${ k1 }$ ) elseif ( x >= - 9.0 _${ k1 }$ . and . x <= zero_k1 ) then p_lim = zero_k1 else p_lim = x endif if ( x < zero_k1 . and . p < p_lim . and . abs ( anint ( p ) - p ) > tol_$ { k1 }$ ) & call error_stop ( \"Error(gpx): Incomplete gamma function with \" & // \"negative x must come with a whole number p not too small\" ) if ( p >= p_lim ) then !use modified Lentz method of continued fraction !for eq. (15) in the above reference. a = one b = p g = a / b c = a / dm d = one / b n = 2 do if ( mod ( n , 2 ) == 0 ) then a = ( one - p - n / 2 ) * x else a = ( n / 2 ) * x end if b = p - one + n d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else if ( x >= zero_k1 ) then !use modified Lentz method of continued !fraction for eq. (16) in the reference. a = one b = x + one - p g = a / b c = a / dm d = one / b n = 2 do a = ( n - 1 ) * ( 1 + p - n ) b = b + 2 d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else !Algorithm 2 in the reference m = nint ( ss ) a = - x c = one / a d = p - one b = c * ( a - d ) n = 1 do c = d * ( d - one ) / ( a * a ) d = d - 2 y = c * ( a - d ) b = b + y n = n + 1 if ( n > int (( p - 2 ) / 2 ) . or . y < b * tol_$ { k2 }$ ) exit end do if ( y >= b * tol_$ { k2 }$ . and . mod ( m , 2 ) /= 0 ) b = b + d * c / a g = (( - 1 ) ** m * exp ( - a + log_gamma ( p ) - ( p - 1 ) * log ( a )) + b ) / a end if res = g end function gpx_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function gpx_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) result ( res ) ! ! Approximation of incomplete gamma G function with integer argument p. ! ! Based on Rémy Abergel and Lionel Moisan \"Algorithm 1006, Fast and ! Accurate Evaluation of a Generalized Incomplete Gamma Function\", ACM ! Transactions on Mathematical Software, March 2020. ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , p_lim , a , b , g , c , d , y integer :: n , m ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ ${ t2 }$ , parameter :: dm = tiny ( 1.0 _${ k2 }$ ) * 10 ** 6 ${ t1 }$ , parameter :: zero_k1 = 0 _${ k1 }$ , two = 2 _${ k1 }$ if ( p <= zero_k1 ) call error_stop ( \"Error(gpx): Incomplete gamma \" & // \"function must have a positive parameter p\" ) if ( x < - 9.0 _${ k2 }$ ) then p_lim = 5.0 _${ k2 }$ * ( sqrt ( abs ( x )) - 1.0 _${ k2 }$ ) else if ( x >= - 9.0 _${ k2 }$ . and . x <= zero ) then p_lim = zero else p_lim = x end if if ( real ( p , ${ k2 }$ ) >= p_lim ) then a = one b = p g = a / b c = a / dm d = one / b n = 2 do if ( mod ( n , 2 ) == 0 ) then a = ( 1 - p - n / 2 ) * x else a = ( n / 2 ) * x end if b = p - 1 + n d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else if ( x >= zero ) then a = one b = x + 1 - p g = a / b c = a / dm d = one / b n = 2 do a = - ( n - 1 ) * ( n - 1 - p ) b = b + 2 d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else a = - x c = one / a d = p - 1 b = c * ( a - d ) n = 1 do c = d * ( d - one ) / ( a * a ) d = d - 2 y = c * ( a - d ) b = b + y n = n + 1 if ( int ( n , ${ k1 }$ ) > ( p - two ) / two . or . y < b * tol_$ { k2 }$ ) exit end do if ( y >= b * tol_$ { k2 }$ . and . mod ( p , two ) /= zero_k1 ) & b = b + d * c / a g = (( - 1 ) ** p * exp ( - a + l_gamma ( p , one ) - ( p - 1 ) * log ( a )) & + b ) / a end if res = g end function gpx_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function ingamma_low_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of lower incomplete gamma function with real p. ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = zero else if ( x > p ) then s1 = log_gamma ( p ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = exp ( s1 + log ( y )) else if ( x <= p . and . x > zero ) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ! ! Approximation of lower incomplete gamma function with integer p. ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = zero else if ( x > real ( p , ${ k2 }$ )) then s1 = l_gamma ( p , one ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = exp ( s1 + log ( y )) else if ( x <= real ( p , ${ k2 }$ ) . and . x > zero ) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else s1 = - x + p * log ( abs ( x )) res = gpx ( p , x ) * exp ( s1 ) res = ( - 1 ) ** p * res end if end function ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = zero else if ( x > p ) then s1 = log_gamma ( p ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = s1 + log ( y ) else if ( x <= p . and . x > zero ) then s1 = - x + p * log ( abs ( x )) res = log ( abs ( gpx ( p , x ))) + s1 else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = zero else if ( x > real ( p , ${ k2 }$ )) then s1 = l_gamma ( p , one ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = s1 + log ( y ) else if ( x <= real ( p , ${ k2 }$ )) then s1 = - x + p * log ( abs ( x )) res = log ( abs ( gpx ( p , x ))) + s1 end if end function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function ingamma_up_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of upper incomplete gamma function with real p. ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = gamma ( p ) else if ( x > p ) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else if ( x <= p . and . x > zero ) then y = log_gamma ( p ) s1 = - x + p * log ( x ) - y res = ( one - gpx ( p , x ) * exp ( s1 )) * exp ( y ) else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ! ! Approximation of upper incomplete gamma function with integer p. ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = gamma ( real ( p , ${ k2 }$ )) else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else if ( x <= real ( p , ${ k2 }$ ) . and . x > zero ) then y = l_gamma ( p , one ) s1 = - x + p * log ( x ) - y res = gpx ( p , x ) * exp ( s1 ) res = ( one - res ) * exp ( y ) else y = l_gamma ( p , one ) s1 = - x + p * log ( abs ( x )) - y res = gpx ( p , x ) * exp ( s1 ) res = ( one - ( - 1 ) ** p * res ) * exp ( y ) end if end function ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = log_gamma ( p ) else if ( x > p ) then s1 = - x + p * log ( x ) res = log ( gpx ( p , x )) + s1 else if ( x <= p . and . x > zero ) then y = log_gamma ( p ) s1 = - x + p * log ( x ) - y res = gpx ( p , x ) * exp ( s1 ) res = log ( one - res ) + y else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = l_gamma ( p , one ) else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) res = log ( gpx ( p , x )) + s1 else if ( x <= real ( p , ${ k2 }$ ) . and . x > zero ) then y = l_gamma ( p , one ) s1 = - x + p * log ( x ) - y res = gpx ( p , x ) * exp ( s1 ) res = log ( one - res ) + y else y = l_gamma ( p , one ) s1 = - x + p * log ( abs ( x )) + log ( gpx ( p , x )) res = ( - 1 ) ** p * exp ( s1 ) res = log ( abs ( exp ( y ) - res )) end if end function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function regamma_p_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplete gamma function P(p,x) for real p ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x < zero ) call error_stop ( \"Error(regamma_p): Regularized gamma_p\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = zero else if ( x > p ) then s1 = - x + p * log ( x ) - log_gamma ( p ) res = one - exp ( s1 + log ( gpx ( p , x ))) else if ( x <= p ) then s1 = - x + p * log ( abs ( x )) - log_gamma ( p ) res = exp ( log ( gpx ( p , x )) + s1 ) end if end function regamma_p_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function regamma_p_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplete gamma function P(p,x) for integer p ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x < zero ) call error_stop ( \"Error(regamma_p): Regularized gamma_p\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = zero else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) - l_gamma ( p , one ) res = one - exp ( s1 + log ( gpx ( p , x ))) else if ( x <= real ( p , ${ k2 }$ )) then s1 = - x + p * log ( abs ( x )) - l_gamma ( p , one ) res = exp ( log ( gpx ( p , x )) + s1 ) end if end function regamma_p_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function regamma_q_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplete gamma function Q(p,x) for real p ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x < zero ) call error_stop ( \"Error(regamma_p): Regularized gamma_q\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = one else if ( x > p ) then s1 = - x + p * log ( x ) - log_gamma ( p ) res = exp ( s1 + log ( gpx ( p , x ))) else if ( x <= p ) then s1 = - x + p * log ( abs ( x )) - log_gamma ( p ) res = one - exp ( log ( gpx ( p , x )) + s1 ) end if end function regamma_q_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function regamma_q_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplet gamma function Q(p,x) for integer p ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x < zero ) call error_stop ( \"Error(regamma_q): Regularized gamma_q\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = one else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) - l_gamma ( p , one ) res = exp ( log ( gpx ( p , x )) + s1 ) elseif ( x <= real ( p , ${ k2 }$ )) then s1 = - x + p * log ( abs ( x )) - l_gamma ( p , one ) res = one - exp ( s1 + log ( gpx ( p , x ))) end if end function regamma_q_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor end module stdlib_specialfunctions_gamma","tags":"","loc":"sourcefile/stdlib_specialfunctions_gamma.fypp.html"},{"title":"Contributing and specs – Fortran-lang/stdlib","text":"Warning This page is currently under construction! Todo Improve the title of this FORD \"pages\" section, and\nimprove the organization of pages\nto separate end-user, high-level documentation and examples from developer documentation and specs.","tags":"","loc":"page/index.html"},{"title":"Fortran stdlib License (MIT) – Fortran-lang/stdlib","text":"MIT License Copyright (c) 2019-2021 stdlib contributors Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","tags":"","loc":"page/License.html"},{"title":"Changelog – Fortran-lang/stdlib","text":"Version 0.6.1 Full release notes available at v0.6.1 tag. Changes to existing scripts and modules\n - changes in module stdlib_linalg_lapack - Renamed variable for compiler compliance #812 - change of the format in some example programs #813 Version 0.6.0 Full release notes available at v0.6.0 tag. new script fypp_deployment.py to support fpm in combination with fypp files #802 Changes to existing scripts and modules\n - change in module stdlib_hashmap_wrappers - addition of int32 hashmap key type #778 - changes in module stdlib_linalg - addition of the procedure det to compute determinants #798 - addition of the procedures lstsq and lstsq_space #801 #809 - addition of the procedures solve and solve_lu #806 - change in module stdlib_linalg_blas - addition of the documentation for rotm and rotmg #795 - use of macOS 12 in macOS CI #807 Changes to existing documentation\n - Improvement of the documentation linalg #797 Version 0.5.0 Full release notes available at v0.5.0 tag. new module stdlib_linalg_state #774 new derived type: linalg_state_type new procedure: linalg_error_handling Changes to existing scripts and modules\n- addition of implicit none to all example programs #780 - change in module stdlib_hashmaps - fix the procedure remove_chaining_entry #788 - change in module stdlib_linalg - addition of the BLAS/LAPACK backends and interfaces #772 - change in module stdlib_str2num - fix the procedure to_${k1}$_from_stream #789 - upgrade of the Intel-classic compiler in macOS CI #777 Changes to existing documentation\n - Improvement of the documentation #784 #781 #786 - Improvement of the support of fpm #787 #790 Version 0.4.0 Full release notes available at v0.4.0 tag. new module stdlib_str2num #743 new procedures: to_num , to_num_from_stream Changes to existing scripts and modules change in .gitignore addition of the file extensions .dat and .stream #768 addition of .gitignore to stdlib-fpm #769 change in CI/CD support of GCC 13 #737 support of Intel compiler ifx #752 change in script fpm-deployment.sh changes to facilitate fypp preprocessing for the fpm deployment #758 change in module stdlib_ascii Improved procedures to_lower and to_upper #733 change in module stdlib_bitsets initialization in bitset_type #753 improved procedure bit_count_large #756 change in module stdlib_hashmaps new procedure get_all_keys #741 new file permissions #762 change in module stdlib_math new procedure meshgrid #764 change in module stdlib_specialfunctions_gamma fix procedure gamma #730 change in module stdlib_string_type fix procedure move #736 #773 change in SpookyV2Test.cpp Fix undefined use of types #747 Changes to the existing documentation change in the specs stdlib_hashmaps Correction of an intent of the variable \"conflict\" #739 change in README.md instructions to build stdlib with fpm through the fpm-deployment.sh script #757 Version 0.3.0 Full release notes available at v0.3.0 tag. new modules stdlib_hashmap_wrappers and stdlib_hashmap #611 new procedures in stdlib_hashmap_wrappers : copy_key , copy_other , fibonacci_hash , fnv_1_hasher , fnv_1a_hasher , free_key , free_other , get , hasher_fun , operator(==) , seeded_nmhash32_hasher , seeded_nmhash32x_hasher , seeded_water_hasher , set , key_type , other_type new procedures in stdlib_hashmaps : chaining_hashmap_type , hashmap_type , `open_hashmap_type Changes to existing scripts and modules change in script doc-deployment.yml update of the script #681 change in script fpm-deployment.sh fixed a problem with dat and npy files in example dir not being deployed #713 change in module stdlib_bitsets remove define assignment for bitset_64 and bitset_large #727 change in module stdlib_hashmap_open fix access violation in a type-bound procedure of open_hashmap_type #707 change in module stdlib_io_npy_load fix various bugs #708 #711 change in module stdlib_linalg addition of kronecker_product #700 change in module stdlib_quadrature_gauss fix erroneous gaussian quadrature points in gauss_legendre #660 change in module stdlib_sorting addition of radix sort #712 support for sorting arrays of bitset_64 and of bitset_large #723 change in module stdlib_stats_distribution_exponential convert pdf_exp and cdf_exp to pure functions #717 change in module stdlib_stats_distribution_normal convert rvs_norm to an impure elemental function #665 remove unused module stdlib_error from module stdlib_stats_distribution_normal #716 remove support for manual make builds #657 Changes to the existing documentation change in README.md #656 #659 #715 #725 change in stdlib_stats_distribution_normal.md Improvement of the documentation #718 #721 change in stdlib_stats_distribution_exponential.md Improvement of the documentation #721 change in the structure of the project stdlib extraction of the demo programs from the specs in the directory example #662 move the directory src/tests to test #669 fix various docs #663 Version 0.2.1 Full release notes available at v0.2.1 tag. build system related bugfixes Version 0.2.0 Full release notes available at v0.2.0 tag. new module stdlib_hash_32bit #573 new procedures: fibonacci_hash , fnv_1_hash , fnv_1a_hash , new_nmhash32_seed , new_nmhash32x_seed , new_water_hash_seed , nmhash32 , nmhash32x , odd_random_integer , universal_mult_hash , and water_hash new module stdlib_hash_64bit #573 new procedures: fibonacci_hash , fnv_1_hash , fnv_1a_hash , new_pengy_hash_seed , new_spooky_hash_seed , odd_random_integer , pengy_hash , spooky_hash , spookyhash_128 , and universal_mult_hash new module stdlib_array #603 new procedures trueloc , falseloc new module stdlib_distribution_uniform #272 new module stdlib_selection #500 new procedures select , arg_select new module stdlib_version #579 new procedure get_stdlib_version update module stdlib_io 597 new procedure getline new module stdlib_io_npy #581 new procedures save_npy , load_npy update module stdlib_math new procedures is_close and all_close #488 new procedures arg , argd and argpi #498 new procedure diff #605 Changes to existing modules change in module stdlib_math linspace and logspace made pure #549 change in module stdlib_string_type move procedure made pure / elemental #562 support for quadruple precision made optional #565 change in module stdlib_io Modified format constants, and made public #617 change in module stdlib_math Minor update to stdlib_math module and document #624 Version 0.1.0 Full release notes available at v0.1.0 tag. new module stdlib_ascii #32 new module stdlib_bitsets #239 new derived types bitset_64 and bitset_large new abstract base class bitset_type new module stdlib_error #53 new module stdlib_io new procedures loadtxt and savetxt #23 #37 new procedure open #71 #77 new module stdlib_kinds #63 new module stdlib_linalg new procedures diag , eye and trace #170 new procedure outer_product #432 new module stdlib_logger new derived type logger_type #228 #261 new module stdlib_math new procedure clip #355 new procedures linspace and logspace #420 new procedure arange #480 new procedure gcd #539 new module stdlib_optval #73 #96 #139 new module stdlib_quadrature new procedures trapz , trapz_weights , simps and simps_weights #146 new procedures gauss_legendre , gauss_legendre_lobatto #313 new module stdlib_random #271 new module stdlib_sorting new procedures sort , ord_sort and sort_index #408 new module stdlib_specialfunctions new procedures legendre and dlegendre #313 new module stdlib_stats new procedure mean #124 #130 #132 new procedure var #144 new procedure moment #153 new procedure corr #191 new procedure median #426 new module stdlib_string_type new derived types string_type #320 new procedure move #467 new module stdlib_stringlist_type new derived types stringlist_type and stringlist_index_type #470 new module stdlib_strings new procedure to_string #444 new procedures strip and chomp #343 new procedures starts_with and ends_with #384 new procedure slice #414 new procedure find #433 new procedure replace_all #436 new procedures padl and padr #441 new procedure count #453 new module stdlib_system new procedure sleep #54","tags":"","loc":"page/changelog.html"},{"title":"Contributing – Fortran-lang/stdlib","text":"This page aims to provide information that are useful for stdlib contributors.\nIssues can be reported on GitHub .","tags":"","loc":"page/contributing/index.html"},{"title":"Contributor Code of Conduct – Fortran-lang/stdlib","text":"Contributor Covenant Code of Conduct Our Pledge In the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to make participation in our project and\nour community a harassment-free experience for everyone, regardless of age,\nbody size, disability, ethnicity, gender identity and expression, level of\nexperience, nationality, personal appearance, race, religion, or sexual\nidentity and orientation. Our Standards Examples of behavior that contributes to creating a positive environment\ninclude: Using welcoming and inclusive language Being respectful of differing viewpoints and experiences Gracefully accepting constructive criticism Focusing on what is best for the community Showing empathy towards other community members Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or\nadvances Trolling, insulting/derogatory comments, and personal or political attacks Public or private harassment Publishing others' private information, such as a physical or electronic\n address, without explicit permission Other conduct which could reasonably be considered inappropriate in a\n professional setting Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful. Scope This Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may\nbe further defined and clarified by project maintainers. Enforcement Instances of abusive, harassing or otherwise unacceptable behavior may be\nreported by contacting one of the project maintainers at caomaco@gmail.com or \nondrej@certik.us. All complaints will be reviewed and investigated and will\nresult in a response that is deemed necessary and appropriate to the\ncircumstances. The project team is obligated to maintain confidentiality with\nregard to the reporter of an incident. Further details of specific enforcement\npolicies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership. Attribution This Code of Conduct is adapted from the Contributor Covenant , version 1.4,\navailable at https://contributor-covenant.org/version/1/4","tags":"","loc":"page/contributing/CodeOfConduct.html"},{"title":"Style Guide – Fortran-lang/stdlib","text":"Note This is a living document.\nYou are welcome to propose changes to this workflow by opening an issue . Fortran stdlib Style Guide Use (modern) standard Fortran File naming conventions Indentation & whitespace Variable and procedure naming Attributes End block closing statements Document public API code with FORD Fortran stdlib Style Guide Adopting a consistent style can improve code legibility through the choice of good naming conventions.\nIn addition, style checks will be run during CI to flag any severe non-conformance.\nThis allows code review discussions to focus on semantics and substance rather than pedantry.\nConsistent whitespace usage, and not polluting line endings with trailing white space makes git diff s considerably more legible.\nThis style guide is a living document and proposed changes may be adopted after discussing them and coming to a consensus. Use (modern) standard Fortran Do not use obsolescent or deleted language features\n E.g., common , pause , entry , arithmetic if and computed goto Do not use vendor extensions in the form of non-standard syntax and vendor supplied intrinsic procedures\n E.g., real*8 or etime() File naming conventions Source files should contain at most one program , module , or submodule The filename should match the program or module name and have the file extension .f90 or .F90 if preprocessing is required If the interface and implementation is split using submodules the implementation submodule file should have the same name as the\n interface (parent) module but end in _implementation E.g., string_class.f90 and string_class_implementation.f90 Tests should be added in the test subdirectory and have the same name as the module they are testing with the test_ prefix\n added\n E.g., string_class.f90 and test/test_string_class.f90 Indentation & whitespace By setting and following a convention for indentation and whitespace, code reviews and git-diffs can\nfocus on the semantics of the proposed changes rather than style and formatting. The body of every Fortran construct should be indented by four (4) spaces Line length should be limited to 80 characters and must not exceed 132 Please do not use Tab characters for indentation Please remove trailing white space before committing code Variable and procedure naming Variable and procedure names, as well as Fortran keywords, should be written in lowercase Variable and procedure names should be made up of one or more full words separated by an underscore,\n for example has_failed is preferred over hasfailed Where conventional and appropriate shortening of a word is used then the underscore may be omitted,\n for example linspace is preferred over lin_space Attributes Always specify intent for dummy arguments. Don't use dimension attribute to declare arrays because it is more verbose.\n Use this: real, allocatable :: a(:), b(:,:) instead of: real, dimension(:), allocatable :: a real, dimension(:,:), allocatable :: b When defining many arrays of the same dimension, dimension can be used as an exception if it makes the code less verbose. If the optional attribute is used to declare a dummy argument, it should follow the intent attribute. End block closing statements Fortran allows certain block constructs or scopes to include the name of the program unit in the end statement.\nThe convention adopted herein is to include procedure names, module names and program names in the end statement,\nunless the closing statement can reasonably be expected to be on the same screen or page, within about 25 lines. Document public API code with FORD Documentation strings should be provided for all public and protected entities and their arguments or parameters.\nThis is currently accomplished using the FORD tool .\nFor help writing FORD style documentation please see the FORD wiki .\nThe following two sections are most relevant for contributing new code: Writing Documentation Documentation Meta Data Limitations To write the \"spec\" (specification) for a new proposal, please place it in the FORD \"pages\" directory at doc/specs/ .\nTo get help please see the \"Writing Pages\" and \"Writing Documentation\" pages\non the FORD wiki .","tags":"","loc":"page/contributing/StyleGuide.html"},{"title":"Workflow for Contributors – Fortran-lang/stdlib","text":"Note This is a living document.\nYou are welcome to propose changes to this workflow by opening an issue . Workflow for the Fortran stdlib contributors This document describes our current workflow. We welcome everyone and anyone to participate and propose additions to stdlib.\nIt is okay if you do not have experience for specification or implementation,\nbut have an idea for stdlib. If the idea is popular among the community, more\nexperienced contributors will help it through all 5 steps. Idea : You have an idea or a proposal. Open an issue to discuss it. This\n is on the level of \"is there interest in having image reader/writer\n functions in stdlib?\" The goal of this step is to find out if the community\n is interested in having this functionality as part of stdlib. API : When there seems to be significant interest in the proposal (vast\n majority of participants think it is a good idea), move on to discuss the\n specific API. It's OK to propose the API off the bat if you already have an\n idea for it. This step is exploratory and its goal is to find out what the\n API should look and feel like. Specification : Discuss the API and iterate. When there is vast majority\n approval for the API, move on to implement it and submit a PR. Small PRs are\n always better than large. It is OK to implement only a few functions of a\n new module, and continue work on the others in a later PR. All new\n functionality goes into an \"experimental\" namespace\n ( version: experimental ). As part of the PR, when submitting a new\n public facing API, please provide the initial draft of the specification\n document as well as the initial reference implementation of this\n specification. The specification is a document that describes the API and\n the functionality, so that anyone can use it to create an implementation\n from scratch without looking at stdlib . The stdlib library then provides\n the reference implementation. Implementation in experimental: When opening a PR, request reviews from\n one or more people that are most relevant to it. These are likely to be\n people involved in prior steps of the workflow. Other contributors (not\n explicitly invited) are encouraged to provide reviews and suggestions as\n well. Iterate until all (or most) participants are on the same page.\n A merge is permitted if there are unit tests for a majority of the possible\n calling scenarios (with or without optional arguments, with arguments that\n trigger an error) and if there is vast majority approval of the PR. Release : Moving from experimental to release. The experimental\n \"namespace\" contains new functionality together with its specification. In\n order to move from experimental to release, the specification document must\n be approved by the wide community and the standards committee (informally).\n If that happens, it has now been blessed for broad use and we can move the\n code into the main section of stdlib , and the particular specification\n document becomes part of the Fortran Standard Library. Note: the general term \"vast majority\" above means at least 80%, but ultimately\nit is left to our best judgement to ensure that the community agrees that each\nPR and proposal was approved by \"vast majority\". You are welcome to propose changes to this workflow by opening an issue . Build systems This project supports two build systems, fpm and CMake. CMake build files The build files for CMake allow both in-tree, i.e. build artifacts share\nthe same tree as the source files, and out-of-tree builds, i.e. build artifacts\nexist in a separate directory tree.\nBoth build types are explicitly supported and tested, the latter strategy\nis recommended for local development. Sources for the main library target are added in src/CMakeLists.txt relative to the library target, i.e. no absolute paths are required. To add tests, the macro ADDTEST should be used instead of the CMake function add_test , the macro hides creation of the executable target, linking against the \nmain library target and registering the test.\nThe tests themselves are defined as standalone executables in the subdirectories\nin test , a new subdirectory with tests has to be registered in test/CMakeLists.txt . The source tree should be considered read-only. References to PROJECT_SOURCE_DIR and CMAKE_CURRENT_SOURCE_DIR should only be used for accessing source files,\nnever to write build outputs, use PROJECT_BINARY_DIR and CMAKE_CURRENT_BINARY_DIR to write build artifacts instead.\nTo fully support in-tree builds, build artifacts must never have the same name as\nsource files to avoid accidentally overwriting them, e.g. when preprocessing or\nconfiguring a file. The CMAKE_INSTALL_PREFIX should only be written to on install, never in the build\nprocess. To install generated files, create a build output in the build tree and\ninstall it with the install function.\nThis project follows the GNU install conventions, this means that the variables CMAKE_INSTALL_BINDIR , CMAKE_INSTALL_LIBDIR , and CMAKE_INSTALL_INCLUDEDIR must be used instead of bin , lib , and include , respectively.\nLibrary targets should be exported on install to allow correct inclusion of the\nproject in other CMake projects.\nPrefer dashes as in project-config or project-targets over camel-case as in projectConfig or projectTarget for file names as the former allows easier\nconstruction from the PROJECT_NAME variable by concatenation. The project is usable as CMake subproject. Explicit references to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR must be avoided to not\nbreak subproject builds.\nAn example project is available here to test the CMake subproject integration.","tags":"","loc":"page/contributing/Workflow.html"},{"title":"Specifications (specs) – Fortran-lang/stdlib","text":"Fortran stdlib Specifications (specs) This is an index/directory of the specifications (specs) for each new module/feature as described in the workflow document . Fortran stdlib Specifications (specs) Experimental Features & Modules Released/Stable Features & Modules Experimental Features & Modules ansi - Terminal color and style escape sequences array - Procedures for index manipulation and array handling ascii - Procedures for handling ASCII characters constants - Constants bitsets - Bitset data types and procedures error - Catching and handling errors hash - Hashing integer\n vectors or character strings hashmaps - Hash maps/tables io - Input/output helper & convenience kinds - Kind parameters linalg - Linear Algebra linalg_state_type - Linear Algebra state and error handling logger - Runtime logging system math - General purpose mathematical functions optval - Fallback value for optional arguments quadrature - Numerical integration random - Probability Distributions random number generator sorting - Sorting of rank one arrays stats - Descriptive Statistics stats_distributions_uniform - Uniform Probability Distribution stats_distributions_normal - Normal Probability Distribution stats_distributions_exponential - Exponential Probability Distribution string_type - Basic string support stringlist_type - 1-Dimensional list of strings strings - String handling and manipulation routines version - Version information Released/Stable Features & Modules (None yet)","tags":"","loc":"page/specs/index.html"},{"title":"terminal colors – Fortran-lang/stdlib","text":"The stdlib_ansi module The stdlib_ansi module Introduction Derived types provided ansi_code type Status Example Constants provided style_reset style_bold style_dim style_italic style_underline style_blink style_blink_fast style_reverse style_hidden style_strikethrough fg_color_black fg_color_red fg_color_green fg_color_yellow fg_color_blue fg_color_magenta fg_color_cyan fg_color_white fg_color_default bg_color_black bg_color_red bg_color_green bg_color_yellow bg_color_blue bg_color_magenta bg_color_cyan bg_color_white bg_color_default Procedures and methods provided to_string Syntax Class Argument Result value Status Example operator(+) Syntax Class Argument Result value Status Example operator(//) Syntax Class Argument Result value Status Example Introduction Support terminal escape sequences to produce styled and colored terminal output. Derived types provided ansi_code type The ansi_code type represent an ANSI escape sequence with a style, foreground\ncolor and background color attribute. By default the instances of this type are\nempty and represent no escape sequence. Status Experimental Example program demo_color use stdlib_ansi , only : fg_color_blue , style_bold , style_reset , ansi_code , & & operator ( // ), operator ( + ) implicit none type ( ansi_code ) :: highlight , reset print '(a)' , highlight // \"Dull text message\" // reset highlight = fg_color_blue + style_bold reset = style_reset print '(a)' , highlight // \"Colorful text message\" // reset end program demo_color Constants provided style_reset Style enumerator representing a reset escape code. style_bold Style enumerator representing a bold escape code. style_dim Style enumerator representing a dim escape code. style_italic Style enumerator representing an italic escape code. style_underline Style enumerator representing an underline escape code. style_blink Style enumerator representing a blink escape code. style_blink_fast Style enumerator representing a (fast) blink escape code. style_reverse Style enumerator representing a reverse escape code. style_hidden Style enumerator representing a hidden escape code. style_strikethrough Style enumerator representing a strike-through escape code. fg_color_black Foreground color enumerator representing a foreground black color escape code. fg_color_red Foreground color enumerator representing a foreground red color escape code. fg_color_green Foreground color enumerator representing a foreground green color escape code. fg_color_yellow Foreground color enumerator representing a foreground yellow color escape code. fg_color_blue Foreground color enumerator representing a foreground blue color escape code. fg_color_magenta Foreground color enumerator representing a foreground magenta color escape code. fg_color_cyan Foreground color enumerator representing a foreground cyan color escape code. fg_color_white Foreground color enumerator representing a foreground white color escape code. fg_color_default Foreground color enumerator representing a foreground default color escape code. bg_color_black Background color enumerator representing a background black color escape code. bg_color_red Background color enumerator representing a background red color escape code. bg_color_green Background color enumerator representing a background green color escape code. bg_color_yellow Background color enumerator representing a background yellow color escape code. bg_color_blue Background color enumerator representing a background blue color escape code. bg_color_magenta Background color enumerator representing a background magenta color escape code. bg_color_cyan Background color enumerator representing a background cyan color escape code. bg_color_white Background color enumerator representing a background white color escape code. bg_color_default Background color enumerator representing a background default color escape code. Procedures and methods provided to_string Generic interface to turn a style, foreground or background enumerator into an actual escape code string for printout. Syntax string = to_string (code) Class Pure function. Argument code : Style, foreground or background code of ansi_code type,\n this argument is intent(in) . Result value The result is a default character string. Status Experimental Example program demo_string use stdlib_ansi , only : fg_color_green , style_reset , to_string implicit none print '(a)' , to_string ( fg_color_green ) // \"Colorized text message\" // to_string ( style_reset ) end program demo_string operator(+) Add two escape sequences, attributes in the right value override the left value ones. Syntax code = lval + rval Class Pure function. Argument lval : Style, foreground or background code of ansi_code type,\n this argument is intent(in) . rval : Style, foreground or background code of ansi_code type,\n this argument is intent(in) . Result value The result is a style, foreground or background code of ansi_code type. Status Experimental Example program demo_combine use stdlib_ansi , only : fg_color_red , style_bold , ansi_code implicit none type ( ansi_code ) :: bold_red bold_red = fg_color_red + style_bold end program demo_combine operator(//) Concatenate an escape code with a string and turn it into an actual escape sequence Syntax str = lval // rval Class Pure function. Argument lval : Style, foreground or background code of ansi_code type or a character string,\n this argument is intent(in) . rval : Style, foreground or background code of ansi_code type or a character string,\n this argument is intent(in) . Result value The result is a character string with the escape sequence prepended or appended. Status Experimental Example program demo_concat use stdlib_ansi , only : fg_color_red , style_reset , operator ( // ) implicit none print '(a)' , fg_color_red // \"Colorized text message\" // style_reset end program demo_concat","tags":"","loc":"page/specs/stdlib_ansi.html"},{"title":"array – Fortran-lang/stdlib","text":"The stdlib_array module The stdlib_array module Introduction Procedures and methods provided trueloc Status Description Syntax Class Arguments Return value Examples falseloc Status Description Syntax Class Arguments Return value Examples Introduction Module for index manipulation and array handling tasks. Procedures and methods provided trueloc Status Experimental Description Turn a logical mask into an index array by selecting all true values.\nProvides similar functionality like the built-in where or the intrinsic procedures merge and pack when working with logical mask.\nThe built-in / intrinsics are usually preferable to trueloc , unless the access to the index array is required. Syntax loc = trueloc (array[, lbound]) Class Pure function. Arguments array : List of default logical arrays. This argument is intent(in) . lbound : Lower bound of the array to index. This argument is optional and intent(in) . Return value Returns an array of default integer size, with a maximum length of size(array) elements. Examples program example_trueloc use stdlib_array , only : trueloc implicit none real , allocatable :: array (:) allocate ( array ( 500 )) call random_number ( array ) array ( trueloc ( array > 0.5 )) = 0.0 end program example_trueloc falseloc Status Experimental Description Turn a logical mask into an index array by selecting all false values.\nProvides similar functionality like the built-in where or the intrinsic procedures merge and pack when working with logical mask.\nThe built-in / intrinsics are usually preferable to falseloc , unless the access to the index array is required. Syntax loc = falseloc (array[, lbound]) Class Pure function. Arguments array : List of default logical arrays. This argument is intent(in) . lbound : Lower bound of the array to index. This argument is optional and intent(in) . Return value Returns an array of default integer size, with a maximum length of size(array) elements. Examples program example_falseloc use stdlib_array , only : falseloc implicit none real , allocatable :: array (:) allocate ( array ( - 200 : 200 )) call random_number ( array ) array ( falseloc ( array < 0.5 , lbound ( array , 1 ))) = 0.0 end program example_falseloc","tags":"","loc":"page/specs/stdlib_array.html"},{"title":"ascii – Fortran-lang/stdlib","text":"The stdlib_ascii module The stdlib_ascii module Introduction Constants provided by stdlib_ascii Specification of the stdlib_ascii procedures to_lower Status Description Syntax Class Argument Result value Example to_upper Status Description Syntax Class Argument Result value Example to_title Status Description Syntax Class Argument Result value Example to_sentence Status Description Syntax Class Argument Result value Example reverse Status Description Syntax Class Argument Result value Example Introduction The stdlib_ascii module provides procedures for handling and manipulating\nintrinsic character variables and constants. Constants provided by stdlib_ascii Note Specification of constants is currently incomplete. Specification of the stdlib_ascii procedures Note Specification of procedures is currently incomplete. to_lower Status Experimental Description Converts input character variable to all lowercase. Syntax res = to_lower (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_lower use stdlib_ascii , only : to_lower implicit none print '(a)' , to_lower ( \"HELLo!\" ) ! returns \"hello!\" end program example_to_lower to_upper Status Experimental Description Converts input character variable to all uppercase. Syntax res = to_upper (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_upper use stdlib_ascii , only : to_upper implicit none print '(a)' , to_upper ( \"hello!\" ) ! returns \"HELLO!\" end program example_to_upper to_title Status Experimental Description Returns the titlecase version of the input character variable. Title case: First character of every word in the sentence is converted to \nuppercase and the rest of the characters are converted to lowercase. A word is a contiguous sequence of character(s) which consists of alphabetical \ncharacter(s) and numeral(s) only and doesn't exclude any alphabetical character \nor numeral present next to either of its 2 ends. Syntax res = to_title (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_title use stdlib_ascii , only : to_title implicit none print * , to_title ( \"hello there!\" ) ! returns \"Hello There!\" print * , to_title ( \"'enquoted'\" ) ! returns \"'Enquoted'\" print * , to_title ( \"1st\" ) ! returns \"1st\" end program example_to_title to_sentence Status Experimental Description Returns the sentencecase version of the input character variable. The first alphabetical character of the sequence is transformed to uppercase \nunless it follows a numeral. The rest of the characters in the sequence are \ntransformed to lowercase. Syntax res = to_sentence (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_sentence use stdlib_ascii , only : to_sentence implicit none print * , to_sentence ( \"hello!\" ) ! returns \"Hello!\" print * , to_sentence ( \"'enquoted'\" ) ! returns \"'Enquoted'\" print * , to_sentence ( \"1st\" ) ! returns \"1st\" end program example_to_sentence reverse Status Experimental Description Reverses the order of all characters in the input character type. Syntax res = reverse (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_reverse use stdlib_ascii , only : reverse implicit none print '(a)' , reverse ( \"Hello, World!\" ) ! returns \"!dlroW ,olleH\" end program example_reverse","tags":"","loc":"page/specs/stdlib_ascii.html"},{"title":"bitsets – Fortran-lang/stdlib","text":"The stdlib_bitsets module The stdlib_bitsets module Introduction The module's constants The stdlib_bitsets derived types The bitset-literal The binary-literal Summary of the module's operations Table of the bitset_type methods Table of the non-member procedure overloads Assignments Example Table of the non-member comparison operations Specification of the stdlib_bitsets methods and procedures all - determine whether all bits are set in self Status Description Syntax Class Argument Result value Example and - bitwise and of the bits of two bitsets Status Description Syntax Class Arguments Example and_not - Bitwise and of one bitset with the negation of another Status Description Syntax Class Arguments Example any - determine whether any bits are set Status Description Syntax Class Argument Result value Example bit_count - return the number of bits that are set Status Description Syntax Class Argument Result value Example bits - returns the number of bits Status Description Syntax Class Argument Result value Example clear - clears a sequence of one or more bits Status Description Syntax Class Arguments Example extract - create a new bitset from a range in an old bitset Status Description Syntax Class Arguments Example flip - flip the values of a sequence of one or more bits Status Description Syntax Class Arguments Example from_string - initializes a bitset from a binary literal Status Description Syntax Class Arguments Example init - bitset_type initialization routines Status Description Syntax Class Arguments Example input - reads a bitset from an unformatted file Status Description Syntax Class Arguments Example none - determines whether no bits are set Status Description Syntax Class Argument Result value Example not - Performs the logical complement on a bitset Status Description Syntax Class Argument Example or - Bitwise OR of the bits of two bitsets Status Description Syntax Class Arguments Example output - Writes a binary representation of a bitset to a file Status Description Syntax Class Arguments Example read_bitset - initializes self with the value of a bitset_literal Status Description Syntax Class Arguments Example set - sets a sequence of one or more bits to 1 Status Description Syntax Class Arguments Example test - determine whether a bit is set Status Descriptions Syntax Class Arguments Result value Example to_string - represent a bitset as a binary literal Status Description Syntax Class Arguments Example value - determine the value of a bit Status Description Syntax Class Arguments Result value Example write_bitset - writes a bitset-literal Status Description Syntax Class Arguments Example xor - bitwise exclusive or Status Description Syntax Class Arguments Example Specification of the stdlib_bitsets operators == - compare two bitsets to determine whether the bits have the same value Status Description Syntax Class Arguments Result value Example /= - compare two bitsets to determine whether any bits differ in value Status Description Syntax Class Arguments Result value Example >= - compare two bitsets to determine whether the first is greater than or equal to the second Status Description Syntax Class Arguments Result value Example > - compare two bitsets to determine whether the first is greater than the other Status Description Syntax Class Arguments Result value Example <= - compare two bitsets to determine whether the first is less than or equal to the other Status Description Syntax Class Arguments Result value Example < - compare two bitsets to determine whether the first is less than the other Status Description Syntax Class Arguments Result value Example Introduction The stdlib_bitsets module implements bitset types. A bitset is a\ncompact representation of a sequence of bits binary values. It can\nequivalently be considered as a sequence of logical values or as a\nsubset of the integers 0 ... bits-1 . For example, the value 1110 can be considered as defining the subset of integers [1, 2, 3].\nThe bits are indexed from 0 to bits(bitset)-1 .\nA bitset is used when space savings are critical in applications\nthat require a large number of closely related logical values.\nIt may also improve performance by reducing memory traffic. To\nimplement bitsets the module\ndefines three bitset types, multiple constants, a character string\nliteral that can be read to and from strings and formatted files, a\nsimple character string literal that can be read to and from strings,\nassignments, procedures, methods, and operators. Note that the module\nassumes two's complement integers, but all current Fortran 95 and later\nprocessors use such integers. Note that the module defines a number of \"binary\" procedures,\nprocedures with two bitset arguments. These arguments must be of the\nsame type and should have the same number of bits . For reasons of\nperformance the module does not enforce the bits constraint, but\nfailure to obey that constraint results in undefined behavior. This\nundefined behavior includes undefined values for those bits that\nexceed the defined number of bits in the smaller bitset. The\nundefined behavior may also include a \"segmentation fault\" for\nattempting to address bits in the smaller bitset, beyond the defined\nnumber of bits . Other problems are also possible. The module's constants The module defines several public integer constants, almost all\nintended to serve as error codes in reporting problems through an\noptional stat argument. One constant, bits_kind is\nthe integer kind value for indexing bits and reporting counts of\nbits. The other constants that are error codes are summarized below: Error Code Summary success No problems found alloc_fault Failure with a memory allocation array_size_invalid_error Attempt to define either negative bits or more than 64 bits in a bitset_64 char_string_invalid_error Invalid character found in a character string char_string_too_large_error Character string was too large to be encoded in the bitset char_string_too_small_error Character string was too small to hold the expected number of bits index_invalid_error Index to a bitstring was less than zero or greater than the number of bits integer_overflow_error Attempt to define an integer value bigger than huge(0_bits_kind) read_failure Failure on a read statement eof_failure An unexpected \"End-of-File\" on a read statement write_failure Failure on a write statement The stdlib_bitsets derived types The stdlib_bitsets module defines three derived types, bitset_type , bitset_64 , and bitset_large . bitset_type is an abstract\ntype that serves as the ancestor of bitset_64 and bitset_large . bitset_type defines one method, bits , and all of its\nother methods are deferred to its extensions. bitset_64 is a bitset\nthat can handle up to 64 bits. bitset_large is a bitset that can handle\nup huge(0_bits_kind) bits. All attributes of the bitset types are\nprivate. The various types each define a sequence of binary values: 0\nor 1. In some cases it is useful to associate a logical value, test ,\nfor each element of the sequence, where test is .true. if the value\nis 1 and .false. otherwise. The number of such values in an entity\nof that type is to be termed, bits . The bits are ordered in terms of\nposition, that, in turn, is indexed from 0 to bits-1 . bitset_type is\nused only as a class to define entities that can be either a bitset_64 or\na bitset_large . The syntax for using the types are: class( bitset_type ) :: variable type( bitset_64 ) :: variable and type( bitset_large ) :: variable The bitset-literal A bitset value may be represented as a bitset-literal-constant character string in source code or as a bitset-literal in\nformatted files and non-constant strings. bitset-literal-constant is ' bitset-literal '\n or \" bitset-literal \" bitset-literal is bitsize-literal binary-literal bitsize-literal is S digit [ digit ] ... binary-literal is B binary-digit [ binary-digit ] ... digit is 0\n or 1\n or 2\n or 3\n or 4\n or 5\n or 6\n or 7\n or 8\n or 9 binary-digit is 0\n or 1 The bitset-literal consists of two parts: a bitsize-literal and a binary-literal . The sequence of decimal digits that is part of the bitsize-literal is interpreted as the decimal value of bits .\nThe binary-literal value is interpreted as a sequence of bit\nvalues and there must be as many binary digits in the literal as there\nare bits . The sequence of binary digits are treated as if they were\nan unsigned integer with the i-th digit corresponding to the bits-i bit position. The binary-literal In defining the bitset-literal we also defined a binary-literal . While not suitable for file I/0, the binary-literal is suitable for transfer to and from character\nstrings. In that case the length of the string is the number of bits\nand all characters in the string must be either \"0\" or \"1\". Summary of the module's operations The stdlib_bitsets module defines a number of operations: \"unary\" methods of class bitset_type , \"binary\" procedure overloads of type bitset_64 or bitset_large , assignments, and \"binary\" comparison operators of type bitset_64 or bitset_large . Each category will be discussed separately. Table of the bitset_type methods The bitset_type class has a number of methods. All except one, bits ,\nare deferred. The methods consist of all procedures with one argument\nof class bitset_type . The procedures with two arguments of type bitset_64 or bitset_large are not methods and are\nsummarized in a separate table of procedures. The methods are\nsummarized below: Method name Class Summary all function .true. if all bits are 1, .false. otherwise any function .true. if any bits are 1, .false. otherwise bit_count function returns the number of bits that are 1 bits function returns the number of bits in the bitset clear subroutine sets a sequence of one or more bits to 0 flip subroutine flips the value of a sequence of one or more bits from_string subroutine reads the bitset from a string treating it as a binary literal init subroutine creates a new bitset of size bits with no bits set input subroutine reads a bitset from an unformatted I/O unit none function .true. if no bits are 1, .false. otherwise not subroutine performs a logical not operation on all the bits output subroutine writes a bitset to an unformatted I/O unit read_bitset subroutine reads a bitset from a bitset literal in a character string or formatted I/O unit set subroutine sets a sequence of one or more bits to 1 test function .true. if the bit at pos is 1, .false. otherwise to_string subroutine represents the bitset as a binary literal value function 1 if the bit at pos is 1, 0 otherwise write_bitset subroutine writes a bitset as a bitset literal to a character string or formatted I/O unit Table of the non-member procedure overloads The procedures with two arguments of type bitset_large or bitset_64 must have both arguments of the same known type which\nprevents them from being methods. The bitwise \"logical\" procedures, and , and_not , or , and xor also require that the two bitset\narguments have the same number of bits, otherwise the results are\nundefined. These procedures are summarized in the following table: Procedure name Class Summary and elemental subroutine Sets self to the bitwise and of the original bits in self and set2 and_not elemental subroutine Sets self to the bitwise and of the original bits in self and the negation of set2 extract subroutine creates a new bitset, new , from a range in old or elemental subroutine Sets self to the bitwise or of the original bits in self and set2 xor elemental subroutine Sets self to the bitwise exclusive or of the original bits in self and set2 Assignments The module uses the intrinsic assignment operation, = , to create a\nduplicate of an original bitset. It additionally defines assignments to and\nfrom rank one arrays of logical type of kinds int8 , int16 , int32 , and int64 . In the assignment to and from logical arrays\narray index, i , is mapped to bit position, pos=i-1 , and .true. is mapped to a set bit, and .false. is mapped to an unset bit. Example program example_assignment use stdlib_bitsets use stdlib_kinds , only : int8 , int32 implicit none logical ( int8 ) :: logical1 ( 64 ) = . true . logical ( int32 ), allocatable :: logical2 (:) type ( bitset_64 ) :: set0 , set1 set0 = logical1 if ( set0 % bits () /= 64 ) then error stop & ' initialization with logical(int8) failed to set' // & ' the right size.' else if (. not . set0 % all ()) then error stop ' initialization with' // & ' logical(int8) failed to set the right values.' else write ( * , * ) 'Initialization with logical(int8) succeeded.' end if set1 = set0 if ( set1 == set0 ) & write ( * , * ) 'Initialization by assignment succeeded' logical2 = set1 if ( all ( logical2 )) then write ( * , * ) 'Initialization of logical(int32) succeeded.' end if end program example_assignment Table of the non-member comparison operations The comparison operators with two arguments of type bitset_large or bitset_64 must have both arguments of the same known type which\nprevents them from being methods. The operands must also have the same\nnumber of bits otherwise the results are undefined. These operators\nare summarized in the following table: Operator Description == , .eq. .true. if all bits in set1 and set2 have the same value, .false. otherwise /= , .ne. .true. if any bits in set1 and set2 differ in value, .false. otherwise > , .gt. .true. if the bits in set1 and set2 differ in value and the highest order differing bit is 1 in set1 and 0 in set2 , .false. otherwise >= , .ge. .true. if the bits in set1 and set2 are the same or the highest order differing bit is 1 in set1 and 0 in set2 , .false. otherwise < , .lt. .true. if the bits in set1 and set2 differ in value and the highest order differing bit is 0 in set1 and 1 in set2 , .false. otherwise <= , .le. .true. if the bits in set1 and set2 are the same or the highest order differing bit is 0 in set1 and 1 in set2 , .false. otherwise Specification of the stdlib_bitsets methods and procedures all - determine whether all bits are set in self Status Experimental Description Determines whether all bits are set to 1 in self . Syntax result = self % all () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if all bits in self are set,\notherwise it is .false. . Example program example_all use stdlib_bitsets implicit none character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if (. not . set0 % all ()) then error stop \"FROM_STRING failed to interpret\" // & \"BITS_ALL's value properly.\" else write ( * , * ) \"FROM_STRING transferred BITS_ALL properly\" // & \" into set0.\" end if end program example_all and - bitwise and of the bits of two bitsets Status Experimental Description Sets the bits in set1 to the bitwise and of the original bits in set1 and set2 . Note that set1 and set2 must have the same\nnumber of bits, otherwise the result is undefined. Syntax call and (set1, set2) Class Elemental subroutine. Arguments set1 : shall be a bitset_64 or bitset_large scalar variable. It\nis an intent(inout) argument. On return the values of the bits in set1 are the bitwise and of the original bits in set1 with the\ncorresponding bits in set2 . set2 : shall be a scalar expression of the same type as set1 . It is\nan intent(in) argument. Note that set2 must also have the same\nnumber of bits as set1 . Example program example_and use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all none if ( set0 % none ()) write ( * , * ) 'Second test of AND worked.' call set1 % not () call and ( set0 , set1 ) ! none all if ( set0 % none ()) write ( * , * ) 'Third test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all all if ( set0 % all ()) write ( * , * ) 'Fourth test of AND worked.' end program example_and and_not - Bitwise and of one bitset with the negation of another Status Experimental Description Sets the bits of set1 to bitwise and of the bits of set1 with\nthe bitwise negation of the corresponding bits of set2 . Note that set1 and set2 must have the same number of bits, otherwise the\nresult is undefined. Syntax call and_not (set1, set2) Class Elemental subroutine. Arguments set1 : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(inout) argument. On return the values of the bits in set1 are the bitwise and of the original bits in set1 with the\ncorresponding negation of the bits in set2 . set2 : shall be a scalar expression of the same type as set1 . It is\nan intent(in) argument. Note that it should also have the same\nnumber of bits as set1 , otherwise the result is undefined. Example program example_and_not use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and_not ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all none if ( set0 % all ()) write ( * , * ) 'Second test of AND_NOT worked.' call set0 % not () call set1 % not () call and_not ( set0 , set1 ) ! none all if ( set0 % none ()) write ( * , * ) 'Third test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all all if ( set0 % none ()) write ( * , * ) 'Fourth test of AND_NOT worked.' end program example_and_not any - determine whether any bits are set Status Experimental Description Determines whether any bits are set in self . Syntax result = self % any () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is a default logical scalar. The result is .true. if any bits in self are set, otherwise it\nis .false. . Example program example_any use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if (. not . set0 % any ()) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % any ()) then write ( * , * ) \"ANY interpreted SET0's value properly.\" end if end program example_any bit_count - return the number of bits that are set Status Experimental Description Returns the number of bits that are set to one in self . Syntax result = self % bit_count () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is an integer scalar of kind bits_kind ,\nequal to the number of bits that are set in self . Example program example_bit_count use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 type ( bitset_large ) :: set1 logical , allocatable :: logi (:) call set0 % from_string ( bits_0 ) if ( set0 % bit_count () == 0 ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % bit_count () == 1 ) then write ( * , * ) \"BIT_COUNT interpreted SET0's value properly.\" end if allocate ( logi ( 1000 ), source = . false .) logi ( 1 :: 7 ) = . true . set1 = logi if ( set1 % bit_count () == count ( logi )) then write ( * , * ) \"BIT_COUNT interpreted SET1's value properly.\" end if end program example_bit_count bits - returns the number of bits Status Experimental Description Reports the number of bits in self . Syntax result = self % bits () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is an integer scalar of kind bits_kind , equal to\nthe number of defined bits in self . Example program example_bits use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % bits () == 19 ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's size properly.\" end if end program example_bits clear - clears a sequence of one or more bits Status Experimental Description If only pos is present, clears the bit with position pos in self . If start_pos and end_pos are present with end_pos >= start_pos clears the bits with positions from start_pos to end_pos in self . if start_pos and end_pos are present with end_pos < start_pos self is unmodified. Note: Positions outside the range 0 to bits(set) -1 are ignored. Syntax call self % clear (pos) or call self % clear (start_pos, end_pos) Class Elemental subroutine Arguments self : shall be a scalar variable of class bitset_type . It is an intent(inout) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. start_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. end_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. Example program example_clear use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if (. not . set0 % test ( 165 )) write ( * , * ) 'Bit 165 is cleared.' call set0 % clear ( 0 , 164 ) if ( set0 % none ()) write ( * , * ) 'All bits are cleared.' end program example_clear extract - create a new bitset from a range in an old bitset Status Experimental Description Creates a new bitset, new , from a range, start_pos to stop_pos ,\nin bitset old . If start_pos is greater than stop_pos the new\nbitset is empty. If start_pos is less than zero or stop_pos is\ngreater than bits(old)-1 then if status is present it has the\nvalue index_invalid_error , otherwise processing stops with an\ninformative message. Syntax call extract (new, old, start_pos, stop_pos, status ) Class Subroutine Arguments new : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(out) argument. It will be the new bitset. old : shall be a scalar expression of the same type as new . It is\nan intent(in) argument. It will be the source bitset. start_pos : shall be a scalar integer expression of the kind bits_kind . It is an intent(in) argument. stop_pos : shall be a scalar integer expression of the kind bits_kind . It is an intent(in) argument. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present it shall have one of the values: success - no problems found index_invalid_error - start_pos was less than zero or stop_pos was greater than bits(old)-1 . Example program example_extract use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set0 % set ( 100 , 150 ) call extract ( set1 , set0 , 100 , 150 ) if ( set1 % bits () == 51 ) & write ( * , * ) 'SET1 has the proper size.' if ( set1 % all ()) write ( * , * ) 'SET1 has the proper values.' end program example_extract flip - flip the values of a sequence of one or more bits Status Experimental Description Flip the values of a sequence of one or more bits. If only pos is present flip the bit value with position pos in self .\n* If start_pos and end_pos are present with end_pos >= start_pos flip the bit values with positions from start_pos to end_pos in self . If end_pos < start_pos then self is unmodified. Syntax call self % flip (pos) or call self % flip (start_pos, end_pos) Class Elemental subroutine. Arguments self : shall be a scalar class bitset_type variable It is an intent(inout) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. start_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. end_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. Example program example_flip use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % flip ( 165 ) if ( set0 % test ( 165 )) write ( * , * ) 'Bit 165 is flipped.' call set0 % flip ( 0 , 164 ) if ( set0 % all ()) write ( * , * ) 'All bits are flipped.' end program example_flip from_string - initializes a bitset from a binary literal Status Experimental Description Initializes the bitset self from string , treating string as a\nbinary literal. Syntax call self % from_string (string[, status]) Class Subroutine Arguments self : shall be a scalar class bitset_type variable. It is an intent(out) argument. string : shall be a scalar default character expression. It is an intent(in) argument. It shall consist only of the characters \"0\",\nand \"1\". status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present, on return its value shall be\none of the error codes defined in this module. If absent, and its\nvalue would not have been success , then processing will stop with an\ninformative text as its stop code. It shall have one of the error\ncodes: success - if no problems were found, alloc_fault - if allocation of the bitset failed char_string_too_large_error - if string was too large, or char_string_invalid_error - if string had an invalid character. Example program example_from_string use stdlib_bitsets implicit none character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if ( bits ( set0 ) /= 33 ) then error stop \"FROM_STRING failed to interpret \" // & \"BITS_ALL's size properly.\" else if (. not . set0 % all ()) then error stop \"FROM_STRING failed to interpret\" // & \"BITS_ALL's value properly.\" else write ( * , * ) \"FROM_STRING transferred BITS_ALL properly\" // & \" into set0.\" end if end program example_from_string init - bitset_type initialization routines Status Experimental Description bitset_type initialization routine. Syntax call self % init (bits [, status]) Class Subroutine. Arguments self : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(out) argument. bits : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument that if present\nspecifies the number of bits in set . A negative value, or a value\ngreater than 64 if self is of type bitset_64 , is an error. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument that, if present, returns an error code\nindicating any problem found in processing init , and if absent and\nan error was found result in stopping processing with an informative\nstop code. It can have any of the following error codes: success - no problem found alloc_fault - self was of type bitset_large and memory\n allocation failed array_size_invalid_error - bits was present with either a negative\n value, or a value greater than 64 when self was of type bitset_64 . Example program example_init use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % bits () == 166 ) & write ( * , * ) 'SET0 has the proper size.' if ( set0 % none ()) write ( * , * ) 'SET0 is properly initialized.' end program example_init input - reads a bitset from an unformatted file Status Experimental Description Reads a bitset from its binary representation in an unformatted\nfile. Syntax call self % input (unit [, status]) Class Subroutine Arguments self : shall be a scalar variable of class bitset_64 or bitset_large . It is an intent(out) argument. unit : shall be a scalar default integer expression. It is an intent(in) argument. Its value must be that of a logical unit\nnumber for an open unformatted file with read or readwrite access positioned at the start of a bitset value written by a bitset_type output subroutine by the same processor. status (optional): shall be a scalar default integer variable. If\npresent its value shall be of one of the error codes defined in this\nmodule. If absent and it would have had a value other than success processing will stop with an informative stop code. Allowed error code\nvalues for this status are: success - no problem found alloc_fault - self was of type bitset_large and allocation of\n memory failed. array_size_invalid_error - if the number of bits read from unit is either negative or greater than 64, if class of self is bitset_64 . read_failure - failure during a read statement Example program example_input use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_input none - determines whether no bits are set Status Experimental Description Determines whether no bits are set in self . Syntax result = self % none () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if no bits in self are set, otherwise it is .false. . Example program example_none use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_large ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % none ()) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if (. not . set0 % none ()) then write ( * , * ) \"NONE interpreted SET0's value properly.\" end if end program example_none not - Performs the logical complement on a bitset Status Experimental Description Performs the logical complement on the bits of self . Syntax call self % not () Class Elemental subroutine. Argument self shall be a scalar variable of class bitset_type . It is an intent(inout) argument. On return its bits shall be the logical\ncomplement of their values on input. Example program example_not use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 155 ) if ( set0 % none ()) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % not () if ( set0 % all ()) then write ( * , * ) \"ALL interpreted SET0's value properly.\" end if end program example_not or - Bitwise OR of the bits of two bitsets Status Experimental Description Replaces the original bits of set1 with the bitwise or of those\nbits with the bits of set2 . Note set1 and set2 must have the\nsame number of bits, otherwise the result is undefined. Syntax call or (set1, set2) Class Elemental subroutine. Arguments set1 : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(inout) argument. On return the values of the bits in setf are the bitwise or of the original bits in set1 with the\ncorresponding bits in set2 . set2 : shall be a scalar expression of the same type as set1 . It is\nan intent(in) argument. Note bits(set2) must equal bits(set1) otherwise the results are undefined. Example program example_or use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call or ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all none if ( set0 % all ()) write ( * , * ) 'Second test of OR worked.' call set0 % not () call set1 % not () call or ( set0 , set1 ) ! none all if ( set0 % all ()) write ( * , * ) 'Third test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all all if ( set0 % all ()) write ( * , * ) 'Fourth test of OR worked.' end program example_or output - Writes a binary representation of a bitset to a file Status Experimental Description Writes a binary representation of a bitset to an unformatted file. Syntax call self % output (unit[, status]) Class Subroutine. Arguments self : shall be a scalar expression of class bitset_64 or bitset_large . It is an intent(in) argument. unit : shall be a scalar default integer expression. It is an intent(in) argument. Its value must be that of an I/O unit number\nfor an open unformatted file with write or readwrite access. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present on return it will have the value\nof success or write_failure . If absent and it would not have the\nvalue of success then processing will stop with an informative stop\ncode. The two code values have the meaning: success - no problem found write_failure - a failure occurred in a write statement. Example program example_output use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_output read_bitset - initializes self with the value of a bitset_literal Status Experimental Description Reads a bitset-literal and initializes self with the corresponding\nvalue. Syntax call self % read_bitset (string[, status]) or call self % read_bitset (unit[, advance, status]) Class Subroutine Arguments self : shall be a scalar variable of class bitset_type . It is an intent(out) argument. Upon a successful return it is initialized with\nthe value of a bitset-literal . string (optional): shall be a scalar default character\nexpression. It is an intent(in) argument. It will consist of a left \njustified bitset-literal , terminated by either the end of the string\nor a blank. unit (optional): shall be a scalar default integer expression. It is\nan intent(in) argument. Its value must be that of an I/O unit number\nfor an open formatted file with read or readwrite access\npositioned at the start of a bitset-literal . advance (optional): shall be a scalar default character\nexpression. It is an intent(in) argument. It is the advance specifier for the final read of unit . If present it should have\nthe value 'yes' or 'no' . If absent it has the default value of 'yes' . status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present on return it shall have the\nvalue of one of the error codes of this module. If absent and it would\nnot have had the value success processing will stop with a message\nas its error code. The possible error codes are: success - no problems found; alloc_fault - if self is of class bitset_large and allocation\n of the bits failed; array_size_invalid_error - if the bitset-literal has a bits\n value greater than 64 and self is of class bitset_64 ; char_string_invalid_error - if the bitset-literal has an invalid\n character; char_string_too_small_error - if string ends before all the bits\n are read; eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal, integer_overflow_error - if the bitset-literal has a bits value larger than huge(0_bits_kind) ; or read_failure - if a read statement failed. Example program example_read_bitset use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_2 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit , status type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) 'WRITE_BITSET to READ_BITSET through unit worked.' end if end program example_read_bitset set - sets a sequence of one or more bits to 1 Status Experimental Description Sets a sequence of one or more bits in self to 1. If start_pos and end_pos are absent sets the bit at position pos in self to 1. If start_pos and end_pos are present with end_pos >= start_pos set the bits at positions from start_pos to end_pos in self to 1. If start_pos and end_pos are present with end_pos < start_pos self is unchanged. Positions outside the range 0 to bits(self) are ignored. Syntax call self % set (POS) or call self % set (START_POS, END_POS) Class Elemental subroutine Arguments self : shall be a scalar variable of class bitset_type . It is an intent(inout) argument. pos (optional): shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. start_pos (optional): shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. end_pos (optional): shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. Example program example_set use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % set ( 165 ) if ( set0 % test ( 165 )) write ( * , * ) 'Bit 165 is set.' call set0 % set ( 0 , 164 ) if ( set0 % all ()) write ( * , * ) 'All bits are set.' end program example_set test - determine whether a bit is set Status Experimental Descriptions Determine whether the bit at position pos is set to 1 in self . Syntax result = self % test (pos) Class Elemental function. Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bit at pos in self is set,\notherwise it is .false. . If pos is outside the range 0... bits(self)-1 the result is .false. . Example program example_test use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if (. not . set0 % test ( 165 )) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % test ( 165 )) write ( * , * ) 'Bit 165 is set.' end program example_test to_string - represent a bitset as a binary literal Status Experimental Description Represents the value of self as a binary literal in string . Syntax call self % to_string (string[, status]) Class Subroutine Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. string : shall be a scalar default character variable of allocatable\nlength. It is an intent(out) argument. On return it shall have a binary-literal representation of the bitset self . status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present it shall have either the value success or alloc_fault . If absent and it would have had the value alloc_fault then processing will stop with an informative test as\nthe stop code. The values have the following meanings: success - no problem found. alloc_fault - allocation of string failed. Example program example_to_string use stdlib_bitsets implicit none character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 character (:), allocatable :: new_string call set0 % init ( 33 ) call set0 % not () call set0 % to_string ( new_string ) if ( new_string == bits_all ) then write ( * , * ) \"TO_STRING transferred BITS0 properly\" // & \" into NEW_STRING.\" end if end program example_to_string value - determine the value of a bit Status Experimental Description Determines the value of the bit at position, pos , in self . Syntax result = self % value (pos) Class Elemental function. Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. Result value The result is a default integer scalar.\nThe result is one if the bit at pos in self is set, otherwise it\nis zero. If pos is outside the range 0... bits(set)-1 the result\nis zero. Example program example_value use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( set0 % value ( 165 ) == 0 ) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % value ( 165 ) == 1 ) write ( * , * ) 'Bit 165 is set.' end program example_value write_bitset - writes a bitset-literal Status Experimental Description Writes a bitset-literal representing self 's current value to a\ncharacter string or formatted file. Syntax call self % write_bitset (string[, status]) or call self % write_bitset (unit[, advance, status]) Class Subroutine Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. string (optional): shall be a scalar default character variable of\nallocatable length. It is an intent(out) argument. unit (optional): shall be a scalar default logical expression. It is\nan intent(in) argument. Its value must be that of a I/O unit number\nfor an open formatted file with write or readwrite access. advance (optional): shall be a scalar default character\nexpression. It is an intent(in) argument. It is the advance specifier for the write to unit . If present it must have the value 'yes' or 'no' . It has the default value of 'yes' . if advance is not present or is present with a value of 'no' then the bitset's bitset-literal is written to unit followed by a blank, and the current record is not advanced. If advance is present with a value of 'yes' then the\n bitset's bitset-literal is written to unit and the\n record is immediately advanced. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present on return it shall have the\nvalue of one of the module's error codes. If absent and a problem was\nfound processing will stop with an informative stop code. It may have\nthe following error code values: success - no problem was found alloc_fault - allocation of the string failed write_failure - the write to the unit failed Example program example_write_bitset use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_2 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit , status type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) 'WRITE_BITSET to READ_BITSET through unit worked.' end if end program example_write_bitset xor - bitwise exclusive or Status Experimental Description Replaces set1 's bitset with the bitwise exclusive or of the\noriginal bits of set1 and set2 . Note set1 and set2 must have\nthe samee number of bits, otherwise the result is undefined. Syntax result = xor (set1, set2) Class Elemental subroutine Arguments set1 : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(inout) argument. On return the values of the bits in set1 are the bitwise exclusive or of the original bits in set1 with the corresponding bits in set2 . set2 shall be a scalar expression of the same type as set1 . It is\n an intent(in) argument. Note set1 and set2 must have the\nsamee number of bits, otherwise the result is undefined. Example program example_xor use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call xor ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all none if ( set0 % all ()) write ( * , * ) 'Second test of XOR worked.' call set0 % not () call set1 % not () call xor ( set0 , set1 ) ! none all if ( set0 % all ()) write ( * , * ) 'Third test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all all if ( set0 % none ()) write ( * , * ) 'Fourth test of XOR worked.' end program example_xor Specification of the stdlib_bitsets operators == - compare two bitsets to determine whether the bits have the same value Status Experimental Description Returns .true. if all bits in set1 and set2 have the same value, .false. otherwise. Syntax result = set1 [[stdlib_bitsets(module):==(interface)]] set2 or result = set1 .EQ. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in both bitsets are set\nto the same value, otherwise the result is .false. . Example program example_equality use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 == set0 . and . set1 == set1 . and . set2 == set2 . and . & . not . set0 == set1 . and . . not . set0 == set2 . and . . not . & set1 == set2 ) then write ( * , * ) 'Passed 64 bit equality tests.' else error stop 'Failed 64 bit equality tests.' end if end program example_equality /= - compare two bitsets to determine whether any bits differ in value Status Experimental Description Returns .true. if any bits in self and set2 differ in value, .false. otherwise. Syntax result = set1 [[stdlib_bitsets(module):/=(interface)]] set2 or result = set1 .NE. set2 Class Elemental function Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if any bits in both bitsets differ, otherwise\nthe result is .false. . Example program example_inequality use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 /= set1 . and . set0 /= set2 . and . set1 /= set2 . and . & . not . set0 /= set0 . and . . not . set1 /= set1 . and . . not . & set2 /= set2 ) then write ( * , * ) 'Passed 64 bit inequality tests.' else error stop 'Failed 64 bit inequality tests.' end if end program example_inequality >= - compare two bitsets to determine whether the first is greater than or equal to the second Status Experimental Description Returns .true. if the bits in set1 and set2 are the same or the\nhighest order different bit is set to 1 in set1 and to 0 in set2 , .false. . otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):>=(interface)]] set2 or result = set1 .GE. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 are the same\nor the highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. Example program example_ge use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 >= set0 . and . set2 >= set1 . and . set2 >= set0 . and . & set0 >= set0 . and . set1 >= set1 . and . set2 >= set2 . and . & . not . set0 >= set1 . and . . not . set0 >= set2 . and . . not . & set1 >= set2 ) then write ( * , * ) 'Passed 64 bit greater than or equals tests.' else error stop 'Failed 64 bit greater than or equals tests.' end if end program example_ge > - compare two bitsets to determine whether the first is greater than the other Status Experimental Description Returns .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):>(interface)]] set2 or result = set1 .GT. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. Example program example_gt use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 > set0 . and . set2 > set1 . and . set2 > set0 . and . & . not . set0 > set0 . and . . not . set0 > set1 . and . . not . & set1 > set2 ) then write ( * , * ) 'Passed 64 bit greater than tests.' else error stop 'Failed 64 bit greater than tests.' end if end program example_gt <= - compare two bitsets to determine whether the first is less than or equal to the other Status Experimental Description Returns .true. if the bits in set1 and set2 are the same or the\nhighest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):<=(interface)]] set2 or result = set1 .LE. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 are the same\nor the highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. Example program example_le use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 <= set1 . and . set1 <= set2 . and . set0 <= set2 . and . & set0 <= set0 . and . set1 <= set1 . and . set2 <= set2 . and . & . not . set1 <= set0 . and . . not . set2 <= set0 . and . . not . & set2 <= set1 ) then write ( * , * ) 'Passed 64 bit less than or equal tests.' else error stop 'Failed 64 bit less than or equal tests.' end if end program example_le < - compare two bitsets to determine whether the first is less than the other Status Experimental Description Returns .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):<(interface)]] set2 or `result = set1 .LT. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. Example program example_lt use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 < set1 . and . set1 < set2 . and . set0 < set2 . and . & . not . set0 < set0 . and . . not . set2 < set0 . and . . not . & set2 < set1 ) then write ( * , * ) 'Passed 64 bit less than tests.' else error stop 'Failed 64 bit less than tests.' end if end program example_lt","tags":"","loc":"page/specs/stdlib_bitsets.html"},{"title":"constants – Fortran-lang/stdlib","text":"Introduction Codata to_real - Get the constant value or its uncertainty. Status Description Syntax Arguments Return value Example Introduction The stdlib_constants module provides mathematical constants and the most common physical constants. Warning : The names of the most common physical constants are kept short as they are inside a dedicated module. \nNonetheless, in case of overlapping names, they can always be renamed as following: use stdlib_constants , only : clight => c Codata The stdlib_codata module defines all codata (physical) constants as derived \ntype. The module is automatically generated with a simple parser written in Python The latest codata constants were released in 2022 by the NIST All values for the codata constants are provided as double precision reals. \nThe names are quite long and can be aliased with shorter names. The derived type codata_constant_type defines: 4 members: name (string) value (double precision real) uncertainty (double precision real) unit (string) 2 type-bound procedures: print : to print the values of the constant members; to_real : to get the value or the uncertainty to the desired precision. A module level interface to_real is \navailable for getting the constant value or uncertainty of a constant. to_real - Get the constant value or its uncertainty. Status Experimental Description Convert a codata_constant_type to a real (at least sp , or dp ) scalar. Warning : Some constants cannot be converted to single precision sp reals due to the value of the exponents. Syntax r = to_real (c, mold [, uncertainty]) Arguments c : argument has intent(in) and shall be of type codata_constant_type . mold : argument has intent(in) and shall be of real type. Note : The type of the mold argument defines the type of the result. uncertainty (optional): argument has intent(in) and shall be of logical type. \nIt specifies if the uncertainty needs to be returned instead of the value. Default to .false. . Return value Returns a scalar of real type which is either the value or the uncertainty of a codata constant. Example program example_constants use stdlib_constants , only : c , pi => PI_dp use stdlib_codata , only : alpha => ALPHA_PARTICLE_ELECTRON_MASS_RATIO use stdlib_codata_type , only : to_real use stdlib_kinds , only : dp , sp ! Use most common physical constants defined as double precision reals print * , \"speed of light in vacuum= \" , c ! Use of mathematical constants such as PI print * , \"PI as double precision real= \" , pi ! Use codata_constant type for evaluating the value to the desired precision print * , \"Value of alpha... evaluated to double precision=\" , alpha % to_real ( 1.0_dp ) print * , \"Uncertainty of alpha... evaluated to double precision=\" , alpha % to_real ( 1.0_sp , . true .) print * , \"Value of alpha... evaluated to single precision=\" , alpha % to_real ( 1.0_sp ) ! Convert a codata constant to a real print * , \"Value of the alpha... evaluated to double precision=\" , to_real ( alpha , 1.0_dp ) ! Print out codata constant attributes: name, value, uncertainty and unit call alpha % print () end program example_constants","tags":"","loc":"page/specs/stdlib_constants.html"},{"title":"error – Fortran-lang/stdlib","text":"The stdlib_error module The stdlib_error module Introduction Procedures and methods provided check - Checks the value of a logical condition Status Description Syntax Arguments Return value Examples error_stop - aborts the program Status Description Syntax Arguments Output Examples Introduction Catching and handling errors. Procedures and methods provided check - Checks the value of a logical condition Status Experimental Description Checks the value of a logical condition. Syntax call check (condition, msg, code, warn) Arguments condition : Shall be a scalar of type logical . msg (optional): Shall be a character expression containing the message to be printed to stderr . The default msg is 'Check failed.'. code (optional): Shall be a scalar of type integer . The default code is 1 . warn (optional): Shall be a scalar of type logical . The default warn is .true. . Return value If condition is .false. , and: no other arguments are provided, this subroutine stops the program with the default message and exit code 1; msg is provided, this subroutine stops the program and it prints the value of msg ; code is provided, this subroutine stops the program with the given exit code; warn is provided and warn is .true. , this subroutine doesn't stop the program and prints the message. Examples program example_check1 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, stops the program with exit code 1 and prints 'Check failed.' call check ( a == 5 ) end program example_check1 program example_check2 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, stops the program with exit code 1 and prints 'a == 5 failed.' call check ( a == 5 , msg = 'a == 5 failed.' ) end program example_check2 program example_check3 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, prints 'a == 5 failed.', but doesn't stop the program. call check ( a == 5 , msg = 'a == 5 failed.' , warn = . true .) end program example_check3 program example_check4 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, stops the program with exit code 77 and prints 'a == 5 failed.' call check ( a == 5 , msg = 'a == 5 failed.' , code = 77 ) end program example_check4 error_stop - aborts the program Status Experimental Description Aborts the program with a message and a nonzero exit code. Syntax call error_stop (msg, code) Arguments msg : Shall be a character expression containing the message to be printed to stderr . code (optional): Shall be a scalar of type integer to be returned as exit code. Output Aborts the program with printing the message msg to stderr and a nonzero exit code. The nonzero exit code is equal to code if provided, and 1 otherwise. Examples Without error code: program example_error_stop1 use stdlib_error , only : error_stop implicit none call error_stop ( \"Invalid argument\" ) end program example_error_stop1 With error code: program example_error_stop2 use stdlib_error , only : error_stop implicit none call error_stop ( \"Invalid argument\" , code = 123 ) end program example_error_stop2","tags":"","loc":"page/specs/stdlib_error.html"},{"title":"hash – Fortran-lang/stdlib","text":"The stdlib_hash_32bit and stdlib_hash_64bit modules The stdlib_hash_32bit and stdlib_hash_64bit modules Overview of hash procedures Licensing Glossary The hash codes modules Overview of the modules The stdlib_hash_32bit module Overview of the module The int_hash parameter The little_endian parameter Specifications of the stdlib_hash_32bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example fnv_1_hash- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example fnv_1a_hash- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example new_nmhash32_seed- returns a valid input seed for nmhash32 Status Description Syntax Class Argument Note Example new_nmhash32x_seed- returns a valid input seed for nmhash32x Status Description Syntax Class Argument Note Example new_water_hash_seed- returns a valid input seed for water_hash Status Description Syntax Class Argument Note Example nmhash32- calculates a hash code from a key and a seed Status Description Syntax Class Arguments Result Note Example nmhash32x- calculates a hash code from a key and a seed Status Description Syntax Class Arguments Result Note Example odd_random_integer - returns an odd integer Status Description Syntax Class Argument Note Example universal_mult_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example water_hash- calculates a hash code from a key and a seed Status Description Syntax Class Arguments Result Note Example The stdlib_hash_64bit module Overview of the module The int_hash parameters The little_endian parameter Specifications of the stdlib_hash_64bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example FNV_1- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example FNV_1A- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example new_pengy_hash_seed- returns a valid input seed for pengy_hash Status Description Syntax Class Argument Note Example new_spooky_hash_seed- returns a valid input seed for spooky_hash Status Description Syntax Class Argument Note Example odd_random_integer - returns odd integer Status Description Syntax Class Argument Note Example pengy_hash - maps a character string or integer vector to an integer Status Description Syntax Class Arguments Result Note Example spooky_hash - maps a character string or integer vector to an integer Status Description Syntax Class Arguments Result Note Example universal_mult_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example Test Codes Overview of hash procedures The comparison of lexical entities or other objects for equality\ncan be computationally expensive.\nThis cost is often reduced by computing a near unique integer value,\ntermed a hash code, from the structure of the object using a procedure\ntermed a hash function.\nEquality of hash codes is a necessary, but not sufficient, condition\nfor the original objects to be equal.\nAs integer comparisons are very efficient, performing an initial\ncomparison of hash codes and then performing a detailed comparison\nonly if the hash codes are equal can improve performance.\nThe hash codes, in turn, can be mapped to a smaller set of integers,\nthat can be used as an index, termed a hash index, to a rank-1\narray, often termed a hash table.\nThis mapping will be known as a scalar hash.\nThe use of a hash table reduces the number of hash codes that need to\nbe compared, further improving performance.\nA hash function can also be used to generate a checksum to verify that\ndata has not changed.\nThe Fortran Standard Library therefore provides procedures to compute\nhash codes and scalar hashes.\nThis document only discusses the hash codes and scalar hashes in the\nlibrary. Licensing The Fortran Standard Library is distributed under the MIT License.\nHowever components of the library may be based on code released under a\ndifferent license. In particular, the hash codes are often based\non algorithms considered as public domain ( Fibonacci Hash , Universal\nMultiplicative Hash) or released under a different license than the\nMIT license ( FNV-1 Hash , FNV-1A Hash , nmhash32 , nmhash32x , waterhash , pengyhash and SpookyHash )\nThe licensing status of the algorithms are discussed below. fibonacci_hash is a scalar hash. It is an implementation in Fortran\n2008 and signed two's complement integers of the Fibonacci Hash\ndescribed in D. E. Knuth, \"The Art of\nComputer Programming, Second Edition, Volume 3, Sorting and\nSearching\", Addison-Wesley, Upper Saddle River, NJ,\npp. 517-518, 1998. The algorithms in that source are considered public\ndomain, and its use is unrestricted. universal_mult_hash is a scalar hash. It is an implementation in\nFortran 2008 and signed two's complement integers of the\nuniversal multiplicative hash algorithm of M. Dietzfelbinger,\nT. Hagerup, J. Katajainen, and M. Penttonen, \"A Reliable Randomized\nAlgorithm for the Closest-Pair Problem,\" J. Algorithms, Vol. 25,\nNo. 1, Oct. 1997, pp. 19-51. Because of its publication in the Journal\nof Algorithms, the universal multiplicative hash algorithm is public\ndomain. fnv_1_hash and fnv_1a_hash are translations to Fortran 2008 and\nsigned two's complement integers of the FNV-1 and FNV-1a hash functions of Glenn Fowler, Landon Curt Noll,\nand Phong Vo, that has been released into the public\ndomain. Permission has been granted, by Landon Curt Noll, for the use\nof these algorithms in the Fortran Standard Library. A description of\nthese functions is available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function .\nThese functions have been modified from their normal forms to also\nencode the structure size in the output hash. Similarly spooky_hash and associated procedures are translations to\nFortran 2008 and signed two's complement integers of the unsigned 64\nbit version 2 SpookyHash functions of Bob\nJenkins https://burtleburtle.net/bob/hash/spooky.html to signed 64\nbit operations. Version 2 was chosen over version 1 as it has better\nperformance and fewer bad seeds\nBob Jenkins has also put this code in the public\ndomain and has given permission to treat this code as public domain in\nthe USA, provided the code can be used under other licenses and he is\ngiven appropriate credit. nmhash32 and nmhash32x are translations to Fortran 2008 and signed\ntwo's complement integers of the unsigned 32-bit\nhashes of James Z. M. Gao's nmhash32 and nmhash32x version of 0.2, https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/nmhash.h James Z. M. Gao has released his code under the BSD 2 Clause\nLicense. The BSD 2-Clause license is as follows: BSD 2-Clause License Copyright ( c ) 2021 , James Z . M . Gao All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : 1 . Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . water_hash is a translation to Fortran 2008 and signed two's\ncomplement integers of the waterhash algorithm\nof Tommy Ettinger. This algorithm is inspired by the Wy Hash of\nWang Yi. Tommy Ettinger's original C++ code, waterhash.h ,\nis available at URL: https://github.com/tommyettinger/waterhash under\nthe unlicense , https://github.com/tommyettinger/waterhash/blob/master/LICENSE .\nThe unlicense reads as follows: This is free and unencumbered software released into the public domain . Anyone is free to copy , modify , publish , use , compile , sell , or distribute this software , either in source code form or as a compiled binary , for any purpose , commercial or non - commercial , and by any means . In jurisdictions that recognize copyright laws , the author or authors of this software dedicate any and all copyright interest in the software to the public domain . We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors . We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law . THE SOFTWARE IS PROVIDED \"AS IS\" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . For more information , please refer to < http : // unlicense . org > pengy_hash is a translation to Fortran 2008 and signed two's\ncomplement arithmetic of the pengyhash algorithm of Alberto Fajardo,\ncopyright 2020. Alberto Fajardo's original C code, pengyhash.c , is\navailable at the URL:\nhttps://github.com/tinypeng/pengyhash/blob/master/pengyhash.c\nunder the BSD 2-Clause License:\nhttps://github.com/tinypeng/pengyhash/blob/master/LICENSE The BSD 2-Clause license is as follows: BSD 2-Clause License pengyhash Copyright ( c ) 2020 Alberto Fajardo All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : 1 . Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . Glossary There are a few words used in this document that may not be familiar to\nreaders of this document: Key - a value to be used to find entries in a hash table typically\n using its hashed value for the initial search; Salt - see seed, and; Seed - an additional argument to a hash function that changes its\n output making some attacks impractical. The hash codes modules Overview of the modules The Standard Library provides two modules implementing hash\nfunctions and scalar hashes.\nThe stdlib_hash_32bit module provides procedures to\ncompute 32-bit integer hash codes and a scalar hash.\nThe hash codes can be used for tables of up to 2**30 entries, and\nfor keys with a few hundred elements, but performance has only been\ntested for tables up to 2**16 entries and performance may degrade\nfor larger numbers of entries.\nThe stdlib_hash_64bit module provides hash procedures to\ncompute 64-bit integer hash codes and a scalar hash.\nThe hash codes can, in principle, be used for tables of up to 2**62 entries, and for keys with a few thousand elements, but testing of\nperformance has only been been for tables up to 2**16 elements and\nperformance may degrade for larger numbers of entries.\nWhile one of the codes in stdlib_hash_64bit , SPOOKY_HASH , can also be used to calculate 128 bit hash codes, none\nof the current codes can be used to calculate 256 bit hash codes.\nSuch larger hash codes are useful for larger hash tables and keys, and\nfor checksums.\nSuch larger keys and tables are little used, if used at all, in\ncurrent\nFortran codes, but the larger hash codes may be added to the library\nif there is a demand for them. Hash functions are often divided into two categories\n\"cryptographic\" and \"non-cryptographic\".\nCryptographic hash functions produce codes that are infeasible to\nreverse without additional information beyond the identity of\nthe hash function used to generate the code and the resulting codes.\nNon-cryptographic codes, in some circumstances, are believed to be\nreversible.\nThe modules only implement hash\nfunctions that are considered non-cryptographic, with\nimplementations available in the public domain. There are a number of algorithms available for the computation of\nnon-cryptographic 32 and 64-bit hash codes that differ in their\ncomputational complexity,\ntheir relative performance on different size keys, and the\nexpected uniqueness (randomness) of the resulting hash codes.\nTheir relative performance in the analysis of text, in particular,\ncan depend on the compiler, character set, language, and content.\nThe quality of a hash function is often evaluated using\nthe SMHasher test suite, originally written by Austin Appleby , but greatly\nextended by Reini Urban .\nAll except the simplest, FNV_1 and FNV_1A , of the hash functions\ndefined in the modules perform well on the tests in Reini Urban's\nversion of SMHasher. There are two problems in implementing hash functions in Fortran.\nFirst, the static typing of Fortran makes it awkward to define general\npurpose hash functions.\nInstead hash functions are defined for some of the more common\nobjects: character strings and rank-1 arrays of integers.\nOther objects can, in principle, be hashed by using transfer to\nmap their contents to an integer array, typically one of kind int8 .\nThe other problem is that hash codes are typically defined using\nmodular unsigned integer arithmetic.\nAs such integers are not part of the current Fortran standard,\nworkarounds have to be used.\nThese can take two forms.\nIn one, the operations are emulated by using an integer of a\nlarger size, or, for the larger integers, by dividing the integer into\ntwo lower and higher order halves,\nand performing the operations on each half separately using\nthe larger integers.\nIn the second, the unsigned integers may be replaced directly by\nthe corresponding signed integers, but\notherwise not modifying the code logic.\nThe first should be standard conforming on current compilers, but\nis more computationally intensive unless the compilers recognize\nunderlying idioms that are rarely used in Fortran codes. The second is\nnot standard conforming as bit operations involving the sign are\nundefined,\nbut should yield equivalent results with fewer operations on\ncompilers with two's complement integers that do not trap on over\nor under flow. The codes currently use the second method. In order to compile the hash function modules, the compilers must\nimplement much of Fortran 2003, and selected components of Fortran\n2008: submodules, 64-bit integers, and some bit intrinsics.\nThe main limitation on valid compilers is whether they\nimplement the submodules enhancement of Fortran 2008.\nIn order to properly run the hash functions, the compilers must\nuse two's complement integers, and be able to execute them with\nwraparound semantics and no integer overflow exceptions.\nCurrent Fortran 2003+ compilers solely use two's complement\nintegers, and appear to be able to turn off overflow detection,\nso the modules use signed integer arithmetic. For that reason\ntrapping on signed arithmetic must be disabled. The command line\nflags to disable overflow detection for compilers implementing\nsubmodules are summarized in the table below.\nNote that FLANG, gfortran (since version 10), ifort, and NAG all default to\ninteger overflow wrapping. Compiler Legal flag Illegal flag Default ARM Fortran NA? NA? overflow wrapping? Cray Fortran NA? NA? overflow wrapping? FLANG/PGI -fwrapv -ftrapv -fwrapv gfortran -fwrapv -ftrapv -fwrapv IBM Fortran NA? NA? overflow wrapping? ifort NA? NA? overflow wrapping NAG Fortran -C=none -C=intovf -C=none NEC Fortran NA? NA? overflow wrapping? NVIDIA Fortran NA? NA? overflow wrapping? All of the modules' hash functions take one or two arguments.\nAll of them have as their first argument the object to be hashed,\ntermed a key .\nMost have a second argument, termed a seed , that sets the initial\nvalue of the hash code changing the hash function behavior.\nIn particular, inputs that hash to the same hash index with a given\nseed, will often hash to different indexes with a different seed.\nThis difference in behavior makes algorithms that use a seed much\nmore resistant to denial of service attacks that use the properties\nof a known hash to increase the number of hash table collisions.\nThis additional integer must be kept the same for all hashes\nin a given hash table, but can be changed and the objects rehashed\nif collisions are unusually common.\nThe seed can be either a scalar or a two-element array.\nSome of the hash functions have alternatives that allow incremental\nhashing. Algorithm Seed Result FNV-1 None 32 or 64-bit integer FNV-1a None 32 or 64-bit integer nmhash32 32-bit scalar integer 32-bit integer nmhash32x 32-bit scalar integer 32-bit integer pengyhash 32-bit scalar integer 64-bit integer Spooky Hash 64-bit two element vector 64-bit two element vector waterhash 64-bit scalar integer 32-bit integer The hash function modules each provide at least five algorithms for\nhash functions: two optimized for small (< 32 int8 integer elements)\nkeys, and three optimized for large (> 100 int8 integer elements)\nkeys.\nThe core implementation for each algorithm is for keys that are\nvectors of int8 integers.\nThese core implementations are then used in wrappers for keys\nthat are vectors of int16 , int32 and int64 integers, or default\ncharacter strings, in the expectation that inlining will eliminate the\noverhead of transferring the other keys to int8 integer vectors. The stdlib_hash_32bit module provides\nimplementations of five hash code algorithms:\nthe FNV_1 and FNV_1A variants of Glenn Fowler,\nLandon Curt Noll, and Kiem-Phong Vo;\nthe nmhash32 and nmhash32x of James Z. M. Gao;\nand the waterhash of Tommy Ettinger.\nThe detailed implementation of each algorithm is handled in a separate\nsubmodule: stdlib_hash_32bit_fnv , stdlib_hash_32bit_nm , and stdlib_hash_32bit_water ,\nrespectively. The nmhash32 , nmhash32x , and waterhash algorithms\nrequire seeds. The submodules provide separate seed generators\nfor each algorithm.\nThe module itself\nimplements two scalar hash functions, fibonacci_hash and universal_mult_hash .\nIt also implements the subroutine, odd_random_integer , for\ngenerating seeds for universal_mult_hash .\nAll assume a two's complement sign bit, and no out of\nrange checks. The stdlib_hash_64bit module also provides\nimplementations of four hash code algorithms:\nthe FNV_1 and FNV_1A variants of Glenn Fowler,\nLandon Curt Noll, and Kiem-Phong Vo;\nthe pengyhash of Alberto Fajardo;\nand the SpookyHash of Bob Jenkins.\nThe detailed implementation of each algorithm is handled in a separate\nsubmodule: stdlib_hash_64bit_fnv , stdlib_hash_64bit_pengy , and stdlib_hash_64bit_spooky ,\nrespectively.\nThe pengyhash , and Spooky Hash algorithms\nrequire seeds. The submodules provide separate seed generators\nfor each algorithm.\nThe module itself implements two scalar hash functions, fibonacci_hash and universal_mult_hash .\nIt also implements the subroutine, odd_random_integer , for\ngenerating seeds for universal_mult_hash .\nAll assume a two's complement sign bit, and no out of\nrange checks. The stdlib_hash_32bit_fnv and stdlib_hash_64bit_fnv submodules each provide implementations of the FNV-1 and FNV-1A\nalgorithms in the form of two separate overloaded functions: FNV_1 and FNV_1A .\nThe FNV-1 and FNV-2 algorithms differ in their order of the\nmultiplication and exclusive or operations.\nThey differ from their normal implementation in that they also\nencode the structure size in the hash code.\nThe 32 and 64-bit algorithms differ in their initial offsets and in\ntheir multiplicative constants.\nAnalysis suggests that FNV_1A should be better at randomizing the\ninput, but tests with hash tables show negligible difference.\nThese algorithms have the reputation of being particularly useful for\nsmall byte strings, i.e., strings of less than 32 bytes.\nWhile they do not at all perform well on the SMHasher test suite,\nusage indicates that this has little impact on the\nperformance of small hash tables, and the small size of the functions\nallows their quick loading and retainment in the instruction cache,\ngiving a performance boost where the hashing is intermittent.\n(See the SMHasher discussion and S. Richter, V. Alvarez, and J. Dittrich. 2015. A Seven-Dimensional Analysis of Hashing Methods and its Implications on Query Processing, Proceedings of the VLDB Endowment, Vol. 9, No. 3. https://doi.org/10.14778/2850583.2850585 . The stdlib_hash_32bit_nm submodule provides implementations\nof James Z.M. Gao's nmhash32 and nmhash32x algorithms,\nversion 0.2,\nin the form of the overloaded functions, nmhash32 and nmhash32x .\nThe implementations are based on the scalar versions of Gao's\nalgorithms and not the vector versions that require access to\nthe vector instructions of some compilers.\nBoth algorithms perform well on the SMHasher tests, and have no known\nbad seeds. The vector versions of both codes perform well on large\nkeys, with the nmhash32x faster on short keys. To provide randomly\ngenerated seeds for the two functions the submodule also defines the\nsubroutines new_nmhash32_seed and new_nmhash32x_seed . Gao claims\nthat nmhash32x is significantly faster than nmhash32 on short\nseeds, but slower on long seeds, but our limited testing so far shows nmhash32x to be significantly faster on short seeds and slightly\nfaster on long seeds. The stdlib_hash_32bit_water submodule provides implementations\nof Tommy Ettinger's waterhash algorithm in the form of the overloaded\nfunction, water_hash . Water Hash has not been tested by Reini Urban,\nbut Tommy Ettinger has tested it with Urban's SMHasher and presents\nresults that shows Water Hash passing all the tests. So far his\ntesting hasn't found any bad seeds for the algorithm. To provide\nrandomly generated seeds for the hash function the submodule also\ndefines the subroutine new_water_hash_seed . The stdlib_hash_64bit_pengy submodule provides implementations of\nAlberto Fajardo's pengyhash in the form of the overloaded function, pengy_hash . Reini Urban's testing shows that PengyHash passes all\nthe tests and has no bad seeds. To provide randomly generated seeds\nfor the hash function the submodule also defines the subroutine new_pengy_hash_seed . The stdlib_hash_64bit_spooky submodule provides implementations\nof Bob Jenkins' SpookyHash in the form of the overloaded function, spooky_hash . Future implementations may provide the SpookyHash\nincremental hashing procedures.\nSpookyHash is optimized for large objects and should give excellent\nperformance for objects greater than about 96 byes, but has\nsignificant overhead for smaller objects.\nThe code was designed for little-endian compilers, and will give\ndifferent results on big-endian compilers, but the hash quality on\nthose compilers is probably just as good.\nSpookyHash version 2 passes all of Reini Urban's SMHasher tests, and\nhas one bad seed only when reduced to a 32-bit output.\nIts only potential problem is undefined behavior if the key is\nmisaligned. The stdlib_hash_32bit module Overview of the module Thirty two bit hash functions are primarily useful for generating hash\ncodes and hash indices for hash tables.\nThey tend to be less useful for generating checksums, which generally\nbenefit from having a larger number of bits.\nThe stdlib_hash_32bit module defines five public overloaded\n32-bit hash code functions, FNV_1 , FNV-1A , nmhash32 , nmhash32x and water_hash , two scalar hash functions, fibonacci_hash and universal_mult_hash , four seed generators, odd_random_integer for universal_mult_hash , and new_nmhash32_seed , new_nmhash32x_seed ,\nand new_water_hash_seed , for their respective hash code\nfunctions. It also defines the integer kind constant, int_hash , and\na logical constant, little_endian , used to deal with one aspect of\nthe machine dependence of the hash codes. The int_hash parameter It is necessary to define the kind of integer used to return the hash\ncode.\nAs stdlib_hash_32bit deals exclusively with 32-bit hash codes, int_hash is an alias for the integer kind int32 . The little_endian parameter In implementing hash functions it is sometimes necessary to know the\n\"endianess\" of the compiler's integers. To this end the stdlib_hash_32bit module defines the logical parameter little_endian that, if true, indicates that the compiler has\nlittle-endian integers, and that if false indicates that the integers\nare big-endian. Specifications of the stdlib_hash_32bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 32-bit integer. This is useful\nin mapping hash codes into small arrays. Syntax code = fibonacci_hash ( key, nbits ) Class Elemental function Arguments key : Shall be a scalar integer expression of kind int32 . It is an intent(in) argument. nbits Shall be a scalar default integer expression with 0 < nbits <\n32 . It is an intent(in) argument. Result The result is an integer of kind int32 with at most the lowest nbits nonzero, mapping to a range 0 to nbits-1 . Note fibonacci_hash is an implementation of the Fibonacci Hash of Donald\nE. Knuth. It multiplies the key by the odd valued approximation to 2**32/phi , where phi is the golden ratio 1.618..., and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_fibonacci_hash use stdlib_hash_32bit , only : fibonacci_hash use iso_fortran_env , only : int32 implicit none integer , allocatable :: array1 (:) integer ( int32 ) :: hash , source allocate ( array1 ( 0 : 2 ** 6 - 1 )) array1 (:) = 0 source = 42_int32 hash = fibonacci_hash ( source , 6 ) array1 ( hash ) = source print * , hash end program example_fibonacci_hash fnv_1_hash - calculates a hash code from a key Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note fnv_1_hash is an implementation of the original FNV-1 hash code of Glenn\nFowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also encodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1_hash use stdlib_hash_32bit , only : fnv_1_hash use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash hash = fnv_1_hash ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ]) print * , hash end program example_fnv_1_hash fnv_1a_hash - calculates a hash code from a key Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1a_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note fnv_1a_hash is an implementation of the alternative FNV-1a hash code of\nGlenn Fowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also encodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1a_hash use stdlib_hash_32bit , only : fnv_1a_hash use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash hash = fnv_1a_hash ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ]) print * , hash end program example_fnv_1a_hash new_nmhash32_seed - returns a valid input seed for nmhash32 Status Experimental Description Calculates a 32-bit \"random\" integer that is believed to be a valid\nseed for nmhash32 and is also different from the input seed. Syntax call new_nmhash32_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int32 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for nmhash32 , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for nmhash32 . new_nmhash32x_seed - returns a valid input seed for nmhash32x Status Experimental Description Calculates a 32-bit \"random\" integer that is believed to be a valid\nseed for nmhash32x and is also different from the input seed. Syntax call new_nmhash32x_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int32 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for nmhash32x , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for nmhash32x . new_water_hash_seed - returns a valid input seed for water_hash Status Experimental Description Calculates a 64-bit \"random\" integer that is believed to be a valid\nseed for water_hash and is also different from the input seed. Syntax call new_water_hash_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int64 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for water_hash , but if any\nare identified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for water_hash . nmhash32 - calculates a hash code from a key and a seed Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string, and the input seed . Syntax code = nmhash32 ( key, seed ) Class Pure/elemental function Arguments key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. seed : shall be an integer scalar expression of kind int32 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note nmhash32 is an implementation of the nmhash32 hash code of\nJames Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash table\napplications.\nThis code passes the SMHasher tests, and has no known bad seeds.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_nmhash32 use stdlib_hash_32bit , only : nmhash32 , & new_nmhash32_seed use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash integer ( int32 ) :: seed = 42_int32 call new_nmhash32_seed ( seed ) hash = nmhash32 ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ], seed ) print * , seed , hash end program example_nmhash32 nmhash32x - calculates a hash code from a key and a seed Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string, and the input seed . Syntax code = nmhash32x ( key, seed ) Class Pure/elemental function Arguments key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. seed : shall be an integer scalar expression of kind int32 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note nmhash32x is an implementation of the nmhash32x hash code of\nJames Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash table\napplications.\nThis code passes the SMHasher tests, and has no known bad seeds.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_nmhash32x use stdlib_hash_32bit , only : nmhash32x , & new_nmhash32x_seed use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash integer ( int32 ) :: seed = 42_int32 call new_nmhash32x_seed ( seed ) hash = nmhash32x ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ], seed ) print * , seed , hash end program example_nmhash32x odd_random_integer - returns an odd integer Status Experimental Description Returns a random 32-bit integer distributed uniformly over the odd values. Syntax call odd_random_integer ( harvest ) Class Subroutine Argument harvest : Shall be a scalar integer variable of kind int32 . It is\nan intent(out) argument. Note odd_random_integer is intended to generate seeds for universal_mult_hash . odd_random_integer uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See universal_mult_hash . universal_mult_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 32-bit integer. This is useful\nin mapping a hash value to a range 0 to 2**nbits-1 . Syntax code = universal_mult_hash ( key, seed, nbits ) Class Elemental function Arguments key : Shall be a scalar integer expression of kind int32 . It is an intent(in) argument. seed : Shall be a scalar integer expression of kind int32 . It is an intent(in) argument. It must have an odd value. nbits Shall be a scalar default integer expression with 0 < nbits <\n32 . It is an intent(in) argument. Result The result is a scalar integer of kind int32 with at most the lowest nbits nonzero. Note universal_mult_hash is an implementation of the Universal\nMultiplicative Hash of M. Dietzfelbinger, et al.\nIt multiplies the key by seed , and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_universal_mult_hash use stdlib_hash_32bit , only : odd_random_integer , & universal_mult_hash use iso_fortran_env , only : int32 implicit none integer , allocatable :: array1 (:) integer ( int32 ) :: hash , i , seed , source seed = 0 allocate ( array1 ( 0 : 2 ** 6 - 1 )) do i = 0 , 2 ** 6 - 1 array1 ( i ) = i end do call odd_random_integer ( seed ) source = 42_int32 hash = universal_mult_hash ( source , seed , 6 ) array1 ( hash ) = source print * , seed , hash , array1 end program example_universal_mult_hash water_hash - calculates a hash code from a key and a seed Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string, and the input seed . Syntax code = water_hash ( key, seed ) Class Pure/elemental function Arguments key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. seed : shall be an integer scalar expression of kind int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note water_hash is an implementation of the waterhash hash code of\nTommy Ettinger.\nThis code has excellent performance on long keys, and good performance\non short keys.\nAs a result it should give reasonable performance for typical hash\ntable applications.\nThis code passes the SMHasher tests.\nThe waterhash is based on the wyhash of Wang Yi.\nWhile wyhash has a number of bad seeds, where randomization of the\noutput is poor,\nso far testing has not found any bad seeds for waterhash .\nIt can have undefined behavior if the key is not word aligned,\ni.e. some computer processors can only process a given size integer if\nthe address of the integer is a multiple of the integer size.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_water_hash use stdlib_hash_32bit , only : water_hash , & new_water_hash_seed use iso_fortran_env , only : int32 , int64 implicit none integer ( int32 ) :: hash integer ( int64 ) :: seed = 42_int64 call new_water_hash_seed ( seed ) hash = water_hash ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ], seed ) print * , hash , seed end program example_water_hash The stdlib_hash_64bit module Overview of the module Sixty-four bit hash functions are generally overkill for hash table\napplications, and are primarily useful for check sums and related\napplications.\nAs checksums often have to deal with extremely large files or\ndirectories, it is often useful to use incremental hashing as well as\ndirect hashing, so 64-bit and higher hash algorithms often provide\nmultiple implementations. The current module, for simplicity of API,\ndoesn't provide any incremental hashes.\nThe stdlib_hash_64bit module defines several public\noverloaded 64-bit hash procedures, FNV_1 , FNV-1A , pengy_hash , and spooky_hash , two scalar hash functions, fibonacci_hash and universal_mult_hash , a seed generator, odd_random_integer , for the universal_mult_hash , and two seed generators, new_pengy_hash_seed and new_spooky_hash_seed for their respective hash functions. It\nalso defines the integer kind constant, int_hash , used to specify\nthe kind of the hash function results, and a logical constant, little_endian , used to deal with one aspect of the machine\ndependence of the hash codes.\nNote that while SpookyHash can be used as a sixty-four bit hash\nalgorithm, its algorithms actually returns two element integer arrays\nof kind int64 , so it can also be used as a 128 bit hash. The int_hash parameters It is necessary to define the kind of integer used to return the hash\ncode.\nAs stdlib_haash_64bit deals exclusively with 64-bit hash codes, int_hash is an alias for the integer kind int64 . The little_endian parameter In implementing hash functions it is sometimes necessary to know the\n\"endianess\" of the compiler's integers. To this end the stdlib_hash_64bit module defines the logical parameter little_endian that if true indicates that the compiler has\nlittle-endian integers, and that if false indicates that the integers\nare big-endian. Specifications of the stdlib_hash_64bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 64-bit integer. This is useful\nin mapping hash codes into small arrays. Syntax code = fibonacci_hash ( key, nbits ) Class Elemental function Arguments key : Shall be a scalar integer expression of kind int64 . It is an intent(in) argument. nbits Shall be a scalar default integer expression with 0 < nbits <\n64 . It is an intent(in) argument. Result The result is an integer of kind int64 with at most the lowest nbits nonzero, mapping to a range 0 to nbits-1 . Note fibonacci_hash is an implementation of the Fibonacci Hash of Donald\nE. Knuth. It multiplies the key by the odd valued approximation to 2**64/phi , where phi is the golden ratio 1.618..., and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_fibonacci_hash_64 use stdlib_hash_64bit , only : fibonacci_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash , source allocate ( array1 ( 0 : 2 ** 6 - 1 )) array1 (:) = 0 source = int ( Z '1FFFFFFFF' , int64 ) hash = fibonacci_hash ( source , 6 ) array1 ( hash ) = source print * , hash end program example_fibonacci_hash_64 FNV_1 - calculates a hash code from a key Status Experimental Description Calculates a 64-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int64 . Note FNV_1 is an implementation of the original FNV-1 hash code of Glenn\nFowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also ecodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications, although it is rare for them to need 64 bits.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1_hash_64 use stdlib_hash_64bit , only : fnv_1_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash array1 = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] hash = fnv_1_hash ( array1 ) print * , hash end program example_fnv_1_hash_64 FNV_1A - calculates a hash code from a key Status Experimental Description Calculates a 64-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1a_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note FNV_1A is an implementation of the alternative FNV-1a hash code of\nGlenn Fowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also encodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1a_hash_64 use stdlib_hash_64bit , only : fnv_1a_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash array1 = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] hash = fnv_1a_hash ( array1 ) print * , hash end program example_fnv_1a_hash_64 new_pengy_hash_seed - returns a valid input seed for pengy_hash Status Experimental Description Calculates a 32-bit \"random\" integer that is believed to be a valid\nseed for pengy_hash and is also different from the input seed. Syntax call new_pengy_hash_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int32 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for pengy_hash , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for pengy_hash . new_spooky_hash_seed - returns a valid input seed for spooky_hash Status Experimental Description Calculates a 32-bit two element vector of \"random\" integer values that\nis believed to be a valid seed for spooky_hash and is also different\nfrom the input seed. Syntax call new_spooky_hash_seed ( seed ) Class Subroutine Argument seed : shall be a defined two element integer vector variable of kind int32 . It is an intent(inout) argument. On input seed should be\ndefined, and on output it will be different from the input seed . Note Currently there are no known bad seeds for spooky_hash , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for spooky_hash . odd_random_integer - returns odd integer Status Experimental Description Returns a random 64-bit integer distributed uniformly over the odd values. Syntax call odd_random_integer ( harvest ) Class Subroutine Argument harvest : Shall be an integer of kind int64 . It is an intent(out) argument. Note odd_random_integer is intended to generate seeds for universal_mult_hash . odd_random_integer uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See universal_mult_hash . pengy_hash - maps a character string or integer vector to an integer Status Experimental Description Maps a character string or integer vector to a 64-bit integer whose\nvalue also depends on a scalar 32-bit integer, seed . Syntax code = pengy_hash ( key, seed ) Class Pure/elemental function Arguments key : shall be a scalar expression of type default character or a\nrank-1 integer vector expression of kind int8 , int16 , int32 , or int64 . It is an intent(in) argument. seed : shall be an integer expression of kind int64 . It is\nan intent(in) argument. Result The result is an integer of kind int64 . Note pengy_hash is an implementation of the 64-bit pengyhash of Alberto\nFajardo. The hash has acceptable performance on small keys, and good\nperformance on long keys. It passes all the SMHasher tests, and has\nno known bad seeds.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_pengy_hash use stdlib_hash_64bit , only : new_pengy_hash_seed , pengy_hash use iso_fortran_env , only : int32 , int64 implicit none integer , allocatable :: key (:) integer ( int64 ) :: hash integer ( int32 ) :: seed key = [ 0 , 1 , 2 , 3 ] seed = 0_int32 call new_pengy_hash_seed ( seed ) hash = pengy_hash ( key , seed ) print * , seed , hash end program example_pengy_hash spooky_hash - maps a character string or integer vector to an integer Status Experimental Description Maps a character string or integer vector to a 64-bit integer whose\nvalue also depends on a two element vector, seed . Syntax code = spooky_hash ( key, seed ) Class Function Arguments key : shall be a scalar of type default character expression or a\nrank-1 integer vector expression of kind int8 , int16 , int32 , or int64 . It is an intent(in) argument. seed : shall be a two element integer vector expression of kind int64 . It is an intent(in) argument. Result The result is a two element integer vector of kind int64 . Note spooky_hash is an implementation of the 64-bit version 2 of\nSpookyHash of Bob Jenkins. The code was designed for little-endian\ncompilers. The output is different on big-endian compilers, but still\nprobably as good quality. It is often used as a 64-bit hash using the\nfirst element of the returned value, but can be used as a 128 bit\nhash. This version of spooky_hash has good performance on small keys\nand excellent performance on long keys. It passes all the SMHasher tests\nand has no known bad seeds. Example program example_spooky_hash use stdlib_hash_64bit , only : new_spooky_hash_seed , & spooky_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: key (:) integer ( int64 ) :: hash ( 2 ), seed ( 2 ) key = [ 0 , 1 , 2 , 3 ] seed = [ 119_int64 , 2_int64 ** 41 - 1 ] call new_spooky_hash_seed ( seed ) hash = spooky_hash ( key , seed ) print * , seed , hash end program example_spooky_hash universal_mult_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 64-bit integer. This is useful\nin mapping a hash value to a range 0 to 2**nbits-1 . Syntax code = universal_mult_hash ( key, seed, nbits ) Class Elemental function Arguments key : Shall be an integer of kind int64 . It is an intent(in) argument. seed : Shall be an integer of kind int64 . It is an intent(in) argument. It should be an odd value. nbits Shall be a default integer with 0 < nbits < 64 . It is an intent(in) argument. It must be an odd integer. Result The result is an integer of kind int64 with at most the lowest nbits nonzero. Note universal_mult_hash is an implementation of the Universal\nMultiplicative Hash of M. Dietzfelbinger, et al.\nIt multiplies the key by seed , and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_universal_mult_hash_64 use stdlib_hash_64bit , only : odd_random_integer , & universal_mult_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash , seed , source seed = 0 allocate ( array1 ( 0 : 2 ** 6 - 1 )) array1 = 0 call odd_random_integer ( seed ) source = 42_int64 hash = universal_mult_hash ( source , seed , 6 ) array1 ( hash ) = source print * , seed , hash , array1 end program example_universal_mult_hash_64 Test Codes The Fortran Standard Library provides two categories of test\ncodes. One category is tests of the relative performance of the\nvarious hash functions. The other is a comparison of the outputs of\nthe Fortran hash functions, with the outputs of the C and C++ hash\nprocedures that are the inspiration for the Fortran hash functions. In the test/hash_functions_perf subdirectory, the Fortran Standard\nLibrary provides two performance test codes for\nthe hash functions of stdlib_hash_32bit and stdlib_hash_64bit , test_32_bit_hash_performance and test_64_bit_hash_performance respectively. These are primarily set\nup to test runtime performance of the functions. They take a sample of 2**18 integers of kind int8 and break it up into vectors of size\n1, 2, 4, 8, 16, 64, 256, and 1024 elements, yielding 2**18 , 2**17 , 2**16 , 2**15 , 2**14 , 2**12 , 2**10 , and 2**8 vectors respectively. These are then processed by the hash functions\n4 times, and the time for processing is reported. Testing so far has\nbeen on a MacBook Pro with a 2.3 GHz Quad-Core Intel Core i5 and 8 GB\n2133 MHz LPDDR3 of RAM, using GNU Fortran (GCC) 11.1.0 to compile the\ncode. The results for test_32_bit_hash_performance is given by the\nfollowing table: Algorithm Key Size Bytes Key # Time (s) FNV-1 1 1048576 0.02949 FNV-1 2 524288 0.02361 FNV-1 4 262144 0.02016 FNV-1 8 131072 0.01806 FNV-1 16 65536 0.01867 FNV-1 64 16384 0.01717 FNV-1 256 4096 0.01759 FNV-1 1024 1024 0.01659 FNV-1a 1 1048576 0.02897 FNV-1a 2 524288 0.02472 FNV-1a 4 262144 0.02025 FNV-1a 8 131072 0.01901 FNV-1a 16 65536 0.01898 FNV-1a 64 16384 0.01784 FNV-1a 256 4096 0.01723 FNV-1a 1024 1024 0.01673 nmhash32 1 1048576 0.31092 nmhash32 2 524288 0.16230 nmhash32 4 262144 0.07815 nmhash32 8 131072 0.04176 nmhash32 16 65536 0.09261 nmhash32 64 16384 0.04587 nmhash32 256 4096 0.07238 nmhash32 1024 1024 0.07263 nmhash32x 1 1048576 0.04294 nmhash32x 2 524288 0.02937 nmhash32x 4 262144 0.01096 nmhash32x 8 131072 0.00911 nmhash32x 16 65536 0.01291 nmhash32x 64 16384 0.00859 nmhash32x 256 4096 0.07373 nmhash32x 1024 1024 0.07618 water 1 1048576 0.12560 water 2 524288 0.06302 water 4 262144 0.04020 water 8 131072 0.01999 water 16 65536 0.01459 water 64 16384 0.00923 water 256 4096 0.00816 water 1024 1024 0.00792 while for test_64_bit_hash_performance the results are: Algorithm Key Size Bytes Key # Time (s) FNV-1 1 1048576 0.02981 FNV-1 2 524288 0.02697 FNV-1 4 262144 0.02275 FNV-1 8 131072 0.02431 FNV-1 16 65536 0.02158 FNV-1 64 16384 0.02007 FNV-1 256 4096 0.01932 FNV-1 1024 1024 0.02089 FNV-1a 1 1048576 0.03226 FNV-1a 2 524288 0.03076 FNV-1a 4 262144 0.02359 FNV-1a 8 131072 0.02542 FNV-1a 16 65536 0.02364 FNV-1a 64 16384 0.02130 FNV-1a 256 4096 0.01962 FNV-1a 1024 1024 0.01966 Pengy 1 1048576 0.24294 Pengy 2 524288 0.12066 Pengy 4 262144 0.06205 Pengy 8 131072 0.03138 Pengy 16 65536 0.01608 Pengy 64 16384 0.00669 Pengy 256 4096 0.00387 Pengy 1024 1024 0.00295 Spooky 1 1048576 0.11920 Spooky 2 524288 0.07478 Spooky 4 262144 0.03185 Spooky 8 131072 0.01468 Spooky 16 65536 0.01503 Spooky 64 16384 0.00440 Spooky 256 4096 0.00290 Spooky 1024 1024 0.00177 As the tested function will typically reside in the instruction cache\nthese results do not include the costs of reloading the procedure if\nhashing is intermittent. If hashing is intermittent then that can more\nseverely impact the performance of nmhash32 , nmhash32x , water_hash , pengy_hash , and spooky_hash relative to fnv_1_hash and fnv_1a_hash . In the test/hash_functions subdirectory, the Fortran\nStandard Library contains codes to test the validity of\nthe Fortran codes against the original C and C++ codes. It consists of one\nexecutable test_hash_functions that\n1) generates a random sequence of 2048\nintegers of kind int8 , and stores that sequence in the binary file key_array.bin ;\n2) reads the values in key_array.bin , and, for each complicated C/C++-coded\nhash procedure, generates a corresponding binary file containing 2049 hash\nvalues generated from the values in key_array.bin ., and\n3) reads the binary files, and, for each complicated C/C++-coded hash procedure,\ncompares the contents of the binary file\nwith the results of calculating hash values using the corresponding\nFortran hash procedure on the same keys.","tags":"","loc":"page/specs/stdlib_hash_procedures.html"},{"title":"Hash maps – Fortran-lang/stdlib","text":"The stdlib_hashmap_wrappers , and stdlib_hashmaps modules The stdlib_hashmap_wrappers, and stdlib_hashmaps modules Overview of hash maps Licensing The hash map modules The stdlib_hashmap_wrappers module The stdlib_hashmap_wrappers's constant, int_hash The stdlib_hashmap_wrappers' module's derived types Table of stdlib_hashmap_wrappers procedures Specifications of the stdlib_hashmap_wrappers procedures copy_key - Returns a copy of the key Status Description Syntax Class Arguments Example copy_other - Returns a copy of the other data Status Description Syntax Class Arguments Example fibonacci_hash - maps an integer to a smaller number of bits Status Description fnv_1_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example fnv_1a_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example free_key - frees the memory associated with a key Status Description Syntax Class Argument Example free_other - frees the memory associated with other data Status Description Syntax Class Argument Example get - extracts the data from a derived type Status Description Syntax Class Argument Example hasher_fun- serves as a function prototype. Status Description Syntax Class Argument Result character Result value Note Example operator(==) - Compares two keys for equality Status Description Syntax Class Arguments Result character Result value Example seeded_nmhash32_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example seeded_nmhash32x_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example seeded_water_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example set - places the data in a derived type Status Description Syntax Class Argument Note Example The stdlib_hashmaps module The stdlib_hashmaps module's public constants The stdlib_hashmaps module's derived types The hashmap_type abstract type The chaining_map_entry_type derived type The chaining_map_entry_ptr derived type The chaining_map_entry_pool derived type The chaining_hashmap_type derived type The open_map_entry_type derived type The open_map_entry_ptr derived type The open_hashmap_type derived type Table of stdlib_hashmap procedures Specifications of the stdlib_hashmaps procedures calls - Returns the number of calls on the hash map Status Description Syntax Class Argument Result character Result value Example entries - Returns the number of entries in the hash map Status Description Syntax Class Argument Result character Result value Example get_all_keys - Returns all the keys contained in a map Status Description Syntax Class Arguments Example get_other_data - Returns other data associated with the key Status Description Syntax Class Arguments Example init - initializes a hash map Status Description Syntax Class Arguments Example key_test - indicates whether key is present Status Description Syntax Class Arguments Example loading - Returns the ratio of entries to slots Status Description Syntax Class Argument Result character Result value Example map_entry - inserts an entry into the hash map Status Description Syntax Class Arguments Example map_probes - returns the number of hash map probes Status Description Syntax Class Argument Result character Result value Example num_slots - returns the number of hash map slots. Status Description Syntax Class Argument Result character Result value Example rehash - changes the hashing function Status Description Syntax Class Arguments Example remove - removes an entry from the hash map Status Description Syntax Class Arguments Example set_other_data - replaces the other data for an entry Status Description Syntax Class Arguments Example slots_bits - returns the number of bits used to address the hash map slots Status Description Syntax Class Argument Result character Result value Example total_depth - returns the total depth of the hash map entries Status Description Syntax Class Argument Result character Result value Example Overview of hash maps A hash map (hash table) is a data structure that maps keys to values . It uses a hash function to compute a hash code from the key that serves as an index into a linear array of slots (buckets) from\nwhich the desired value can be extracted.\nEach key ideally maps to a unique slot, but most hash functions are\nimperfect and can map multiple keys to the same slot resulting in\ncollisions. Hash maps differ in how they deal with such collisions.\nThis document discusses the hash maps in the Fortran Standard Library. Licensing The Fortran Standard Library is distributed under the MIT License.\nHowever components of the library should be evaluated as to whether\nthey are compatible with the MIT License.\nThe current hash maps were inspired by an implementation of David\nChase. While the code has been greatly modified from his\nimplementation, he has give permission for the unrestricted use of\nhis code. The hash map modules The Fortran Standard Library provides two modules for the\nimplementation of simple hash maps. These maps only accept hash\nfunctions with a single argument, the key, and yield a 32 bit\nhash code. The modules will need to be modified if it is desired to\nuse hash functions with a different API. The two modules are: stdlib_hashmap_wrappers , and stdlib_hashmaps corresponding to the\nfiles: stdlib_hashmap_wrappers.f90 , and stdlib_hashmaps.f90 The module stdlib_hashmap_wrappers provides types and procedures for\nuse by stdlib_hashmaps . It provides an\ninterface to the 32 bit hash functions of the Standard Library module, stdlib_hash_32bit , and provides wrappers to some of the\nhash functions so that they no longer need to be supplied seeds. It\nalso defines two data types used to store information in the hash\nmaps, the key_type and the other_type . The key_type is used to\ndefine keys that, in turn, are used to identify the data entered into\na hash map. The other_type is intended to contain the other data\nassociated with the key. The module stdlib_hashmaps defines the API for a parent datatype, hashmap_type and two extensions of that hash map type: chaining_hashmap_type and open_hashmap_type . The hashmap_type defines the Application Programmers\nInterface (API) for the procedures used by its two extensions. It\nexplicitly defines five non-overridable procedures. It also defines\nthe interfaces for eleven deferred procedures. It does not define the\nfinalization routines for the two extension types, or one routine\nprovided by the open_hashmap_type . The chaining_hashmap_type uses separate chaining with linked\nlists to deal with hash index collisions. In separate chaining the\ncolliding indices are handled by using linked lists with their roots\nat the hash index. The chaining_hashmap_type procedures are\nimplemented in the module stdlib_hashmap_chaining corresponding\nto the file, stdlib_hashmap_chaining.f90 . The open_hashmap_type uses linear open addressing to deal with hash index collisions. In\nlinear open addressing the colliding indices are\nhandled by searching from the initial hash index in increasing\nsteps of one (modulo the hash map size) for an open map slot.\nThe open_hashmap_type procedures are implemented in the submodule stdlib_hashmap_open corresponding to the file stdlib_hashmap_open.f90 . The maps use powers of two for their slot sizes, so that the function, fibonacci_hash , can \nbe used to map the hash codes to indices in the map. This is\nexpected to be more efficient than prime number mapping using a\nmodulo operation, and reduces the requirement that the hash\nfunction need to do a good job randomizing its lower order bits.\nThey do require a good randomizing hash method for good performance.\nBoth adjust the map size to reduce collisions, based on \nthe ratio of the number of hash map probes to the number of subroutine \ncalls.\nWile the maps make extensive use of pointers internally, a private\nfinalization subroutine avoids memory leaks.\nThe maps can take entry keys of type key_type , and other data of the\ntype other_type .\nThe maps allow the addition, removal, and lookup of entries, and the\ninclusion of data in addition to the entry key. The stdlib_hashmap_wrappers module The stdlib_hashmap_wrappers module provides data types to\nrepresent keys and associated data stored in a module, but is also, a\nwrapper for the stdlib_hash_32bit module. It allows\ndirect access to the stdlib_hash_32bit procedures: fibonacci_hash , fnv_1_hasher , fnv_1a_hasher ; and provides\nwrapper functions, seeded_nmhash32_hasher , seeded_nmhash32x_hasher , and seeded_water_hasher to the hash\nfunctions: nmhash32 , nmhash32x , and water_hash , respectively. It\ndefines an interface, hasher_fun , compatible with the hash functions\nthat take a non-scalar key . It defines one integer constant used\nas a kind value, int_hash . It also defines two types, key_type and other_type , and associated procedures, for storing and manipulating\nkeys and their associated data. The stdlib_hashmap_wrappers 's constant, int_hash The constant int_hash is used to define the integer kind value for\nthe returned hash codes and variables used to access them. It\ncurrently is imported from stdlib_hash_32bit where it has the\nvalue, int32 . The stdlib_hashmap_wrappers ' module's derived types The stdlib_hashmap_wrappers module defines two derived types: key_type , and other_type . The key_type is intended to be used\nfor the search keys of hash tables. The other_type is intended to\nstore additional data associated with a key. Both types are\nopaque. Their current representations are as follows type :: key_type private integer ( int8 ), allocatable :: value (:) end type key_type type :: other_type private class ( * ), allocatable :: value end type other_type The module also defines six procedures for those types: copy_key , copy_other , equal_keys , free_key , free_other , get , and set , and one operator, == ,\nfor use by the hash maps to manipulate or inquire of components of\nthose types. Table of stdlib_hashmap_wrappers procedures The stdlib_hashmap_wrappers module provides procedures in\nseveral categories: procedures to manipulate data of the key_type ;\nprocedures to manipulate data of the other_type , and 32 bit hash\nfunctions for keys. The procedures in each category are listed\nbelow. It also provides an operator to compare two key type values for\nequality. Procedures to manipulate key_type data: copy_key( key_in, key_out ) - Copies the contents of the key, key_in , to contents of the key, key_out . get( key, value ) - extracts the contents of key into value ,\n an int8 array, 'int32' array, or character string. free_key( key ) - frees the memory in key . set( key, value ) - sets the content of key to value . Supported key types are int8 array, int32 array, and character\n string. Procedures to manipulate other_type data: copy_other( other_in, other_out ) - Copies the contents of the\n other data, other_in , to the contents of the other data, other_out . get( other, value ) - extracts the contents of other into the class(*) variable value . set( other, value ) - sets the content of other to the class(*) variable value . free_other( other ) - frees the memory in other . Procedures to hash keys to 32 bit integers: fnv_1_hasher( key ) - hashes a key using the FNV-1 algorithm. fnv_1a_hasher( key ) - hashes a key using the FNV-1a algorithm. seeded_nmhash32_hasher( key ) - hashes a key using the nmhash32\n algorithm. seeded_nmhash32x_hasher( key ) - hashes a key using the nmhash32x\n algorithm. seeded_water_hasher( key ) - hashes a key using the waterhash\n algorithm. Operator to compare two key_type values for equality key1 == key2 - compares key1 with key2 for equality Specifications of the stdlib_hashmap_wrappers procedures copy_key - Returns a copy of the key Status Experimental Description Returns a copy of an input of type key_type . Syntax call copy_key ( old_key, new_key ) Class Subroutine. Arguments old_key : shall be a scalar expression of type key_type . It\nis an intent(in) argument. new_key : shall be a scalar variable of type key_type . It\nis an intent(out) argument. Example program example_copy_key use stdlib_hashmap_wrappers , only : & copy_key , operator ( == ), key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ) :: i , value ( 15 ) type ( key_type ) :: old_key , new_key value = [( i , i = 1 , 15 )] call set ( old_key , value ) call copy_key ( old_key , new_key ) print * , \"old_key == new_key = \" , old_key == new_key end program example_copy_key copy_other - Returns a copy of the other data Status Experimental Description Returns a copy of an input of type other_type . Syntax call copy_other ( other_in, other_out ) Class Subroutine. Arguments other_in : shall be a scalar expression of type other_type . It\nis an intent(in) argument. other_out : shall be a scalar variable of type other_type . It\nis an intent(out) argument. Example program example_copy_other use stdlib_hashmap_wrappers , only : & copy_other , other_type use iso_fortran_env , only : int8 implicit none type ( other_type ) :: other_in , other_out integer ( int8 ) :: i type dummy_type integer ( int8 ) :: value ( 15 ) end type type ( dummy_type ) :: dummy_val do i = 1 , 15 dummy_val % value ( i ) = i end do allocate ( other_in % value , source = dummy_val ) call copy_other ( other_in , other_out ) select type ( out => other_out % value ) type is ( dummy_type ) print * , \"other_in == other_out = \" , & all ( dummy_val % value == out % value ) end select end program example_copy_other fibonacci_hash - maps an integer to a smaller number of bits Status Experimental Description fibonacci_hash is just a re-export of the function of the same name\nimplemented in stdlib_hash_32bit .\nIt reduces the value of a 32 bit integer to a smaller number of bits. fnv_1_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = fnv_1_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the FNV-1 algorithm. Note fnv_1_hasher is an implementation of the original FNV-1 hash code of\nGlenn Fowler, Landon Curt Noll, and Phong Vo.\nThis code is relatively fast on short keys, and is small enough that\nit will often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash map\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate. Example program example_fnv_1_hasher use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = fnv_1_hasher ( key ) print * , hash end program example_fnv_1_hasher fnv_1a_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = fnv_1a_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the FNV-1a algorithm. Note fnv_1a_hasher is an implementation of the original FNV-1A hash code\nof Glenn Fowler, Landon Curt Noll, and Phong Vo.\nThis code is relatively fast on short keys, and is small enough that\nit will often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash map\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate. Example program example_fnv_1a_hasher use stdlib_hashmap_wrappers , only : & fnv_1a_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = fnv_1a_hasher ( key ) print * , hash end program example_fnv_1a_hasher free_key - frees the memory associated with a key Status Experimental Description Deallocates the memory associated with a variable of type key_type . Syntax call free_key ( key ) Class Subroutine. Argument key : shall be a scalar variable of type key_type . It\nis an intent(out) argument. Example program example_free_key use stdlib_hashmap_wrappers , only : & copy_key , free_key , key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ) :: i , value ( 15 ) type ( key_type ) :: old_key , new_key value = [( i , i = 1 , 15 )] call set ( old_key , value ) call copy_key ( old_key , new_key ) call free_key ( old_key ) end program example_free_key free_other - frees the memory associated with other data Status Experimental Description Deallocates the memory associated with a variable of type other_type . Syntax call free_other ( other ) Class Subroutine. Argument other : shall be a scalar variable of type other_type . It\nis an intent(out) argument. Example program example_free_other use stdlib_hashmap_wrappers , only : & copy_other , free_other , other_type use iso_fortran_env , only : int8 implicit none type dummy_type integer ( int8 ) :: value ( 15 ) end type dummy_type type ( dummy_type ) :: dummy_val type ( other_type ) :: other_in , other_out integer ( int8 ) :: i do i = 1 , 15 dummy_val % value ( i ) = i end do allocate ( other_in % value , source = dummy_val ) call copy_other ( other_in , other_out ) call free_other ( other_out ) end program example_free_other get - extracts the data from a derived type Status Experimental Description Extracts the data from a key_type or other_type and stores it\nin the variable value . Syntax call get ( key, value ) or call get ( other, value ) Class Subroutine. Argument key : shall be a scalar expression of type key_type . It\nis an intent(in) argument. other : shall be a scalar expression of type other_type . It\nis an intent(in) argument. value : if the the first argument is of key_type value shall be\nan allocatable default character string variable, or \nan allocatable vector variable of type integer and kind int8 or int32 , otherwise the first argument is of other_type and value shall be an allocatable of class(*) . It is an intent(out) argument. Example program example_get use stdlib_hashmap_wrappers , only : & get , key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ), allocatable :: value (:), result (:) type ( key_type ) :: key integer ( int8 ) :: i allocate ( value ( 1 : 15 )) do i = 1 , 15 value ( i ) = i end do call set ( key , value ) call get ( key , result ) print * , 'RESULT == VALUE = ' , all ( value == result ) end program example_get hasher_fun - serves as a function prototype. Status Experimental Description Serves as a prototype for hashing functions with a single, key ,\nargument of type key_type returning an int32 hash value. Syntax type( hasher_fun ), pointer :: fun_pointer Class Pure function prototype Argument key : Shall be a rank one array expression of type integer(int8) .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code. Note hasher_fun is a prototype for defining dummy arguments and function\npointers intended for use as a hash function for the hash maps. Example program example_hasher_fun use stdlib_hashmap_wrappers , only : fnv_1a_hasher , hasher_fun , set , key_type use stdlib_kinds , only : int8 , int32 implicit none procedure ( hasher_fun ), pointer :: hasher_pointer integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key hasher_pointer => fnv_1a_hasher array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = hasher_pointer ( key ) print * , hash end program example_hasher_fun operator(==) - Compares two keys for equality Status Experimental Description Returns .true. if two keys are equal, and .false. otherwise. Syntax test = key1 == key2 Class Pure operator. Arguments key1 : shall be a scalar expression of type key_type . It \nis an intent(in) argument. key2 : shall be a scalar expression of type key_type . It \nis an intent(in) argument. Result character The result is a value of type default logical . Result value The result is .true. if the keys are equal, otherwise .falss. . Example program example_equal_keys use stdlib_hashmap_wrappers , only : & copy_key , operator ( == ), key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ) :: i , value ( 15 ) type ( key_type ) :: old_key , new_key do i = 1 , 15 value ( i ) = i end do call set ( old_key , value ) call copy_key ( old_key , new_key ) print * , \"old_key == new_key = \" , old_key == new_key end program example_equal_keys seeded_nmhash32_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = seeded_nmhash32_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the nmhash32 algorithm. Note seeded_nmhash32_hasher is a wrapper to the NMHASH32_HASH of the\nmodule stdlib_hash_32bit , which supplies a fixed seed\nto the wrapped function. NMHASH32 is an implementation of the nmhash32 hash code of James Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash map\napplications.\nThis code passes the SMHasher tests. Example program example_seeded_nmhash32_hasher use stdlib_hashmap_wrappers , only : & seeded_nmhash32_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = seeded_nmhash32_hasher ( key ) print * , hash end program example_seeded_nmhash32_hasher seeded_nmhash32x_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = seeded_nmhash32x_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the nmhash32x algorithm. Note seeded_nmhash32x_hasher is a wrapper to the nmhash32x_hash of the\nmodule stdlib_hash_32bit , which supplies a fixed seed\nto the wrapped function. nmhash32x is an implementation of the nmhash32x hash code of James Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash map\napplications.\nThis code passes the SMHasher tests. Example program example_seeded_nmhash32x_hasher use stdlib_kinds , only : int8 , int32 use stdlib_hashmap_wrappers , only : & seeded_nmhash32x_hasher , key_type , set implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = seeded_nmhash32x_hasher ( key ) print * , hash end program example_seeded_nmhash32x_hasher seeded_water_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = seeded_water_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the waterhash algorithm. Note seeded_water_hasher is a wrapper to the water_hash of the\nmodule stdlib_hash_32bit , which supplies a fixed seed\nto the wrapped function. water_hash is an implementation of the waterhash hash code of Tommy Ettinger.\nThis code has excellent performance on long keys, and good performance\non short keys.\nAs a result it should give reasonable performance for typical hash\ntable applications.\nThis code passes the SMHasher tests. Example program example_seeded_water_hasher use stdlib_hashmap_wrappers , only : & seeded_water_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = seeded_water_hasher ( key ) print * , hash end program example_seeded_water_hasher set - places the data in a derived type Status Experimental Description Places the data from value in a key_type or an other_type . Syntax call set ( key, value ) or call set ( other, value ) Class Subroutine. Argument key : shall be a scalar variable of type key_type . It\nis an intent(out) argument. other : shall be a scalar variable of type other_type . It\nis an intent(out) argument. value : if the first argument is key value shall be a default\ncharacter string scalar expression, or a vector expression of type integer\nand kind int8 or int32 , while for a first argument of type other value shall be of type class(*) . It is an intent(in) argument. Note Values of types other than a scalar default character or and int8 or int32 vector can be used as the basis of a key by transferring the\nvalue to an int8 vector. Example program example_set use stdlib_hashmap_wrappers , only : & get , key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ), allocatable :: value (:), result (:) type ( key_type ) :: key integer ( int8 ) :: i allocate ( value ( 1 : 15 )) do i = 1 , 15 value ( i ) = i end do call set ( key , value ) call get ( key , result ) print * , 'RESULT == VALUE = ' , all ( value == result ) end program example_set The stdlib_hashmaps module The stdlib_hashmaps module defines three public data types,\nassociated procedures and constants that implement two simple hash map\ntypes using separate chaining hashing and open addressing hashing. The\nderived type hashmap_type is the parent type to its two\nextensions: chaining_hashmap_type and open_hashmap_type .\nThe extension types provide \nprocedures to manipulate the structure of a hash map object: init , map_entry , rehash , remove , and set_other_data . They also provide procedures to inquire about\nentries in the hash map: get_other_data , and key_test . Finally they provide procedures to inquire about the\noverall structure and performance of the hash map object: calls , entries , get_other_data , loading , slots , and total_depth . The module also defines a number of public constants: probe_factor , load_factor , map_probe_factor , default_bits , max_bits , int_calls , int_depth , int_index , int_probes , success , alloc_fault , and array_size_error . The stdlib_hashmaps module's public constants The module defines several categories of public constants. Some are\nused to parameterize the empirical slot expansion code. Others\nparameterize the slots table size. Some are used to define\ninteger kind values for different applications. Finally, some are used\nto report errors or success. The constants probe_factor , and map_probe_factor are used to\nparameterize the slot expansion code used to determine when in a\nin a procedure call the number \nof slots need to be increased to decrease the search path for an\nentry. The constant probe_factor is used to determine when\nthe ratio of the number of map probes to map calls is too large and \nthe slots need expansion. The constant map_probe_factor is used to\ndetermine when inserting a new entry the ratio of the number of map\nprobes to map calls is too large and the slots need expansion. The constants default_bits , and max_bits are used to parameterize the table's slots size. The default_bits constant defines the default initial number of slots\nwith a current value of 6 resulting in an initial 2**6 == 64 slots. This may optionally be overridden on hash map creation. The max_bits parameter sets the maximum table size as 2**max_bits with\na default value for max_bits of 30. The table will not work for a\nslots size greater than 2**30 . The constants int_calls , int_depth , int_index , and int_probes are used to define integer kind values for various contexts. The\nnumber of calls are reported and stored in entities of kind int_calls . Currently int_calls has the value of int64 . The\ntotal depth, the number of inquiries needed to access all elements\nof the table, is reported and stored in entities of kind int_depth . Currently int_depth has the value of int64 . The\nnumber of entries in the table, is reported and stored in entities of\nkind int_index . Currently int_index has the value of int32 .\nThe number of probes, hash map enquiries, are reported and stored in\nentities of kind int_probes . Currently int_probes has the value of int64 . The constant load_factor is only used by the open_hashmap_type . It\nspecifies the maximum fraction of the available slots that may be\nfilled before expansion occurs. The current load_factor = 0.5625 so\nthe current implementation of open_hashmap_type can only hold a\nlittle more than 2**29 entries. Finally the error codes success , alloc_fault , and array_size_error are used to report the error status of certain\nprocedure calls. The succes code indicates that no problems were\nfound. The alloc_fault code indicates that a memory allocation\nfailed. Finally the array_size_error indicates that on table\ncreation slots_bits is less than default_bits or\ngreater than max_bits . The stdlib_hashmaps module's derived types The stdlib_hashmaps module defines three public derived types and\nseven private types used in the implementation of the public\ntypes. The public types are the abstract hashmap_type and its\nextensions: chaining_hashmap_type and open_hashmap_type . The three\nprivate derived types, chaining_map_entry_type , chaining_map_entry_ptr , and chaining_map_entry_pool are used in\nthe implementation of the chaining_hashmap_type public type. The\nfour private derived types, open_map_entry_type , open_map_entry_list , open_map_entry_ptr , and open_map_entry_pool are used in the implementation of the open_hashmap_type public\ntype. Each of these types are described below. The hashmap_type abstract type The hashmap_type abstract type serves as the parent type for the two\ntypes chaining_hashmap_type and open_hashmap_type . It defines\nseven private components: call_count - the number of procedure calls on the map; nbits - the number of bits used to address the slots; num_entries - the number of entries in the map; num_free - the number of entries in the free list of removed \n entries; probe_count - the number of map probes since the last resizing or\n initialization; total_probes - the number of probes of the map up to the last\n resizing or initialization; and hasher - a pointer to the hash function used by the map. It also defines five non-overridable procedures: calls - returns the number of procedure calls on the map; entries - returns the number of entries in the map; map_probes - returns the number of map probes since\n initialization; num_slots - returns the number of slots in the map; and slots_bits - returns the number of bits used to address the slots; and ten deferred procedures: get_all_keys - gets all the keys contained in a map; get_other_data - gets the other map data associated with the key; init - initializes the hash map; key_test - returns a logical flag indicating whether the key is \n defined in the map. loading - returns the ratio of the number of entries to the number\n of slots; map_entry - inserts a key and its other associated data into the\n map; rehash - rehashes the map with the provided hash function; remove - removes the entry associated wit the key; set_other_data - replaces the other data associated with the key; total_depth - returns the number of probes needed to address all\n the entries in the map; The type's definition is below: type , abstract :: hashmap_type private integer ( int_calls ) :: call_count = 0 integer ( int_calls ) :: probe_count = 0 integer ( int_calls ) :: total_probes = 0 integer ( int_index ) :: num_entries = 0 integer ( int_index ) :: num_free = 0 integer ( int32 ) :: nbits = default_bits procedure ( hasher_fun ), pointer , nopass :: hasher => fnv_1_hasher contains procedure , non_overridable , pass ( map ) :: calls procedure , non_overridable , pass ( map ) :: entries procedure , non_overridable , pass ( map ) :: map_probes procedure , non_overridable , pass ( map ) :: slots_bits procedure , non_overridable , pass ( map ) :: num_slots procedure ( get_all_keys ), deferred , pass ( map ) :: get_all_keys procedure ( get_other ), deferred , pass ( map ) :: get_other_data procedure ( init_map ), deferred , pass ( map ) :: init procedure ( key_test ), deferred , pass ( map ) :: key_test procedure ( loading ), deferred , pass ( map ) :: loading procedure ( map_entry ), deferred , pass ( map ) :: map_entry procedure ( rehash_map ), deferred , pass ( map ) :: rehash procedure ( remove_entry ), deferred , pass ( map ) :: remove procedure ( set_other ), deferred , pass ( map ) :: set_other_data procedure ( total_depth ), deferred , pass ( map ) :: total_depth end type hashmap_type The chaining_map_entry_type derived type Entities of the type chaining_map_entry_type are used to define\na linked list structure that stores the\nkey, its other data, the hash of the key, and the resulting index into\nthe inverse table. The type's definition is below: type :: chaining_map_entry_type ! Chaining hash map entry type private integer ( int_hash ) :: hash_val ! Full hash value type ( key_type ) :: key ! The entry's key type ( other_type ) :: other ! Other entry data integer ( int_index ) :: index ! Index into inverse table type ( chaining_map_entry_type ), pointer :: & next => null () ! Next bucket end type chaining_map_entry_type Currently the int_hash and int_index have the value of int32 . The chaining_map_entry_ptr derived type The type chaining_map_entry_ptr is used to define the elements of\nthe hash map that are either empty or link to the linked lists\ncontaining the elements of the table. The type's definition is below: type chaining_map_entry_ptr ! Wrapper for a pointer to a chaining ! map entry type object type ( chaining_map_entry_type ), pointer :: target => null () end type chaining_map_entry_ptr The chaining_map_entry_pool derived type The type chaining_map_entry_pool is used to implement a pool of\nallocated chaining_map_entry_type elements to save on allocation\ncosts. The type's definition is below: type :: chaining_map_entry_pool ! Type implementing a pool of allocated ! `chaining_map_entry_type` objects private ! Index of next bucket integer ( int_index ) :: next = 0 type ( chaining_map_entry_type ), allocatable :: more_map_entries (:) type ( chaining_map_entry_pool ), pointer :: lastpool => null () end type chaining_map_entry_pool The chaining_hashmap_type derived type The chaining_hashmap_type derived type extends the hashmap_type to\nimplements a separate chaining hash map. In addition to the components\nof the hashmap_type it provides the four components: cache - a pool of chaining_map_entry_pool objects used to reduce\nallocation costs; free_list - a free list of map entries; inverse - an array of chaining_map_entry_ptr bucket lists\n(inverses) storing entries at fixed locations once\nentered; and slots - an array of bucket lists serving as the hash map. It also implements all of the deferred procedures of the hashmap_type and a finalizer for its maps. The type's definition is\nas follows: type , extends ( hashmap_type ) :: chaining_hashmap_type private type ( chaining_map_entry_pool ), pointer :: cache => null () type ( chaining_map_entry_type ), pointer :: free_list => null () type ( chaining_map_entry_ptr ), allocatable :: inverse (:) type ( chaining_map_entry_ptr ), allocatable :: slots (:) contains procedure :: get_all_keys => get_all_chaining_keys procedure :: get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: key => chaining_key_test procedure :: loading => chaining_loading procedure :: map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map procedure :: remove => remove_chaining_entry procedure :: set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth final :: free_chaining_map end type chaining_hashmap_type The open_map_entry_type derived type Entities of the type open_map_entry_type are used to define\na linked list structure that stores the\nkey, its other data, the hash of the key, and the resulting index into\nthe inverse table. The type's definition is below: type :: open_map_entry_type ! Open hash map entry type private integer ( int_hash ) :: hash_val ! Full hash value type ( key_type ) :: key ! The entry's key type ( other_type ) :: other ! Other entry data integer ( int_index ) :: index ! Index into inverse table end type open_map_entry_type Currently int_hash and int_index have the value of int32 . The open_map_entry_ptr derived type The type open_map_entry_ptr is used to define the elements of\nthe hash map that are either empty or link to the linked lists\ncontaining the elements of the table. The type's definition is below: type open_map_entry_ptr ! Wrapper for a pointer to a open ! map entry type object type ( open_map_entry_type ), pointer :: target => null () end type open_map_entry_ptr The open_hashmap_type derived type The open_hashmap_type derived type extends the hashmap_type to\nimplement an open addressing hash map. In addition to the components\nof the hashmap_type it provides the four components: cache - a pool of open_map_entry_pool objects used to reduce\nallocation costs; free_list - a free list of map entries; index_mask - an and mask used in linear addressing; inverse - an array of open_map_entry_ptr bucket lists\n(inverses) storing entries at fixed locations once\nentered; and slots - an array of bucket lists serving as the hash map. It also implements all of the deferred procedures of the hashmap_type and a finalizer for its maps. The type's definition is\nas follows: type , extends ( hashmap_type ) :: open_hashmap_type private integer ( int_index ) :: index_mask = 2_int_index ** default_bits - 1 type ( open_map_entry_pool ), pointer :: cache => null () type ( open_map_entry_list ), pointer :: free_list => null () type ( open_map_entry_ptr ), allocatable :: inverse (:) integer ( int_index ), allocatable :: slots (:) contains procedure :: get_all_keys => get_all_open_keys procedure :: get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: key_test => open_key_test procedure :: loading => open_loading procedure :: map_entry => map_open_entry procedure :: rehash => rehash_open_map procedure :: remove => remove_open_entry procedure :: set_other_data => set_other_open_data procedure :: total_depth => total_open_depth final :: free_open_map end type open_hashmap_type Table of stdlib_hashmap procedures The stdlib_hashmap module provides procedures in\nseveral categories: a procedure to initialize the map; a procedure to\nmodify the structure of a map; procedures to modify the content of a\nmap; procedures to report on the content of a map; and procedures\nto report on the structure of the map. The procedures in each category\nare listed below. Procedure to initialize a chaining hash map: map % init( hasher[, slots_bits, status] ) - Routine\n to initialize a chaining hash map. Procedure to modify the structure of a map: map % rehash( hasher ) - Routine to change the hash function\n for a map. Procedures to modify the content of a map: map % map_entry( key, other, conflict ) - Inserts an entry into the\n hash map. map % remove( key, existed ) - Remove the entry, if any,\n associated with the key . map % set_other_data( key, other, exists ) - Change the other data\n associated with the entry. Procedures to report the content of a map: map % get_all_keys( all_keys ) - Returns all the keys\n contained in the map; map % get_other_data( key, other, exists ) - Returns the other data\n associated with the key ; map % key_test( key, present) - Returns a flag indicating whether\n the key is present in the map. Procedures to report on the structure of the map: map % calls() - the number of subroutine calls on the hash map. map % entries() - the number of entries in a hash map. map % loading() - the number of entries relative to the number of\n slots in a hash map. map % map_probes() - the total number of table probes on a hash\n map. map % slots() - Returns the number of allocated slots in a hash\n map. map % total_depth() - Returns the total number of one's based\noffsets of slot entries from their slot index Specifications of the stdlib_hashmaps procedures calls - Returns the number of calls on the hash map Status Experimental Description Returns the number of procedure calls on a hash map. Syntax value = map % calls () Class Pure function Argument map (pass) - shall be an expression of class hashmap_type .\nIt is an intent(in) argument. Result character The result will be an integer of kind int_calls . Result value The result will be the number of procedure calls on the hash map. Example program example_calls use stdlib_hashmaps , only : chaining_hashmap_type , int_calls use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer ( int_calls ) :: initial_calls call map % init ( fnv_1_hasher ) initial_calls = map % calls () print * , \"INITIAL_CALLS = \" , initial_calls end program example_calls entries - Returns the number of entries in the hash map Status Experimental Description Returns the number of entries in a hash map. Syntax value = map % entries () Class Pure function Argument map (pass) - shall be an expression of class hashmap_type .\nIt is an intent(in) argument. Result character The result will be an integer of kind int_index . Result value The result will be the number of entries in the hash map. Example program example_entries use stdlib_hashmaps , only : open_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( open_hashmap_type ) :: map integer ( int_index ) :: initial_entries call map % init ( fnv_1_hasher ) initial_entries = map % entries () print * , \"INITIAL_ENTRIES = \" , initial_entries end program example_entries get_all_keys - Returns all the keys contained in a map Status Experimental Description Returns all the keys contained in a map. Syntax call map % get_all_keys ( all_keys ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It is an intent(in) argument. It will be \n the hash map used to store and access the other data. all_keys : shall be a rank-1 allocatable array of type key_type . \n It is an intent(out) argument. Example program example_hashmaps_get_all_keys use stdlib_kinds , only : int32 use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , & key_type , other_type , set implicit none type ( chaining_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other type ( key_type ), allocatable :: keys (:) integer ( int32 ) :: i call map % init ( fnv_1_hasher ) ! adding key-value pairs to the map call set ( key , \"initial key\" ) call set ( other , \"value 1\" ) call map % map_entry ( key , other ) call set ( key , \"second key\" ) call set ( other , \"value 2\" ) call map % map_entry ( key , other ) call set ( key , \"last key\" ) call set ( other , \"value 3\" ) call map % map_entry ( key , other ) ! getting all the keys in the map call map % get_all_keys ( keys ) print '(\"Number of keys in the hashmap = \", I0)' , size ( keys ) !Number of keys in the hashmap = 3 do i = 1 , size ( keys ) print '(\"Value of key \", I0, \" = \", A)' , i , key_to_char ( keys ( i )) end do !Value of key 1 = initial key !Value of key 2 = second key !Value of key 3 = last key contains !Converts key type to character type pure function key_to_char ( key ) result ( str ) type ( key_type ), intent ( in ) :: key character (:), allocatable :: str character (:), allocatable :: str_mold allocate ( character ( len = size ( key % value )) :: str_mold ) str = transfer ( key % value , str_mold ) end function key_to_char end program example_hashmaps_get_all_keys get_other_data - Returns other data associated with the key Status Experimental Description Returns the other data associated with the key , Syntax value = map % get_other_data ( key, other [, exists] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It is an intent(inout) argument. It will be \n the hash map used to store and access the other data. key : shall be a scalar expression of type key_type . It\n is an intent(in) argument. other : shall be a variable of type other_data .\n It is an intent(out) argument. It is the other data associated\n with the key . exists (optional): shall be a variable of type logical. It is an intent(out) argument. If .true. an entry with the given key exists in the map and other is defined. If .false. other is\nundefined. Example The following is an example of the retrieval of other data\n associated with a key : program example_get_other_data use stdlib_kinds , only : int8 use stdlib_hashmaps , only : chaining_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , other_type , set , get implicit none logical :: conflict type ( key_type ) :: key type ( other_type ) :: other type ( chaining_hashmap_type ) :: map type dummy_type integer ( int8 ) :: value ( 4 ) end type dummy_type type ( dummy_type ) :: dummy class ( * ), allocatable :: data dummy % value = [ 4_int8 , 3_int8 , 2_int8 , 1_int8 ] allocate ( data , source = dummy ) call map % init ( fnv_1_hasher ) call set ( key , [ 0_int8 , 1_int8 , 2_int8 , 3_int8 , 4_int8 ]) call set ( other , data ) call map % map_entry ( key , other , conflict ) if (. not . conflict ) then call map % get_other_data ( key , other ) else error stop 'Key is already present in the map.' end if call get ( other , data ) select type ( data ) type is ( dummy_type ) print * , 'Other data % value = ' , data % value class default print * , 'Invalid data type in other' end select end program example_get_other_data init - initializes a hash map Status Experimental Description Initializes a hashmap_type object. Syntax call map % init ( hasher [, slots_bits, status ] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It is an intent(out) argument. It will \n be a hash map used to store and access the entries. hasher : shall be a procedure with interface hash_fun .\n It is an intent(in) argument. It is the procedure to be used to\n generate the hashes for the table from the keys of the entries. slots_bits (optional): shall be a scalar default integer \n expression. It is an intent(in) argument. The initial number of\n slots in the table will be 2**slots_bits . slots_bits shall be a positive default integer less than max_bits , otherwise processing stops with an informative\n error code. If slots_bits is absent then the effective value for slots_bits is default_bits . status (optional): shall be a scalar integer variable of kind int32 . It is an intent(out) argument. On return if present it\nshall have an error code value. If map was successfully initialized then status has the value success . If allocation of memory for the map arrays fails then status has the value alloc_fault . If slot_bits < 6 or slots_bits > max_bits then status has the value of array_size_error . If status is absent, but status would have a value other than success , then processing stops with an informative stop code. Example program example_init use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map call map % init ( fnv_1_hasher , slots_bits = 10 ) end program example_init key_test - indicates whether key is present Status Experimental Description Returns a logical flag indicating whether key is present for an\nentry in the map. Syntax call map % key_test ( key, present ) Class Subroutine. Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . \nIt is an intent(inout) argument. It is the hash map whose entries\nare examined. key : shall be a scalar expression of type key_type . It\nis an intent(in) argument. It is a key whose presence in the map is being examined. present (optional): shall be a scalar variable of type default logical . It is an intent(out) argument. It is a logical flag where .true. indicates that an entry with that key is present in the map and .false. indicates that no such entry is present. Example program example_key_test use stdlib_kinds , only : int8 use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , set implicit none type ( chaining_hashmap_type ) :: map type ( key_type ) :: key logical :: present call map % init ( fnv_1_hasher ) call set ( key , [ 0_int8 , 1_int8 ]) call map % key_test ( key , present ) print * , \"Initial key of 10 present for empty map = \" , present end program example_key_test loading - Returns the ratio of entries to slots Status Experimental Description Returns the ratio of the number of entries relative to the number of\nslots in the hash map. Syntax value = map % loading ( ) Class Pure function Argument map (pass) - shall be an expression of class chaining_hashmap_type or open_hashmap_type . It is an intent(in) argument. Result character The result will be a default real. Result value The result will be the ratio of the number of entries relative to the\nnumber of slots in the hash map. Example program example_loading use stdlib_hashmaps , only : open_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( open_hashmap_type ) :: map real :: ratio call map % init ( fnv_1_hasher ) ratio = map % loading () print * , \"Initial loading = \" , ratio end program example_loading map_entry - inserts an entry into the hash map Status Experimental Description Inserts an entry into the hash map if it is not already present. Syntax call map % map_entry ( key[, other, conflict ] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It\nis an intent(inout) argument. It is the hash map to receive the\nentry. key : shall be a scalar expression of type key_type .\n It is an intent(in) argument. It is the key for the entry to be\n placed in the table. other (optional): shall be a scalar expression of type other_type .\n It is an intent(in) argument. If present it is the other data to be\n associated with the key . conflict (optional): shall be a scalar variable of type logical . It is an intent(out) argument. If present, a .true. value indicates that an entry with the value of key already exists\nand the entry was not entered into the map, a .false. value indicates\nthat key was not present in the map and the entry was added to the\nmap. If key is already present in map then the presence of other is ignored. Example program example_map_entry use , intrinsic :: iso_fortran_env , only : int8 use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , other_type , set implicit none type ( chaining_hashmap_type ) :: map type ( key_type ) :: key logical :: conflict type ( other_type ) :: other class ( * ), allocatable :: dummy allocate ( dummy , source = 4 ) call map % init ( fnv_1_hasher , slots_bits = 10 ) call set ( key , [ 5_int8 , 7_int8 , 4_int8 , 13_int8 ]) call set ( other , dummy ) call map % map_entry ( key , other , conflict ) print * , 'CONFLICT = ' , conflict end program example_map_entry map_probes - returns the number of hash map probes Status Experimental Description Returns the total number of table probes on the hash map. Syntax result = map % map_probes ( ) Class Pure function Argument map (pass): shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the hash map of interest. Result character The result is a scalar integer of kind int_probes . Result value The result is the number of probes of map since initialization or\nrehashing. Example program example_probes use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer :: nprobes call map % init ( fnv_1_hasher ) nprobes = map % map_probes () print * , \"Initial probes = \" , nprobes end program example_probes num_slots - returns the number of hash map slots. Status Experimental Description Returns the total number of slots on a hash map Syntax result = map % num_slots ( ) Class Pure function Argument map : shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the\nhash map of interest. Result character The result is a scalar integer of kind int_index . Result value The result is the number of slots in map . Example program example_num_slots use stdlib_hashmaps , only : chaining_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer ( int_index ) :: initial_slots call map % init ( fnv_1_hasher ) initial_slots = map % num_slots () print * , \"Initial slots = \" , initial_slots end program example_num_slots rehash - changes the hashing function Status Experimental Description Changes the hashing function for the map entries to that of hasher . Syntax call map % rehash ( hasher ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type .\nIt is an intent(inout) argument. It is the hash map whose hashing \nmethod is to be changed. hasher : shall be a function of interface hasher_fun .\nIt is the hash method to be used by map . Example program example_rehash use stdlib_kinds , only : int8 use stdlib_hashmaps , only : open_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , fnv_1a_hasher , & key_type , other_type , set implicit none type ( open_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other class ( * ), allocatable :: dummy allocate ( dummy , source = 'a dummy value' ) call map % init ( fnv_1_hasher , slots_bits = 10 ) call set ( key , [ 5_int8 , 7_int8 , 4_int8 , 13_int8 ]) call set ( other , dummy ) call map % map_entry ( key , other ) call map % rehash ( fnv_1a_hasher ) end program example_rehash remove - removes an entry from the hash map Status Experimental Description Removes an entry from the hash map, map . Syntax call map % remove ( key[, existed ]) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . \nIt is an intent(inout) argument. It is the hash map with the element \nto be removed. key : shall be a scalar expression of type key_type . It\nis an intent(in) argument. It is the key identifying the entry\nto be removed. existed (optional): shall be a scalar variable of type default\nlogical. It is an intent(out) argument. If present with the value .true. the entry existed in the map before removal, if .false. the\nentry was not present to be removed and the map is unchanged. If\nabsent, the procedure returns with no entry with the given key. Example program example_remove use stdlib_kinds , only : int8 use stdlib_hashmaps , only : open_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher , & fnv_1a_hasher , key_type , other_type , set implicit none type ( open_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other logical :: existed class ( * ), allocatable :: dummy allocate ( dummy , source = 4.0 ) call map % init ( fnv_1_hasher , slots_bits = 10 ) call set ( key , [ 5_int8 , 7_int8 , 4_int8 , 13_int8 ]) call set ( other , dummy ) call map % map_entry ( key , other ) call map % remove ( key , existed ) print * , \"Removed key existed = \" , existed end program example_remove set_other_data - replaces the other data for an entry Status Experimental Description Replaces the other data in the map for the entry with the key value, key . Syntax call map % set_other_data ( key, other[, exists] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It\nis an intent(inout) argument. It will be a hash map used to store\nand access the entry's data. key : shall be a scalar expression of type key_type . It\nis an intent(in) argument. It is the key to the entry whose other data is to be replaced. other : shall be a scalar expression of type other_type .\nIt is an intent(in) argument. It is the data to be stored as\nthe other data for the entry with the key value, key . exists (optional): shall be a scalar variable of type default\nlogical. It is an intent(out) argument. If present with the value .true. an entry with that key existed in the map and its other data was replaced, otherwise if exists is .false. the entry did\nnot exist and nothing was done. Example program example_set_other_data use stdlib_kinds , only : int8 use stdlib_hashmaps , only : open_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , & fnv_1a_hasher , key_type , other_type , set implicit none logical :: exists type ( open_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other class ( * ), allocatable :: dummy call map % init ( fnv_1_hasher , slots_bits = 10 ) allocate ( dummy , source = 'A value' ) call set ( key , [ 5_int8 , 7_int8 , 4_int8 , 13_int8 ]) call set ( other , dummy ) call map % map_entry ( key , other ) deallocate ( dummy ) allocate ( dummy , source = 'Another value' ) call set ( other , dummy ) call map % set_other_data ( key , other , exists ) print * , 'The entry to have its other data replaced exists = ' , exists end program example_set_other_data slots_bits - returns the number of bits used to address the hash map slots Status Experimental Description Returns the total number of bits used to address the hash map slots. Syntax result = map % slots_bits ( ) Class Pure function Argument map (pass): shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the\nhash map of interest. Result character The result is a scalar integer of kind int_index . Result value The result is the number of bits used in addressing the slots in map . Example program example_slots_bits use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer :: bits call map % init ( fnv_1_hasher ) bits = map % slots_bits () print * , \"Initial slot bits = \" , bits end program example_slots_bits total_depth - returns the total depth of the hash map entries Status Experimental Description Returns the total number of one's based offsets of slot entries from\ntheir slot index for a hash map Syntax result = map % total_depth ( ) Class Pure function Argument map (pass): shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the\nhash map of interest. Result character The result is a scalar integer of kind int_depth . Result value The result is the total number of one's based offsets of slot entries\nfrom their slot index the map. Example program example_total_depth use stdlib_hashmaps , only : chaining_hashmap_type , int_depth use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer ( int_depth ) :: initial_depth call map % init ( fnv_1_hasher ) initial_depth = map % total_depth () print * , \"Initial total depth = \" , initial_depth end program example_total_depth","tags":"","loc":"page/specs/stdlib_hashmaps.html"},{"title":"io – Fortran-lang/stdlib","text":"IO IO loadtxt - load a 2D array from a text file Status Description Syntax Arguments Return value Example open - open a file Status Description Syntax Arguments Return value Example savetxt - save a 2D array into a text file Status Description Syntax Arguments Output Example load_npy Status Description Syntax Arguments Return value Example save_npy Status Description Syntax Arguments Output Example getline Status Description Syntax Arguments Example Formatting constants Status Description Example loadtxt - load a 2D array from a text file Status Experimental Description Loads a rank-2 array from a text file. Syntax call loadtxt (filename, array [, skiprows] [, max_rows] [, fmt]) Arguments filename : Shall be a character expression containing the file name from which to load the rank-2 array . array : Shall be an allocatable rank-2 array of type real , complex or integer . skiprows (optional): Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. max_rows (optional): Read max_rows lines of content after skiprows lines. A negative value results in reading all lines. A value of zero results in no lines to be read. The default value is -1. fmt (optional): Fortran format specifier for the text read. Defaults to the write format for the data type. Setting fmt='*' will specify list directed read. Return value Returns an allocated rank-2 array with the content of filename . Example program example_loadtxt use stdlib_io , only : loadtxt implicit none real , allocatable :: x (:, :) call loadtxt ( 'example.dat' , x ) ! Can also use list directed format if the default read fails. call loadtxt ( 'example.dat' , x , fmt = '*' ) end program example_loadtxt open - open a file Status Experimental Description Returns the unit number of a file opened to read, to write, or to read and write. The file might be a text file or a binary file. All files are opened using a streamed access. Syntax u = open (filename [, mode] [, iostat]) Arguments filename : Shall be a character expression containing the name of the file to open. mode (optional): Shall be a character expression containing characters describing the way in which the file will be used. The available modes are: Character Meaning 'r' open for reading (default) 'w' open for writing, truncating the file first 'x' open for exclusive creation, failing if the file already exists 'a' open for writing, appending to the end of the file if it exists '+' open for updating (reading and writing) 'b' binary mode 't' text mode (default) The default mode is 'rt' (i.e. open for reading a text file). The mode may include one of the four different methods for opening a file (i.e., 'r' , 'w' , 'x' , and 'a' ). These four methods can be associated with the character '+' to open the file for updating. In addition, it can be specified if the file should be handled as a binary file ( 'b' ) or a text file ( 't' ). iostat (optional): Shall be a scalar of type integer that receives the error status of open , if provided. If no error exists, iostat is zero. u : Shall be a scalar of type integer that specifies the unit number associated with the file filename . Return value The result is a scalar of type integer . Example program example_open use stdlib_io , only : open implicit none integer :: u u = open ( 'example.dat' , 'wt' ) write ( u , '(a)' ) 'This is an example for open' close ( u ) end program example_open savetxt - save a 2D array into a text file Status Experimental Description Saves a rank-2 array into a text file. Syntax call savetxt (filename, array) Arguments filename : Shall be a character expression containing the name of the file that will contain the 2D array . array : Shall be a rank-2 array of type real , complex or integer . Output Provides a text file called filename that contains the rank-2 array . Example program example_savetxt use stdlib_io , only : savetxt implicit none real :: x ( 3 , 2 ) = 1 call savetxt ( 'example.dat' , x ) end program example_savetxt load_npy Status Experimental Description Loads an array from a npy formatted binary file. Syntax call load_npy (filename, array[, iostat][, iomsg]) Arguments filename : Shall be a character expression containing the file name from which to load the array .\n This argument is intent(in) . array : Shall be an allocatable array of any rank of type real , complex or integer .\n This argument is intent(out) . iostat : Default integer, contains status of loading to file, zero in case of success.\n It is an optional argument, in case not present the program will halt for non-zero status.\n This argument is intent(out) . iomsg : Deferred length character value, contains error message in case iostat is non-zero.\n It is an optional argument, error message will be dropped if not present.\n This argument is intent(out) . Return value Returns an allocated array with the content of filename in case of success. Example program example_loadnpy use stdlib_io_npy , only : load_npy implicit none real , allocatable :: x (:, :) call load_npy ( 'example.npy' , x ) end program example_loadnpy save_npy Status Experimental Description Saves an array into a npy formatted binary file. Syntax call save_npy (filename, array[, iostat][, iomsg]) Arguments filename : Shall be a character expression containing the name of the file that will contain the array .\n This argument is intent(in) . array : Shall be an array of any rank of type real , complex or integer .\n This argument is intent(in) . iostat : Default integer, contains status of saving to file, zero in case of success.\n It is an optional argument, in case not present the program will halt for non-zero status.\n This argument is intent(out) . iomsg : Deferred length character value, contains error message in case iostat is non-zero.\n It is an optional argument, error message will be dropped if not present.\n This argument is intent(out) . Output Provides a npy file called filename that contains the rank-2 array . Example program example_savenpy use stdlib_io_npy , only : save_npy implicit none real :: x ( 3 , 2 ) = 1 call save_npy ( 'example.npy' , x ) end program example_savenpy getline Status Experimental Description Read a whole line from a formatted unit into a string variable Syntax call getline (unit, line[, iostat][, iomsg]) call getline (line[, iostat][, iomsg]) Arguments unit : Formatted input unit.\n This argument is intent(in) .\n If unit is not specified standard input is used. line : Deferred length character or string_type variable.\n This argument is intent(out) . iostat : Default integer, contains status of reading from unit, zero in case of success.\n It is an optional argument, in case not present the program will halt for non-zero status.\n This argument is intent(out) . iomsg : Deferred length character value, contains error message in case iostat is non-zero.\n It is an optional argument, error message will be dropped if not present.\n This argument is intent(out) . Example program example_getline use , intrinsic :: iso_fortran_env , only : input_unit , output_unit use stdlib_io , only : getline implicit none character ( len = :), allocatable :: line integer :: stat call getline ( input_unit , line , stat ) do while ( stat == 0 ) write ( output_unit , '(a)' ) line call getline ( input_unit , line , stat ) end do end program example_getline Formatting constants Status Experimental Description Formatting constants for printing out integer, floating point, and complex numbers at their full precision.\nProvides formats for all kinds as defined in the stdlib_kinds module. Example program example_fmt_constants use stdlib_kinds , only : int32 , int64 , sp , dp use stdlib_io , only : FMT_INT , FMT_REAL_SP , FMT_REAL_DP , FMT_COMPLEX_SP , FMT_COMPLEX_DP implicit none integer ( kind = int32 ) :: i32 integer ( kind = int64 ) :: i64 real ( kind = sp ) :: r32 real ( kind = dp ) :: r64 complex ( kind = sp ) :: c32 complex ( kind = dp ) :: c64 i32 = 100_int32 i64 = 100_int64 r32 = 10 0.0_sp r64 = 10 0.0_dp c32 = cmplx ( 10 0.0_sp , kind = sp ) c64 = cmplx ( 10 0.0_dp , kind = dp ) print \"(2(\" // FMT_INT // \",1x))\" , i32 , i64 ! outputs: 100 100 print FMT_REAL_SP , r32 ! outputs: 1.00000000E+02 print FMT_REAL_DP , r64 ! outputs: 1.0000000000000000E+002 print FMT_COMPLEX_SP , c32 ! outputs: 1.00000000E+02 0.00000000E+00 print FMT_COMPLEX_DP , c64 ! outputs: 1.0000000000000000E+002 0.0000000000000000E+000 end program example_fmt_constants","tags":"","loc":"page/specs/stdlib_io.html"},{"title":"kinds – Fortran-lang/stdlib","text":"The stdlib_kinds module The stdlib_kinds module Introduction Constants provided by stdlib_kinds sp dp xdp qp int8 int16 int32 int64 lk c_bool Introduction The stdlib_kinds module provides kind parameters for the Fortran intrinsic data types, integer , logical , real , and complex . Constants provided by stdlib_kinds sp Single precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 6 significant digits. dp Double precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 15 significant digits. xdp Extended double precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 18 significant digits.\nIf not available it has value -1 . qp Quadruple precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 33 significant digits.\nIf not available it has value -1 . int8 Reexported intrinsic named constant int8 from iso_fortran_env . int16 Reexported intrinsic named constant int16 from iso_fortran_env . int32 Reexported intrinsic named constant int32 from iso_fortran_env . int64 Reexported intrinsic named constant int64 from iso_fortran_env . lk Kind parameter of the default logical data type. c_bool Reexported intrinsic named constant c_bool from iso_c_binding .","tags":"","loc":"page/specs/stdlib_kinds.html"},{"title":"linalg – Fortran-lang/stdlib","text":"Linear Algebra Linear Algebra BLAS and LAPACK Status Description Syntax Example Licensing diag - Create a diagonal array or extract the diagonal elements of an array Status Description Syntax Arguments Return value Example eye - Construct the identity matrix Status Class Description Syntax Arguments Return value Warning Example trace - Trace of a matrix Status Description Syntax Arguments Return value Example outer_product - Computes the outer product of two vectors Status Description Syntax Arguments Return value Example kronecker_product - Computes the Kronecker product of two rank-2 arrays Status Description Syntax Arguments Return value Example cross_product - Computes the cross product of two vectors Status Description Syntax Arguments Return value Example is_square - Checks if a matrix is square Status Description Syntax Arguments Return value Example is_diagonal - Checks if a matrix is diagonal Status Description Syntax Arguments Return value Example is_symmetric - Checks if a matrix is symmetric Status Description Syntax Arguments Return value Example is_skew_symmetric - Checks if a matrix is skew-symmetric Status Description Syntax Arguments Return value Example is_hermitian - Checks if a matrix is Hermitian Status Description Syntax Arguments Return value Example is_triangular - Checks if a matrix is triangular Status Description Syntax Arguments Return value Example is_hessenberg - Checks if a matrix is hessenberg Status Description Syntax Arguments Return value Example solve - Solves a linear matrix equation or a linear system of equations. Status Description Syntax Arguments Return value Example solve_lu - Solves a linear matrix equation or a linear system of equations (subroutine interface). Status Description Syntax Arguments Return value Example lstsq - Computes the least squares solution to a linear matrix equation. Status Description Syntax Arguments Return value Example solve_lstsq - Compute the least squares solution to a linear matrix equation (subroutine interface). Status Description Syntax Arguments Return value Example lstsq_space - Compute internal working space requirements for the least squares solver. Status Description Syntax Arguments det - Computes the determinant of a square matrix Status Description Syntax Arguments Return value Example .det. - Determinant operator of a square matrix Status Description Syntax Arguments Return value Example svd - Compute the singular value decomposition of a rank-2 array (matrix). Status Description Syntax Class Arguments Return values Example svdvals - Compute the singular values of a rank-2 array (matrix). Status Description Syntax Arguments Return values Example The stdlib linear algebra library provides high-level APIs for dealing with common linear algebra operations. BLAS and LAPACK Status Experimental Description BLAS and LAPACK backends provide efficient low level implementations of many linear algebra algorithms, and are employed for non-trivial operators. \nA Modern Fortran version of the Reference-LAPACK 3.10.1 implementation is provided as a backend. \nModern Fortran modules with full explicit typing features are provided after an automated conversion of the legacy codes: \n- [stdlib_linalg_blas(module)], [stdlib_linalg_lapack(module)] provide kind-agnostic interfaces to all functions.\n- Both libraries are available for 32- ( sp ), 64- ( dp ) and 128-bit ( qp ) real and complex numbers (the latter if available in the current build)\n- Free format, lower-case style\n- implicit none(type, external) applied to all procedures and modules\n- intent added and all pure procedures where possible\n- stdlib provides all procedures in two different flavors: (a) original BLAS/LAPACK names with a prefix stdlib_? (ex: stdlib_dgemv , stdlib_sgemv ); (b) A generic, kind agnostic , i.e. gemv . \n- F77-style parameter s removed, and all numeric constants have been generalized with KIND-dependent Fortran intrinsics. \n- preprocessor-based OpenMP directives retained.\nThe single-source module structure hopefully allows for cross-procedural inlining which is otherwise impossible without link-time optimization. When available, highly optimized libraries that take advantage of specialized processor instructions should be preferred over the stdlib implementation. \nExamples of such libraries are: OpenBLAS, MKL (TM), Accelerate, and ATLAS. In order to enable their usage, simply ensure that the following pre-processor macros are defined: STDLIB_EXTERNAL_BLAS wraps all BLAS procedures (except for the 128-bit ones) to an external library STDLIB_EXTERNAL_LAPACK wraps all LAPACK procedures (except for the 128-bit ones) to an external library These can be enabled during the build process. For example, with CMake, one can enable these preprocessor directives using add_compile_definitions(STDLIB_EXTERNAL_BLAS STDLIB_EXTERNAL_LAPACK) .\nThe same is possible from the fpm branch, where the cpp preprocessor is enabled by default. For example, the macros can be added to the project's manifest: # Link against appropriate external BLAS and LAPACK libraries, if necessary [build] link = [ \"blas\" , \"lapack\" ] [dependencies] stdlib = \"*\" # Macros are only needed if using an external library [preprocess] [preprocess.cpp] macros = [ \"STDLIB_EXTERNAL_BLAS\" , \"STDLIB_EXTERNAL_LAPACK\" ] or directly via compiler flags: fpm build --flag \"-DSTDLIB_EXTERNAL_BLAS -DSTDLIB_EXTERNAL_LAPACK -lblas -llapack\" . Syntax All procedures in the BLAS and LAPACK backends follow the standard interfaces from the Reference LAPACK . So, the online Users Guide should be consulted for the full API and descriptions of procedure arguments and their usage. The stdlib implementation makes both kind-agnostic and specific procedure interfaces available via modules\n[stdlib_linalg_blas(module)] and [stdlib_linalg_lapack(module)]. Because all procedures start with a letter that indicates the base datatype , the stdlib generic\ninterface drops the heading letter and contains all kind-dependent implementations. For example, the generic \ninterface to the axpy function looks like: !> AXPY: constant times a vector plus a vector. interface axpy module procedure stdlib_saxpy module procedure stdlib_daxpy module procedure stdlib_qaxpy module procedure stdlib_caxpy module procedure stdlib_zaxpy module procedure stdlib_waxpy end interface axpy The generic interface is the endpoint for using an external library. Whenever the latter is used, references\nto the internal module procedure s are replaced with interfaces to the external library, \nfor example: !> AXPY: constant times a vector plus a vector. interface axpy pure subroutine caxpy ( n , ca , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: ca , cx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( inout ) :: cy ( * ) end subroutine caxpy ! [....] module procedure stdlib_qaxpy end interface axpy Note that the 128-bit functions are only provided by stdlib and always point to the internal implementation. \nBecause 128-bit precision is identified as [stdlib_kinds(module):qp], initials for 128-bit procedures were \nlabelled as q (quadruple-precision reals) and w (\"wide\" or quadruple-precision complex numbers). \nExtended precision ([stdlib_kinds(module):xdp]) calculations are currently not supported. Example program example_gemv use stdlib_linalg , only : eye use stdlib_linalg_blas , only : sp , gemv implicit none ( type , external ) real ( sp ) :: A ( 2 , 2 ), B ( 2 ), C ( 2 ) B = [ 1.0 , 2.0 ] A = eye ( 2 ) ! Use legacy BLAS interface call gemv ( 'No transpose' , m = size ( A , 1 ), n = size ( A , 2 ), alpha = 1.0 , a = A , lda = size ( A , 1 ), x = B , incx = 1 , beta = 0.0 , y = C , incy = 1 ) print * , C ! returns 1.0 2.0 end program example_gemv program example_getrf use stdlib_linalg , only : eye use stdlib_linalg_lapack , only : dp , ilp , getrf implicit none ( type , external ) real ( dp ) :: A ( 3 , 3 ) integer ( ilp ) :: ipiv ( 3 ), info A = eye ( 3 ) ! LAPACK matrix factorization interface (overwrite result) call getrf ( size ( A , 1 ), size ( A , 2 ), A , size ( A , 1 ), ipiv , info ) print * , info ! info==0: Success! end program example_getrf Licensing The Fortran Standard Library is distributed under the MIT License. LAPACK and its contained BLAS are a \nfreely-available software package. They are available from netlib via anonymous \nftp and the World Wide Web. Thus, they can be included in commercial software packages (and have been). \nThe license used for the BLAS and LAPACK backends is the modified BSD license . The header of the LICENSE.txt file has as its licensing requirements: Copyright ( c ) 1992-2013 The University of Tennessee and The University of Tennessee Research Foundation . All rights reserved . Copyright ( c ) 2000-2013 The University of California Berkeley . All rights reserved . Copyright ( c ) 2006-2013 The University of Colorado Denver . All rights reserved . $ COPYRIGHT $ Additional copyrights may follow $ HEADER $ Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : - Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer . - Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer listed in this license in the documentation and / or other materials provided with the distribution . - Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission . The copyright holders provide no reassurances that the source code provided does not infringe any patent , copyright , or any other intellectual property rights of third parties . The copyright holders disclaim any liability to any recipient for claims brought against recipient by any third party for infringement of that parties intellectual property rights . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . So the license for the LICENSE.txt code is compatible with the use of\nmodified versions of the code in the Fortran Standard Library under the MIT license. Credit for the BLAS , LAPACK libraries should be given to the LAPACK authors .\nAccording to the original license, we also changed the name of the routines and commented the changes made \nto the original. diag - Create a diagonal array or extract the diagonal elements of an array Status Experimental Description Create a diagonal array or extract the diagonal elements of an array Syntax d = diag (a [, k]) Arguments a : Shall be a rank-1 or or rank-2 array. If a is a rank-1 array (i.e. a vector) then diag returns a rank-2 array with the elements of a on the diagonal. If a is a rank-2 array (i.e. a matrix) then diag returns a rank-1 array of the diagonal elements. k (optional): Shall be a scalar of type integer and specifies the diagonal. The default k = 0 represents the main diagonal, k > 0 are diagonals above the main diagonal, k < 0 are diagonals below the main diagonal. Return value Returns a diagonal array or a vector with the extracted diagonal elements. Example program example_diag1 use stdlib_linalg , only : diag implicit none real , allocatable :: A (:, :) integer :: i A = diag ([( 1 , i = 1 , 10 )]) ! creates a 10 by 10 identity matrix end program example_diag1 program example_diag2 use stdlib_linalg , only : diag implicit none real , allocatable :: v (:) real , allocatable :: A (:, :) v = [ 1 , 2 , 3 , 4 , 5 ] A = diag ( v ) ! creates a 5 by 5 matrix with elements of v on the diagonal end program example_diag2 program example_diag3 use stdlib_linalg , only : diag implicit none integer , parameter :: n = 10 real :: c ( n ), ul ( n - 1 ) real :: A ( n , n ) c = 2 ul = - 1 A = diag ( ul , - 1 ) + diag ( c ) + diag ( ul , 1 ) ! Gil Strang's favorite matrix end program example_diag3 program example_diag4 use stdlib_linalg , only : diag implicit none integer , parameter :: n = 12 real :: A ( n , n ) real :: v ( n ) call random_number ( A ) v = diag ( A ) ! v contains diagonal elements of A end program example_diag4 program example_diag5 use stdlib_linalg , only : diag implicit none integer , parameter :: n = 3 real :: A ( n , n ) real , allocatable :: v (:) A = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ n , n ]) v = diag ( A , - 1 ) ! v is [2,6] v = diag ( A , 1 ) ! v is [4,8] end program example_diag5 eye - Construct the identity matrix Status Experimental Class Pure function. Description Construct the identity matrix. Syntax I = eye (dim1 [, dim2]) Arguments dim1 : Shall be a scalar of default type integer .\nThis is an intent(in) argument. dim2 : Shall be a scalar of default type integer .\nThis is an intent(in) and optional argument. Return value Return the identity matrix, i.e. a matrix with ones on the main diagonal and zeros elsewhere. The return value is of type integer(int8) .\nThe use of int8 was suggested to save storage. Warning Since the result of eye is of integer(int8) type, one should be careful about using it in arithmetic expressions. For example: !> Be careful A = eye ( 2 , 2 ) / 2 !! A == 0.0 !> Recommend A = eye ( 2 , 2 ) / 2.0 !! A == diag([0.5, 0.5]) Example program example_eye1 use stdlib_linalg , only : eye implicit none integer :: i ( 2 , 2 ) real :: a ( 3 , 3 ) real :: b ( 2 , 3 ) !! Matrix is non-square. complex :: c ( 2 , 2 ) I = eye ( 2 ) !! [1,0; 0,1] A = eye ( 3 ) !! [1.0,0.0,0.0; 0.0,1.0,0.0; 0.0,0.0,1.0] A = eye ( 3 , 3 ) !! [1.0,0.0,0.0; 0.0,1.0,0.0; 0.0,0.0,1.0] B = eye ( 2 , 3 ) !! [1.0,0.0,0.0; 0.0,1.0,0.0] C = eye ( 2 , 2 ) !! [(1.0,0.0),(0.0,0.0); (0.0,0.0),(1.0,0.0)] C = ( 1.0 , 1.0 ) * eye ( 2 , 2 ) !! [(1.0,1.0),(0.0,0.0); (0.0,0.0),(1.0,1.0)] end program example_eye1 program example_eye2 use stdlib_linalg , only : eye , diag implicit none print * , all ( eye ( 4 ) == diag ([ 1 , 1 , 1 , 1 ])) ! prints .true. end program example_eye2 trace - Trace of a matrix Status Experimental Description Trace of a matrix (rank-2 array) Syntax result = trace (A) Arguments A : Shall be a rank-2 array. If A is not square, then trace(A) will return the sum of diagonal values from the square sub-section of A . Return value Returns the trace of the matrix, i.e. the sum of diagonal elements. Example program example_trace use stdlib_linalg , only : trace implicit none real :: A ( 3 , 3 ) A = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) print * , trace ( A ) ! 1 + 5 + 9 end program example_trace outer_product - Computes the outer product of two vectors Status Experimental Description Computes the outer product of two vectors Syntax d = outer_product (u, v) Arguments u : Shall be a rank-1 array v : Shall be a rank-1 array Return value Returns a rank-2 array equal to u v^T (where u, v are considered column vectors). The shape of the returned array is [size(u), size(v)] . Example program example_outer_product use stdlib_linalg , only : outer_product implicit none real , allocatable :: A (:, :), u (:), v (:) u = [ 1. , 2. , 3. ] v = [ 3. , 4. ] A = outer_product ( u , v ) !A = reshape([3., 6., 9., 4., 8., 12.], [3,2]) end program example_outer_product kronecker_product - Computes the Kronecker product of two rank-2 arrays Status Experimental Description Computes the Kronecker product of two rank-2 arrays Syntax C = kronecker_product (A, B) Arguments A : Shall be a rank-2 array with dimensions M1, N1 B : Shall be a rank-2 array with dimensions M2, N2 Return value Returns a rank-2 array equal to A \\otimes B . The shape of the returned array is [M1*M2, N1*N2] . Example program example_kronecker_product use stdlib_linalg , only : kronecker_product implicit none integer , parameter :: m1 = 1 , n1 = 2 , m2 = 2 , n2 = 3 integer :: i , j real :: A ( m1 , n1 ), B ( m2 , n2 ) real , allocatable :: C (:,:) do j = 1 , n1 do i = 1 , m1 A ( i , j ) = i * j ! A = [1, 2] end do end do do j = 1 , n2 do i = 1 , m2 ! B = [ 1, 2, 3 ] B ( i , j ) = i * j ! [ 2, 4, 6 ] end do end do C = kronecker_product ( A , B ) ! C = [ a(1,1) * B(:,:) | a(1,2) * B(:,:) ] ! or in other words, ! C = [ 1.00 2.00 3.00 2.00 4.00 6.00 ] ! [ 2.00 4.00 6.00 4.00 8.00 12.00 ] end program example_kronecker_product cross_product - Computes the cross product of two vectors Status Experimental Description Computes the cross product of two vectors Syntax c = cross_product (a, b) Arguments a : Shall be a rank-1 and size-3 array b : Shall be a rank-1 and size-3 array Return value Returns a rank-1 and size-3 array which is perpendicular to both a and b . Example program demo_cross_product use stdlib_linalg , only : cross_product implicit none real :: a ( 3 ), b ( 3 ), c ( 3 ) a = [ 1. , 0. , 0. ] b = [ 0. , 1. , 0. ] c = cross_product ( a , b ) !c = [0., 0., 1.] end program demo_cross_product is_square - Checks if a matrix is square Status Experimental Description Checks if a matrix is square Syntax d = is_square (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is square, and .false. otherwise. Example program example_is_square use stdlib_linalg , only : is_square implicit none real :: A ( 2 , 2 ), B ( 3 , 2 ) logical :: res A = reshape ([ 1. , 2. , 3. , 4. ], shape ( A )) B = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], shape ( B )) res = is_square ( A ) ! returns .true. res = is_square ( B ) ! returns .false. end program example_is_square is_diagonal - Checks if a matrix is diagonal Status Experimental Description Checks if a matrix is diagonal Syntax d = is_diagonal (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is diagonal, and .false. otherwise.\nNote that nonsquare matrices may be diagonal, so long as a_ij = 0 when i /= j . Example program example_is_diagonal use stdlib_linalg , only : is_diagonal implicit none real :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ 1. , 0. , 0. , 4. ], shape ( A )) B = reshape ([ 1. , 0. , 3. , 4. ], shape ( B )) res = is_diagonal ( A ) ! returns .true. res = is_diagonal ( B ) ! returns .false. end program example_is_diagonal is_symmetric - Checks if a matrix is symmetric Status Experimental Description Checks if a matrix is symmetric Syntax d = is_symmetric (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is symmetric, and .false. otherwise. Example program example_is_symmetric use stdlib_linalg , only : is_symmetric implicit none real :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ 1. , 3. , 3. , 4. ], shape ( A )) B = reshape ([ 1. , 0. , 3. , 4. ], shape ( B )) res = is_symmetric ( A ) ! returns .true. res = is_symmetric ( B ) ! returns .false. end program example_is_symmetric is_skew_symmetric - Checks if a matrix is skew-symmetric Status Experimental Description Checks if a matrix is skew-symmetric Syntax d = is_skew_symmetric (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is skew-symmetric, and .false. otherwise. Example program example_is_skew_symmetric use stdlib_linalg , only : is_skew_symmetric implicit none real :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ 0. , - 3. , 3. , 0. ], shape ( A )) B = reshape ([ 0. , 3. , 3. , 0. ], shape ( B )) res = is_skew_symmetric ( A ) ! returns .true. res = is_skew_symmetric ( B ) ! returns .false. end program example_is_skew_symmetric is_hermitian - Checks if a matrix is Hermitian Status Experimental Description Checks if a matrix is Hermitian Syntax d = is_hermitian (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is Hermitian, and .false. otherwise. Example program example_is_hermitian use stdlib_linalg , only : is_hermitian implicit none complex :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ cmplx ( 1. , 0. ), cmplx ( 3. , - 1. ), cmplx ( 3. , 1. ), cmplx ( 4. , 0. )], shape ( A )) B = reshape ([ cmplx ( 1. , 0. ), cmplx ( 3. , 1. ), cmplx ( 3. , 1. ), cmplx ( 4. , 0. )], shape ( B )) res = is_hermitian ( A ) ! returns .true. res = is_hermitian ( B ) ! returns .false. end program example_is_hermitian is_triangular - Checks if a matrix is triangular Status Experimental Description Checks if a matrix is triangular Syntax d = is_triangular (A,uplo) Arguments A : Shall be a rank-2 array uplo : Shall be a single character from {'u','U','l','L'} Return value Returns a logical scalar that is .true. if the input matrix is the type of triangular specified by uplo (upper or lower), and .false. otherwise.\nNote that the definition of triangular used in this implementation allows nonsquare matrices to be triangular.\nSpecifically, upper triangular matrices satisfy a_ij = 0 when j < i , and lower triangular matrices satisfy a_ij = 0 when j > i . Example program example_is_triangular use stdlib_linalg , only : is_triangular implicit none real :: A ( 3 , 3 ), B ( 3 , 3 ) logical :: res A = reshape ([ 1. , 0. , 0. , 4. , 5. , 0. , 7. , 8. , 9. ], shape ( A )) B = reshape ([ 1. , 0. , 3. , 4. , 5. , 0. , 7. , 8. , 9. ], shape ( B )) res = is_triangular ( A , 'u' ) ! returns .true. res = is_triangular ( B , 'u' ) ! returns .false. end program example_is_triangular is_hessenberg - Checks if a matrix is hessenberg Status Experimental Description Checks if a matrix is Hessenberg Syntax d = is_hessenberg (A,uplo) Arguments A : Shall be a rank-2 array uplo : Shall be a single character from {'u','U','l','L'} Return value Returns a logical scalar that is .true. if the input matrix is the type of Hessenberg specified by uplo (upper or lower), and .false. otherwise.\nNote that the definition of Hessenberg used in this implementation allows nonsquare matrices to be Hessenberg.\nSpecifically, upper Hessenberg matrices satisfy a_ij = 0 when j < i-1 , and lower Hessenberg matrices satisfy a_ij = 0 when j > i+1 . Example program example_is_hessenberg use stdlib_linalg , only : is_hessenberg implicit none real :: A ( 3 , 3 ), B ( 3 , 3 ) logical :: res A = reshape ([ 1. , 2. , 0. , 4. , 5. , 6. , 7. , 8. , 9. ], shape ( A )) B = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. , 7. , 8. , 9. ], shape ( B )) res = is_hessenberg ( A , 'u' ) ! returns .true. res = is_hessenberg ( B , 'u' ) ! returns .false. end program example_is_hessenberg solve - Solves a linear matrix equation or a linear system of equations. Status Experimental Description This function computes the solution to a linear matrix equation , where is a square, full-rank, real or complex matrix. Result vector or array x returns the exact solution to within numerical precision, provided that the matrix is not ill-conditioned. \nAn error is returned if the matrix is rank-deficient or singular to working precision. \nThe solver is based on LAPACK's *GESV backends. Syntax Pure interface: x = solve (a, b) Expert interface: x = solve (a, b [, overwrite_a], err) Arguments a : Shall be a rank-2 real or complex square array containing the coefficient matrix. It is normally an intent(in) argument. If overwrite_a=.true. , it is an intent(inout) argument and is destroyed by the call. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing the right-hand-side vector(s). It is an intent(in) argument. overwrite_a (optional): Shall be an input logical flag. if .true. , input matrix a will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. The function is not pure if this argument is provided. Return value For a full-rank matrix, returns an array value that represents the solution to the linear system of equations. Raises LINALG_ERROR if the matrix is singular to working precision.\nRaises LINALG_VALUE_ERROR if the matrix and rhs vectors have invalid/incompatible sizes.\nIf err is not present, exceptions trigger an error stop . Example program example_solve1 use stdlib_linalg_constants , only : sp use stdlib_linalg , only : solve , linalg_state_type implicit none real ( sp ), allocatable :: A (:,:), b (:), x (:) ! Solve a system of 3 linear equations: ! 4x + 3y + 2z = 25 ! -2x + 2y + 3z = -10 ! 3x - 5y + 2z = -4 ! Note: Fortran is column-major! -> transpose A = transpose ( reshape ([ 4 , 3 , 2 , & - 2 , 2 , 3 , & 3 , - 5 , 2 ], [ 3 , 3 ])) b = [ 25 , - 10 , - 4 ] ! Get coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) x = solve ( A , b ) print * , 'solution: ' , x ! 5.0, 3.0, -2.0 end program example_solve1 program example_solve2 use stdlib_linalg_constants , only : sp use stdlib_linalg , only : solve , linalg_state_type implicit none complex ( sp ), allocatable :: A (:,:), b (:), x (:) ! Solve a system of 3 complex linear equations: ! 2x + iy + 2z = (5-i) ! -ix + (4-3i)y + 6z = i ! 4x + 3y + z = 1 ! Note: Fortran is column-major! -> transpose A = transpose ( reshape ([( 2.0 , 0.0 ),( 0.0 , 1.0 ),( 2.0 , 0.0 ), & ( 0.0 , - 1.0 ),( 4.0 , - 3.0 ),( 6.0 , 0.0 ), & ( 4.0 , 0.0 ),( 3.0 , 0.0 ),( 1.0 , 0.0 )] , [ 3 , 3 ])) b = [( 5.0 , - 1.0 ),( 0.0 , 1.0 ),( 1.0 , 0.0 )] ! Get coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) x = solve ( A , b ) print * , 'solution: ' , x ! (1.0947,0.3674) (-1.519,-0.4539) (1.1784,-0.1078) end program example_solve2 solve_lu - Solves a linear matrix equation or a linear system of equations (subroutine interface). Status Experimental Description This subroutine computes the solution to a linear matrix equation , where is a square, full-rank, real or complex matrix. Result vector or array x returns the exact solution to within numerical precision, provided that the matrix is not ill-conditioned. \nAn error is returned if the matrix is rank-deficient or singular to working precision. \nIf all optional arrays are provided by the user, no internal allocations take place.\nThe solver is based on LAPACK's *GESV backends. Syntax Simple ( Pure ) interface: call solve_lu (a, b, x) Expert ( Pure ) interface: call solve_lu (a, b, x [, pivot, overwrite_a, err]) Arguments a : Shall be a rank-2 real or complex square array containing the coefficient matrix. It is normally an intent(in) argument. If overwrite_a=.true. , it is an intent(inout) argument and is destroyed by the call. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing the right-hand-side vector(s). It is an intent(in) argument. x : Shall be a rank-1 or rank-2 array of the same kind and size as b , that returns the solution(s) to the system. It is an intent(inout) argument, and must have the contiguous property. pivot (optional): Shall be a rank-1 array of the same kind and matrix dimension as a , providing storage for the diagonal pivot indices. It is an intent(inout) arguments, and returns the diagonal pivot indices. overwrite_a (optional): Shall be an input logical flag. if .true. , input matrix a will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. Return value For a full-rank matrix, returns an array value that represents the solution to the linear system of equations. Raises LINALG_ERROR if the matrix is singular to working precision.\nRaises LINALG_VALUE_ERROR if the matrix and rhs vectors have invalid/incompatible sizes.\nIf err is not present, exceptions trigger an error stop . Example program example_solve3 use stdlib_linalg_constants , only : sp , ilp use stdlib_linalg , only : solve_lu , linalg_state_type implicit none integer ( ilp ) :: test integer ( ilp ), allocatable :: pivot (:) complex ( sp ), allocatable :: A (:,:), b (:), x (:) ! Solve a system of 3 complex linear equations: ! 2x + iy + 2z = (5-i) ! -ix + (4-3i)y + 6z = i ! 4x + 3y + z = 1 ! Note: Fortran is column-major! -> transpose A = transpose ( reshape ([( 2.0 , 0.0 ),( 0.0 , 1.0 ),( 2.0 , 0.0 ), & ( 0.0 , - 1.0 ),( 4.0 , - 3.0 ),( 6.0 , 0.0 ), & ( 4.0 , 0.0 ),( 3.0 , 0.0 ),( 1.0 , 0.0 )] , [ 3 , 3 ])) ! Pre-allocate x allocate ( b ( size ( A , 2 )), pivot ( size ( A , 2 ))) allocate ( x , mold = b ) ! Call system many times avoiding reallocation do test = 1 , 100 b = test * [( 5.0 , - 1.0 ),( 0.0 , 1.0 ),( 1.0 , 0.0 )] call solve_lu ( A , b , x , pivot ) print \"(i3,'-th solution: ',*(1x,f12.6))\" , test , x end do end program example_solve3 lstsq - Computes the least squares solution to a linear matrix equation. Status Experimental Description This function computes the least-squares solution to a linear matrix equation . Result vector x returns the approximate solution that minimizes the 2-norm , i.e., it contains the least-squares solution to the problem. Matrix A may be full-rank, over-determined, or under-determined. The solver is based on LAPACK's *GELSD backends. Syntax x = lstsq (a, b, [, cond, overwrite_a, rank, err]) Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix. It is an intent(inout) argument. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing one or more right-hand-side vector(s), each in its leading dimension. It is an intent(in) argument. cond (optional): Shall be a scalar real value cut-off threshold for rank evaluation: s_i >= cond*maxval(s), i=1:rank . Shall be a scalar, intent(in) argument. overwrite_a (optional): Shall be an input logical flag. If .true. , input matrix A will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. rank (optional): Shall be an integer scalar value, that contains the rank of input matrix A . This is an intent(out) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return value Returns an array value of the same kind and rank as b , containing the solution(s) to the least squares system. Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix and right-hand-side vector have invalid/incompatible sizes.\nExceptions trigger an error stop . Example ! Least-squares solver: functional interface program example_lstsq1 use stdlib_linalg_constants , only : dp use stdlib_linalg , only : lstsq implicit none integer , allocatable :: x (:), y (:) real ( dp ), allocatable :: A (:,:), b (:), coef (:) ! Data set x = [ 1 , 2 , 2 ] y = [ 5 , 13 , 25 ] ! Fit three points using a parabola, least squares method ! A = [1 x x**2] A = reshape ([[ 1 , 1 , 1 ], x , x ** 2 ],[ 3 , 3 ]) b = y ! Get coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) coef = lstsq ( A , b ) print * , 'parabola: ' , coef ! parabola: -0.42857142857141695 1.1428571428571503 4.2857142857142811 end program example_lstsq1 solve_lstsq - Compute the least squares solution to a linear matrix equation (subroutine interface). Status Experimental Description This subroutine computes the least-squares solution to a linear matrix equation . Result vector x returns the approximate solution that minimizes the 2-norm , i.e., it contains the least-squares solution to the problem. Matrix A may be full-rank, over-determined, or under-determined. The solver is based on LAPACK's *GELSD backends. Syntax call solve_lstsq (a, b, x, [, real_storage, int_storage, [cmpl_storage, ] cond, singvals, overwrite_a, rank, err]) Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix. It is an intent(inout) argument. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing one or more right-hand-side vector(s), each in its leading dimension. It is an intent(in) argument. x : Shall be an array of same kind and rank as b , and leading dimension of at least n , containing the solution(s) to the least squares system. It is an intent(inout) argument. real_storage (optional): Shall be a real rank-1 array of the same kind a , providing working storage for the solver. It minimum size can be determined with a call to lstsq_space . It is an intent(inout) argument. int_storage (optional): Shall be an integer rank-1 array, providing working storage for the solver. It minimum size can be determined with a call to lstsq_space . It is an intent(inout) argument. cmpl_storage (optional): For complex systems, it shall be a complex rank-1 array, providing working storage for the solver. It minimum size can be determined with a call to lstsq_space . It is an intent(inout) argument. cond (optional): Shall be a scalar real value cut-off threshold for rank evaluation: s_i >= cond*maxval(s), i=1:rank . Shall be a scalar, intent(in) argument. singvals (optional): Shall be a real rank-1 array of the same kind a and size at least minval(shape(a)) , returning the list of singular values s(i)>=cond*maxval(s) , in descending order of magnitude. It is an intent(out) argument. overwrite_a (optional): Shall be an input logical flag. If .true. , input matrix A will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. rank (optional): Shall be an integer scalar value, that contains the rank of input matrix A . This is an intent(out) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return value Returns an array value that represents the solution to the least squares system. Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix and right-hand-side vector have invalid/incompatible sizes.\nExceptions trigger an error stop . Example ! Demonstrate expert subroutine interface with pre-allocated arrays program example_lstsq2 use stdlib_linalg_constants , only : dp , ilp use stdlib_linalg , only : solve_lstsq , lstsq_space , linalg_state_type implicit none integer , allocatable :: x (:), y (:) real ( dp ), allocatable :: A (:,:), b (:), coef (:), real_space (:), singvals (:) integer ( ilp ), allocatable :: int_space (:) integer ( ilp ) :: lrwork , liwork , arank ! Data set x = [ 1 , 2 , 2 ] y = [ 5 , 13 , 25 ] ! Fit three points using a parabola, least squares method ! A = [1 x x**2] A = reshape ([[ 1 , 1 , 1 ], x , x ** 2 ],[ 3 , 3 ]) b = y ! Get storage sizes for the arrays and pre-allocate data call lstsq_space ( A , b , lrwork , liwork ) allocate ( coef ( size ( x )), real_space ( lrwork ), int_space ( liwork ), singvals ( minval ( shape ( A )))) ! Solve coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) ! with no internal allocations call solve_lstsq ( A , b , x = coef , & real_storage = real_space , & int_storage = int_space , & singvals = singvals , & overwrite_a = . true ., & rank = arank ) print * , 'parabola: ' , coef ! parabola: -0.42857142857141695 1.1428571428571503 4.2857142857142811 print * , 'rank: ' , arank ! rank: 2 end program example_lstsq2 lstsq_space - Compute internal working space requirements for the least squares solver. Status Experimental Description This subroutine computes the internal working space requirements for the least-squares solver, solve_lstsq . Syntax call lstsq_space (a, b, lrwork, liwork [, lcwork]) Arguments a : Shall be a rank-2 real or complex array containing the linear system coefficient matrix. It is an intent(in) argument. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing the system's right-hand-side vector(s). It is an intent(in) argument. lrwork : Shall be an integer scalar, that returns the minimum array size required for the real working storage to this system. liwork : Shall be an integer scalar, that returns the minimum array size required for the integer working storage to this system. lcwork ( complex a , b ): For a complex system, shall be an integer scalar, that returns the minimum array size required for the complex working storage to this system. det - Computes the determinant of a square matrix Status Experimental Description This function computes the determinant of a real or complex square matrix. This interface comes with a pure version det(a) , and a non-pure version det(a,overwrite_a,err) that\nallows for more expert control. Syntax c = det (a [, overwrite_a, err]) Arguments a : Shall be a rank-2 square array overwrite_a (optional): Shall be an input logical flag. if .true. , input matrix a will be used as temporary storage and overwritten. This avoids internal data allocation.\n This is an intent(in) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return value Returns a real scalar value of the same kind of a that represents the determinant of the matrix. Raises LINALG_ERROR if the matrix is singular.\nRaises LINALG_VALUE_ERROR if the matrix is non-square.\nExceptions are returned to the err argument if provided; an error stop is triggered otherwise. Example program example_determinant use stdlib_kinds , only : dp use stdlib_linalg , only : det , linalg_state_type implicit none type ( linalg_state_type ) :: err real ( dp ) :: d ! Compute determinate of a real matrix d = det ( reshape ([ real ( dp ) :: 1 , 2 , 3 , 4 ],[ 2 , 2 ])) print * , d ! a*d-b*c = -2.0 end program example_determinant .det. - Determinant operator of a square matrix Status Experimental Description This operator returns the determinant of a real square matrix. This interface is equivalent to the pure version of determinant det . Syntax c = [[stdlib_linalg(module):operator(.det.)(interface)]] (a) Arguments a : Shall be a rank-2 square array of any real or complex kinds. It is an intent(in) argument. Return value Returns a real scalar value that represents the determinnt of the matrix. Raises LINALG_ERROR if the matrix is singular.\nRaises LINALG_VALUE_ERROR if the matrix is non-square.\nExceptions trigger an error stop . Example program example_determinant2 use stdlib_kinds , only : dp use stdlib_linalg , only : operator (. det .) implicit none real ( dp ) :: d ! Compute determinate of a real matrix d = . det . reshape ([ real ( dp ) :: 1 , 2 , 3 , 4 ],[ 2 , 2 ]) print * , d ! a*d-b*c = -2.0 end program example_determinant2 svd - Compute the singular value decomposition of a rank-2 array (matrix). Status Experimental Description This subroutine computes the singular value decomposition of a real or complex rank-2 array (matrix) .\nThe solver is based on LAPACK's *GESDD backends. Result vector s returns the array of singular values on the diagonal of . \nIf requested, u contains the left singular vectors, as columns of .\nIf requested, vt contains the right singular vectors, as rows of . Syntax call svd (a, s, [, u, vt, overwrite_a, full_matrices, err]) Class Subroutine Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix of size [m,n] . It is an intent(inout) argument, but returns unchanged unless overwrite_a=.true. . s : Shall be a rank-1 real array, returning the list of k = min(m,n) singular values. It is an intent(out) argument. u (optional): Shall be a rank-2 array of same kind as a , returning the left singular vectors of a as columns. Its size should be [m,m] unless full_matrices=.false. , in which case, it can be [m,min(m,n)] . It is an intent(out) argument. vt (optional): Shall be a rank-2 array of same kind as a , returning the right singular vectors of a as rows. Its size should be [n,n] unless full_matrices=.false. , in which case, it can be [min(m,n),n] . It is an intent(out) argument. overwrite_a (optional): Shall be an input logical flag. If .true. , input matrix A will be used as temporary storage and overwritten. This avoids internal data allocation. By default, overwrite_a=.false. . It is an intent(in) argument. full_matrices (optional): Shall be an input logical flag. If .true. (default), matrices u and vt shall be full-sized. Otherwise, their secondary dimension can be resized to min(m,n) . See u , v for details. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return values Returns an array s that contains the list of singular values of matrix a .\nIf requested, returns a rank-2 array u that contains the left singular vectors of a along its columns.\nIf requested, returns a rank-2 array vt that contains the right singular vectors of a along its rows. Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix or any of the output arrays invalid/incompatible sizes.\nExceptions trigger an error stop , unless argument err is present. Example svdvals - Compute the singular values of a rank-2 array (matrix). Status Experimental Description This subroutine computes the singular values of a real or complex rank-2 array (matrix) from its singular \nvalue decomposition . The solver is based on LAPACK's *GESDD backends. Result vector s returns the array of singular values on the diagonal of . Syntax s = svdvals (a [, err]) Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix of size [m,n] . It is an intent(in) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return values Returns an array s that contains the list of singular values of matrix a . Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix or any of the output arrays invalid/incompatible sizes.\nExceptions trigger an error stop , unless argument err is present. Example ! Singular Values program example_svdvals use stdlib_linalg_constants , only : dp use stdlib_linalg , only : svdvals implicit none real ( dp ), allocatable :: A (:,:), s (:) character ( * ), parameter :: fmt = \"(a,*(1x,f12.8))\" ! We want to find the singular values of matrix: ! ! A = [ 3 2 2] ! [ 2 3 -2] ! A = transpose ( reshape ([ 3 , 2 , 2 , & 2 , 3 , - 2 ], [ 3 , 2 ])) ! Get singular values s = svdvals ( A ) ! Singular values: [5, 3] print fmt , ' ' print fmt , 'S = ' , s print fmt , ' ' end program example_svdvals","tags":"","loc":"page/specs/stdlib_linalg.html"},{"title":"linalg_state_type – Fortran-lang/stdlib","text":"Linear Algebra -- State and Error Handling Module Linear Algebra -- State and Error Handling Module Introduction Derived types provided The linalg_state_type derived type Type-bound procedures Status Example Error flags provided Comparison operators provided Introduction The stdlib_linalg_state module provides a derived type holding information on the state of linear algebra operations, and procedures for expert control of linear algebra workflows. \nAll linear algebra procedures are engineered to support returning an optional linalg_state_type variable to holds such information, as a form of expert API. If the user does not require state \ninformation, but fatal errors are encountered during the execution of linear algebra routines, the \nprogram will undergo a hard stop.\nInstead, if the state argument is present, the program will never stop, but will return detailed error \ninformation into the state handler. Derived types provided The linalg_state_type derived type The linalg_state_type is defined as a derived type containing an integer error flag, and \nfixed-size character strings to store an error message and the location of the error state change. \nFixed-size string storage was chosen to facilitate the compiler's memory allocation and ultimately \nensure maximum computational performance. A similarly named generic interface, linalg_state_type , is provided to allow the developer to \ncreate diagnostic messages and raise error flags easily. The call starts with an error flag or \nthe location of the event, and is followed by an arbitrary list of integer , real , complex or character variables. Numeric variables may be provided as either scalars or rank-1 (array) inputs. Type-bound procedures The following convenience type-bound procedures are provided: \n- print() returns an allocatable character string containing state location, message, and error flag; \n- print_message() returns an allocatable character string containing the state message; \n- ok() returns a logical flag that is .true. in case of successful state ( flag==LINALG_SUCCESS );\n- error() returns a logical flag that is .true. in case of error state ( flag/=LINALG_SUCCESS ). Status Experimental Example program example_state1 use stdlib_linalg_state , only : linalg_state_type , LINALG_SUCCESS , LINALG_VALUE_ERROR , & operator ( /= ) implicit none type ( linalg_state_type ) :: err ! To create a state variable, we enter its integer state flag, followed by a list of variables ! that will be automatically assembled into a formatted error message. No need to provide string formats err = linalg_state_type ( LINALG_VALUE_ERROR , 'just an example with scalar ' ,& 'integer=' , 1 , 'real=' , 2.0 , 'complex=' ,( 3.0 , 1.0 ), 'and array ' ,[ 1 , 2 , 3 ], 'inputs' ) ! Print flag print * , err % print () ! Check success print * , 'Check error: ' , err % error () print * , 'Check flag : ' , err /= LINALG_SUCCESS end program example_state1 Error flags provided The module provides the following state flags: \n- LINALG_SUCCESS : Successful execution\n- LINALG_VALUE_ERROR : Numerical errors (such as infinity, not-a-number, range bounds) are encountered.\n- LINALG_ERROR : Linear Algebra errors are encountered, such as: non-converging iterations, impossible operations, etc.\n- LINALG_INTERNAL_ERROR : Provided as a developer safeguard for internal errors that should never occur. Comparison operators provided The module provides overloaded comparison operators for all comparisons of a linalg_state_type variable \nwith an integer error flag: < , <= , == , >= , > , /= .","tags":"","loc":"page/specs/stdlib_linalg_state_type.html"},{"title":"logger – Fortran-lang/stdlib","text":"Loggers Loggers Introduction The stdlib_logger constants The derived type: logger_type Status Description Syntax Private attributes The stdlib_logger variable Public logger_type methods Specification of the logger_type methods add_log_file - open a file and add its unit to self % log_units Status Description Syntax Class Arguments Example add_log_unit - add a unit to the array self % log_units Status Description Syntax Class. Arguments Example configuration - report a logger's configuration Status Description Syntax Class Arguments Example configure - configure the logging process Status Description Syntax Class Arguments Example log_debug - Writes the string message to self % log_units Status Description Syntax Behavior Class Arguments Example log_error - Writes the string message to self % log_units Status Description Syntax Behavior Class Arguments Example log_information - Writes the string message to self % log_units Status Description Syntax Behavior Class Arguments Example log_io_error - Write the string message to self % log_units Status Description Behavior Syntax Class Arguments Example log_message - write the string message to self % log_units Status Description Behavior Syntax Class Arguments Example log_text_error - send a message to self % log_units describing an error Status Description Behavior Syntax Class Arguments Example log_units_assigned - returns the number of active I/O units Status Description Syntax Class Argument Result character Result value Example log_warning - write the string message to log_units Status Description Behavior Syntax Class Arguments Example remove_log_unit - remove unit from self % log_units Status Description Syntax Class Arguments Example Introduction This module defines a derived type, its methods, a variable, and\nconstants to be used for the reporting of errors, displaying messages,\nand other information. The derived type, logger_type , is to be used\nto define both global and local logger variables. The logger_type methods serve to configure the loggers and use the logger variables to\nreport messages to a variable specific list of I/O units termed log_units . The variable, global_logger , of type logger_type ,\nis intended to serve as the default global logger. The constants serve\nas error flags returned by the optional integer stat argument. The logger variables have the option to: change which units receive the log messages; report which units receive the log messages; select which types of messages are logged; precede messages by a blank line; precede messages by a time stamp of the form yyyy-mm-dd hh:mm:ss.sss ; precede messages with the names of a module and procedure; follow a message with the stat and errmsg of the error report\n that prompted the log message; follow a message with the iostat and iomsg of the I/O error\n report that prompted the log message; label a message with one of 'DEBUG: ' , 'INFO: ' , 'WARN: ' , 'ERROR: ' , or 'I/O ERROR: ' ; indent subsequent lines of the messages; and format the text to fit within a maximum column width. While every effort has been made to make the code process and\nasynchronous I/O safe, it is always best to have each process write to\nits own dedicated logger file.\nFor thread parallelism (e.g., with OpenMP), it is advised to put the\nlogger call in a guarding region (e.g., in an OpenMP critical region). Note: Loggers of type logger_type normally report their messages to I/O\nunits in the internal list termed log_units . However if log_units is empty then the messages go to the output_unit of the intrinsic\nmodule iso_fortran_env . The stdlib_logger constants The module defines nine distinct public integer constants for\nreporting errors in the stat arguments of some of the module's\nprocedures. The constants, termed error codes, are as follows: Error Code Description success no error was detected close_failure a close statement for an I/O unit failed index_invalid_error the column was invalid for the given line non_sequential_error the I/O unit did not have SEQUENTIAL access open_failure an open statement failed read_only_error an output unit did not have an access specifier of 'WRITE' or 'READWRITE' unformatted_in_error the unit did not have a form of 'FORMATTED' unopened_in_error the unit was not opened write_fault one of the writes to log_units failed The module also defines eight distinct public integer constants for\nselecting the messages that are logged. These constants, termed\nseverity levels, are (sorted following their increasing order of\nseverity): all_level , debug_level , information_level , warning_level , error_level , io_error_level , text_error_level ,\nand none_level .\nAll log messages with a level (e.g., debug_level ) lower than a\nspecified severity level (e.g., information_level ) will be ignored.\nThe levels error_level and io_error_level have the same severity.\nThe default severity level is information_level . The derived type: logger_type Status Experimental Description Serves to define 'logger' variables to be used in reporting\nsignificant events encountered during the execution of a program. Syntax type( logger_type ) :: variable Private attributes Attribute Type Description Initial value add_blank_line Logical Flag to precede output with a blank line .false. indent_lines Logical Flag to indent subsequent lines by four columns .true. level Integer Severity level information_level log_units Integer array List of I/O units used for output Unallocated max_width Integer Maximum column width of output 0 time_stamp Logical Flag to precede output by a time stamp .true. units Integer Count of the number of active output units 0 The stdlib_logger variable The module defines one public variable, global_logger , of type logger_type . As might be guessed from its name, global_logger is\nintended to serve as the default logger for use throughout an\napplication. Public logger_type methods The module defines twelve public procedures: one function and eleven\nsubroutines. The\nmethods are: Method Class Description add_log_file Subroutine Opens a file using newunit , and adds the resulting unit to the log_units list add_log_unit Subroutine Adds an existing unit to the log_units list configuration Subroutine Reports the details of the logging configuration configure Subroutine Configures the details of the logging process log_debug Subroutine Sends a message prepended by 'DEBUG: ' log_error Subroutine Sends a message prepended by 'ERROR: ' optionally followed by a stat or errmsg log_information Subroutine Sends a message prepended by 'INFO: ' log_io_error Subroutine Sends a message prepended by 'I/O ERROR: ' optionally followed by an iostat or iomsg log_message Subroutine Sends a message log_text_error Subroutine Sends a message describing an error found in a line of text log_units_assigned Function Returns the number of active I/O units in log_units log_warning Subroutine Sends a message prepended by 'WARN: ' remove_log_unit Subroutine Removes the unit number from the log_units array Specification of the logger_type methods add_log_file - open a file and add its unit to self % log_units Status Experimental Description Opens a formatted, sequential access, output file, filename using newunit and adds the resulting unit number to the logger's log_units array. Syntax call self % add_log_file ( filename [, unit, action, position, status, stat ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It shall be the logger to add the file to its log_units . filename : shall be a scalar default character expression. It is\nan intent(in) argument. It shall be the name of the file to be opened. unit (optional): shall be a scalar default integer variable. It is an intent(out) argument. It will be the unit number returned by the newunit specifier of the open statement for filename . action (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It shall be the action specifier of the open statement and must have one of the values 'WRITE' or 'READWRITE' . It has the default value of 'WRITE' . position (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It shall be the position specifier of the open statement and must have one of\n the values 'ASIS' , 'REWIND' , or 'APPEND' . It has the default\n value of 'REWIND' . status (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It shall be the status specifier of the open statement and must have one of\n the values 'OLD' , 'NEW' , 'REPLACE' , or 'UNKNOWN' . It has the\n default value of 'REPLACE' . stat (optional): shall be a scalar default integer variable. It\n is an intent(out) argument. If present, on return it will have the\n value success if filename could be opened, the value read_only_error if the action specifier is \"READ\" , or the value open_failure if filename could not be opened. If absent and filename could not be opened then processing will stop with an informative message as the stop code. Example program example_global_logger use stdlib_logger , global => global_logger implicit none integer :: unit , stat call global % add_log_file ( 'error_log.txt' , unit , & position = 'asis' , stat = stat ) if ( stat /= success ) then error stop 'Unable to open \"error_log.txt\".' end if end program example_global_logger add_log_unit - add a unit to the array self % log_units Status Experimental Description Adds unit to the array of self % log_units . The unit shall\nbe the unit number for an opened, sequential, formatted file with an action specifier of 'WRITE' or 'READWRITE' . Failure of unit to meet\nthose requirements will cause stat , if present, to not be success and unit will not be added to log_units . In this case, if stat is\nnot present, cause processing to stop with an informative string as\nthe stop code. Syntax call self % add_log_unit ( unit [, stat ] ) Class. Subroutine. Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It shall be the logger to direct its output\nto unit . unit : shall be a scalar default integer expression. It is an intent(in) argument. It shall be the unit number for an opened,\n sequential, formatted file with an action specifier of 'WRITE' or 'READWRITE' . stat (optional): shall be a scalar default integer variable. It is\n an intent(out) argument. If absent and unit could not be added\n to self's log_units processing will stop with an informative\n message as the stop code. If present it shall have the value of one\n of the module's error codes indicating any errors found with unit . The codes are\n * success - no problem found\n * non_sequential_error - unit did not have an access specifier of 'SEQUENTIAL' * read_only_error - unit had an action specifier of 'READ' when it needs a specifier of 'WRITE' or 'READWRITE' * unformatted_in_error - unit did not have a form specifier of 'FORMATTED' * unopened_in_error - unit was not opened Example program example_add_log_unit use stdlib_logger , only : global_logger , read_only_error implicit none character ( 256 ) :: iomsg integer :: iostat , unit , stat open ( newunit = unit , file = 'error_log.txt' , & form = 'formatted' , status = 'replace' , & position = 'rewind' , & action = 'write' , iostat = iostat , iomsg = iomsg ) call global_logger % add_log_unit ( unit , stat ) select case ( stat ) case ( read_only_error ) error stop 'Unable to write to \"error_log.txt\".' end select end program example_add_log_unit configuration - report a logger's configuration Status Experimental Description Reports the configuration of a logger. Syntax call self % configuration ( [ add_blankline, indent, level, max_width, time_stamp, log_units ] ) Class Pure subroutine Arguments self : shall be a scalar expression of type logger_type . It is an intent(in) argument. It shall be the logger whose configuration is reported. add_blank_line (optional): shall be a scalar default logical\n variable. It is an intent(out) argument. A value of .true. starts output with a blank line, and .false. otherwise. indent (optional): shall be a scalar default logical variable. It\n is an intent(out) argument. A value of .true. indents subsequent\n lines by four spaces, and .false. otherwise. level (optional): shall be a scalar default integer variable. It is an intent(out) argument. The value corresponds to the severity level for\n ignoring a message. max_width (optional): shall be a scalar default integer\n variable. It is an intent(out) argument. A positive value bigger\n than four defines the maximum width of the output, otherwise there\n is no maximum width. time_stamp (optional): shall be a scalar default logical\n variable. It is an intent(out) argument. A value of .true. precedes output with a time stamp of the form 'yyyy-mm-dd\n hh:mm:ss.sss', and .false. otherwise. log_units (optional): shall be a rank one allocatable array\n variable of type default integer. It is an intent(out) argument. On return it shall be the elements of the self 's log_units array. If there were no elements in self 's log_units , a\n zero-sized array is returned. Example module example_mod use stdlib_logger type ( logger_type ) :: logger contains subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit integer , allocatable :: log_units (:) call logger % configuration ( log_units = log_units ) if ( size ( log_units ) == 0 ) then call add_logger_unit ( unit ) end if end subroutine example_sub end module example_mod configure - configure the logging process Status Experimental Description Configures the logging process for self. Syntax call self % configure ( [ add_blank_line, indent, level, max_width, time_stamp ] ) Class Pure subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It shall be the logger to be configured. add_blank_line (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. Set to .true. to start\n output with a blank line, and to .false. otherwise. indent (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. Set to .true. to\n indent subsequent lines by four spaces, and to .false. to\n not indent. level (optional): shall be a scalar default integer expression. It is\n an intent(in) argument. Set the severity level for ignoring a log\n message. max_width (optional): shall be a scalar default integer\n expression. It is an intent(in) argument. Set to a positive value\n bigger than four to define the maximum width of the output,\n otherwise there is no maximum width. time_stamp (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. Set to .true. to\n precede output with a time stamp of the form 'yyyy-mm-dd\n hh:mm:ss.sss', and to .false. otherwise. Example program example_configure use stdlib_logger , only : global => global_logger implicit none call global % configure ( indent = . false ., max_width = 72 ) end program example_configure log_debug - Writes the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with optional additional text. Syntax call self % log_debug ( message [, module, procedure ] ) Behavior If time stamps are active, a time stamp is written, followed\nby module and procedure if present, and then message is written with the prefix 'DEBUG: ' . It is ignored if the level of self is higher than debug_level . Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_information call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_information call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( selection ) integer , intent ( out ) :: selection character ( 128 ) :: errmsg , message integer :: stat write ( * , '(a)' ) \"Enter an integer to select a widget\" read ( * , '(i0)' ) selection write ( message , '(a, i0)' ) & \"The user selected \" , selection call logger % log_DEBUG ( message , & module = 'EXAMPLE_MOD' , procedure = 'EXAMPLE_SUB' ) end subroutine example_sub end module example_mod log_error - Writes the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with optional additional text. Syntax call self % log_error ( message [, module, procedure, stat, errmsg ] ) Behavior If time stamps are active for self , a time stamp is written,\nfollowed by module and procedure if present, then message is written with the prefix 'ERROR: ' , and then\nif stat or errmsg are present they are written. It is ignored if the level of self is higher than error_level . Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_error call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_error call. stat (optional): shall be a scalar default integer expression. It\n is an intent(in) argument. It should be the stat specifier of\n the subroutine call or intrinsic statement that prompted the log_error call. errmsg (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the errmsg specifier of the subroutine call or intrinsic statement\n that prompted the log_error call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( size ) integer , intent ( in ) :: size character ( 128 ) :: errmsg , message integer :: stat allocate ( a ( size ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( message , '(a, i0)' ) & \"Allocation of A failed with SIZE = \" , size call logger % log_error ( message , & module = 'EXAMPLE_MOD' , & procedure = 'EXAMPLE_SUB' , & stat = stat , & errmsg = errmsg ) end if end subroutine example_sub end module example_mod log_information - Writes the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with optional additional text. Syntax call self % log_information ( message [, module, procedure ] ) Behavior If time stamps are active, a time stamp is written, followed\nby module and procedure if present, and then message is written with the prefix 'INFO: ' . It is ignored if the level of self is higher than information_level . Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_information call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_information call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( selection ) integer , intent ( out ) :: selection character ( 128 ) :: errmsg , message integer :: stat write ( * , '(a)' ) \"Enter an integer to select a widget\" read ( * , '(i0)' ) selection write ( message , '(a, i0)' ) & \"The user selected \" , selection call logger % log_information ( message , & module = 'EXAMPLE_MOD' , procedure = 'EXAMPLE_SUB' ) end subroutine example_sub end module example_mod log_io_error - Write the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with\noptional additional text. Behavior If time stamps are active, a time stamp is written\nfirst. Then if module or procedure are present, they are\nwritten. Then message is written with the prefix 'I/O ERROR: ' . Then if iostat or iomsg are present they are\nwritten. It is ignored if the level of self is higher than io_error_level . Syntax call self % log_io_error ( message [, module, procedure, iostat, iomsg ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_io_error call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_io_error call. iostat (optional): shall be a scalar default integer\n expression. It is an intent(in) argument. It should be the iostat specifier of the subroutine call or intrinsic statement\n that prompted the log_io_error call. iomsg (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the iomsg specifier of the subroutine call or intrinsic statement\n that prompted the log_io_error call. Example program example_log_io_error use stdlib_logger , global => global_logger implicit none character ( * ), parameter :: filename = 'nodummy.txt' integer :: iostat , lun character ( 128 ) :: iomsg character ( * ), parameter :: message = & 'Failure in opening \"nodummy.txt\".' open ( newunit = lun , file = filename , form = 'formatted' , & status = 'old' , iostat = iostat , iomsg = iomsg ) if ( iostat /= 0 ) then call global % log_io_error ( message , & procedure = 'EXAMPLE' , & iostat = iostat , & iomsg = iomsg ) error stop 'Error on opening a file' end if end program example_log_io_error log_message - write the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with\n optional additional text. Behavior If time stamps are active, a time stamp is written,\nthen module and procedure are written if present,\nfollowed by prefix \\\\ ': ' , if present, and finally message . No severity level is applied to log_message . Syntax call self % log_message ( message [, module, procedure, prefix ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_message call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_message call. prefix (optional): shall be a scalar default character expression.\nIt is an intent(in) argument. It will precede message with an ': ' appended. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write ( * , '(a)' ) \"Enter an integer to select a widget\" read ( * , '(i0)' ) selection write ( message , '(a, i0)' ) & \"The user selected \" , selection call logger % log_message ( message , & module = 'EXAMPLE_MOD' , & procedure = 'EXAMPLE_SUB' , & prefix = ` INFO ' ) end subroutine example_sub end module example_mod log_text_error - send a message to self % log_units describing an error Status Experimental Description log_text_error sends a message to self % log_units describing an error found in a line of text. Behavior If time stamps are active first a time stamp is\nwritten. Then if filename or line_number are present they are\nwritten with column . Then line is written. Then a caret, '^', is\nwritten below line at the column indicated by column . Then summary is written below the caret. It is ignored if the level of self is higher than text_error_level . Syntax call self % log_text_error ( line, column, summary [, filename, line_number, caret, stat ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. line : shall be a scalar default character expression. It is an intent(in) argument. It should be the line of text in which the\n error was found. column : shall be a scalar default integer expression. It is an intent(in) argument. It should be the one's based column at which\n the error begins. summary : shall be a scalar default character expression. It is an intent(in) argument. It should be a description of the error in line . filename (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the file, if any, in which line was found. line_number (optional): shall be a scalar default integer\n expression. It is an intent(in) argument. It should be the line\n number in filename associated with line . caret (optional): shall be a scalar default single character\n expression. It is an intent(in) argument. If present it will be\n placed below line on output to indicate the starting location of\n the error. It has a default value of '^'. stat (optional): shall be a scalar default integer variable. It\n is an intent(out) argument. If present it will have the value of success if no errors were encountered, the value index_invalid_error if column is less than one or greater than len(line)+1 , or the value write_fault if the writes to any of log_units failed. If stat is absent and would not have the value success then processing will stop with an informative stop code. Example program example_log_text_error use stdlib_logger implicit none character ( * ), parameter :: filename = 'dummy.txt' integer :: col_no , line_no , lun , status character ( 128 ) :: line character ( * ), parameter :: message = 'Bad text found.' open ( newunit = lun , file = filename , status = 'old' , & form = 'formatted' ) line_no = 0 do read ( lun , fmt = '(a)' , end = 900 ) line line_no = line_no + 1 call check_line ( line , status , col_no ) if ( status /= 0 ) then call global_logger % log_text_error ( line , & col_no , message , filename , line_no ) error stop 'Error in reading ' // filename end if end do 900 continue contains subroutine check_line ( line , status , col_no ) character ( * ), intent ( in ) :: line integer , intent ( inout ) :: status integer , intent ( inout ) :: col_no ! scan the line for forbidden characters col_no = scan ( line , \".$/\" ) ! col_no > 0 means there is a forbidden character status = col_no end subroutine end program example_log_text_error log_units_assigned - returns the number of active I/O units Status Experimental Description Returns the number of active I/O units in self % log_units Syntax result = self % log_units_assigned () Class Elemental function Argument self : shall be a scalar expression of type logger_type . It is an intent(in) argument. It is the logger whose state is queried. Result character The result shall be a scalar of type default integer. Result value The result is the number of I/O units in self % log_units . Example module example_mod use stdlib_logger type ( logger_type ) :: logger contains subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit integer , allocatable :: log_units (:) if ( logger % log_units_assigned () == 0 ) then call logger % add_log_unit ( unit ) end if end subroutine example_sub end module example_mod log_warning - write the string message to log_units Status Experimental Description Writes the string message to log_units with\n optional additional text. Behavior If time stamps are active, a time stamp is written,\nthen module and procedure if present, then message is written with the prefix WARN: ' . Syntax call self % log_warning ( message [, module, procedure ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module : (optional) shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_warning call. procedure : (optional) shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_warning call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( size , stat ) integer , intent ( in ) :: size integer , intent ( out ) :: stat allocate ( a ( size ) ) if ( stat /= 0 ) then write ( message , '(a, i0)' ) & \"Allocation of A failed with SIZE = \" , size call logger % log_warning ( message , & module = 'EXAMPLE_MOD' , & procedure = 'EXAMPLE_SUB' ) end if end subroutine example_sub end module example_mod remove_log_unit - remove unit from self % log_units Status Experimental Description Remove unit from the self % log_units list. If close_unit is present and .true. then the corresponding file is\nclosed. If unit is not in self % log_units then nothing is done. Syntax call self % remove_log_unit ( unit [, close_unit, stat ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It is the logger whose log_units is to be\nmodified. unit : shall be a scalar default integer expression. It is an intent(in) argument. It should be one of the I/O unit numbers\n in self % log_units . If it is not, then nothing is done. close_unit (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. If .true and unit is\n in self % log_units then unit will be closed, otherwise the I/O unit\n will be unaffected. stat (optional): shall be a scalar default integer variable. It is\n an intent(out) argument. If present it has the default value of success , but has the value close_failure if close_unit is\n present with the value .true. , and unit is initially in log_units , and closing unit fails. If stat is absent and\n closing the unit fails then processing stops with an informative\n stop code. Example module example_mod use stdlib_logger , global => global_logger contains subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit call global % remove_log_unit ( unit ) end subroutine example_sub end module example_mod","tags":"","loc":"page/specs/stdlib_logger.html"},{"title":"math – Fortran-lang/stdlib","text":"The stdlib_math module The stdlib_math module Introduction Procedures and Methods provided clip function Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: Example 2: gcd function Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: linspace - Create a linearly spaced rank one array Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: Example 2: logspace - Create a logarithmically spaced rank one array Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: Example 2: Example 3: arange function Status Class Description Syntax Arguments Warning Return value Example arg function Status Class Description Syntax Arguments Return value Example argd function Status Class Description Syntax Arguments Return value Example argpi function Status Class Description Syntax Arguments Return value Example is_close function Description Syntax Status Class Arguments Result value Example all_close function Description Syntax Status Class Arguments Result value Example diff function Description Syntax Status Class Arguments Result value Example meshgrid subroutine Description Syntax Status Class Arguments Example Introduction stdlib_math module provides general purpose mathematical functions. Procedures and Methods provided clip function Description Returns a value which lies in the given interval [ xmin , xmax ] (interval is xmin and xmax inclusive) and is closest to the input value x . Syntax res = clip (x, xmin, xmax) Status Experimental Class Elemental function. Argument(s) x : scalar of either integer or real type. This argument is intent(in) . xmin : scalar of either integer or real type. This argument is intent(in) . xmax : scalar of either integer or real type, which must be greater than or equal to xmin . This argument is intent(in) . Note: All arguments must have same type and same kind . Output value or Result value The output is a scalar of type and kind same as to that of the arguments. Examples Example 1: Here inputs are of type integer and kind int32 program example_clip_integer use stdlib_math , only : clip use stdlib_kinds , only : int32 implicit none integer ( int32 ) :: x integer ( int32 ) :: xmin integer ( int32 ) :: xmax integer ( int32 ) :: clipped_value xmin = - 5_int32 xmax = 5_int32 x = 12_int32 clipped_value = clip ( x , xmin , xmax ) ! clipped_value <- 5 end program example_clip_integer Example 2: Here inputs are of type real and kind sp program example_clip_real use stdlib_math , only : clip use stdlib_kinds , only : sp implicit none real ( sp ) :: x real ( sp ) :: xmin real ( sp ) :: xmax real ( sp ) :: clipped_value xmin = - 5.769_sp xmax = 3.025_sp x = 3.025_sp clipped_value = clip ( x , xmin , xmax ) ! clipped_value <- 3.02500010 end program example_clip_real gcd function Description Returns the greatest common divisor of two integers. Syntax res = gcd (a, b) Status Experimental Class Elemental function. Argument(s) a : One integer with intent(in) to get the divisor for. b : Another integer with intent(in) to get the divisor for. Note: All arguments must be integers of the same kind . Output value or Result value Returns an integer of the same kind as that of the arguments. Examples Example 1: program example_gcd use stdlib_math , only : gcd implicit none integer :: a , b , c a = 48 b = 18 c = gcd ( a , b ) ! returns 6 end program example_gcd linspace - Create a linearly spaced rank one array Description Returns a linearly spaced rank 1 array from [ start , end ]. Optionally, you can specify the length of the returned array by passing n . Syntax res = linspace (start, end [, n]) Status Experimental Class Pure function. Argument(s) start : Shall be scalar of any numeric type or kind. This argument is intent(in) . end : Shall be the same type and kind as start . This argument is intent(in) . n : Shall be an integer specifying the length of the output. This argument is optional and intent(in) . Output value or Result value The output is a rank 1 array whose length is either 100 (default value) or n . If n == 1, return a rank 1 array whose only element is end .\nIf n <= 0, return a rank 1 array with length 0. If start / end are real or complex types, the result will be of the same type and kind as start / end .\nIf start / end are integer types, the result will default to a real(dp) array. Examples Example 1: Here inputs are of type complex and kind dp program example_linspace_complex use stdlib_math , only : linspace use stdlib_kinds , only : dp implicit none complex ( dp ) :: start = cmplx ( 1 0.0_dp , 5.0_dp , kind = dp ) complex ( dp ) :: end = cmplx ( - 1 0.0_dp , 1 5.0_dp , kind = dp ) complex ( dp ) :: z ( 11 ) z = linspace ( start , end , 11 ) end program example_linspace_complex Example 2: Here inputs are of type integer and kind int16 , with the result defaulting to real(dp) . program example_linspace_int16 use stdlib_math , only : linspace use stdlib_kinds , only : int16 , dp implicit none integer ( int16 ) :: start = 10_int16 integer ( int16 ) :: end = 23_int16 real ( dp ) :: r ( 15 ) r = linspace ( start , end , 15 ) end program example_linspace_int16 logspace - Create a logarithmically spaced rank one array Description Returns a logarithmically spaced rank 1 array from [ base ^ start , base ^ end ]. The default size of the array is 50. Optionally, you can specify the length of the returned array by passing n . You can also specify the base used to compute the range (default 10). Syntax res = logspace (start, end [, n [, base]]) Status Experimental Class Pure function. Argument(s) start : Shall be a scalar of any numeric type. All kinds are supported for real and complex arguments. For integers, only the default kind is currently implemented. This argument is intent(in) . end : Shall be the same type and kind as start . This argument is intent(in) . n : Shall be an integer specifying the length of the output. This argument is optional and intent(in) . base : Shall be a scalar of any numeric type. All kinds are supported for real and complex arguments. For integers, only the default kind is currently implemented. This argument is optional and intent(in) . Output value or Result value The output is a rank 1 array whose length is either 50 (default value) or n . If n == 1, return a rank 1 array whose only element is base ^ end .\nIf n <= 0, return a rank 1 array with length 0 The type and kind of the output is dependent on the type and kind of the passed parameters. For function calls where the base is not specified: logspace(start, end) / logspace(start, end, n) , the type and kind of\nthe output follows the same scheme as above for linspace . If start / end are real or complex types, the result will be the same type and kind as start / end .\nIf start / end are integer types, the result will default to a real(dp) array. For function calls where the base is specified, the type and kind of the result is in accordance with the following table: start / end n base output real(KIND) Integer real(KIND) real(KIND) \" \" \" \" complex(KIND) complex(KIND) \" \" \" \" Integer real(KIND) complex(KIND) \" \" real(KIND) complex(KIND) \" \" \" \" complex(KIND) complex(KIND) \" \" \" \" Integer complex(KIND) Integer \" \" real(KIND) real(KIND) \" \" \" \" complex(KIND) complex(KIND) \" \" \" \" Integer Integer Examples Example 1: Here inputs are of type complex and kind dp . n and base is not specified and thus default to 50 and 10, respectively. program example_logspace_complex use stdlib_math , only : logspace use stdlib_kinds , only : dp implicit none complex ( dp ) :: start = ( 1 0.0_dp , 5.0_dp ) complex ( dp ) :: end = ( - 1 0.0_dp , 1 5.0_dp ) complex ( dp ) :: z ( 11 ) ! Complex values raised to complex powers results in complex values z = logspace ( start , end , 11 ) end program example_logspace_complex Example 2: Here inputs are of type integer and default kind. base is not specified and thus defaults to 10. program example_logspace_int use stdlib_math , only : logspace use stdlib_kinds , only : dp implicit none integer , parameter :: start = 10 integer , parameter :: end = 23 integer , parameter :: n = 15 real ( dp ) :: r ( n ) ! Integer values raised to real powers results in real values r = logspace ( start , end , n ) end program example_logspace_int Example 3: Here start / end are of type real and double precision. base is type complex and also double precision. program example_logspace_rstart_cbase use stdlib_math , only : logspace use stdlib_kinds , only : dp implicit none real ( dp ) :: start = 0.0_dp real ( dp ) :: end = 3.0_dp integer , parameter :: n = 4 complex ( dp ) :: base = ( 0.0_dp , 1.0_dp ) complex ( dp ) :: z ( n ) ! complex values raised to real powers result in complex values z = logspace ( start , end , n , base ) end program example_logspace_rstart_cbase arange function Status Experimental Class Pure function. Description Creates a rank-1 array of the integer/real type with fixed-spaced values of given spacing, within a given interval. Syntax result = arange (start [, end, step]) Arguments All arguments should be the same type and kind. start : Shall be an integer/real scalar.\nThis is an intent(in) argument. The default start value is 1 . end : Shall be an integer/real scalar.\nThis is an intent(in) and optional argument. The default end value is the inputted start value. step : Shall be an integer/real scalar and large than 0 . \nThis is an intent(in) and optional argument. The default step value is 1 . Warning If step = 0 , the step argument will be corrected to 1/1.0 by the internal process of the arange function. If step < 0 , the step argument will be corrected to abs(step) by the internal process of the arange function. Return value Returns a rank-1 array of fixed-spaced values. For integer type arguments, the length of the result vector is (end - start)/step + 1 . For real type arguments, the length of the result vector is floor((end - start)/step) + 1 . Example program example_math_arange use stdlib_math , only : arange implicit none print * , arange ( 3 ) ! [1,2,3] print * , arange ( - 1 ) ! [1,0,-1] print * , arange ( 0 , 2 ) ! [0,1,2] print * , arange ( 1 , - 1 ) ! [1,0,-1] print * , arange ( 0 , 2 , 2 ) ! [0,2] print * , arange ( 3.0 ) ! [1.0,2.0,3.0] print * , arange ( 0.0 , 5.0 ) ! [0.0,1.0,2.0,3.0,4.0,5.0] print * , arange ( 0.0 , 6.0 , 2.5 ) ! [0.0,2.5,5.0] print * , ( 1.0 , 1.0 ) * arange ( 3 ) ! [(1.0,1.0),(2.0,2.0),[3.0,3.0]] print * , arange ( 0.0 , 2.0 , - 2.0 ) ! [0.0,2.0]. Not recommended: `step` argument is negative! print * , arange ( 0.0 , 2.0 , 0.0 ) ! [0.0,1.0,2.0]. Not recommended: `step` argument is zero! end program example_math_arange arg function Status Experimental Class Elemental function. Description arg computes the phase angle (radian version) of complex scalar in the interval (-π,π]. \nThe angles in θ are such that z = abs(z)*exp((0.0, θ)) . Syntax result = arg (z) Arguments z : Shall be a complex scalar/array.\nThis is an intent(in) argument. Return value Returns the real type phase angle (radian version) of the complex argument z . Notes: Although the angle of the complex number 0 is undefined, arg((0,0)) returns the value 0 . Example program example_math_arg use stdlib_math , only : arg implicit none print * , arg (( 0.0 , 0.0 )) ! 0.0 print * , arg (( 3.0 , 4.0 )) ! 0.927 print * , arg ( 2.0 * exp (( 0.0 , 0.5 ))) ! 0.5 print * , arg ([( 0.0 , 1.0 ), ( 1.0 , 0.0 ), ( 0.0 , - 1.0 ), ( - 1.0 , 0.0 )]) ! [π/2, 0.0, -π/2, π] end program example_math_arg argd function Status Experimental Class Elemental function. Description argd computes the phase angle (degree version) of complex scalar in the interval (-180.0,180.0]. \nThe angles in θ are such that z = abs(z)*exp((0.0, θ*π/180.0)) . Syntax result = argd (z) Arguments z : Shall be a complex scalar/array.\nThis is an intent(in) argument. Return value Returns the real type phase angle (degree version) of the complex argument z . Notes: Although the angle of the complex number 0 is undefined, argd((0,0)) returns the value 0 . Example program example_math_argd use stdlib_math , only : argd implicit none print * , argd (( 0.0 , 0.0 )) ! 0.0° print * , argd (( 3.0 , 4.0 )) ! 53.1° print * , argd ( 2.0 * exp (( 0.0 , 0.5 ))) ! 28.64° print * , argd ([( 0.0 , 1.0 ), ( 1.0 , 0.0 ), ( 0.0 , - 1.0 ), ( - 1.0 , 0.0 )]) ! [90°, 0°, -90°, 180°] end program example_math_argd argpi function Status Experimental Class Elemental function. Description argpi computes the phase angle (IEEE circular version) of complex scalar in the interval (-1.0,1.0]. \nThe angles in θ are such that z = abs(z)*exp((0.0, θ*π)) . Syntax result = argpi (z) Arguments z : Shall be a complex scalar/array.\nThis is an intent(in) argument. Return value Returns the real type phase angle (circular version) of the complex argument z . Notes: Although the angle of the complex number 0 is undefined, argpi((0,0)) returns the value 0 . Example program example_math_argpi use stdlib_math , only : argpi implicit none print * , argpi (( 0.0 , 0.0 )) ! 0.0 print * , argpi (( 3.0 , 4.0 )) ! 0.295 print * , argpi ( 2.0 * exp (( 0.0 , 0.5 ))) ! 0.159 print * , argpi ([( 0.0 , 1.0 ), ( 1.0 , 0.0 ), ( 0.0 , - 1.0 ), ( - 1.0 , 0.0 )]) ! [0.5, 0.0, -0.5, 1.0] end program example_math_argpi is_close function Description Returns a boolean scalar/array where two scalars/arrays are element-wise equal within a tolerance. !> For `real` type is_close ( a , b , rel_tol , abs_tol ) = abs ( a - b ) <= max ( rel_tol * ( abs ( a ), abs ( b )), abs_tol ) !> and for `complex` type is_close ( a , b , rel_tol , abs_tol ) = is_close ( a % re , b % re , rel_tol , abs_tol ) . and . & is_close ( a % im , b % im , rel_tol , abs_tol ) Syntax bool = is_close (a, b [, rel_tol, abs_tol, equal_nan]) Status Experimental. Class Elemental function. Arguments Note: All real/complex arguments must have same kind . If the value of rel_tol/abs_tol is negative (not recommended), \nit will be corrected to abs(rel_tol/abs_tol) by the internal process of is_close . a : Shall be a real/complex scalar/array.\nThis argument is intent(in) . b : Shall be a real/complex scalar/array.\nThis argument is intent(in) . rel_tol : Shall be a real scalar/array.\nThis argument is intent(in) and optional , which is sqrt(epsilon(..)) by default. abs_tol : Shall be a real scalar/array.\nThis argument is intent(in) and optional , which is 0.0 by default. equal_nan : Shall be a logical scalar/array.\nThis argument is intent(in) and optional , which is .false. by default.\nWhether to compare NaN values as equal. If .true. , NaN values in a will be considered equal to NaN values in b . Result value Returns a logical scalar/array. Example program example_math_is_close use stdlib_math , only : is_close implicit none real :: x ( 2 ) = [ 1 , 2 ], y , NAN y = - 3 NAN = sqrt ( y ) print * , is_close ( x , [ real :: 1 , 2.1 ]) ! [T, F] print * , is_close ( 2.0 , 2.1 , abs_tol = 0.1 ) ! T print * , NAN , is_close ( 2.0 , NAN ), is_close ( 2.0 , NAN , equal_nan = . true .) ! NAN, F, F print * , is_close ( NAN , NAN ), is_close ( NAN , NAN , equal_nan = . true .) ! F, T end program example_math_is_close all_close function Description Returns a boolean scalar where two arrays are element-wise equal within a tolerance. Syntax bool = all_close (a, b [, rel_tol, abs_tol, equal_nan]) Status Experimental. Class Pure function. Arguments Note: All real/complex arguments must have same kind . If the value of rel_tol/abs_tol is negative (not recommended), \nit will be corrected to abs(rel_tol/abs_tol) by the internal process of all_close . a : Shall be a real/complex array.\nThis argument is intent(in) . b : Shall be a real/complex array.\nThis argument is intent(in) . rel_tol : Shall be a real scalar.\nThis argument is intent(in) and optional , which is sqrt(epsilon(..)) by default. abs_tol : Shall be a real scalar.\nThis argument is intent(in) and optional , which is 0.0 by default. equal_nan : Shall be a logical scalar.\nThis argument is intent(in) and optional , which is .false. by default.\nWhether to compare NaN values as equal. If .true. , NaN values in a will be considered equal to NaN values in b . Result value Returns a logical scalar. Example program example_math_all_close use stdlib_math , only : all_close implicit none real :: y , NAN complex :: z ( 4 , 4 ) y = - 3 NAN = sqrt ( y ) z = ( 1.0 , 1.0 ) print * , all_close ( z + cmplx ( 1.0e-11 , 1.0e-11 ), z ) ! T print * , NAN , all_close ([ NAN ], [ NAN ]), all_close ([ NAN ], [ NAN ], equal_nan = . true .) ! NAN, F, T end program example_math_all_close diff function Description Computes differences between adjacent elements of an array. Syntax For a rank-1 array: y = diff (x [, n, prepend, append]) and for a rank-2 array: y = diff (x [, n, dim, prepend, append]) Status Experimental. Class Pure function. Arguments x : The array to take a difference of.\nShall be a real/integer and rank-1/rank-2 array.\nThis argument is intent(in) . n : How many times to iteratively calculate the difference.\nShall be an integer scalar.\nThis argument is intent(in) and optional , and has value of 1 by default. dim : The dimension of the input array along which to calculate the difference.\nIts value must be between 1 and rank(x) .\nShall be an integer scalar.\nThis argument is intent(in) and optional and has a value of 1 by default. prepend , append : Arrays to prepend or append to a along axis prior to performing the difference.\nThe dimension and shape must match a except along axis.\nShall be a real/integer and rank-1/rank-2 array.\nThis argument is intent(in) and optional , which is no value by default. Note: The x , prepend and append arguments must have the same type , kind and rank . If the value of n is less than or equal to 0 (which is not recommended), the return value of diff is x . If the value of dim is not equal to 1 or 2 (which is not recommended), 1 will be used by the internal process of diff . Result value Returns the finite difference of the input array.\nShall be a real/integer and rank-1/rank-2 array.\nWhen both prepend and append are not present, the result y has one fewer element than x alongside the dimension dim . Example program example_diff use stdlib_math , only : diff implicit none integer :: i ( 7 ) = [ 1 , 1 , 2 , 3 , 5 , 8 , 13 ] real :: x ( 6 ) = [ 0 , 5 , 15 , 30 , 50 , 75 ] integer :: A ( 3 , 3 ) = reshape ([ 1 , 7 , 17 , 3 , 11 , 19 , 5 , 13 , 23 ], [ 3 , 3 ]) integer :: Y ( 3 , 2 ) print * , diff ( i ) ! [0, 1, 1, 2, 3, 5] print * , diff ( x , 2 ) ! [5.0, 5.0, 5.0, 5.0] Y = diff ( A , n = 1 , dim = 2 ) print * , Y ( 1 , :) ! [2, 2] print * , Y ( 2 , :) ! [4, 2] print * , Y ( 3 , :) ! [2, 4] print * , diff ( i , prepend = [ 0 ]) ! [1, 0, 1, 1, 2, 3, 5] print * , diff ( i , append = [ 21 ]) ! [0, 1, 1, 2, 3, 5, 8] end program example_diff meshgrid subroutine Description Computes a list of coordinate matrices from coordinate vectors. For $n \\geq 1$ coordinate vectors $(x_1, x_2, ..., x_n)$ of sizes $(s_1, s_2, ..., s_n)$, meshgrid computes $n$ coordinate matrices $(X_1, X_2, ..., X_n)$ with identical shape corresponding to the selected indexing:\n- Cartesian indexing (default behavior): the shape of the coordinate matrices is $(s_2, s_1, s_3, s_4, ... s_n)$.\n- matrix indexing: the shape of the coordinate matrices is $(s_1, s_2, s_3, s_4, ... s_n)$. Syntax For a 2D problem in Cartesian indexing: call meshgrid (x, y, xm, ym) For a 3D problem in Cartesian indexing: call meshgrid (x, y, z, xm, ym, zm) For a 3D problem in matrix indexing: call meshgrid (x, y, z, xm, ym, zm, indexing=\"ij\") The subroutine can be called in n -dimensional situations, as long as n is inferior to the maximum allowed array rank. Status Experimental. Class Subroutine. Arguments For a n -dimensional problem, with n >= 1 : x1, x2, ..., xn : The coordinate vectors.\nShall be real/integer and rank-1 arrays.\nThese arguments are intent(in) . xm1, xm2, ..., xmn : The coordinate matrices.\nShall be arrays of type real or integer of adequate shape:\n- for Cartesian indexing, the shape of the coordinate matrices must be [size(x2), size(x1), size(x3), ..., size(xn)] .\n- for matrix indexing, the shape of the coordinate matrices must be [size(x1), size(x2), size(x3), ..., size(xn)] . These argument are intent(out) . indexing : the selected indexing.\nShall be an integer equal to stdlib_meshgrid_xy for Cartesian indexing (default), or stdlib_meshgrid_ij for matrix indexing. stdlib_meshgrid_xy and stdlib_meshgrid_ij are public constants defined in the module.\nThis argument is intent(in) and optional , and is equal to stdlib_meshgrid_xy by default. Example program example_meshgrid use stdlib_math , only : meshgrid , linspace , stdlib_meshgrid_ij use stdlib_kinds , only : sp implicit none integer , parameter :: nx = 3 , ny = 2 real ( sp ) :: x ( nx ), y ( ny ), & xm_cart ( ny , nx ), ym_cart ( ny , nx ), & xm_mat ( nx , ny ), ym_mat ( nx , ny ) x = linspace ( 0_sp , 1_sp , nx ) y = linspace ( 0_sp , 1_sp , ny ) call meshgrid ( x , y , xm_cart , ym_cart ) print * , \"xm_cart = \" call print_2d_array ( xm_cart ) print * , \"ym_cart = \" call print_2d_array ( ym_cart ) call meshgrid ( x , y , xm_mat , ym_mat , indexing = stdlib_meshgrid_ij ) print * , \"xm_mat = \" call print_2d_array ( xm_mat ) print * , \"ym_mat = \" call print_2d_array ( ym_mat ) contains subroutine print_2d_array ( array ) real ( sp ), intent ( in ) :: array (:, :) integer :: i do i = 1 , size ( array , dim = 1 ) print * , array ( i , :) end do end subroutine end program example_meshgrid","tags":"","loc":"page/specs/stdlib_math.html"},{"title":"optval – Fortran-lang/stdlib","text":"Default values for optional arguments Default values for optional arguments optval - fallback value for optional arguments Status Description Syntax Arguments Return value Example optval - fallback value for optional arguments Status Experimental Description Returns x if it is present, otherwise default . This function is intended to be called in a procedure with one or more optional arguments, in order to conveniently fall back to a default value if an optional argument is not present. Syntax result = optval (x, default) Arguments x : Shall be of type integer , real , complex , or logical , or a scalar of type character . default : Shall have the same type, kind, and rank as x . Return value If x is present, the result is x , otherwise the result is default . Example program example_optval use stdlib_optval , only : optval implicit none print * , root ( 6 4.0 ) ! 8.0 print * , root ( 6 4.0 , 3 ) ! 4.0 contains real function root ( x , n ) real , intent ( in ) :: x integer , intent ( in ), optional :: n root = x ** ( 1.0 / optval ( n , 2 )) end function root end program example_optval","tags":"","loc":"page/specs/stdlib_optval.html"},{"title":"quadrature – Fortran-lang/stdlib","text":"Numerical integration Numerical integration trapz - integrate sampled values using trapezoidal rule Status Description Syntax Arguments Return value Example trapz_weights - trapezoidal rule weights for given abscissas Status Description Syntax Arguments Return value Example simps - integrate sampled values using Simpson's rule Status Description Syntax Arguments Return value Example simps_weights - Simpson's rule weights for given abscissas Status Description Syntax Arguments Return value Example gauss_legendre - Gauss-Legendre quadrature (a.k.a. Gaussian quadrature) nodes and weights Status Description Syntax Arguments Example gauss_legendre_lobatto - Gauss-Legendre-Lobatto quadrature nodes and weights Status Description Syntax Arguments Example trapz - integrate sampled values using trapezoidal rule Status Experimental Description Returns the trapezoidal rule integral of an array y representing discrete samples of a function. The integral is computed assuming either equidistant abscissas with spacing dx or arbitrary abscissas x . Syntax result = trapz (y, x) result = trapz (y, dx) Arguments y : Shall be a rank-one array of type real . x : Shall be a rank-one array of type real having the same kind and size as y . dx : Shall be a scalar of type real having the same kind as y . Return value The result is a scalar of type real having the same kind as y . If the size of y is zero or one, the result is zero. Example program example_trapz use stdlib_quadrature , only : trapz implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = x ** 2 print * , trapz ( y , x ) ! 22.0 print * , trapz ( y , 0.5 ) ! 11.0 end program example_trapz trapz_weights - trapezoidal rule weights for given abscissas Status Experimental Description Given an array of abscissas x , computes the array of weights w such that if y represented function values tabulated at x , then sum(w*y) produces a trapezoidal rule approximation to the integral. Syntax result = trapz_weights (x) Arguments x : Shall be a rank-one array of type real . Return value The result is a real array with the same size and kind as x . If the size of x is one, then the sole element of the result is zero. Example program example_trapz_weights use stdlib_quadrature , only : trapz_weights implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = x ** 2 real :: w ( 5 ) w = trapz_weights ( x ) print * , sum ( w * y ) ! 22.0 end program example_trapz_weights simps - integrate sampled values using Simpson's rule Status Experimental Description Returns the Simpson's rule integral of an array y representing discrete samples of a function. The integral is computed assuming either equidistant abscissas with spacing dx or arbitrary abscissas x . Simpson's ordinary (\"1/3\") rule is used for odd-length arrays. For even-length arrays, Simpson's 3/8 rule is also utilized in a way that depends on the value of even . If even is negative (positive), the 3/8 rule is used at the beginning (end) of the array. If even is zero or not present, the result is as if the 3/8 rule were first used at the beginning of the array, then at the end of the array, and these two results were averaged. Syntax result = simps (y, x [, even]) result = simps (y, dx [, even]) Arguments y : Shall be a rank-one array of type real . x : Shall be a rank-one array of type real having the same kind and size as y . dx : Shall be a scalar of type real having the same kind as y . even : (Optional) Shall be a default-kind integer . Return value The result is a scalar of type real having the same kind as y . If the size of y is zero or one, the result is zero. If the size of y is two, the result is the same as if trapz had been called instead. Example program example_simps use stdlib_quadrature , only : simps implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = 3. * x ** 2 print * , simps ( y , x ) ! 64.0 print * , simps ( y , 0.5 ) ! 32.0 end program example_simps simps_weights - Simpson's rule weights for given abscissas Status Experimental Description Given an array of abscissas x , computes the array of weights w such that if y represented function values tabulated at x , then sum(w*y) produces a Simpson's rule approximation to the integral. Simpson's ordinary (\"1/3\") rule is used for odd-length arrays. For even-length arrays, Simpson's 3/8 rule is also utilized in a way that depends on the value of even . If even is negative (positive), the 3/8 rule is used at the beginning (end) of the array and the 1/3 rule used elsewhere. If even is zero or not present, the result is as if the 3/8 rule were first used at the beginning of the array, then at the end of the array, and then these two results were averaged. Syntax result = simps_weights (x [, even]) Arguments x : Shall be a rank-one array of type real . even : (Optional) Shall be a default-kind integer . Return value The result is a real array with the same size and kind as x . If the size of x is one, then the sole element of the result is zero. If the size of x is two, then the result is the same as if trapz_weights had been called instead. Example program example_simps_weights use stdlib_quadrature , only : simps_weights implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = 3. * x ** 2 real :: w ( 5 ) w = simps_weights ( x ) print * , sum ( w * y ) ! 64.0 end program example_simps_weights gauss_legendre - Gauss-Legendre quadrature (a.k.a. Gaussian quadrature) nodes and weights Status Experimental Description Computes Gauss-Legendre quadrature (also known as simply Gaussian quadrature) nodes and weights,\n for any N (number of nodes).\nUsing the nodes x and weights w , you can compute the integral of some function f as follows: integral = sum(f(x) * w) . Only double precision is supported - if lower precision is required, you must do the appropriate conversion yourself.\nAccuracy has been validated up to N=64 by comparing computed results to tablulated values known to be accurate to machine precision\n(maximum difference from those values is 2 epsilon). Syntax subroutine gauss_legendre (x, w[, interval]) Arguments x : Shall be a rank-one array of type real(real64) . It is an output argument, representing the quadrature nodes. w : Shall be a rank-one array of type real(real64) , with the same dimension as x . \nIt is an output argument, representing the quadrature weights. interval : (Optional) Shall be a two-element array of type real(real64) . \nIf present, the nodes and weigts are calculated for integration from interval(1) to interval(2) .\nIf not specified, the default integral is -1 to 1. Example program example_gauss_legendre use iso_fortran_env , dp => real64 use stdlib_quadrature , only : gauss_legendre implicit none integer , parameter :: N = 6 real ( dp ), dimension ( N ) :: x , w call gauss_legendre ( x , w ) print * , \"integral of x**2 from -1 to 1 is\" , sum ( x ** 2 * w ) end program example_gauss_legendre gauss_legendre_lobatto - Gauss-Legendre-Lobatto quadrature nodes and weights Status Experimental Description Computes Gauss-Legendre-Lobatto quadrature nodes and weights,\n for any N (number of nodes).\nUsing the nodes x and weights w , you can compute the integral of some function f as follows: integral = sum(f(x) * w) . Only double precision is supported - if lower precision is required, you must do the appropriate conversion yourself.\nAccuracy has been validated up to N=64 by comparing computed results to tablulated values known to be accurate to machine precision\n(maximum difference from those values is 2 epsilon). Syntax subroutine gauss_legendre_lobatto (x, w[, interval]) Arguments x : Shall be a rank-one array of type real(real64) . It is an output argument, representing the quadrature nodes. w : Shall be a rank-one array of type real(real64) , with the same dimension as x . \nIt is an output argument, representing the quadrature weights. interval : (Optional) Shall be a two-element array of type real(real64) . \nIf present, the nodes and weigts are calculated for integration from interval(1) to interval(2) .\nIf not specified, the default integral is -1 to 1. Example program example_gauss_legendre_lobatto use iso_fortran_env , dp => real64 use stdlib_quadrature , only : gauss_legendre_lobatto implicit none integer , parameter :: N = 6 real ( dp ), dimension ( N ) :: x , w call gauss_legendre_lobatto ( x , w ) print * , \"integral of x**2 from -1 to 1 is\" , sum ( x ** 2 * w ) end program example_gauss_legendre_lobatto","tags":"","loc":"page/specs/stdlib_quadrature.html"},{"title":"random – Fortran-lang/stdlib","text":"Statistical Distributions -- Pseudorandom Number Generator Module Statistical Distributions -- Pseudorandom Number Generator Module random_seed - set or get a value of seed to the probability distribution pseudorandom number generator Status Description Syntax Arguments Return value Example dist_rand - Get a random integer with specified kind Status Description Syntax Arguments Return value Example random_seed - set or get a value of seed to the probability distribution pseudorandom number generator Status Experimental Description Set or get the seed value before calling the probability distribution pseudorandom number generator for variates. Syntax call random_seed (put, get) Arguments put : argument has intent(in) and may be a scalar of type integer . get : argument has intent(out) and is a scalar of type integer . Return value Return a scalar of type integer . Example program example_random_seed use stdlib_random , only : random_seed implicit none integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! set and get current value of seed end program example_random_seed dist_rand - Get a random integer with specified kind Status Experimental Description Generate an integer pseudorandom number in a specific range [-2^k, 2^k - 1] according to the input integer kind n. This pseudorandom number will be operated by bit opeartors instead of normal arithmetic operators. Syntax result = dist_rand (n) Arguments n : argument has intent(in) is a scalar of type integer . Return value Return a scalar of type integer . Example program example_dist_rand use stdlib_kinds , only : int8 , int16 , int32 , int64 use stdlib_random , only : dist_rand , random_seed implicit none integer :: put , get put = 135792468 call random_seed ( put , get ) ! set and get current value of seed print * , dist_rand ( 1_int8 ) ! random integer in [-2^7, 2^7 - 1] ! -90 print * , dist_rand ( 1_int16 ) ! random integer in [-2^15, 2^15 - 1] ! -32725 print * , dist_rand ( 1_int32 ) ! random integer in [-2^31, 2^31 - 1] ! -1601563881 print * , dist_rand ( 1_int64 ) ! random integer in [-2^63, 2^63 - 1] ! 180977695517992208 end program example_dist_rand","tags":"","loc":"page/specs/stdlib_random.html"},{"title":"selection – Fortran-lang/stdlib","text":"The stdlib_selection module The stdlib_selection module Overview of selection Overview of the module select - find the k-th smallest value in an input array Status Description Syntax Class Arguments Notes Example arg_select - find the index of the k-th smallest value in an input array Status Description Syntax Class Arguments Notes Example Comparison with using sort Overview of selection Suppose you wish to find the value of the k-th smallest entry in an array of size N, or\nthe index of that value. While it could be done by sorting the whole array\nusing sort or sort_index from stdlib_sorting and then finding the k-th entry, that would\nrequire O(N x LOG(N)) time. However selection of a single entry can be done in\nO(N) time, which is much faster for large arrays. This is useful, for example,\nto quickly find the median of an array, or some other percentile. The Fortran Standard Library therefore provides a module, stdlib_selection ,\nwhich implements selection algorithms. Overview of the module The module stdlib_selection defines two generic subroutines: select is used to find the k-th smallest entry of an array. The input\narray is also modified in-place, and on return will be partially sorted\nsuch that all(array(1:k) <= array(k))) and all(array(k) <= array((k+1):size(array))) is true.\nThe user can optionally specify left and right indices to constrain the search\nfor the k-th smallest value. This can be useful if you have previously called select to find a smaller or larger rank (that will have led to partial sorting of array , thus implying some constraints on the location). arg_select is used to find the index of the k-th smallest entry of an array.\nIn this case the input array is not modified, but the user must provide an\ninput index array with the same size as array , having indices that are a permutation of 1:size(array) , which is modified instead. On return the index array is modified\nsuch that all(array(index(1:k)) <= array(index(k))) and all(array(k) <= array(k+1:size(array))) .\nThe user can optionally specify left and right indices to constrain the search\nfor the k-th smallest value. This can be useful if you have previously called arg_select to find a smaller or larger rank (that will have led to partial sorting of index , thus implying some constraints on the location). select - find the k-th smallest value in an input array Status Experimental Description Returns the k-th smallest value of array(:) , and also partially sorts array(:) such that all(array(1:k) <= array(k)) and all(array(k) <= array((k+1):size(array))) Syntax call select ( array, k, kth_smallest [, left, right ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(xdp) , real(qp) . It is an intent(inout) argument. k : shall be a scalar with any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) . It\nis an intent(in) argument. We search for the k -th smallest entry of array(:) . kth_smallest : shall be a scalar with the same type as array . It is an intent(out) argument. On return it contains the k-th smallest entry of array(:) . left (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is\ndefinitely contained in array(left:size(array)) . If left is not present,\nthe default is 1. This is typically useful if multiple calls to select are\nmade, because the partial sorting of array implies constraints on where we\nneed to search. right (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is\ndefinitely contained in array(1:right) . If right is not present, the\ndefault is size(array) . This is typically useful if multiple calls to select are made, because the partial sorting of array implies constraints\non where we need to search. Notes Selection of a single value should have runtime of O( size(array) ), so it is\nasymptotically faster than sorting array entirely. The test program at the\nend of this document shows that is the case. The code does not support NaN elements in array ; it will run, but there is\nno consistent interpretation given to the order of NaN entries of array compared to other entries. select was derived from code in the Coretran library by Leon Foks,\nhttps://github.com/leonfoks/coretran. Leon Foks has given permission for the\ncode here to be released under stdlib's MIT license. Example program example_select use stdlib_selection , only : select implicit none real , allocatable :: array (:) real :: kth_smallest integer :: k array = [ 3. , 2. , 7. , 4. , 5. , 1. , 4. , - 1. ] k = 2 call select ( array , k , kth_smallest ) print * , kth_smallest ! print 1.0 k = 7 ! Due to the previous call to select, we know for sure this is in an ! index >= 2 call select ( array , k , kth_smallest , left = 2 ) print * , kth_smallest ! print 5.0 k = 6 ! Due to the previous two calls to select, we know for sure this is in ! an index >= 2 and <= 7 call select ( array , k , kth_smallest , left = 2 , right = 7 ) print * , kth_smallest ! print 4.0 end program example_select arg_select - find the index of the k-th smallest value in an input array Status Experimental Description Returns the index of the k-th smallest value of array(:) , and also partially sorts\nthe index-array indx(:) such that all(array(indx(1:k)) <= array(indx(k))) and all(array(indx(k)) <= array(indx((k+1):size(array)))) Syntax call arg_select ( array, indx, k, kth_smallest [, left, right ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(xdp) , real(qp) . It is an intent(in) argument. On input it is\nthe array in which we search for the k-th smallest entry. indx : shall be a rank one array with the same size as array , containing all integers\nfrom 1:size(array) in any order. It is of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) . It is an intent(inout) argument. On return its elements will define a partial sorting of array(:) such that: all( array(indx(1:k-1)) <= array(indx(k)) ) and all(array(indx(k)) <= array(indx(k+1:size(array)))) . k : shall be a scalar with the same type as indx . It is an intent(in) argument. We search for the k -th smallest entry of array(:) . kth_smallest : a scalar with the same type as indx . It is an intent(out) argument,\nand on return it contains the index of the k-th smallest entry of array(:) . left (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is definitely contained\nin array(indx(left:size(array))) . If left is not present, the default is 1.\nThis is typically useful if multiple calls to arg_select are made, because\nthe partial sorting of indx implies constraints on where we need to search. right (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is definitely contained\nin array(indx(1:right)) . If right is not present, the default is size(array) . This is typically useful if multiple calls to arg_select are\nmade, because the reordering of indx implies constraints on where we need to\nsearch. Notes arg_select does not modify array , unlike select . The partial sorting of indx is not stable, i.e., indices that map to equal\nvalues of array may be reordered. The code does not support NaN elements in array ; it will run, but there is\nno consistent interpretation given to the order of NaN entries of array compared to other entries. While it is essential that indx contains a permutation of the integers 1:size(array) , \nthe code does not check for this. For example if size(array) == 4 , then we could have indx = [4, 2, 1, 3] or indx = [1, 2, 3, 4] , but not indx = [2, 1, 2, 4] . It is the user's\nresponsibility to avoid such errors. Selection of a single value should have runtime of O( size(array) ), so it is\nasymptotically faster than sorting array entirely. The test program at the end of\nthese documents confirms that is the case. arg_select was derived using code from the Coretran library by Leon Foks,\nhttps://github.com/leonfoks/coretran. Leon Foks has given permission for the\ncode here to be released under stdlib's MIT license. Example program example_arg_select use stdlib_selection , only : arg_select implicit none real , allocatable :: array (:) integer , allocatable :: indx (:) integer :: kth_smallest integer :: k array = [ 3. , 2. , 7. , 4. , 5. , 1. , 4. , - 1. ] indx = [( k , k = 1 , size ( array ))] k = 2 call arg_select ( array , indx , k , kth_smallest ) print * , array ( kth_smallest ) ! print 1.0 k = 7 ! Due to the previous call to arg_select, we know for sure this is in an ! index >= 2 call arg_select ( array , indx , k , kth_smallest , left = 2 ) print * , array ( kth_smallest ) ! print 5.0 k = 6 ! Due to the previous two calls to arg_select, we know for sure this is in ! an index >= 2 and <= 7 call arg_select ( array , indx , k , kth_smallest , left = 2 , right = 7 ) print * , array ( kth_smallest ) ! print 4.0 end program example_arg_select Comparison with using sort The following program compares the timings of select and arg_select for\ncomputing the median of an array, vs using sort from stdlib . In theory we\nshould see a speed improvement with the selection routines which grows like\nLOG(size( array )). program selection_vs_sort use stdlib_kinds , only : dp , sp , int64 use stdlib_selection , only : select , arg_select use stdlib_sorting , only : sort implicit none call compare_select_sort_for_median ( 1 ) call compare_select_sort_for_median ( 11 ) call compare_select_sort_for_median ( 101 ) call compare_select_sort_for_median ( 1001 ) call compare_select_sort_for_median ( 10001 ) call compare_select_sort_for_median ( 100001 ) contains subroutine compare_select_sort_for_median ( N ) integer , intent ( in ) :: N integer :: i , k , result_arg_select , indx ( N ), indx_local ( N ) real :: random_vals ( N ), local_random_vals ( N ) integer , parameter :: test_reps = 100 integer ( int64 ) :: t0 , t1 real :: result_sort , result_select integer ( int64 ) :: time_sort , time_select , time_arg_select logical :: select_test_passed , arg_select_test_passed ! Ensure N is odd if ( mod ( N , 2 ) /= 1 ) stop time_sort = 0 time_select = 0 time_arg_select = 0 select_test_passed = . true . arg_select_test_passed = . true . indx = ( / ( i , i = 1 , N ) / ) k = ( N + 1 ) / 2 ! Deliberate integer division do i = 1 , test_reps call random_number ( random_vals ) ! Compute the median with sorting local_random_vals = random_vals call system_clock ( t0 ) call sort ( local_random_vals ) result_sort = local_random_vals ( k ) call system_clock ( t1 ) time_sort = time_sort + ( t1 - t0 ) ! Compute the median with selection, assuming N is odd local_random_vals = random_vals call system_clock ( t0 ) call select ( local_random_vals , k , result_select ) call system_clock ( t1 ) time_select = time_select + ( t1 - t0 ) ! Compute the median with arg_select, assuming N is odd local_random_vals = random_vals indx_local = indx call system_clock ( t0 ) call arg_select ( local_random_vals , indx_local , k , result_arg_select ) call system_clock ( t1 ) time_arg_select = time_arg_select + ( t1 - t0 ) if ( result_select /= result_sort ) select_test_passed = . FALSE . if ( local_random_vals ( result_arg_select ) /= result_sort ) arg_select_test_passed = . FALSE . end do print * , \"select ; N=\" , N , '; ' , merge ( 'PASS' , 'FAIL' , select_test_passed ), & '; Relative-speedup-vs-sort:' , ( 1.0 * time_sort ) / ( 1.0 * time_select ) print * , \"arg_select; N=\" , N , '; ' , merge ( 'PASS' , 'FAIL' , arg_select_test_passed ), & '; Relative-speedup-vs-sort:' , ( 1.0 * time_sort ) / ( 1.0 * time_arg_select ) end subroutine end program The results seem consistent with expectations when the array is large; the program prints: select ; N = 1 ; PASS ; Relative-speedup-vs-sort : 1 . 90928173 arg_select ; N = 1 ; PASS ; Relative-speedup-vs-sort : 1 . 76875830 select ; N = 11 ; PASS ; Relative-speedup-vs-sort : 1 . 14835048 arg_select ; N = 11 ; PASS ; Relative-speedup-vs-sort : 1 . 00794709 select ; N = 101 ; PASS ; Relative-speedup-vs-sort : 2 . 31012774 arg_select ; N = 101 ; PASS ; Relative-speedup-vs-sort : 1 . 92877376 select ; N = 1001 ; PASS ; Relative-speedup-vs-sort : 4 . 24190664 arg_select ; N = 1001 ; PASS ; Relative-speedup-vs-sort : 3 . 54580402 select ; N = 10001 ; PASS ; Relative-speedup-vs-sort : 5 . 61573362 arg_select ; N = 10001 ; PASS ; Relative-speedup-vs-sort : 4 . 79348087 select ; N = 100001 ; PASS ; Relative-speedup-vs-sort : 7 . 28823519 arg_select ; N = 100001 ; PASS ; Relative-speedup-vs-sort : 6 . 03007460","tags":"","loc":"page/specs/stdlib_selection.html"},{"title":"sorting – Fortran-lang/stdlib","text":"The stdlib_sorting module The stdlib_sorting module Overview of sorting Overview of the module The parameters int_index and int_index_low The module subroutines Licensing The ORD_SORT subroutine The SORT_INDEX subroutine The SORT subroutine The RADIX_SORT subroutine Specifications of the stdlib_sorting procedures ord_sort - sorts an input array Status Description Syntax Class Arguments Notes Example sort - sorts an input array Status Description Syntax Class Arguments Notes Example radix_sort - sorts an input array Status Description Syntax Class Arguments Notes Example sort_index - creates an array of sorting indices for an input array, while also sorting the array. Status Description Syntax Class Arguments Notes Examples Performance benchmarks Overview of sorting The sorting of collections of data is useful in the analysis of those\ncollections.\nWith its absence of generics and limited polymorphism, it is\nimpractical, in current Fortran, to provide sorting routines for\narbitrary collections of arbitrary types of data.\nHowever Fortran's arrays are by far its most widely used collection,\nand arrays of arbitrary types of data can often be sorted in terms of\na single component of intrinsic type.\nThe Fortran Standard Library therefore provides a module, stdlib_sorting , with procedures to sort arrays of simple intrinsic\nnumeric types, i.e. the different kinds of integers and reals, the\ndefault assumed length character, and the stdlib_string_type module's string_type type. Overview of the module The module stdlib_sorting defines several public entities, two\ndefault integer parameters, int_index and int_index_low , and four overloaded\nsubroutines: ORD_SORT , SORT , RADIX_SORT and SORT_INDEX . The\noverloaded subroutines also each have several specific names for\nversions corresponding to different types of array arguments. The parameters int_index and int_index_low The parameters int_index and int_index_low are used to specify the kind of integer used\nin indexing the various arrays. Currently the module sets int_index and int_index_low to the value of int64 and int32 from the stdlib_kinds module, respectively. The module subroutines The stdlib_sorting module provides three different overloaded\nsubroutines intended to sort three different kinds of arrays of\ndata: ORD_SORT is intended to sort simple arrays of intrinsic data\n that have significant sections that were partially ordered before\n the sort; SORT_INDEX is based on ORD_SORT , but in addition to sorting the\n input array, it returns indices that map the original array to its\n sorted version. This enables related arrays to be re-ordered in the\n same way; SORT is intended to sort simple arrays of intrinsic data\n that are effectively unordered before the sort; RADIX_SORT is intended to sort fixed width intrinsic data \n types (integers and reals). Licensing The Fortran Standard Library is distributed under the MIT\nLicense. However components of the library may be based on code with\nadditional licensing restrictions. In particular ORD_SORT , SORT_INDEX , and SORT are translations of codes with their\nown distribution restrictions. The ORD_SORT and SORT_INDEX subroutines are essentially\ntranslations to Fortran 2008 of the \"Rust\" sort of the Rust Language\ndistributed as part of slice.rs .\nThe header of the slice.rs file has as its licensing requirements: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\nfile at the top-level directory of this distribution and at\nhttp://rust-lang.org/COPYRIGHT.\n\nLicensed under the Apache License, Version 2.0 or the MIT license\n, at your\noption. This file may not be copied, modified, or distributed\nexcept according to those terms. So the license for the slice.rs code is compatible with the use of\nmodified versions of the code in the Fortran Standard Library under\nthe MIT license. The SORT subroutine is essentially a translation to Fortran\n2008 of the\n[ introsort ]((http://www.cs.rpi.edu/~musser/gp/introsort.ps) of David\nMusser. David Musser has given permission to include a variant of introsort in the Fortran Standard Library under the MIT license\nprovided we cite: Musser, D.R., “Introspective Sorting and Selection Algorithms,”\nSoftware—Practice and Experience, Vol. 27(8), 983–993 (August 1997). as the official source of the algorithm. The ORD_SORT subroutine ORD_SORT is a translation of the \"Rust\" sort sorting algorithm\ncontained in [ slice.rs ]\n(https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs). \"Rust\" sort , in turn, is inspired by the [ timsort algorithm]\n(http://svn.python.org/projects/python/trunk/Objects/listsort.txt)\nthat Tim Peters created for the Python Language. ORD_SORT is a hybrid stable comparison algorithm combining merge sort ,\nand insertion sort . It has always at worst O(N Ln(N)) runtime\nperformance in sorting random data, having a performance about 15-25%\nslower than SORT on such data. However it has much better\nperformance than SORT on partially sorted data, having O(N)\nperformance on uniformly increasing or decreasing data. When sorting in an increasing order, ORD_SORT begins by traversing the array\nstarting in its tail attempting to identify runs in the array, where a run is\neither a uniformly decreasing sequence, ARRAY(i-1) > ARRAY(i) , or a\nnon-decreasing, ARRAY(i-1) <= ARRAY(i) , sequence. First delimited decreasing\nsequences are reversed in their order. Then, if the sequence has less than MIN_RUN elements, previous elements in the array are added to the run using insertion sort until the run contains MIN_RUN elements or the array is\ncompletely processed. As each run is identified the start and length of the run\nare then pushed onto a stack and the stack is then processed using merge until\nit obeys the stack invariants: len(i-2) > len(i-1) + len(i) len(i-1) > len(i) ensuring that processing the stack is, at worst, of order O(N\nLn(N)) . However, because of the identification of decreasing and\nnon-decreasing runs, processing of structured data can be much faster,\nwith processing of uniformly decreasing or non-decreasing arrays being\nof order O(N). The result in our tests is that ORD_SORT is about\n25% slower than SORT on purely random data, depending on\nthe compiler, but can be Ln(N) faster than SORT on highly\nstructured data. As a modified merge sort , ORD_SORT requires the\nuse of a \"scratch\" array, that may be provided as an optional work argument or allocated internally on the stack. Arrays can be also sorted in a decreasing order by providing the argument reverse\n= .true. . The SORT_INDEX subroutine The SORT and ORD_SORT subroutines can sort rank 1 isolated\narrays of intrinsic types, but do nothing for the coordinated sorting\nof related data, e.g., multiple related rank 1 arrays, higher rank\narrays, or arrays of derived types. For such related data, what is\nuseful is an array of indices that maps a rank 1 array to its sorted\nform. For such a sort, a stable sort is useful, therefore the module\nprovides a subroutine, SORT_INDEX , that generates such an array of\nindices based on the ORD_SORT algorithm, in addition to sorting\nthe input array. The logic of SORT_INDEX parallels that of ORD_SORT , with\nadditional housekeeping to keep the array of indices consistent with\nthe sorted positions of the input array. Because of this additional\nhousekeeping it has slower runtime performance than ORD_SORT . SORT_INDEX requires the use of two \"scratch\" arrays, that may be\nprovided as optional work and iwork arguments or allocated\ninternally on the stack. The SORT subroutine SORT uses the introsort sorting algorithm of David Musser. introsort is a hybrid unstable comparison algorithm combining quicksort , insertion sort , and heap sort . While this algorithm's\nruntime performance is always O(N Ln(N)), it is relatively fast on\nrandomly ordered data, but does not show the improvement in\nperformance on partly sorted data found for ORD_SORT . First it examines the array and estimates the depth of recursion a\nquick sort would require for ideal (random) data, D =\nCeiling(Ln(N)/Ln(2)) . It then defines a limit to the number of quicksort recursions to be allowed in processing, D_limit = factor * D , where factor is currently 2, and\ncalls introsort proper. introsort proper then: Examines the number of elements remaining to be sorted, and, if\n they are less than 16, sorts them using insertion sort and returns; If they are not less than 16, checks whether the current depth of\n recursion exceeds D_limit and, if it does, processes the remaining\n elements with heap sort and returns; If the current depth of recursion does not exceed D_limit , then\n in effect does a quicksort step: Partitions the remaining array using a median of three, Calls introsort proper on the leftmost partition, Calls introsort proper on the rightmost partition, and then\n returns. The resulting algorithm is of order O(N Ln(N)) run time performance\nfor all inputs. Because it relies on quicksort , the coefficient of\nthe O(N Ln(N)) behavior is typically small compared to other sorting\nalgorithms on random data. On partially sorted data it can show either\nslower heap sort performance, or enhanced performance by up to a\nfactor of six. Still, even when it shows enhanced performance, its\nperformance on partially sorted data is typically an order of\nmagnitude slower than ORD_SORT . Its memory requirements are also\nlow, being of order O(Ln(N)), while the memory requirements of ORD_SORT and SORT_INDEX are of order O(N). The RADIX_SORT subroutine RADIX_SORT is a implementation of LSD radix sort ,\nusing 256 as the radix. It only works for fixed width data,\nthus integers and reals. RADIX_SORT is always of O(N) runtime performance\nfor any input data. For large and random data, it is about five (or more)\ntimes faster than other sort subroutines. The RADIX_SORT needs a buffer that have same size of the input data.\nYour can provide it using work argument, if not the subroutine will\nallocate the buffer and deallocate before return. Specifications of the stdlib_sorting procedures ord_sort - sorts an input array Status Experimental Description Returns an input array with the elements sorted in order of\nincreasing, or decreasing, value. Syntax call ord_sort ( array[, work, reverse ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(qp) , character(*) , type(string_type) , type(bitset_64) , or type(bitset_large) .\nIt is an intent(inout) argument. On input it is\nthe array to be sorted. If both the type of array is real and at\nleast one of the elements is a NaN , then the ordering of the result\nis undefined. Otherwise on return its elements will be sorted in order\nof non-decreasing value. work (optional): shall be a rank one array of the same type as\narray, and shall have at least size(array)/2 elements. It is an intent(out) argument. It is intended to be used as \"scratch\"\nmemory for internal record keeping. If associated with an array in\nstatic storage, its use can significantly reduce the stack memory\nrequirements for the code. Its contents on return are undefined. reverse (optional): shall be a scalar of type default logical. It\nis an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in stable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in stable order. Notes ORD_SORT implements a hybrid sorting algorithm combining merge sort , and insertion sort . For most purposes it behaves like\na merge sort , providing worst case O(N Ln(N)) run time performance\nfor most random arrays, that is typically slower than SORT .\nHowever, if the array has significant runs of decreasing or\nnon-decreasing values, performance can be much better than SORT , with O(N) behavior on uniformly decreasing, or\nnon-decreasing arrays. The optional work array replaces \"scratch\"\nmemory that would otherwise be allocated on the stack. If array is of\nany type REAL the order of its elements on return undefined if any\nelement of array is a NaN . Sorting of CHARACTER(*) and STRING_TYPE arrays are based on the operators > and < , and not on the\nfunction LGT . Example program example_ord_sort use stdlib_sorting , only : ord_sort implicit none integer , allocatable :: array1 (:), work (:) array1 = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] allocate ( work , mold = array1 ) call ord_sort ( array1 , work ) print * , array1 !print [1, 3, 4, 4, 5, 9, 10] end program example_ord_sort sort - sorts an input array Status Experimental Description Returns an input array with the elements sorted in order of increasing, or\ndecreasing, value. Syntax call sort ( array[, reverse] ) Class Pure generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(qp) . character(*) , type(string_type) , type(bitset_64) , or type(bitset_large) .\nIt is an intent(inout) argument. On return its\ninput elements will be sorted in order of non-decreasing value. reverse (optional): shall be a scalar of type default logical. It\nis an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in unstable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in unstable order. Notes SORT implements a hybrid sorting algorithm combining quicksort , merge sort , and insertion sort . For most purposes it\nbehaves like a quicksort with a median of three partition, providing\ngood, O(N Ln(N)) , run time performance for most random arrays, but\ndefaulting to merge sort if the structure of the array results in\nthe quicksort not converging as rapidly as expected. If array is of\nany type REAL , the behavior of the sorting is undefined if any\nelement of array is a NaN . Sorting of CHARACTER(*) and STRING_TYPE arrays are based on the operators < , <= , > , and >= , and not on the functions LLT , LLE , LGT , or LGE . Example program example_sort use stdlib_sorting , only : sort implicit none integer , allocatable :: array (:) array = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] call sort ( array ) print * , array !print [1, 3, 4, 4, 5, 9, 10] end program example_sort radix_sort - sorts an input array Status Experimental Description Returns an input array with the elements sorted in order of increasing, or\ndecreasing, value. Syntax call radix_sort ( array[, work, reverse] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) . It is an intent(inout) argument. On return its\ninput elements will be sorted in order of non-decreasing value. work (optional): shall be a rank one array of the same type as\narray, and shall have at least size(array) elements. It is an intent(inout) argument, and its contents on return are undefined. reverse (optional): shall be a scalar of type default logical . It\nis an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in unstable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in unstable order. Notes radix_sort implements a LSD radix sort algorithm with a 256 radix. For any\ninput data it provides O(N) run time performance. If array is of\nany type real the order of its elements on return undefined if any\nelement of array is a NaN . Example program example_radix_sort use iso_fortran_env , only : int8 , int16 , dp => real64 use stdlib_sorting , only : radix_sort implicit none integer ( int8 ), allocatable :: arri8 (:) integer ( int16 ), allocatable :: arri16 (:) real ( dp ) :: x real ( dp ), allocatable :: arrf64 (:) arri8 = [ - 128 , 127 , 0 , - 1 , 1 ] call radix_sort ( arri8 ) print * , arri8 arri16 = [ - 32767 , 32767 , 0 , 0 , - 3 , 2 , - 3 ] call radix_sort ( arri16 , reverse = . true .) print * , arri16 allocate ( arrf64 ( 10 )) x = 0.0_dp ! divide zero will arise compile error arrf64 = [ 1.0_dp / x , 0.0_dp , 0.0_dp / x , - 1.0_dp / x , - 0.0_dp , 1.0_dp , - 1.0_dp , 3.45_dp , - 3.14_dp , 3.44_dp ] call radix_sort ( arrf64 ) print * , arrf64 ! Expected output: ! nan, -inf, -3.14, -1.0, -0.0, 0.0, 1.0, 3.44, 3.45, inf ! Note: the position of nan is undefined end program example_radix_sort sort_index - creates an array of sorting indices for an input array, while also sorting the array. Status Experimental Description Returns the input array sorted in the direction requested while\nretaining order stability, and an integer array whose elements would\nsort the input array to produce the output array . Syntax call sort_index ( array, index[, work, iwork, reverse ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(qp) , character(*) , type(string_type) , type(bitset_64) , or type(bitset_large) .\nIt is an intent(inout) argument. On input it\nwill be an array whose sorting indices are to be determined. On return\nit will be the sorted array. index : shall be a rank one integer array of kind int_index or int_index_low and of\nthe size of array . It is an intent(out) argument. On return it\nshall have values that are the indices needed to sort the original\narray in the desired direction. work (optional): shall be a rank one array of any of the same type as array , and shall have at least size(array)/2 elements. It is an intent(out) argument. It is intended to be used as \"scratch\"\nmemory for internal record keeping. If associated with an array in\nstatic storage, its use can significantly reduce the stack memory\nrequirements for the code. Its contents on return are undefined. iwork (optional): shall be a rank one integer array of the same kind\nof the array index , and shall have at least size(array)/2 elements. It\nis an intent(out) argument. It is intended to be used as \"scratch\"\nmemory for internal record keeping. If associated with an array in\nstatic storage, its use can significantly reduce the stack memory\nrequirements for the code. Its contents on return are undefined. reverse (optional): shall be a scalar of type default logical. It\nis an intent(in) argument. If present with a value of .true. then index will sort array in order of non-increasing values in stable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in stable order. Notes SORT_INDEX implements the hybrid sorting algorithm of ORD_SORT ,\nkeeping the values of index consistent with the elements of array as it is sorted. As a merge sort based algorithm, it is a stable\nsorting comparison algorithm. The optional work and iwork arrays\nreplace \"scratch\" memory that would otherwise be allocated on the\nstack. If array is of any kind of REAL the order of the elements in index and array on return are undefined if any element of array is a NaN . Sorting of CHARACTER(*) and STRING_TYPE arrays are\nbased on the operator > , and not on the function LGT . It should be emphasized that the order of array will typically be\ndifferent on return Examples Sorting a rank one array with sort_index : program example_sort_index use stdlib_sorting , only : sort_index implicit none integer , allocatable :: array (:) integer , allocatable :: index (:) array = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] allocate ( index , mold = array ) call sort_index ( array , index ) print * , array !print [1, 3, 4, 4, 5, 9, 10] print * , index !print [4, 3, 2, 6, 1, 7, 5] end program example_sort_index Sorting a related rank one array: subroutine sort_related_data ( a , b , work , index , iwork ) ! Sort `a`, and also sort `b` to be reorderd the same way as `a` integer , intent ( inout ) :: a (:) integer ( int32 ), intent ( inout ) :: b (:) ! The same size as a integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Find the indices to sort a call sort_index ( a , index ( 1 : size ( a )),& work ( 1 : size ( a ) / 2 ), iwork ( 1 : size ( a ) / 2 )) ! Sort b based on the sorting of a b (:) = b ( index ( 1 : size ( a )) ) end subroutine sort_related_data Sorting a rank 2 array based on the data in a column subroutine sort_related_data ( array , column , work , index , iwork ) ! Reorder rows of `array` such that `array(:, column)` is sorted integer , intent ( inout ) :: array (:,:) integer ( int32 ), intent ( in ) :: column integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) integer , allocatable :: dummy (:) integer :: i allocate ( dummy ( size ( array , dim = 1 ))) ! Extract a column of `array` dummy (:) = array (:, column ) ! Find the indices to sort the column call sort_index ( dummy , index ( 1 : size ( dummy )),& work ( 1 : size ( dummy ) / 2 ), iwork ( 1 : size ( dummy ) / 2 )) ! Sort a based on the sorting of its column do i = 1 , size ( array , dim = 2 ) array (:, i ) = array ( index ( 1 : size ( array , dim = 1 )), i ) end do end subroutine sort_related_data Sorting an array of a derived type based on the data in one component subroutine sort_a_data ( a_data , a , work , index , iwork ) ! Sort `a_data` in terms of its component `a` type ( a_type ), intent ( inout ) :: a_data (:) integer ( int32 ), intent ( inout ) :: a (:) integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Extract a component of `a_data` a ( 1 : size ( a_data )) = a_data (:) % a ! Find the indices to sort the component call sort_index ( a ( 1 : size ( a_data )), index ( 1 : size ( a_data )),& work ( 1 : size ( a_data ) / 2 ), iwork ( 1 : size ( a_data ) / 2 )) ! Sort a_data based on the sorting of that component a_data (:) = a_data ( index ( 1 : size ( a_data )) ) end subroutine sort_a_data Performance benchmarks We have performed benchmarks of the procedures on nine different\ninteger arrays each of size 2**16 : Blocks - the array is divided into six blocks, each of distinct\n uniformly increasing integers. Decreasing - values decrease uniformly from 2**16-1 to 0 . Identical - all integers have the same value of 10. Increasing - values increase uniformly from 0 to 2**16-1 . Random dense - the integers are generated randomly from a set of\n values from 0 to 2**14-1 so duplicates are dense. Random order - a set of integers from 0 to 2**16 - 1 in random\n order. Random sparse - the integers are generated randomly from a set of\n values from 0 to 2**18-1 so duplicates are sparse. Random-3 - the increasing array has 3 random exchanges of individual\n elements. Random-10 - the final ten elements of the increasing array are\n replaced by random values. On three different default character arrays, each of length 4 and of\nsize `20**4, with characters drawn from the set \"a\"-\"p\": Char. Decreasing - values decrease uniformly from \"pppp\" to \"aaaa\" . Char. Increasing - values decrease uniformly from \"aaaa\" to \"pppp\" . Char. Random - the set of strings from \"aaaa\" to \"pppp\" in\n random order. On three different string_type arrays, each of length 4 elements and\nof size 16**3 , with characters drawn from the set \"a\"-\"p\": String Decreasing - values decrease uniformly from \"ppp\" to \"aaa\" . String Increasing - values decrease uniformly from \"aaa\" to \"ppp\" . String Random - the set of strings from \"aaa\" to \"ppp\" in\n random order. These benchmarks have been performed on two different compilers, both\non WSL with Ubuntu-20.04, Intel(R) Core(TM) i7-10700 CPU @ 2.9GHz, with\n32 GB DDR4 memory. The first compiler is GNU Fortran (GCC) 9.4.0, with\nthe following results. Type Elements Array Name Method Time (s) Integer 65536 Blocks Ord_Sort 0.001048 Integer 65536 Decreasing Ord_Sort 0.000204 Integer 65536 Identical Ord_Sort 0.000097 Integer 65536 Increasing Ord_Sort 0.000096 Integer 65536 Random dense Ord_Sort 0.006580 Integer 65536 Random order Ord_Sort 0.006886 Integer 65536 Random sparse Ord_Sort 0.006821 Integer 65536 Random 3 Ord_Sort 0.000461 Integer 65536 Random 10 Ord_Sort 0.000226 Character 65536 Char. Decrease Ord_Sort 0.000824 Character 65536 Char. Increase Ord_Sort 0.000370 Character 65536 Char. Random Ord_Sort 0.016020 String_type 4096 String Decrease Ord_Sort 0.000465 String_type 4096 String Increase Ord_Sort 0.000169 String_type 4096 String Random Ord_Sort 0.004194 Integer 65536 Blocks Radix_Sort 0.001610 Integer 65536 Decreasing Radix_Sort 0.001076 Integer 65536 Identical Radix_Sort 0.001074 Integer 65536 Increasing Radix_Sort 0.001060 Integer 65536 Random dense Radix_Sort 0.001161 Integer 65536 Random order Radix_Sort 0.001069 Integer 65536 Random sparse Radix_Sort 0.001005 Integer 65536 Random 3 Radix_Sort 0.001057 Integer 65536 Random 10 Radix_Sort 0.001046 Integer 65536 rand-real32 Radix_Sort 0.001429 Integer 65536 Blocks Sort 0.004269 Integer 65536 Decreasing Sort 0.005108 Integer 65536 Identical Sort 0.006257 Integer 65536 Increasing Sort 0.002093 Integer 65536 Random dense Sort 0.006032 Integer 65536 Random order Sort 0.006030 Integer 65536 Random sparse Sort 0.006126 Integer 65536 Random 3 Sort 0.007930 Integer 65536 Random 10 Sort 0.014729 Character 65536 Char. Decrease Sort 0.020623 Character 65536 Char. Increase Sort 0.008028 Character 65536 Char. Random Sort 0.014258 String_type 4096 String Decrease Sort 0.005542 String_type 4096 String Increase Sort 0.001987 String_type 4096 String Random Sort 0.003267 Integer 65536 Blocks Sort_Index 0.000686 Integer 65536 Decreasing Sort_Index 0.000529 Integer 65536 Identical Sort_Index 0.000218 Integer 65536 Increasing Sort_Index 0.000214 Integer 65536 Random dense Sort_Index 0.008044 Integer 65536 Random order Sort_Index 0.008042 Integer 65536 Random sparse Sort_Index 0.008148 Integer 65536 Random 3 Sort_Index 0.000677 Integer 65536 Random 10 Sort_Index 0.000387 Character 65536 Char. Decrease Sort_Index 0.000932 Character 65536 Char. Increase Sort_Index 0.000487 Character 65536 Char. Random Sort_Index 0.017231 String_type 4096 String Decrease Sort_Index 0.000489 String_type 4096 String Increase Sort_Index 0.000183 String_type 4096 String Random Sort_Index 0.004102 The second compiler is Intel(R) Fortran Intel(R) 64 Compiler Classic\nfor applications running on Intel(R) 64, Version 2021.7.0 Build\n20220726_000000, with the following results: Type Elements Array Name Method Time (s) Integer 65536 Blocks Ord_Sort 0.000135 Integer 65536 Decreasing Ord_Sort 0.000053 Integer 65536 Identical Ord_Sort 0.000033 Integer 65536 Increasing Ord_Sort 0.000034 Integer 65536 Random dense Ord_Sort 0.003291 Integer 65536 Random order Ord_Sort 0.003546 Integer 65536 Random sparse Ord_Sort 0.003313 Integer 65536 Random 3 Ord_Sort 0.000145 Integer 65536 Random 10 Ord_Sort 0.000070 Character 65536 Char. Decrease Ord_Sort 0.000696 Character 65536 Char. Increase Ord_Sort 0.000338 Character 65536 Char. Random Ord_Sort 0.015255 String_type 4096 String Decrease Ord_Sort 0.001276 String_type 4096 String Increase Ord_Sort 0.000153 String_type 4096 String Random Ord_Sort 0.024705 Integer 65536 Blocks Radix_Sort 0.001038 Integer 65536 Decreasing Radix_Sort 0.000910 Integer 65536 Identical Radix_Sort 0.000441 Integer 65536 Increasing Radix_Sort 0.000803 Integer 65536 Random dense Radix_Sort 0.000363 Integer 65536 Random order Radix_Sort 0.000741 Integer 65536 Random sparse Radix_Sort 0.000384 Integer 65536 Random 3 Radix_Sort 0.000877 Integer 65536 Random 10 Radix_Sort 0.000801 Integer 65536 rand-real32 Radix_Sort 0.000604 Integer 65536 Blocks Sort 0.001342 Integer 65536 Decreasing Sort 0.001391 Integer 65536 Identical Sort 0.001485 Integer 65536 Increasing Sort 0.000447 Integer 65536 Random dense Sort 0.002778 Integer 65536 Random order Sort 0.002896 Integer 65536 Random sparse Sort 0.003136 Integer 65536 Random 3 Sort 0.002996 Integer 65536 Random 10 Sort 0.005752 Character 65536 Char. Decrease Sort 0.021973 Character 65536 Char. Increase Sort 0.008391 Character 65536 Char. Random Sort 0.015155 String_type 4096 String Decrease Sort 0.034014 String_type 4096 String Increase Sort 0.010464 String_type 4096 String Random Sort 0.015748 Integer 65536 Blocks Sort_Index 0.000381 Integer 65536 Decreasing Sort_Index 0.000085 Integer 65536 Identical Sort_Index 0.000046 Integer 65536 Increasing Sort_Index 0.000046 Integer 65536 Random dense Sort_Index 0.004020 Integer 65536 Random order Sort_Index 0.004059 Integer 65536 Random sparse Sort_Index 0.004073 Integer 65536 Random 3 Sort_Index 0.000215 Integer 65536 Random 10 Sort_Index 0.000101 Character 65536 Char. Decrease Sort_Index 0.000680 Character 65536 Char. Increase Sort_Index 0.000356 Character 65536 Char. Random Sort_Index 0.016231 String_type 4096 String Decrease Sort_Index 0.001219 String_type 4096 String Increase Sort_Index 0.000125 String_type 4096 String Random Sort_Index 0.018631","tags":"","loc":"page/specs/stdlib_sorting.html"},{"title":"specialfunctions – Fortran-lang/stdlib","text":"Special functions Special functions legendre - Calculate Legendre polynomials Status Description Syntax Arguments Return value dlegendre - Calculate first derivatives of Legendre polynomials Status Description Syntax Arguments Return value legendre - Calculate Legendre polynomials Status Experimental Description Computes the value of the n-th Legendre polynomial at a specified point.\nCurrently only 64 bit floating point is supported. This is an elemental function. Syntax result = legendre (n, x) Arguments n : Shall be a scalar of type real(real64) . x : Shall be a scalar or array (this function is elemental) of type real(real64) . Return value The function result will be the value of the n -th Legendre polynomial, evaluated at x . dlegendre - Calculate first derivatives of Legendre polynomials Status Experimental Description Computes the value of the first derivative of the n-th Legendre polynomial at a specified point.\nCurrently only 64 bit floating point is supported. This is an elemental function. Syntax result = dlegendre (n, x) Arguments n : Shall be a scalar of type real(real64) . x : Shall be a scalar or array (this function is elemental) of type real(real64) . Return value The function result will be the value of the first derivative of the n -th Legendre polynomial, evaluated at x .","tags":"","loc":"page/specs/stdlib_specialfunctions.html"},{"title":"specialfunctions_gamma – Fortran-lang/stdlib","text":"Special functions gamma Special functions gamma gamma - Calculate the gamma function Status Description Syntax Class Arguments Return value Example log_gamma - Calculate the natural logarithm of the gamma function Status Description Syntax Class Arguments Return value Example log_factorial - calculate the logarithm of a factorial Status Description Syntax Class Arguments Return value Example lower_incomplete_gamma - calculate lower incomplete gamma integral Status Description Syntax Class Arguments Return value Example upper_incomplete_gamma - calculate the upper incomplete gamma integral Status Description Syntax Class Arguments Return value Example log_lower_incomplete_gamma - calculate the natural logarithm of the lower incomplete gamma integral Status Description Syntax Class Arguments Return value log_upper_incomplete_gamma - calculate logarithm of the upper incomplete gamma integral Status Description Syntax Class Arguments Return value regularized_gamma_p - calculate the gamma quotient P Status Description Syntax Class Arguments Return value Example regularized_gamma_q - calculate the gamma quotient Q Status Description Syntax Class Arguments Return value Example gamma - Calculate the gamma function Status Experimental Description The gamma function is defined as the analytic continuation of a convergent improper integral function on the whole complex plane except zero and negative integers: Fortran 2018 standard implements the intrinsic gamma function of real type argument in single and double precisions. Here the gamma function is extended to both integer and complex arguments. The values of the gamma function with integer arguments are exact. The values of the gamma function with complex arguments are approximated in single and double precisions by using Lanczos approximation. Syntax result = gamma (x) Class Elemental function Arguments x : should be a positive integer or a complex type number Return value The function returns a value with the same type and kind as input argument. Example program example_gamma use stdlib_kinds , only : dp , int64 use stdlib_specialfunctions_gamma , only : gamma implicit none integer :: i integer ( int64 ) :: n real :: x real ( dp ) :: y complex :: z complex ( dp ) :: z1 i = 10 n = 15_int64 x = 2.5 y = 4.3_dp z = ( 2.3 , 0.6 ) z1 = ( - 4.2_dp , 3.1_dp ) print * , gamma ( i ) !integer gives exact result ! 362880 print * , gamma ( n ) ! 87178291200 print * , gamma ( x ) ! intrinsic function call ! 1.32934034 print * , gamma ( y ) ! intrinsic function call ! 8.8553433604540341 print * , gamma ( z ) ! (0.988054395, 0.383354813) print * , gamma ( z1 ) ! (-2.78916032990983999E-005, 9.83164600163221218E-006) end program example_gamma log_gamma - Calculate the natural logarithm of the gamma function Status Experimental Description Mathematically, logarithm of gamma function is a special function with complex arguments by itself. Due to the different branch cut structures and a different principal branch, natural logarithm of gamma function log_gamma(z) with complex argument is different from the ln(Gamma(z)). The two have the same real part but different imaginary part. Fortran 2018 standard implements intrinsic log_gamma function of absolute value of real type argument in single and double precision. Here the log_gamma function is extended to both integer and complex arguments. The values of log_gamma function with complex arguments are approximated in single and double precisions by using Stirling's approximation. Syntax result = log_gamma (x) Class Elemental function Arguments x : Shall be a positive integer or a complex type number. Return value The function returns real single precision values for integer input arguments, while it returns complex values with the same kind as complex input arguments. Example program example_log_gamma use stdlib_kinds , only : dp use stdlib_specialfunctions_gamma , only : log_gamma implicit none integer :: i real :: x real ( dp ) :: y complex :: z complex ( dp ) :: z1 i = 10 x = 8.76 y = x z = ( 5.345 , - 3.467 ) z1 = z print * , log_gamma ( i ) !default single precision output !12.8018274 print * , log_gamma ( x ) !intrinsic function call !10.0942659 print * , log_gamma ( y ) !intrinsic function call !10.094265528673880 print * , log_gamma ( z ) !same kind as input !(2.56165648, -5.73382425) print * , log_gamma ( z1 ) !(2.5616575105114614, -5.7338247782852498) end program example_log_gamma log_factorial - calculate the logarithm of a factorial Status Experimental Description Compute the natural logarithm of factorial, log(n!) Syntax result = log_factorial (x) Class Elemental function Arguments x : Shall be a positive integer type number. Return value The function returns real type values with single precision. Example program example_log_factorial use stdlib_kinds , only : int64 use stdlib_specialfunctions_gamma , only : lf => log_factorial implicit none integer :: n n = 10 print * , lf ( n ) ! 15.1044130 print * , lf ( 35_int64 ) ! 92.1361771 end program example_log_factorial lower_incomplete_gamma - calculate lower incomplete gamma integral Status Experimental Description The lower incomplete gamma function is defined as: When x < 0, p must be positive integer. Syntax result = lower_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_ligamma use stdlib_specialfunctions_gamma , only : lig => lower_incomplete_gamma implicit none integer :: p real :: p1 p = 3 p1 = 2.3 print * , lig ( p , - 5.0 ) ! -2521.02417 print * , lig ( p1 , 5.0 ) ! 1.09715652 end program example_ligamma upper_incomplete_gamma - calculate the upper incomplete gamma integral Status Experimental Description The upper incomplete gamma function is defined as: When x < 0, p must be a positive integer. Syntax result = upper_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_uigamma use stdlib_specialfunctions_gamma , only : uig => upper_incomplete_gamma implicit none print * , uig ( 3 , - 5.0 ) !2523.02295 print * , uig ( 2.3 , 5.0 ) !6.95552528E-02 end program example_uigamma log_lower_incomplete_gamma - calculate the natural logarithm of the lower incomplete gamma integral Status Experimental Description Compute the natural logarithm of the absolute value of the lower incomplete gamma function. Syntax result = log_lower_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. log_upper_incomplete_gamma - calculate logarithm of the upper incomplete gamma integral Status Experimental Description Compute the natural logarithm of the absolute value of the upper incomplete gamma function. Syntax result = log_upper_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. regularized_gamma_p - calculate the gamma quotient P Status Experimental Description The regularized gamma quotient P, also known as normalized incomplete gamma function, is defined as: The values of regularized gamma P is in the range of [0, 1] Syntax result = regularized_gamma_p (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_gamma_p use stdlib_specialfunctions_gamma , only : rgp => regularized_gamma_p implicit none print * , rgp ( 3.0 , 5.0 ) ! 0.875347972 end program example_gamma_p regularized_gamma_q - calculate the gamma quotient Q Status Experimental Description The regularized gamma quotient Q is defined as: The values of regularized gamma Q is in the range of [0, 1] Syntax result = regularized_gamma_q (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_gamma_q use stdlib_specialfunctions_gamma , only : rgq => regularized_gamma_q implicit none print * , rgq ( 3.0 , 5.0 ) ! 0.124652028 end program example_gamma_q","tags":"","loc":"page/specs/stdlib_specialfunctions_gamma.html"},{"title":"stats – Fortran-lang/stdlib","text":"Descriptive statistics Descriptive statistics corr - Pearson correlation of array elements Status Description Syntax Class Arguments Return value Example cov - covariance of array elements Status Description Syntax Class Arguments Return value Example mean - mean of array elements Status Description Syntax Class Arguments Return value Example median - median of array elements Status Description Syntax Class Arguments Return value Example moment - central moments of array elements Status Description Syntax Class Arguments Return value Example var - variance of array elements Status Description Syntax Class Arguments Return value Example corr - Pearson correlation of array elements Status Experimental Description Returns the Pearson correlation of the elements of array along dimension dim if the corresponding element in mask is true . The Pearson correlation between two rows (or columns), say x and y , of array is defined as: corr ( x , y ) = cov ( x , y ) / sqrt ( var ( x ) * var ( y )) Syntax result = corr (array, dim [, mask]) Class Generic subroutine Arguments array : Shall be a rank-1 or a rank-2 array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. Return value If array is of rank 1 and of type real or complex , the result is of type real and has the same kind as array .\nIf array is of rank 2 and of type real or complex , the result is of the same type and kind as array .\nIf array is of type integer , the result is of type real(dp) . If array is of rank 1 and of size larger than 1, a scalar equal to 1 is returned. Otherwise, IEEE NaN is returned.\nIf array is of rank 2, a rank-2 array with the corresponding correlations is returned. If mask is specified, the result is the Pearson correlation of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_corr use stdlib_stats , only : corr implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ - 1. , 4 0. , - 3. , 4. , 1 0. , 6. ], [ 2 , 3 ]) print * , corr ( x , 1 ) !returns 1. print * , corr ( y , 2 ) !returns reshape([ 1., -.32480, -.32480, 1. ], [ 2, 3]) end program example_corr cov - covariance of array elements Status Experimental Description Returns the covariance of the elements of array along dimension dim if the corresponding element in mask is true . Per default, the covariance is defined as: cov(array) = 1/(n-1) sum_i (array(i) - mean(array) * (array(i) - mean(array))) where n is the number of elements. The scaling can be changed with the logical argument corrected . If corrected is .false. , then the sum is scaled with n , otherwise with n-1 . Syntax result = cov (array, dim [, mask [, corrected]]) Class Generic subroutine Arguments array : Shall be a rank-1 or a rank-2 array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. corrected (optional): Shall be a scalar of type logical . If corrected is .true. (default value), the sum is scaled with n-1 . If corrected is .false. , then the sum is scaled with n . It is an intent(in) argument. Return value If array is of rank 1 and of type real or complex , the result is of type real corresponding to the type of array .\nIf array is of rank 2 and of type real or complex , the result is of the same type as array .\nIf array is of type integer , the result is of type real(dp) . If array is of rank 1, a scalar with the covariance (that is the variance) of all elements in array is returned.\nIf array is of rank 2, a rank-2 array is returned. If mask is specified, the result is the covariance of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_cov use stdlib_stats , only : cov implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , cov ( x , 1 ) !returns 3.5 print * , cov ( x , 1 , corrected = . false .) !returns 2.9167 print * , cov ( y , 1 ) !returns a square matrix of size 3 with all elements equal to 0.5 end program example_cov mean - mean of array elements Status Experimental Description Returns the mean of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . Syntax result = mean (array [, mask]) result = mean (array, dim [, mask]) Class Generic subroutine Arguments array : Shall be an array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. Return value If array is of type real or complex , the result is of the same type as array .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the mean of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the mean of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_mean use stdlib_stats , only : mean implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , mean ( x ) !returns 3.5 print * , mean ( y ) !returns 3.5 print * , mean ( y , 1 ) !returns [ 1.5, 3.5, 5.5 ] print * , mean ( y , 1 , y > 3. ) !returns [ NaN, 4.0, 5.5 ] end program example_mean median - median of array elements Status Experimental Description Returns the median of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . The median of the elements of array is defined as the \"middle\"\nelement, after that the elements are sorted in an increasing order, e.g. array_sorted =\nsort(array) . If n = size(array) is an even number, the median is: median(array) = array_sorted( floor( (n + 1) / 2.)) and if n is an odd number, the median is: median(array) = mean( array_sorted( floor( (n + 1) / 2.):floor( (n + 1) / 2.) + 1 ) ) The current implementation relies on a selection algorithm applied on a copy of\nthe whole array, using the subroutine select provided by the stdlib_selection module. Syntax result = median (array [, mask]) result = median (array, dim [, mask]) Class Generic subroutine Arguments array : Shall be an array of type integer or real . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. Return value If array is of type real , the result is of type real with the same kind as array .\nIf array is of type real and contains IEEE NaN , the result is IEEE NaN .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the median of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the median of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_median use stdlib_stats , only : median implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , median ( x ) !returns 3.5 print * , median ( y ) !returns 3.5 print * , median ( y , 1 ) !returns [ 1.5, 3.5, 5.5 ] print * , median ( y , 1 , y > 3. ) !returns [ NaN, 4.0, 5.5 ] end program example_median moment - central moments of array elements Status Experimental Description Returns the k -th order central moment of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . If a scalar or an array center is provided, the function returns the k -th order moment about 'center', of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . The k -th order central moment is defined as : moment(array) = 1/n sum_i (array(i) - mean(array))^k where n is the number of elements. The k -th order moment about center is defined as : moment(array) = 1/n sum_i (array(i) - center)^k Syntax result = moment (array, order [, center [, mask]]) result = moment (array, order, dim [, center [, mask]]) Class Generic subroutine Arguments array : Shall be an array of type integer , real , or complex . order : Shall be an scalar of type integer . dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . center (optional): Shall be a scalar of the same type of result if dim is not provided. If dim is provided, center shall be a scalar or an array (with a shape similar to that of array with dimension dim dropped) of the same type of result . mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . Return value If array is of type real or complex , the result is of the same type as array .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the k -th (central) moment of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the k -th (central) moment of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_moment use stdlib_stats , only : moment implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , moment ( x , 2 ) !returns 2.9167 print * , moment ( y , 2 ) !returns 2.9167 print * , moment ( y , 2 , 1 ) !returns [0.25, 0.25, 0.25] print * , moment ( y , 2 , 1 , mask = ( y > 3. )) !returns [NaN, 0., 0.25] print * , moment ( x , 2 , center = 0. ) !returns 15.1667 print * , moment ( y , 1 , 1 , center = 0. ) !returns [1.5, 3.5, 5.5] end program example_moment var - variance of array elements Status Experimental Description Returns the variance of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . Per default, the variance is defined as the best unbiased estimator and is computed as: var ( array ) = 1 / ( n - 1 ) sum_i ( array ( i ) - mean ( array )) ^ 2 where n is the number of elements. The use of the term n-1 for scaling is called Bessel 's correction. The scaling can be changed with the logical argument corrected . If corrected is .false. , then the sum is scaled with n , otherwise with n-1 . Syntax result = var (array [, mask [, corrected]]) result = var (array, dim [, mask [, corrected]]) Class Generic subroutine Arguments array : Shall be an array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. corrected (optional): Shall be a scalar of type logical . If corrected is .true. (default value), the sum is scaled with n-1 . If corrected is .false. , then the sum is scaled with n . It is an intent(in) argument. Return value If array is of type real or complex , the result is of type real corresponding to the type of array .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the variance of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the variance of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . If the variance is computed with only one single element, then the result is IEEE NaN if corrected is .true. and is 0. if corrected is .false. . Example program example_var use stdlib_stats , only : var implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , var ( x ) !returns 3.5 print * , var ( x , corrected = . false .) !returns 2.9167 print * , var ( y ) !returns 3.5 print * , var ( y , 1 ) !returns [0.5, 0.5, 0.5] print * , var ( y , 1 , y > 3. ) !returns [NaN, NaN, 0.5] print * , var ( y , 1 , y > 3. , corrected = . false .) !returns [NaN, 0., 0.25] end program example_var","tags":"","loc":"page/specs/stdlib_stats.html"},{"title":"stats_distribution_exponential – Fortran-lang/stdlib","text":"Statistical Distributions -- Exponential Distribution Module Statistical Distributions -- Exponential Distribution Module rvs_exp - exponential distribution random variates Status Description Syntax Class Arguments Return value Example pdf_exp - exponential distribution probability density function Status Description Syntax Class Arguments Return value Example cdf_exp - exponential cumulative distribution function Status Description Syntax Class Arguments Return value Example rvs_exp - exponential distribution random variates Status Experimental Description An exponential distribution is the distribution of time between events in a Poisson point process.\nThe inverse scale parameter lambda specifies the average time between events ( ), also called the rate of events. Without argument, the function returns a random sample from the standard exponential distribution . With a single argument, the function returns a random sample from the exponential distribution .\nFor complex arguments, the real and imaginary parts are sampled independently of each other. With two arguments, the function returns a rank-1 array of exponentially distributed random variates. Note The algorithm used for generating exponential random variates is fundamentally limited to double precision. 1 Syntax result = rvs_exp ([lambda] [[, array_size]]) Class Elemental function Arguments lambda : optional argument has intent(in) and is a scalar of type real or complex .\nIf lambda is real , its value must be positive. If lambda is complex , both the real and imaginary components must be positive. array_size : optional argument has intent(in) and is a scalar of type integer with default kind. Return value The result is a scalar or rank-1 array with a size of array_size , and the same type as lambda .\nIf lambda is non-positive, the result is NaN . Example program example_exponential_rvs use stdlib_random , only : random_seed use stdlib_stats_distribution_exponential , only : rexp => rvs_exp implicit none complex :: scale integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , rexp () !single standard exponential random variate ! 0.358690143 print * , rexp ( 2.0 ) !exponential random variate with lambda=2.0 ! 0.816459715 print * , rexp ( 0.3 , 10 ) !an array of 10 variates with lambda=0.3 ! 1.84008647E-02 3.59742008E-02 0.136567295 0.262772143 3.62352766E-02 ! 0.547133625 0.213591918 4.10784185E-02 0.583882213 0.671128035 scale = ( 2.0 , 0.7 ) print * , rexp ( scale ) !single complex exponential random variate with real part of lambda=2.0; !imagainary part of lambda=0.7 ! (1.41435969,4.081114382E-02) end program example_exponential_rvs pdf_exp - exponential distribution probability density function Status Experimental Description The probability density function (pdf) of the single real variable exponential distribution is: For a complex variable with independent real and imaginary parts, the joint probability density function is the product of the corresponding real and imaginary marginal pdfs: 2 Syntax result = pdf_exp (x, lambda) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . lambda : has intent(in) and is a scalar of type real or complex .\nIf lambda is real , its value must be positive. If lambda is complex , both the real and imaginary components must be positive. All arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If lambda is non-positive, the result is NaN . Example program example_exponential_pdf use stdlib_random , only : random_seed use stdlib_stats_distribution_exponential , only : exp_pdf => pdf_exp , & rexp => rvs_exp implicit none real , dimension ( 2 , 3 , 4 ) :: x , lambda real :: xsum complex :: scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! probability density at x=1.0 in standard exponential print * , exp_pdf ( 1.0 , 1.0 ) ! 0.367879450 ! probability density at x=2.0 with lambda=2.0 print * , exp_pdf ( 2.0 , 2.0 ) ! 3.66312787E-02 ! probability density at x=2.0 with lambda=-1.0 (out of range) print * , exp_pdf ( 2.0 , - 1.0 ) ! NaN ! standard exponential random variates array x = reshape ( rexp ( 0.5 , 24 ), [ 2 , 3 , 4 ]) ! a rank-3 exponential probability density lambda (:, :, :) = 0.5 print * , exp_pdf ( x , lambda ) ! 0.349295378 0.332413018 0.470253497 0.443498343 0.317152828 ! 0.208242029 0.443112582 8.07073265E-02 0.245337561 0.436016470 ! 7.14025944E-02 5.33841923E-02 0.322308093 0.264558554 0.212898195 ! 0.100339092 0.226891592 0.444002301 9.91026312E-02 3.87373678E-02 ! 3.11400592E-02 0.349431813 0.482774824 0.432669312 ! probability density array where lambda<=0.0 for certain elements print * , exp_pdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.367879450 NaN NaN ! `pdf_exp` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( exp_pdf ( x (:,:, i ), lambda (:,:, i ))) end do print * , xsum ! 6.45566940 ! complex exponential probability density function at (1.5,1.0) with real part ! of lambda=1.0 and imaginary part of lambda=2.0 scale = ( 1.0 , 2. ) print * , exp_pdf (( 1.5 , 1.0 ), scale ) ! 6.03947677E-02 ! As above, but with lambda%re < 0 scale = ( - 1.0 , 2. ) print * , exp_pdf (( 1.5 , 1.0 ), scale ) ! NaN end program example_exponential_pdf cdf_exp - exponential cumulative distribution function Status Experimental Description Cumulative distribution function (cdf) of the single real variable exponential distribution: For a complex variable with independent real and imaginary parts, the joint cumulative distribution function is the product of corresponding real and imaginary marginal cdfs: 2 Syntax result = cdf_exp (x, lambda) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . lambda : has intent(in) and is a scalar of type real or complex .\nIf lambda is real , its value must be positive. If lambda is complex , both the real and imaginary components must be positive. All arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If lambda is non-positive, the result is NaN . Example program example_exponential_cdf use stdlib_random , only : random_seed use stdlib_stats_distribution_exponential , only : exp_cdf => cdf_exp , & rexp => rvs_exp implicit none real , dimension ( 2 , 3 , 4 ) :: x , lambda real :: xsum complex :: scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! standard exponential cumulative distribution at x=1.0 print * , exp_cdf ( 1.0 , 1.0 ) ! 0.632120550 ! cumulative distribution at x=2.0 with lambda=2 print * , exp_cdf ( 2.0 , 2.0 ) ! 0.981684387 ! cumulative distribution at x=2.0 with lambda=-1.0 (out of range) print * , exp_cdf ( 2.0 , - 1.0 ) ! NaN ! standard exponential random variates array x = reshape ( rexp ( 0.5 , 24 ), [ 2 , 3 , 4 ]) ! a rank-3 exponential cumulative distribution lambda (:, :, :) = 0.5 print * , exp_cdf ( x , lambda ) ! 0.301409245 0.335173965 5.94930053E-02 0.113003314 ! 0.365694344 0.583515942 0.113774836 0.838585377 ! 0.509324908 0.127967060 0.857194781 0.893231630 ! 0.355383813 0.470882893 0.574203610 0.799321830 ! 0.546216846 0.111995399 0.801794767 0.922525287 ! 0.937719882 0.301136374 3.44503522E-02 0.134661376 ! cumulative distribution array where lambda<=0.0 for certain elements print * , exp_cdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.632120550 NaN NaN ! `cdf_exp` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( exp_cdf ( x (:,:, i ), lambda (:,:, i ))) end do print * , xsum ! 11.0886612 ! complex exponential cumulative distribution at (0.5,0.5) with real part of ! lambda=0.5 and imaginary part of lambda=1.0 scale = ( 0.5 , 1.0 ) print * , exp_cdf (( 0.5 , 0.5 ), scale ) ! 8.70351046E-02 ! As above, but with lambda%im < 0 scale = ( 1.0 , - 2.0 ) print * , exp_cdf (( 1.5 , 1.0 ), scale ) ! NaN end program example_exponential_cdf Marsaglia, George, and Wai Wan Tsang. \"The ziggurat method for generating random variables.\" Journal of statistical software 5 (2000): 1-7. ↩ Miller, Scott, and Donald Childers. Probability and random processes: With applications to signal processing and communications . Academic Press, 2012 (p. 197). ↩ ↩","tags":"","loc":"page/specs/stdlib_stats_distribution_exponential.html"},{"title":"stats_distribution_normal – Fortran-lang/stdlib","text":"Statistical Distributions -- Normal Distribution Module Statistical Distributions -- Normal Distribution Module rvs_normal - normal distribution random variates Status Description Syntax Class Arguments Return value Example pdf_normal - normal distribution probability density function Status Description Syntax Class Arguments Return value Example cdf_normal - normal distribution cumulative distribution function Status Description Syntax Class Arguments Return value Example rvs_normal - normal distribution random variates Status Experimental Description A normal continuous random variate distribution, also known as Gaussian, or Gauss or Laplace-Gauss distribution.\nThe location loc specifies the mean or expectation ( ). The scale specifies the standard deviation ( ). Without argument, the function returns a standard normal distributed random variate . With two arguments, the function returns a normal distributed random variate . For complex arguments, the real and imaginary parts are independent of each other. With three arguments, the function returns a rank-1 array of normal distributed random variates. Note The algorithm used for generating exponential random variates is fundamentally limited to double precision. 1 Syntax result = rvs_normal ([loc, scale] [[, array_size]]) Class Elemental function (passing both loc and scale ). Arguments loc : optional argument has intent(in) and is a scalar of type real or complex . scale : optional argument has intent(in) and is a positive scalar of type real or complex . array_size : optional argument has intent(in) and is a scalar of type integer . loc and scale arguments must be of the same type. Return value The result is a scalar or rank-1 array, with a size of array_size , and the same type as scale and loc . If scale is non-positive, the result is NaN . Example program example_normal_rvs use stdlib_random , only : random_seed use stdlib_stats_distribution_normal , only : norm => rvs_normal implicit none real :: a ( 2 , 3 , 4 ), b ( 2 , 3 , 4 ) complex :: loc , scale integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , norm () !single standard normal random variate ! 0.563655198 print * , norm ( 1.0 , 2.0 ) !normal random variate mu=1.0, sigma=2.0 ! -0.633261681 print * , norm ( 0.0 , 1.0 , 10 ) !an array of 10 standard norml random variates ! -3.38123664E-02 -0.190365672 0.220678389 -0.424612164 -0.249541596 ! 0.865260184 1.11086845 -0.328349441 1.10873628 1.27049923 a (:, :, :) = 1.0 b (:, :, :) = 1.0 print * , norm ( a , b ) ! a rank 3 random variates array !0.152776539 -7.51764774E-02 1.47208166 0.180561781 1.32407105 ! 1.20383692 0.123445868 -0.455737948 -0.469808221 1.60750175 ! 1.05748117 0.720934749 0.407810807 1.48165631 2.31749439 ! 0.414566994 3.06084275 1.86505437 1.36338580 7.26878643E-02 ! 0.178585172 1.39557445 0.828021586 0.872084975 loc = ( - 1.0 , 2.0 ) scale = ( 2.0 , 1.0 ) print * , norm ( loc , scale ) !single complex normal random variate with real part of mu=-1, sigma=2; !imagainary part of mu=2.0 and sigma=1.0 ! (1.22566295,2.12518454) end program example_normal_rvs pdf_normal - normal distribution probability density function Status Experimental Description The probability density function (pdf) of the single real variable normal distribution: For a complex varible with independent real and imaginary parts, the joint probability density function is the product of the the corresponding real and imaginary marginal pdfs: 2 Syntax result = pdf_normal (x, loc, scale) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . loc : has intent(in) and is a scalar of type real or complex . scale : has intent(in) and is a positive scalar of type real or complex . All three arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If scale is non-positive, the result is NaN . Example program example_normal_pdf use stdlib_random , only : random_seed use stdlib_stats_distribution_normal , only : norm_pdf => pdf_normal , & norm => rvs_normal implicit none real , dimension ( 3 , 4 , 5 ) :: x , mu , sigma real :: xsum complex :: loc , scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! probability density at x=1.0 in standard normal print * , norm_pdf ( 1.0 , 0. , 1. ) ! 0.241970733 ! probability density at x=2.0 with mu=-1.0 and sigma=2.0 print * , norm_pdf ( 2.0 , - 1.0 , 2.0 ) ! 6.47588000E-02 ! probability density at x=1.0 with mu=1.0 and sigma=-1.0 (out of range) print * , norm_pdf ( 1.0 , 1.0 , - 1.0 ) ! NaN ! standard normal random variates array x = reshape ( norm ( 0.0 , 1.0 , 60 ), [ 3 , 4 , 5 ]) ! standard normal probability density array mu (:, :, :) = 0.0 sigma (:, :, :) = 1.0 print * , norm_pdf ( x , mu , sigma ) ! 0.340346158 0.285823315 0.398714304 0.391778737 0.389345556 ! 0.364551932 0.386712372 0.274370432 0.215250477 0.378006011 ! 0.215760440 0.177990928 0.278640658 0.223813817 0.356875211 ! 0.285167664 0.378533930 0.390739858 0.271684974 0.138273031 ! 0.135456234 0.331718773 0.398283750 0.383706540 ! probability density array where sigma<=0.0 for certain elements print * , norm_pdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.398942292 NaN NaN ! `pdf_normal` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( norm_pdf ( x (:,:, i ), mu (:,:, i ), sigma (:,:, i ))) end do print * , xsum ! 18.0754433 ! complex normal probability density function at x=(1.5,1.0) with real part ! of mu=1.0, sigma=1.0 and imaginary part of mu=-0.5, sigma=2.0 loc = ( 1.0 , - 0.5 ) scale = ( 1.0 , 2. ) print * , norm_pdf (( 1.5 , 1.0 ), loc , scale ) ! 5.30100204E-02 end program example_normal_pdf cdf_normal - normal distribution cumulative distribution function Status Experimental Description Cumulative distribution function of the single real variable normal distribution: For the complex variable with independent real and imaginary parts, the joint cumulative distribution function is the product of the corresponding real and imaginary marginal cdfs: 2 Syntax result = cdf_normal (x, loc, scale) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . loc : has intent(in) and is a scalar of type real or complex . scale : has intent(in) and is a positive scalar of type real or complex . All three arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If scale is non-positive, the result is NaN . Example program example_normal_cdf use stdlib_random , only : random_seed use stdlib_stats_distribution_normal , only : norm_cdf => cdf_normal , & norm => rvs_normal implicit none real , dimension ( 2 , 3 , 4 ) :: x , mu , sigma real :: xsum complex :: loc , scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! standard normal cumulative probability at x=0.0 print * , norm_cdf ( 0.0 , 0.0 , 1.0 ) ! 0.500000000 ! cumulative probability at x=2.0 with mu=-1.0 sigma=2.0 print * , norm_cdf ( 2.0 , - 1.0 , 2.0 ) ! 0.933192849 ! cumulative probability at x=1.0 with mu=1.0 and sigma=-1.0 (out of range) print * , norm_cdf ( 1.0 , 1.0 , - 1.0 ) ! NaN ! standard normal random variates array x = reshape ( norm ( 0.0 , 1.0 , 24 ), [ 2 , 3 , 4 ]) ! standard normal cumulative array mu (:, :, :) = 0.0 sigma (:, :, :) = 1.0 print * , norm_cdf ( x , mu , sigma ) ! 0.713505626 0.207069695 0.486513376 0.424511284 0.587328553 ! 0.335559726 0.401470929 0.806552052 0.866687536 0.371323735 ! 0.866228044 0.898046613 0.198435277 0.141147852 0.681565762 ! 0.206268221 0.627057910 0.580759525 0.190364420 7.27325380E-02 ! 7.08068311E-02 0.728241026 0.522919059 0.390097380 ! cumulative probability array where sigma<=0.0 for certain elements print * , norm_cdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.500000000 NaN NaN ! `cdf_normal` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( norm_cdf ( x (:,:, i ), mu (:,:, i ), sigma (:,:, i ))) end do print * , xsum ! 11.3751936 ! complex normal cumulative distribution at x=(0.5,-0.5) with real part of ! mu=1.0, sigma=0.5 and imaginary part of mu=0.0, sigma=1.0 loc = ( 1.0 , 0.0 ) scale = ( 0.5 , 1.0 ) print * , norm_cdf (( 0.5 , - 0.5 ), loc , scale ) ! 4.89511043E-02 end program example_normal_cdf Marsaglia, George, and Wai Wan Tsang. \"The ziggurat method for generating random variables.\" Journal of statistical software 5 (2000): 1-7. ↩ Miller, Scott, and Donald Childers. Probability and random processes: With applications to signal processing and communications . Academic Press, 2012 (p. 197). ↩ ↩","tags":"","loc":"page/specs/stdlib_stats_distribution_normal.html"},{"title":"stats_distribution_uniform – Fortran-lang/stdlib","text":"Statistical Distributions -- Uniform Distribution Module Statistical Distributions -- Uniform Distribution Module shuffle - Using Fisher-Yates algorithm to generate a random permutation of a list Status Description Syntax Class Arguments Return value Example rvs_uniform - uniform distribution random variates Status Description Syntax Class Arguments Return value Example pdf_uniform - Uniform distribution probability density function Status Description Syntax Class Arguments Return value Example cdf_uniform - Uniform distribution cumulative distribution function Status Description Syntax Class Arguments Return value Example shuffle - Using Fisher-Yates algorithm to generate a random permutation of a list Status Experimental Description Applying Fisher-Yates algorithm to generate an unbiased permutation for any list of intrinsic numerical data types. Syntax result = shuffle ( list ) Class Function. Arguments list : argument has intent(in) and is a rank one array of integer , real , or complex type. Return value Return a randomized rank one array of the input type. Example program example_shuffle use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : shuffle implicit none integer :: seed_put , seed_get , i real :: x ( 10 ) integer :: n ( 10 ) complex :: z ( 10 ) do i = 1 , 10 n ( i ) = i x ( i ) = real ( i ) z ( i ) = cmplx ( real ( i ), real ( i )) end do seed_put = 32165498 call random_seed ( seed_put , seed_get ) ! set and get current value of seed print * , shuffle ( n ) ! get randomized n !10 6 9 2 8 1 3 5 7 4 print * , shuffle ( x ) ! get randomized x !5.0 10.0 9.0 4.0 3.0 8.0 2.0 1.0 7.0 6.0 print * , shuffle ( z ) ! get randomized z !(8.0, 8.0) (7.0, 7.0) (4.0, 4.0) (1.0, 1.0) (5.0, 5.0) !(9.0, 9.0) (6.0, 6.0) (3.0, 3.0) (2.0, 2.0) (10.0, 10.0) end program example_shuffle rvs_uniform - uniform distribution random variates Status Experimental Description Without argument the function returns a scalar standard uniformly distributed variate U(0,1) of real type with single precision on [0,1]. With single argument scale of integer type the function returns a scalar uniformly distributed variate of integer type on [0,scale]. This is the standard Rectangular distribution. With single argument scale of real or complex type the function returns a scalar uniformly distributed variate of real type on [0, scale] or complex type on [(0, 0i), (scale, i(scale))]. With double arguments loc and scale the function returns a scalar uniformly distributed random variates of integer or real type on [loc, loc + scale], or complex type on [(loc, i(loc)), ((loc + scale), i(loc + scale))], dependent of input type. With triple arguments loc , scale and array_size the function returns a rank one array of uniformly distributed variates of integer , real or complex type with an array size of array_size . For complex type, the real part and imaginary part are independent of each other. Note: the algorithm used for generating uniform random variates is fundamentally limited to double precision. Syntax result = rvs_uniform ([[loc,] scale] [[[,array_size]]]) Class Elemental function (without the third argument). Arguments loc : optional argument has intent(in) and is a scalar of type integer , real or complex . scale : optional argument has intent(in) and is a scalar of type integer , real or complex . array_size : optional argument has intent(in) and is a scalar of type integer with default kind. loc and scale must have the same type and kind when both are present. Return value The result is a scalar or a rank one array with size of array_size , of type integer , real or complex depending on the input type. Example program example_uniform_rvs use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : uni => rvs_uniform implicit none complex :: loc , scale real :: a ( 3 , 4 , 5 ), b ( 3 , 4 , 5 ) integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , uni () !real standard uniform random variate in [0., 1.] ! 0.161520019 print * , uni ( 3.0 ) !an uniform random variate in [0., 3.] ! 1.65974522 print * , uni ( - 0.5 , 1.0 ) !an uniform random variate in [-0.5, 0.5] ! 0.486900032 print * , uni ( - 1.0 , 2.0 , 10 ) !an array of 10 uniform random variates in [-1., 1.] !0.884182811 -0.771520197 0.560377002 0.709313750 -7.12267756E-02 !-0.431066573 0.497536063 -0.396331906 -0.325983286 0.137686729 print * , uni ( 20 ) !a random integer variate in [0, 20] ! 17 print * , uni ( 5 , 13 ) !a random integer variate in [5, 18] ! 15 print * , uni ( 3 , 19 , 10 ) !an array of 10 integer variates in [3,22] !7 16 16 12 9 21 19 4 3 19 loc = ( - 0.5 , - 0.5 ) scale = ( 1.0 , 1.0 ) print * , uni ( scale ) !a complex uniform random variate in unit square !(0.139202669, 0.361759573) print * , uni ( loc , scale ) !a complex uniform random variate in [(-0.5, -0.5), (0.5, 0.5)] !(0.296536088,-0.143987954) print * , uni ( loc , scale , 10 ) !an array of 10 complex uniform random variate in [(-0.5, -0.5), (0.5, 0.5)] !(-0.302334785,-0.401923567) (0.281620383,9.534919262E-02) ! (-0.374348879,0.457528770) (0.442990601,-0.240510434) ! (-0.421572685,0.279313922) (-0.182090610,5.901372433E-02) ! (-7.864198089E-02,0.378484428) (-0.423258364,-0.201292425) ! (0.193327367,-0.353985727) (-0.397661150,0.355926156) a (:, :, :) = - 0.5 b (:, :, :) = 1.0 print * , uni ( a , b ) !a rank 3 array of random variates in [-0.5,0.5] ! -0.249188632 -0.199248433 -0.389813602 2.88307667E-03 0.238479793, ! 0.264856219 -0.205177426 -0.480921626 0.131218433 0.252170086, ! -0.303151041 -8.89462233E-02 -0.377370685 0.341802299 0.323204756, ! 0.358679056 -0.138909757 0.384329498 -0.109372199 0.132353067, ! 0.494320452 0.419343710 -0.103044361 0.461389005 0.403132677 ! 0.121850729 0.403839290 -0.349389791 0.490482628 0.156600773 ! 8.46788883E-02 -0.483680278 0.388107836 0.119698405 0.154214382 ! 0.153113484 0.236523747 0.155937552 -0.135760903 0.219589531 ! 0.394639254 6.30156994E-02 -0.342692465 -0.444846451 -0.215700030 ! 0.204189956 -0.208748132 0.355063021 8.98272395E-02 -0.237928331 ! 2.98077464E-02 -0.485149682 -8.06870461E-02 -0.372713923 ! -0.178335011 0.283877611 -2.13934183E-02 -9.21690464E-03 ! 4.56320047E-02 0.220112979 end program example_uniform_rvs pdf_uniform - Uniform distribution probability density function Status Experimental Description The probability density function of the uniform distribution: f(x) = 0 x < loc or x > loc + scale for all types uniform distributions For random variable x in [loc, loc + scale]: f(x) = 1 / (scale + 1); for discrete uniform distribution. f(x) = 1 / scale; for continuous uniform distribution. f(x) = 1 / (scale%re * scale%im); for complex uniform distribution. Syntax result = pdf_uniform (x, loc, scale) Class Elemental function. Arguments x : has intent(in) and is a scalar of type integer , real or complex . loc : has intent(in) and is a scalar of type integer , real or complex . scale : has intent(in) and is a scalar of type integer , real or complex . All three arguments must have the same type and kind. Return value The result is a scalar or an array, with a shape conformable to arguments, of type real . Example program example_uniform_pdf use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : uni_pdf => pdf_uniform , & uni => rvs_uniform implicit none complex :: loc , scale real :: a ( 3 , 4 , 5 ), b ( 3 , 4 , 5 ), x ( 3 , 4 , 5 ) integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , uni_pdf ( 3 , 2 , 10 ) !probability density at 3 in range [2, 10] ! 9.09090936E-02 print * , uni_pdf ( 0.5 , 0.0 , 1.0 ) !a probability density at 0.5 in [0., 1.] ! 1.00000000 print * , uni_pdf ( 0.7 , - 1.0 , 2.0 ) !a probability density at 0.7 in [-1., 1.] ! 0.500000000 a (:, :, :) = 0.0 b (:, :, :) = 2.0 x = reshape ( uni ( 0. , 2. , 60 ), [ 3 , 4 , 5 ]) ! uniform random variates array in [0., 2.] print * , uni_pdf ( x , a , b ) ! probability density array in [0., 2.] ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 loc = ( - 0.5 , - 0.5 ) scale = ( 1.0 , 1.0 ) print * , uni_pdf (( - 0.1 , 0.2 ), loc , scale ) ! joint probability density at (-0.1,0.2) in [(-0.5, -0.5), (0.5, 0.5)] ! 1.00000000 end program example_uniform_pdf cdf_uniform - Uniform distribution cumulative distribution function Status Experimental Description Cumulative distribution function of the uniform distribution: F(x) = 0 x < loc for all types uniform distributions F(x) = 1 x > loc + scale for all types uniform distributions For random variable x in [loc, loc + scale]: F(x) = (x - loc + 1) / (scale + 1); for discrete uniform distribution. F(x) = (x - loc) / scale; for continuous uniform distribution. F(x) = (x%re - loc%re)(x%im - loc%im) / (scale%re * scale%im); for complex uniform distribution. Syntax result = cdf_uniform (x, loc, scale) Class Elemental function. Arguments x : has intent(in) and is a scalar of type integer , real or complex . loc : has intent(in) and is a scalar of type integer , real or complex . scale : has intent(in) and is a scalar of type integer , real or complex . All three arguments must have the same type and kind. Return value The result is a scalar or an array, with a shape conformable to arguments, of type real . Example program example_uniform_cdf use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : uni_cdf => cdf_uniform , & uni => rvs_uniform implicit none real :: x ( 3 , 4 , 5 ), a ( 3 , 4 , 5 ), b ( 3 , 4 , 5 ) complex :: loc , scale integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , uni_cdf ( 0.5 , 0. , 1. ) ! a cumulative at 0.5 in [0., 1.] !0.500000000 print * , uni_cdf ( 0.7 , - 1.0 , 2.0 ) ! a cumulative at 0.7 in [-1.0, 1.0] ! 0.850000024 print * , uni_cdf ( 6 , 2 , 10 ) ! a cumulative at 6 in [2, 10] ! 0.454545468 a (:, :, :) = - 1.0 b (:, :, :) = 2.0 x = reshape ( uni ( - 1.0 , 2.0 , 60 ), [ 3 , 4 , 5 ]) ! uniform random variates array print * , uni_cdf ( x , a , b ) ! cumulative array in [-1.0, 1.0] !0.161520004 0.553248405 0.986900032 0.942091405 0.114239901 0.780188501 ! 0.854656875 0.464386612 0.284466714 0.748768032 0.301834047 0.337008357 !0.568843365 0.596165061 0.180993259 0.614166319 0.214835495 7.98164606E-02 !0.641274095 0.607101977 0.701139212 0.230517209 1.97925568E-02 0.857982159 !0.712761045 0.139202654 0.361759573 0.796536088 0.356012046 0.197665215 !9.80764329E-02 0.781620383 0.595349193 0.125651121 0.957528770 0.942990601 !0.259489566 7.84273148E-02 0.779313922 0.317909390 0.559013724 0.421358019 !0.878484428 7.67416358E-02 0.298707575 0.693327367 0.146014273 0.102338850 !0.855926156 0.250811368 0.300751567 0.110186398 0.502883077 0.738479793 !0.764856219 0.294822574 1.90783739E-02 0.631218433 0.752170086 0.196848959 loc = ( 0. , 0. ) scale = ( 2. , 1. ) print * , uni_cdf (( 1.2 , 0.5 ), loc , scale ) ! joint cumulative distribution at (1.2,0.5) in [(0.,0.), (2.,1.)] ! 0.300000012 end program example_uniform_cdf","tags":"","loc":"page/specs/stdlib_stats_distribution_uniform.html"},{"title":"str2num – Fortran-lang/stdlib","text":"The stdlib_str2num module This module proposes a function-style interface for string-to-number conversion. It also profits from Fortran's interfaces to implement precision-dependant algorithms to maximize runtime efficiency. The stdlib_str2num module to_num - conversion of strings to numbers Status Description Syntax Arguments Return value Example to_num_from_stream - conversion of a stream of values in a string to numbers Status Description Syntax Arguments Return value Example Note to_num - conversion of strings to numbers Status Experimental Description Convert a string or an array of strings to numerical types. Syntax number = to_num (string, mold) Arguments string : argument has intent(in) and is of type character(*) . mold : argument has intent(in) and is of numerical type (that is of integer or of real ). Note : The type of the mold argument defines the type of the result. Return value Return a scalar of numerical type (i.e., integer , or real ). Example program example_string_to_number use stdlib_kinds , only : dp use stdlib_str2num , only : to_num implicit none character (:), allocatable :: txt real ( dp ) :: x txt = ' 8.8541878128e−12 ' x = to_num ( txt , x ) end program example_string_to_number to_num_from_stream - conversion of a stream of values in a string to numbers Status Experimental Description Convert a stream of values in a string to an array of values. Syntax number = to_num_from_stream (string, mold) Arguments string : argument has intent(in) and is of type character(:), pointer . mold : argument has intent(in) and is of numerical type (currently of integer or real ). Note : The type of the mold argument defines the type of the result. Return value Return a scalar of numerical type (i.e., integer or real ). Example program example_stream_of_strings_to_numbers use stdlib_kinds , only : dp use stdlib_str2num , only : to_num_from_stream implicit none character (:), allocatable , target :: chain character ( len = :), pointer :: cptr real ( dp ), allocatable :: r (:), p (:) integer :: i chain = \" 1.234 1.E1 1e0 0.1234E0 12.21e+001 -34.5E1\" allocate ( r ( 6 ), p ( 6 ) ) !> Example for streamline conversion using `to_num_from_stream` cptr => chain do i = 1 , 6 r ( i ) = to_num_from_stream ( cptr , r ( i ) ) !> the pointer is shifted within the function end do read ( chain , * ) p print * , \"Reading with to_num_from_stream\" print * , r print * , \"Reading with formatted read\" print * , p end program example_stream_of_strings_to_numbers Note The accuracy of the conversion is implementation dependent; it is recommended that implementers guarantee precision down to the last 3 bits. The current implementation has been tested to provide for : sp : exact match dp : precision up-to epsilon(0.0_dp) qp : precision around 200*epsilon(0.0_qp) Where precision refers to the relative difference between to_num and read . On the other hand, to_num provides speed-ups ranging from 4x to >10x compared to the intrinsic read .","tags":"","loc":"page/specs/stdlib_str2num.html"},{"title":"string_type – Fortran-lang/stdlib","text":"The stdlib_string_type module The stdlib_string_type module Introduction Derived types provided The string_type derived type Status Procedures and methods provided Constructor for empty string Status Description Syntax Class Argument Result value Example Constructor from character scalar Status Description Syntax Class Argument Result value Example Constructor from integer scalar Status Description Syntax Class Argument Result value Example Constructor from logical scalar Status Description Syntax Class Argument Result value Example Assignment of character scalar Status Description Syntax Class Example Len function Status Description Syntax Class Argument Result value Example Len_trim function Status Description Syntax Class Argument Result value Example Trim function Status Description Syntax Class Argument Result value Example Adjustl function Status Description Syntax Class Argument Result value Example Adjustr function Status Description Syntax Class Argument Result value Example Repeat function Status Description Syntax Class Argument Result value Example Char function Status Description Syntax Class Argument Result value Example Char function (position variant) Status Description Syntax Class Argument Result value Example Char function (range variant) Status Description Syntax Class Argument Result value Example Ichar function Status Description Syntax Class Argument Result value Example Iachar function Status Description Syntax Class Argument Result value Example Index function Status Description Syntax Class Argument Result value Example Scan function Status Description Syntax Class Argument Result value Example Verify function Status Description Syntax Class Argument Result value Example Lgt function (lexical greater than) Status Description Syntax Class Argument Result value Example Llt function (lexical less than) Status Description Syntax Class Argument Result value Example Lge function (lexical greater than or equal) Status Description Syntax Class Argument Result value Example Lle function (lexical less than or equal) Status Description Syntax Class Argument Result value Example To_lower function Status Description Syntax Class Argument Result Value Example To_upper function Status Description Syntax Class Argument Result Value Example To_title function Status Description Syntax Class Argument Result Value Example To_sentence function Status Description Syntax Class Argument Result Value Example Reverse function Status Description Syntax Class Argument Result Value Example Comparison operator greater Status Description Syntax Class Argument Result value Example Comparison operator less Status Description Syntax Class Argument Result value Example Comparison operator greater or equal Status Description Syntax Class Argument Result value Example Comparison operator less or equal Status Description Syntax Class Argument Result value Example Comparison operator equal Status Description Syntax Class Argument Result value Example Comparison operator not equal Status Description Syntax Class Argument Result value Example Concatenation operator Status Description Syntax Class Argument Result value Example Unformatted write Status Description Syntax Class Argument Example Formatted write Status Description Syntax Class Argument Example Unformatted read Status Description Syntax Class Argument Example Formatted read Status Description Syntax Class Argument Example move Status Description Syntax Class Argument Example Introduction The stdlib_string_type provides a derived type holding an arbitrary sequence\nof characters compatible with most Fortran intrinsic character procedures as\nwell as operators for working with character variables and constants. Derived types provided The string_type derived type The string_type is defined as a non-extendible derived type representing a\nsequence of characters. The internal representation of the character sequence\nis implementation dependent and not visible for the user of the module. Status Experimental Procedures and methods provided Procedures returning string_type instances can usually be used in elemental\ncontext, while procedures returning scalar character values can only be\nused in a pure way. Constructor for empty string Status Experimental Description The module defines a constructor to create an empty string type. Creates a string instance representing an empty string. Syntax res = string_type () Class Elemental function. Argument None. Result value The result is an instance of string_type with zero length. Example program example_constructor_empty use stdlib_string_type implicit none type ( string_type ) :: string string = string_type () ! len(string) == 0 end program example_constructor_empty Constructor from character scalar Status Experimental Description The module defines a constructor to create a string type from a character scalar. Creates a string instance representing the input character scalar value.\nThe constructor shall create an empty string if an unallocated deferred-length\ncharacter variable is passed. Syntax res = string_type (string) Class Elemental function. Argument string : shall be a scalar character value. It is an intent(in) argument. Result value The result is an instance of string_type . Example program example_constructor_scalar use stdlib_string_type implicit none type ( string_type ) :: string string = string_type ( \"Sequence\" ) ! len(string) == 8 string = string_type ( \" S p a c e d \" ) ! len(string) == 13 end program example_constructor_scalar Constructor from integer scalar Status Experimental Description The module defines a constructor to create a string type from an integer scalar. Syntax res = string_type (string) Class Elemental function. Argument val : shall be a scalar integer value. It is an intent(in) argument. Result value The result is an instance of string_type . Example program example_constructor_integer use stdlib_string_type implicit none type ( string_type ) :: string string = string_type ( 42 ) ! len(string) == 2 string = string_type ( - 289 ) ! len(string) == 4 end program example_constructor_integer Constructor from logical scalar Status Experimental Description The module defines a constructor to create a string type from a logical scalar. Syntax res = string_type (string) Class Elemental function. Argument val : shall be a scalar logical value. It is an intent(in) argument. Result value The result is an instance of string_type . Example program example_constructor_logical use stdlib_string_type implicit none type ( string_type ) :: string string = string_type (. true .) ! len(string) == 1 string = string_type (. false .) ! len(string) == 1 end program example_constructor_logical Assignment of character scalar Status Experimental Description The module defines an assignment operations, = , to create a string type\nfrom a character scalar. Creates a string instance representing the right-hand-side character scalar value. Syntax lhs = rhs Class Elemental subroutine, assignment(=) . Example program example_constructor_character use stdlib_string_type implicit none type ( string_type ) :: string ! len(string) == 0 string = \"Sequence\" ! len(string) == 8 end program example_constructor_character Len function Status Experimental Description Returns the length of the string. Syntax res = len (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_len use stdlib_string_type implicit none type ( string_type ) :: string integer :: length string = \"Some longer sentence for this example.\" length = len ( string ) ! length == 38 string = \"Whitespace \" length = len ( string ) ! length == 38 end program example_len Len_trim function Status Experimental Description Returns the length of the character sequence without trailing spaces\nrepresented by the string. Syntax res = len_trim (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_len_trim use stdlib_string_type implicit none type ( string_type ) :: string integer :: length string = \"Some longer sentence for this example.\" length = len_trim ( string ) ! length == 38 string = \"Whitespace \" length = len_trim ( string ) ! length == 10 end program example_len_trim Trim function Status Experimental Description Returns the character sequence hold by the string without trailing spaces\nrepresented by a string_type . Syntax res = trim (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_trim use stdlib_string_type implicit none type ( string_type ) :: string string = \"Whitespace \" string = trim ( string ) ! len(string) == 10 end program example_trim Adjustl function Status Experimental Description Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Syntax res = adjustl (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_adjustl use stdlib_string_type implicit none type ( string_type ) :: string string = \" Whitespace\" string = adjustl ( string ) ! char(string) == \"Whitespace \" end program example_adjustl Adjustr function Status Experimental Description Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Syntax res = adjustr (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_adjustr use stdlib_string_type implicit none type ( string_type ) :: string string = \"Whitespace \" string = adjustr ( string ) ! char(string) == \" Whitespace\" end program example_adjustr Repeat function Status Experimental Description Repeats the character sequence hold by the string by the number of\nspecified copies. Syntax res = repeat (string, ncopies) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . ncopies : Integer of default type. This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_repeat use stdlib_string_type implicit none type ( string_type ) :: string string = \"What? \" string = repeat ( string , 3 ) ! string == \"What? What? What? \" end program example_repeat Char function Status Experimental Description Return the character sequence represented by the string. Syntax res = char (string) Class Pure function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar character value. Example program example_char use stdlib_string_type implicit none type ( string_type ) :: string character ( len = :), allocatable :: dlc string = \"Character sequence\" dlc = char ( string ) ! dlc == \"Character sequence\" end program example_char Char function (position variant) Status Experimental Description Return the character at a certain position in the string. Syntax res = char (string, pos) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . pos : Integer of default type. This argument is intent(in) . Result value The result is a scalar character value. Example program example_char_position use stdlib_string_type implicit none type ( string_type ) :: string character ( len = :), allocatable :: dlc character ( len = 1 ), allocatable :: chars (:) string = \"Character sequence\" dlc = char ( string , 3 ) ! dlc == \"a\" chars = char ( string , [ 3 , 5 , 8 , 12 , 14 , 15 , 18 ]) ! chars == [\"a\", \"a\", \"e\", \"e\", \"u\", \"e\", \"e\"] end program example_char_position Char function (range variant) Status Experimental Description Return a substring from the character sequence of the string. Syntax res = char (string, start, last) Class Pure function. Argument string : Instance of a string_type . This argument is intent(in) . start : Integer of default type. This argument is intent(in) . last : Integer of default type. This argument is intent(in) . Result value The result is a scalar character value. Example program example_char_range use stdlib_string_type implicit none type ( string_type ) :: string character ( len = :), allocatable :: dlc string = \"Fortran\" dlc = char ( string , 1 , 4 ) ! dlc == \"Fort\" end program example_char_range Ichar function Status Experimental Description Character-to-integer conversion function. Returns the code for the character in the first character position of the\ncharacter sequence in the system's native character set. Syntax res = ichar (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_ichar use stdlib_string_type implicit none type ( string_type ) :: string integer :: code string = \"Fortran\" code = ichar ( string ) end program example_ichar Iachar function Status Experimental Description Code in ASCII collating sequence. Returns the code for the ASCII character in the first character position of\nthe character sequences represent by the string. Syntax res = iachar (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_iachar use stdlib_string_type implicit none type ( string_type ) :: string integer :: code string = \"Fortran\" code = iachar ( string ) end program example_iachar Index function Status Experimental Description Position of a substring within a string . Returns the position of the start of the leftmost or rightmost occurrence\nof string substring in string , counting from one. If substring is not\npresent in string , zero is returned. Syntax res = index (string, substring[, back]) Class Elemental function. Argument string : Either scalar character value or string type. This argument is intent(in) . substring : Either scalar character value or string type. This argument is intent(in) . back : Either absent or a scalar logical value. This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_index use stdlib_string_type implicit none type ( string_type ) :: string integer :: pos string = \"Search this string for this expression\" pos = index ( string , \"this\" ) ! pos == 8 pos = index ( string , \"this\" , back = . true .) ! pos == 24 pos = index ( string , \"This\" ) ! pos == 0 end program example_index Scan function Status Experimental Description Scans a string for the presence any of the characters in a set of characters.\nIf back is either absent or false , this function returns the position\nof the leftmost character of string that is in set . If back is true ,\nthe rightmost position is returned. If no character of set is found in string , the result is zero. Syntax res = scan (string, set[, back]) Class Elemental function. Argument string : Either scalar character value or string type. This argument is intent(in) . set : Either scalar character value or string type. This argument is intent(in) . back : Either absent or a scalar logical value. This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_scan use stdlib_string_type implicit none type ( string_type ) :: string integer :: pos string = \"fortran\" pos = scan ( string , \"ao\" ) ! pos == 2 pos = scan ( string , \"ao\" , . true .) ! pos == 6 pos = scan ( string , \"c++\" ) ! pos == 0 end program example_scan Verify function Status Experimental Description Verifies that all the characters in string belong to the set of characters in set .\nIf back is either absent or false , this function returns the position\nof the leftmost character of string that is not in set . If back is true ,\nthe rightmost position is returned. If all characters of string are found\nin set , the result is zero. Syntax res = verify (string, set[, back]) Class Elemental function. Argument string : Either scalar character value or string type. This argument is intent(in) . set : Either scalar character value or string type. This argument is intent(in) . back : Either absent or a scalar logical value. This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_verify use stdlib_string_type implicit none type ( string_type ) :: string integer :: pos string = \"fortran\" pos = verify ( string , \"ao\" ) ! pos == 1 pos = verify ( string , \"fo\" ) ! pos == 3 pos = verify ( string , \"c++\" ) ! pos == 1 pos = verify ( string , \"c++\" , back = . true .) ! pos == 7 pos = verify ( string , string ) ! pos == 0 end program example_verify Lgt function (lexical greater than) Status Experimental Description Lexically compare the order of two character sequences being greater than. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic lgt procedure. Syntax res = lgt (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lgt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = lgt ( string , \"abc\" ) ! res .eqv. .true. res = lgt ( string , \"bcd\" ) ! res .eqv. .false. res = lgt ( string , \"cde\" ) ! res .eqv. .false. end program example_lgt Llt function (lexical less than) Status Experimental Description Lexically compare the order of two character sequences being less than. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic llt procedure. Syntax res = llt (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_llt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = llt ( string , \"abc\" ) ! res .eqv. .false. res = llt ( string , \"bcd\" ) ! res .eqv. .false. res = llt ( string , \"cde\" ) ! res .eqv. .true. end program example_llt Lge function (lexical greater than or equal) Status Experimental Description Lexically compare the order of two character sequences being greater than\nor equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic lge procedure. Syntax res = lge (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lge use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = lge ( string , \"abc\" ) ! res .eqv. .true. res = lge ( string , \"bcd\" ) ! res .eqv. .true. res = lge ( string , \"cde\" ) ! res .eqv. .false. end program example_lge Lle function (lexical less than or equal) Status Experimental Description Lexically compare the order of two character sequences being less than\nor equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic lle procedure. Syntax res = lle (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lle use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = lle ( string , \"abc\" ) ! res .eqv. .false. res = lle ( string , \"bcd\" ) ! res .eqv. .true. res = lle ( string , \"cde\" ) ! res .eqv. .true. end program example_lle To_lower function Status Experimental Description Returns a new string_type instance which holds the lowercase version of the\ncharacter sequence hold by the input string. Syntax lowercase_string = to_lower (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_lower use stdlib_string_type implicit none type ( string_type ) :: string , lowercase_string string = \"Lowercase This String\" ! string <-- \"Lowercase This String\" lowercase_string = to_lower ( string ) ! string <-- \"Lowercase This String\" ! lowercase_string <-- \"lowercase this string\" end program example_to_lower To_upper function Status Experimental Description Returns a new string_type instance which holds the uppercase version of the\ncharacter sequence hold by the input string. Syntax uppercase_string = to_upper (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_upper use stdlib_string_type implicit none type ( string_type ) :: string , uppercase_string string = \"Uppercase This String\" ! string <-- \"Uppercase This String\" uppercase_string = to_upper ( string ) ! string <-- \"Uppercase This String\" ! uppercase_string <-- \"UPPERCASE THIS STRING\" end program example_to_upper To_title function Status Experimental Description Returns a new string_type instance which holds the titlecase version\nof the character sequence hold by the input string.\nTitle case: First character of every word in the sentence is converted to\nuppercase and the rest of the characters are converted to lowercase.\nA word is a contiguous sequence of character(s) which consists of alphabetical\ncharacter(s) and numeral(s) only and doesn't exclude any alphabetical character\nor numeral present next to either of its 2 ends. Syntax titlecase_string = to_title (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_title use stdlib_string_type implicit none type ( string_type ) :: string , titlecase_string string = \"titlecase this string.\" ! string <-- \"titlecase this string.\" titlecase_string = to_title ( string ) ! string <-- \"titlecase this string.\" ! titlecase_string <-- \"Titlecase This String.\" end program example_to_title To_sentence function Status Experimental Description Returns a new string_type instance which holds the sentencecase\nversion of the character sequence hold by the input string.\nSentencecase version: The first alphabetical character of the input character sequence\nis transformed to uppercase unless it follows a numeral and the rest of the\ncharacters in the sequence are transformed to lowercase. Syntax sentencecase_string = to_sentence (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_sentence use stdlib_string_type implicit none type ( string_type ) :: string , sentencecase_string string = \"sentencecase this string.\" ! string <-- \"sentencecase this string.\" sentencecase_string = to_sentence ( string ) ! string <-- \"sentencecase this string.\" ! sentencecase_string <-- \"Sentencecase this string.\" end program example_to_sentence Reverse function Status Experimental Description Returns a new string_type instance which holds the reversed version of the\ncharacter sequence hold by the input string. Syntax reverse_string = reverse (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_reverse use stdlib_string_type implicit none type ( string_type ) :: string , reverse_string string = \"Reverse This String\" ! string <-- \"Reverse This String\" reverse_string = reverse ( string ) ! string <-- \"Reverse This String\" ! reverse_string <-- \"gnirtS sihT esreveR\" end program example_reverse Comparison operator greater Status Experimental Description Compare the order of two character sequences being greater. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(>) and operator(.gt.) . Syntax res = lhs > rhs res = lhs .gt. rhs Class Elemental function, operator(>) and operator(.gt.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_gt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string > \"abc\" ! res .eqv. .true. res = string > \"bcd\" ! res .eqv. .false. res = string > \"cde\" ! res .eqv. .false. end program example_gt Comparison operator less Status Experimental Description Compare the order of two character sequences being less. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(<) and operator(.lt.) . Syntax res = lhs < rhs res = lhs .lt. rhs Class Elemental function, operator(<) and operator(.lt.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string < \"abc\" ! res .eqv. .false. res = string < \"bcd\" ! res .eqv. .false. res = string < \"cde\" ! res .eqv. .true. end program example_lt Comparison operator greater or equal Status Experimental Description Compare the order of two character sequences being greater or equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(>=) and operator(.ge.) . Syntax res = lhs >= rhs res = lhs .ge. rhs Class Elemental function, operator(>=) and operator(.ge.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_ge use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string >= \"abc\" ! res .eqv. .true. res = string >= \"bcd\" ! res .eqv. .true. res = string >= \"cde\" ! res .eqv. .false. end program example_ge Comparison operator less or equal Status Experimental Description Compare the order of two character sequences being less or equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(<=) and operator(.le.) . Syntax res = lhs <= rhs res = lhs .le. rhs Class Elemental function, operator(<=) and operator(.le.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_le use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string <= \"abc\" ! res .eqv. .false. res = string <= \"bcd\" ! res .eqv. .true. res = string <= \"cde\" ! res .eqv. .true. end program example_le Comparison operator equal Status Experimental Description Compare two character sequences for equality. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(==) and operator(.eq.) . Syntax res = lhs == rhs res = lhs .eq. rhs Class Elemental function, operator(==) and operator(.eq.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_eq use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string == \"abc\" ! res .eqv. .false. res = string == \"bcd\" ! res .eqv. .true. res = string == \"cde\" ! res .eqv. .false. end program example_eq Comparison operator not equal Status Experimental Description Compare two character sequences for inequality. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(/=) and operator(.ne.) . Syntax res = lhs /= rhs res = lhs .ne. rhs Class Elemental function, operator(/=) and operator(.ne.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_ne use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string /= \"abc\" ! res .eqv. .true. res = string /= \"bcd\" ! res .eqv. .false. res = string /= \"cde\" ! res .eqv. .true. end program example_ne Concatenation operator Status Experimental Description Concatenate two character sequences. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(//) . Syntax res = lhs // rhs Class Elemental function, operator(//) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is an instance of string_type . Example program example_cont use stdlib_string_type implicit none type ( string_type ) :: string string = \"Hello, \" string = string // \"World!\" ! len(string) == 13 end program example_cont Unformatted write Status Experimental Description Write the character sequence hold by the string to a connected unformatted unit.\nThe character sequences is represented by an 64 bit signed integer record,\nholding the length of the following character record. Syntax write(unit, iostat=iostat, iomsg=iomsg) string Class Unformatted user defined derived type output. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for output. This argument is intent(in) . iostat : Status identifier to indicate success of output operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing output operation.\n This argument is intent(inout) . Example program example_uwrite use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"unformatted\" , status = \"scratch\" ) write ( io ) string rewind ( io ) read ( io ) string close ( io ) end program example_uwrite Formatted write Status Experimental Description Write the character sequence hold by the string to a connected formatted unit. The current implementation is limited to list directed output and dt formatted\noutput. Requesting namelist output will raise an error. Syntax write(unit, fmt, iostat=iostat, iomsg=iomsg) string Class Formatted user defined derived type output. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for output. This argument is intent(in) . iotype : Type of formatted data transfer, has the value \"LISTDIRECTED\" for fmt=* , \"NAMELIST\" for namelist output or starts with \"DT\" for derived type output.\n This argument is intent(in) . v_list : Rank one array of default integer type containing the edit descriptors for\n derived type output.\n This argument is intent(in) . iostat : Status identifier to indicate success of output operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing output operation.\n This argument is intent(inout) . Example program example_fwrite use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"formatted\" , status = \"scratch\" ) write ( io , * ) string write ( io , * ) rewind ( io ) read ( io , * ) string close ( io ) end program example_fwrite Unformatted read Status Experimental Description Read a character sequence from a connected unformatted unit into the string.\nThe character sequences is represented by an 64 bit signed integer record,\nholding the length of the following character record. On failure the state the read variable is undefined and implementation dependent. Syntax read(unit, iostat=iostat, iomsg=iomsg) string Class Unformatted derived type input. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for input. This argument is intent(in) . iostat : Status identifier to indicate success of input operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing input operation.\n This argument is intent(inout) . Example program example_uread use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"unformatted\" , status = \"scratch\" ) write ( io ) string rewind ( io ) read ( io ) string close ( io ) end program example_uread Formatted read Status Experimental Description Read a character sequence from a connected formatted unit into the string.\nList-directed input will retrieve the complete record into the string. On failure the state the read variable is undefined and implementation dependent. The current implementation is limited to list directed input.\nRequesting dt formatted input or namelist output will raise an error. Syntax read(unit, fmt, iostat=iostat, iomsg=iomsg) string Class Formatted derived type input. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for input. This argument is intent(in) . iotype : Type of formatted data transfer, has the value \"LISTDIRECTED\" for fmt=* , \"NAMELIST\" for namelist input or starts with \"DT\" for derived type input.\n This argument is intent(in) . v_list : Rank one array of default integer type containing the edit descriptors for\n derived type input.\n This argument is intent(in) . iostat : Status identifier to indicate success of input operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing input operation.\n This argument is intent(inout) . Example program example_fread use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"formatted\" , status = \"scratch\" ) write ( io , * ) string write ( io , * ) rewind ( io ) read ( io , * ) string close ( io ) end program example_fread move Status Experimental Description Moves the allocation from from to to , consequently deallocating from in this process.\nIf from is not allocated before execution, to gets deallocated by the process.\nAn unallocated string_type instance is equivalent to an empty string.\nIf from and to are the same variable, then from remains unchanged. Syntax call move (from, to) Class Pure subroutine (Elemental subroutine, only when both from and to are type(string_type) ) Argument from : Character scalar or string_type .\n This argument is intent(inout) . to : Character scalar or string_type .\n This argument is intent(inout) when both from and to are type(string_type) ,\n otherwise intent(out) . Example program example_move use stdlib_string_type , only : string_type , assignment ( = ), move implicit none type ( string_type ) :: from_string character ( len = :), allocatable :: from_char , to_char from_string = \"move this string\" from_char = \"move this char\" ! from_string <-- \"move this string\" ! from_char <-- \"move this char\" ! to_char <-- (unallocated) call move ( from_string , to_char ) ! from_string <-- \"\" ! to_char <-- \"move this string\" call move ( from_char , to_char ) ! from_char <-- (unallocated) ! to_string <-- \"move this char\" end program example_move","tags":"","loc":"page/specs/stdlib_string_type.html"},{"title":"stringlist_type – Fortran-lang/stdlib","text":"stdlib_stringlist_type module (1-D list of strings) stdlib_stringlist_type module (1-D list of strings) Introduction Derived types provided stringlist_type derived type Status stringlist_index_type derived type Status fidx/bidx Description Syntax Status Class Argument Result value Example Constructor for stringlist_type(or stringlist) Description Syntax Status Class Argument Result value Example insert_at Description Syntax Status Class Argument Example get Description Syntax Status Class Argument Result value Example len Description Syntax Status Class Argument Result value Example clear Description Syntax Status Class Argument Example Comparison operator equal Description Syntax Status Class Argument Result value Example Comparison operator not equal Description Syntax Status Class Argument Result value Example Concatenation operator(//) Description Syntax Status Class Argument Result value Example Introduction The stdlib_stringlist_type module provides with 2 derived types to deal with lists of strings. stringlist_type derived type represents one-dimensional list of variable-length strings (also referred as one-dimensional stringlist) which is compatible with Fortran intrinsic character and stringlist_index_type derived type represents an index to access, modify the elements of a stringlist, insert elements to a stringlist and much more. Derived types provided stringlist_type derived type The stringlist_type derived type represents one-dimensional list of strings (also referred as one-dimensional stringlist). The internal representation of the list is implementation dependent and is not visible to the user of the module. Note: stringlist is an abstract concept which is expressed through the derived type stringlist_type . Status Experimental stringlist_index_type derived type An instance of the derived type stringlist_index_type represents either a forward index OR a backward index. \nThe internal representation is implementation dependent and is not visible to the user of the module. list_head and list_tail are 2 special instances of this type representing the head and the tail of a stringlist respectively.\nAn index is independent of the stringlist(or stringlist_type ) it is used with and hence, an index can be used with multiple stringlists in the same program. Status Experimental fidx/bidx Description fidx : Returns an instance which represents forward index idx . bidx : Returns an instance which represents backward index idx . Syntax For fidx: res = fidx (idx) For bidx: res = bidx (idx) Status Experimental. Class Pure function. Argument idx : Shall be of kind integer .\n This argument is intent(in) . Result value The result is of type stringlist_index_type . Example program example_fidx_bidx use stdlib_stringlist_type , only : stringlist_index_type , fidx , bidx implicit none type ( stringlist_index_type ) :: index index = fidx ( 1 ) ! forward index 1 index = bidx ( 3 ) ! backward index 3 end program example_fidx_bidx Constructor for stringlist_type (or stringlist) Description No arguments given: Initializes an empty stringlist(a stringlist containing no elements in it). With argument: Initializes a stringlist equivalent to the input array array i.e. a stringlist containing all elements of the input array array in the same order. Syntax res = stringlist_type ([array]) Status Experimental Class Pure function. Argument array : Shall be an array of character scalar or array of string_type .\n This argument is intent(in) and optional . Result value The result is an instance of type stringlist_type . Example program example_constructor use stdlib_stringlist_type , only : stringlist_type use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist stringlist = stringlist_type () ! stringlist <-- { } (empty stringlist) stringlist = stringlist_type ([ \"#1\" , \"#2\" , \"#3\" ]) ! stringlist <-- {\"#1\", \"#2\", \"#3\"} stringlist = stringlist_type ([ string_type ( \"#1\" ), string_type ( \"#2\" )]) ! stringlist <-- {\"#1\", \"#2\"} end program example_constructor insert_at Description Inserts the string string AT the index idx , so that the newly added element is present at index idx after insertion. Inserting an element AT index beyond length + 1 inserts the element AT list_tail , and likewise inserting AT a non-positive index inserts the element AT list_head . Syntax call stringlist_type % insert_at (idx, string) Status Experimental. Class Pure subroutine. Argument idx : stringlist_index_type .\n This argument is intent(in) . string : Character scalar or string_type .\n This argument is intent(in) . Example program example_insert_at use stdlib_stringlist_type , only : stringlist_type , stringlist_index_type , fidx , bidx use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( stringlist_index_type ) :: index index = fidx ( 1 ) call stringlist % insert_at ( index , \"Element No. one\" ) ! stringlist <-- {\"Element No. one\"} index = bidx ( 1 ) call stringlist % insert_at ( index , string_type ( \"Element No. two\" )) ! stringlist <-- {\"Element No. one\", \"Element No. two\"} call stringlist % insert_at ( fidx ( 2 ), string_type ( \"Element No. three\" )) ! stringlist <-- {\"Element No. one\", \"Element No. three\", \"Element No. two\"} call stringlist % insert_at ( bidx ( 1 ), \"Element No. four\" ) ! stringlist <-- {\"Element No. one\", \"Element No. three\", \"Element No. two\", \"Element No. four\"} end program example_insert_at get Description Returns the string present currently at the index idx in a stringlist. If index idx is out of bounds, then an empty string is returned. Syntax res = stringlist_type % get (idx) Status Experimental. Class Pure function. Argument idx : stringlist_index_type .\n This argument is intent(in) . Result value The result is a string of type string_type . Example program example_get use stdlib_stringlist_type , only : stringlist_type , fidx , bidx use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( string_type ) :: output !> inserting 4 elements to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"Element No. one\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. two\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. three\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. four\" ) ! stringlist <-- {\"Element No. four\", \"Element No. three\", \"Element No. two\", \"Element No. one\"} output = stringlist % get ( fidx ( 1 )) ! output <-- \"Element No. four\" output = stringlist % get ( bidx ( 1 )) ! output <-- \"Element No. one\" !> accessing out of bounds index output = stringlist % get ( bidx ( 5 )) ! output <-- \"\" output = stringlist % get ( fidx ( 0 )) ! output <-- \"\" end program example_get len Description Returns the number of elements present currently in the stringlist. Syntax res = stringlist_type % len () Status Experimental. Class Pure function. Argument No arguments. Result value The result is of type integer . Example program example_len use stdlib_stringlist_type , only : stringlist_type , bidx implicit none type ( stringlist_type ) :: stringlist integer :: output output = stringlist % len () ! output <-- 0 !> inserting 2 elements to the stringlist call stringlist % insert_at ( bidx ( 1 ), \"Element No. one\" ) call stringlist % insert_at ( bidx ( 1 ), \"Element No. two\" ) ! stringlist <-- {\"Element No. one\", \"Element No. two\"} print '(a)' , stringlist % len () ! 2 end program example_len clear Description Removes all elements from a stringlist. Syntax call stringlist_type % clear () Status Experimental. Class Pure subroutine. Argument No arguments. Example program example_clear use stdlib_stringlist_type , only : stringlist_type , fidx implicit none type ( stringlist_type ) :: stringlist !> inserting 2 elements to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"Element No. one\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. two\" ) ! stringlist <-- {\"Element No. two\", \"Element No. one\"} call stringlist % clear () ! stringlist <-- { } (empty stringlist) !> inserting 1 element to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"Element No. one\" ) ! stringlist <-- {\"Element No. one\"} end program example_clear Comparison operator equal Description Compares left hand side (lhs) with right hand side (rhs) for equality. Syntax res = lhs == rhs res = lhs .eq. rhs Status Experimental. Class Pure function, operator(==) and operator(.eq.) . Argument lhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . rhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_equality_operator use stdlib_stringlist_type , only : stringlist_type , fidx , list_head , operator ( == ) use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( string_type ), allocatable :: stringarray (:) logical :: res !> inserting 4 elements to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"#1\" ) call stringlist % insert_at ( list_head , \"#2\" ) call stringlist % insert_at ( fidx ( 1 ), \"#3\" ) call stringlist % insert_at ( list_head , \"#4\" ) ! stringlist <-- {\"#4\", \"#3\", \"#2\", \"#1\"} !> creating an array of 4 string_type elements stringarray = [ string_type ( \"#4\" ), string_type ( \"#3\" ), string_type ( \"#2\" ), string_type ( \"#1\" )] res = ( stringarray == stringlist ) ! res <-- .true. res = ( stringlist == [ \"#4\" , \"#3\" , \"#2\" , \"#1\" ]) ! res <-- .true. print '(a)' , stringlist == [ \"#4\" , \"#3\" , \"#1\" ] ! .false. end program example_equality_operator Comparison operator not equal Description Compares left hand side (lhs) with right hand side (rhs) for inequality. Syntax res = lhs /= rhs res = lhs .ne. rhs Status Experimental. Class Pure function, operator(/=) and operator(.ne.) . Argument lhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . rhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_inequality_operator use stdlib_stringlist_type , only : stringlist_type , bidx , list_tail , operator ( /= ) use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( string_type ), allocatable :: stringarray (:) logical :: res !> inserting 4 elements to the stringlist call stringlist % insert_at ( bidx ( 1 ), \"#1\" ) call stringlist % insert_at ( list_tail , \"#2\" ) call stringlist % insert_at ( bidx ( 1 ), \"#3\" ) call stringlist % insert_at ( list_tail , \"#4\" ) ! stringlist <-- {\"#1\", \"#2\", \"#3\", \"#4\"} !> creating an array of 4 string_type elements stringarray = [ string_type ( \"#1\" ), string_type ( \"#2\" ), string_type ( \"#3\" ), string_type ( \"#4\" )] res = ( stringarray /= stringlist ) ! res <-- .false. res = ( stringlist /= [ \"#111\" , \"#222\" , \"#333\" , \"#444\" ]) ! res <-- .true. print '(a)' , stringlist /= [ \"#4\" , \"#3\" , \"#1\" ] ! .true. end program example_inequality_operator Concatenation operator(//) Description Returns the concatenated output of left hand side (lhs) and right hand side (rhs). Syntax res = lhs // rhs Status Experimental. Class Pure function, operator(//) . Argument lhs : Shall be a character scalar or string_type OR an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . rhs : Shall be a character scalar or string_type OR an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . Result value The result is an instance of stringlist_type . Example program example_concatenate_operator use stdlib_stringlist_type , only : stringlist_type , operator ( // ) use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: first_stringlist , second_stringlist type ( string_type ), allocatable :: stringarray (:) first_stringlist = first_stringlist // \"Element No. one\" ! first_stringlist <-- {\"Element No. one\"} second_stringlist = string_type ( \"Element No. two\" ) // first_stringlist ! second_stringlist <-- {Element No. two, \"Element No. one\"} !> Creating an array of 2 string_type elements stringarray = [ string_type ( \"Element No. three\" ), string_type ( \"Element No. four\" )] second_stringlist = first_stringlist // stringarray ! second_stringlist <-- {\"Element No. one\", \"Element No. three\", \"Element No. four\"} second_stringlist = [ \"#1\" , \"#2\" ] // second_stringlist ! second_stringlist <-- {\"#1\", \"#2\", \"Element No. one\", \"Element No. three\", \"Element No. four\"} first_stringlist = first_stringlist // second_stringlist ! first_stringlist <-- {\"Element No. one\", \"#1\", \"#2\", \"Element No. one\", \"Element No. three\", \"Element No. four\"} end program example_concatenate_operator","tags":"","loc":"page/specs/stdlib_stringlist_type.html"},{"title":"strings – Fortran-lang/stdlib","text":"The stdlib_strings module The stdlib_strings module Introduction Procedures and methods provided strip Description Syntax Status Class Argument Result value Example chomp Description Syntax Status Class Argument Result value Example starts_with Description Syntax Status Class Argument Result value Example ends_with Description Syntax Status Class Argument Result value Example slice Description Syntax Status Class Argument Result value Example find Description Syntax Status Class Argument Result value Example replace_all Description Syntax Status Class Argument Result value Example padl Description Syntax Status Class Argument Result value Example padr Description Syntax Status Class Argument Result value Example count Description Syntax Status Class Argument Result value Example zfill Description Syntax Status Class Argument Result value Example to_string Description Syntax Status Class Argument Result value Example Introduction The stdlib_strings module provides basic string handling and manipulation routines. Procedures and methods provided strip Description Remove leading and trailing whitespace characters. Syntax string = strip (string) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). Result value The result is of the same type as string . Example program example_strip use stdlib_ascii , only : TAB , VT , LF , CR , FF use stdlib_strings , only : strip implicit none print '(a)' , strip ( \" hello \" ) ! \"hello\" print '(a)' , strip ( TAB // \"goodbye\" // CR // LF ) ! \"goodbye\" print '(a)' , strip ( \" \" // TAB // LF // VT // FF // CR ) ! \"\" print '(a)' , strip ( \" ! \" ) // \"!\" ! \"!!\" print '(a)' , strip ( \"Hello\" ) ! \"Hello\" end program example_strip chomp Description Remove trailing characters in set or substring from string .\nIf no character set or substring is provided trailing whitespace is removed. Syntax string = chomp (string[, set|substring]) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). set : Array of length one character. This argument is intent(in). substring : Character scalar or string_type .\n This argument is intent(in). Result value The result is of the same type as string . Example program example_chomp use stdlib_ascii , only : TAB , VT , LF , CR , FF use stdlib_strings , only : chomp implicit none print '(a)' , chomp ( \" hello \" ) ! \" hello\" print '(a)' , chomp ( TAB // \"goodbye\" // CR // LF ) ! \"\\tgoodbye\" print '(a)' , chomp ( \" \" // TAB // LF // VT // FF // CR ) ! \"\" print '(a)' , chomp ( \" ! \" ) // \"!\" ! \" !!\" print '(a)' , chomp ( \"Hello\" ) ! \"Hello\" print '(a)' , chomp ( \"hello\" , [ \"l\" , \"o\" ]) ! \"he\" print '(a)' , chomp ( \"hello\" , set = [ \"l\" , \"o\" ]) ! \"he\" print '(a)' , chomp ( \"hello\" , \"lo\" ) ! \"hel\" print '(a)' , chomp ( \"hello\" , substring = \"lo\" ) ! \"hel\" end program example_chomp starts_with Description Check if a string starts with a given substring . Syntax string = starts_with (string, substring) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). substring : Character scalar or string_type .\n This argument is intent(in). Result value The result is of scalar logical type. Example program example_starts_with use stdlib_strings , only : starts_with implicit none print '(l1)' , starts_with ( \"pattern\" , \"pat\" ) ! T print '(l1)' , starts_with ( \"pattern\" , \"ern\" ) ! F end program example_starts_with ends_with Description Check if a string ends with a given substring . Syntax string = ends_with (string, substring) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). substring : Character scalar or string_type .\n This argument is intent(in). Result value The result is of scalar logical type. Example program example_ends_with use stdlib_strings , only : ends_with implicit none print '(l1)' , ends_with ( \"pattern\" , \"ern\" ) ! T print '(l1)' , ends_with ( \"pattern\" , \"pat\" ) ! F end program example_ends_with slice Description Extracts the characters from the defined region of the input string by taking strides. Argument first and last defines this region for extraction by function slice . Argument stride defines the magnitude and direction (+/-) of stride to be taken while extraction. stride when given invalid value 0, is converted to +1. Deduction Process: Function first automatically deduces the optional arguments that are not provided by the user. Deduced first and last argument take +infinity or -infinity value and deduced stride argument \ntakes value +1 or -1 depending upon the actual argument(s) provided by the user. Extraction Process: Extraction starts only if last is crossable from first with stride of stride . Extraction starts from the first valid index in the defined region to take stride of stride and ends when the last valid index in the defined region is crossed. If no valid index exists in the defined region, empty string is returned. Syntax string = slice (string [, first, last, stride]) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). first : integer.\n This argument is intent(in) and optional. last : integer.\n This argument is intent(in) and optional. stride : integer.\n This argument is intent(in) and optional. Result value The result is of the same type as string . Example program example_slice use stdlib_string_type use stdlib_strings , only : slice implicit none type ( string_type ) :: string character ( len = 10 ) :: chars string = \"abcdefghij\" ! string <-- \"abcdefghij\" chars = \"abcdefghij\" ! chars <-- \"abcdefghij\" print '(a)' , slice ( \"abcdefghij\" , 2 , 6 , 2 ) ! \"bdf\" print '(a)' , slice ( chars , 2 , 6 , 2 ) ! \"bdf\" string = slice ( string , 2 , 6 , 2 ) ! string <-- \"bdf\" end program example_slice find Description Returns the starting index of the occurrence th occurrence of the substring pattern in the input string string . Default value of occurrence is set to 1 . \nIf consider_overlapping is not provided or is set to .true. the function counts two overlapping occurrences of substring pattern as two different occurrences. If occurrence th occurrence is not found, function returns 0 . Syntax string = find (string, pattern [, occurrence, consider_overlapping]) Status Experimental Class Elemental function Argument string : Character scalar or string_type .\n This argument is intent(in). pattern : Character scalar or string_type .\n This argument is intent(in). occurrence : integer.\n This argument is intent(in) and optional. consider_overlapping : logical.\n This argument is intent(in) and optional. Result value The result is a scalar of integer type or an integer array of rank equal to the highest rank among all dummy arguments. Example program example_find use stdlib_string_type , only : string_type , assignment ( = ) use stdlib_strings , only : find implicit none type ( string_type ) :: string string = \"needle in the character-stack\" print * , find ( string , \"needle\" ) ! 1 print * , find ( string , [ \"a\" , \"c\" ], [ 3 , 2 ]) ! [27, 20] print * , find ( \"qwqwqwq\" , \"qwq\" , 3 , [. false ., . true .]) ! [0, 5] end program example_find replace_all Description Replaces all occurrences of substring pattern in the input string with the replacement replacement . Occurrences overlapping on a base occurrence will not be replaced. Syntax string = replace_all (string, pattern, replacement) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). pattern : Character scalar or string_type .\n This argument is intent(in). replacement : Character scalar or string_type .\n This argument is intent(in). Result value The result is of the same type as string . Example program example_replace_all use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : replace_all implicit none type ( string_type ) :: string string = \"hurdles here, hurdles there, hurdles everywhere\" ! string <-- \"hurdles here, hurdles there, hurdles everywhere\" print '(dt)' , replace_all ( string , \"hurdles\" , \"learn from\" ) ! \"learn from here, learn from there, learn from everywhere\" string = replace_all ( string , \"hurdles\" , \"technology\" ) ! string <-- \"technology here, technology there, technology everywhere\" end program example_replace_all padl Description Returns a string of length output_length left padded with pad_with character if it is provided, otherwise with \" \" (1 whitespace). If output_length is less than or equal to the length of string , padding is not performed. Syntax string = padl (string, output_length [, pad_with]) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). output_length : integer.\n This argument is intent(in). pad_with : Character scalar of length 1.\n This argument is intent(in) and optional. Result value The result is of the same type as string . Example program example_padl use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : padl implicit none type ( string_type ) :: string string = \"left pad this string\" ! string <-- \"left pad this string\" print '(dt)' , padl ( string , 25 , \"$\" ) ! \"$left pad this string\" string = padl ( string , 25 ) ! string <-- \" left pad this string\" end program example_padl padr Description Returns a string of length output_length right padded with pad_with character if it is provided, otherwise with \" \" (1 whitespace). If output_length is less than or equal to the length of string , padding is not performed. Syntax string = padr (string, output_length [, pad_with]) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). output_length : integer.\n This argument is intent(in). pad_with : Character scalar of length 1.\n This argument is intent(in) and optional. Result value The result is of the same type as string . Example program example_padr use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : padr implicit none type ( string_type ) :: string string = \"right pad this string\" ! string <-- \"right pad this string\" print '(dt)' , padr ( string , 25 , \"$\" ) ! \"right pad this string\" string = padr ( string , 25 ) ! string <-- \"right pad this string \" end program example_padr count Description Returns the number of times the substring pattern has occurred in the input string string . If consider_overlapping is not provided or is set to .true. the function counts two overlapping occurrences of substring pattern as two different occurrences. Syntax string = count (string, pattern [, consider_overlapping]) Status Experimental Class Elemental function Argument string : Character scalar or string_type .\n This argument is intent(in). pattern : Character scalar or string_type .\n This argument is intent(in). consider_overlapping : logical.\n This argument is intent(in) and optional. Result value The result is a scalar of integer type or an integer array of rank equal to the highest rank among all dummy arguments. Example program example_count use stdlib_string_type , only : string_type , assignment ( = ) use stdlib_strings , only : count implicit none type ( string_type ) :: string string = \"How much wood would a woodchuck chuck if a woodchuck could chuck wood?\" print * , count ( string , \"wood\" ) ! 4 print * , count ( string , [ \"would\" , \"chuck\" , \"could\" ]) ! [1, 4, 1] print * , count ( \"a long queueueueue\" , \"ueu\" , [. false ., . true .]) ! [2, 4] end program example_count zfill Description Returns a string of length output_length left-padded with zeros.\nIf output_length is less than or equal to the length of string , padding is not performed. Syntax string = zfill (string, output_length) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). output_length : integer.\n This argument is intent(in). Result value The result is of the same type as string . Example program example_zfill use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : zfill implicit none type ( string_type ) :: string string = \"left pad this string with zeros\" ! string <-- \"left pad this string with zeros\" print '(dt)' , zfill ( string , 36 ) ! \"00000left pad this string with zeros\" string = zfill ( string , 36 ) ! string <-- \"00000left pad this string with zeros\" end program example_zfill to_string Description Format or transfer a integer/real/complex/logical scalar as a string. Input a wrong format that cause the internal-IO to fail, the result value is a string of [*] . Syntax string = to_string (value [, format]) Status Experimental Class Pure function. Argument value : Shall be an integer/real/complex/logical scalar.\n This is an intent(in) argument. format : Shall be a character(len=*) scalar like '(F6.2)' or just 'F6.2' .\n This is an intent(in) and optional argument. Contains the edit descriptor to format value into a string, for example '(F6.2)' or '(f6.2)' . to_string will automatically enclose format in a set of parentheses, so passing F6.2 or f6.2 as format is possible as well. Result value The result is an allocatable length character scalar with up to 128 cached character length. Example program example_to_string use stdlib_strings , only : to_string implicit none !> Example for `complex` type print * , to_string (( 1 , 1 )) !! \"(1.00000000,1.00000000)\" print * , to_string (( 1 , 1 ), '(F6.2)' ) !! \"( 1.00, 1.00)\" print * , to_string (( 1000 , 1 ), '(ES0.2)' ), to_string (( 1000 , 1 ), '(SP,F6.3)' ) !! \"(1.00E+3,1.00)\"\"(******,+1.000)\" !! Too narrow formatter for real number !! Normal demonstration(`******` from Fortran Standard) !> Example for `integer` type print * , to_string ( - 3 ) !! \"-3\" print * , to_string ( 42 , '(I4)' ) !! \" 42\" print * , to_string ( 1 , '(I0.4)' ), to_string ( 2 , '(B4)' ) !! \"0001\"\" 10\" !> Example for `real` type print * , to_string ( 1. ) !! \"1.00000000\" print * , to_string ( 1. , '(F6.2)' ) !! \" 1.00\" print * , to_string ( 1. , 'F6.2' ) !! \" 1.00\" print * , to_string ( 1. , '(SP,ES9.2)' ), to_string ( 1 , '(F7.3)' ) !! \"+1.00E+00\"\"[*]\" !! 1 wrong demonstration (`[*]` from `to_string`) !> Example for `logical` type print * , to_string (. true .) !! \"T\" print * , to_string (. true ., '(L2)' ) !! \" T\" print * , to_string (. true ., 'L2' ) !! \" T\" print * , to_string (. false ., '(I5)' ) !! \"[*]\" !! 1 wrong demonstrations(`[*]` from `to_string`) end program example_to_string","tags":"","loc":"page/specs/stdlib_strings.html"},{"title":"version – Fortran-lang/stdlib","text":"The stdlib_version module The stdlib_version module Introduction Constants provided by stdlib_version stdlib_version_string stdlib_version_compact get_stdlib_version Status Description Syntax Class Argument Example Introduction The stdlib_version module contains the version of the standard library.\nThe version information can be used as a compile time constant or retrieved from a getter function at runtime.\nIn case the standard library is dynamically linked, the version number retrieved from the getter might mismatch the compile time constants provided from the version built against.\nTherefore, it is recommended to retrieve the version information always at runtime. Constants provided by stdlib_version stdlib_version_string String constant representing the version number. stdlib_version_compact Compact representation of the version string following the scheme:\nmajor * 10000 + minor * 100 + patch. get_stdlib_version Status Experimental Description Getter function to retrieve version information Syntax res = get_stdlib_version ([major], [minor], [patch], [string]) Class Pure subroutine. Argument major : shall be an intrinsic integer type. It is an optional, intent(out) argument. minor : shall be an intrinsic integer type. It is an optional, intent(out) argument. patch : shall be an intrinsic integer type. It is an optional, intent(out) argument. string : shall be a deferred length character type. It is an optional, intent(out) argument. Example program example_version use stdlib_version , only : get_stdlib_version implicit none character ( len = :), allocatable :: version call get_stdlib_version ( string = version ) print '(a)' , version end program example_version","tags":"","loc":"page/specs/stdlib_version.html"}]} \ No newline at end of file +var tipuesearch = {"pages":[{"title":" Fortran-lang/stdlib ","text":"Fortran-lang/stdlib Fortran stdlib API Documentation Goals and Motivation Scope Code of Conduct License Warning This API documentation for the Fortran-lang/stdlib is a work in progress Note Use the navigation bar at the top of the screen to browse modules, procedures, source files, etc.\nThe listings near the bottom of the page are incomplete. Fortran stdlib API Documentation This is the main API documentation landing page generated by FORD .\nThe documentation for comment markup in source code, running FORD and the FORD project file are all maintained on the FORD wiki . Goals and Motivation The Fortran Standard, as published by the ISO (https://wg5-fortran.org/), does\nnot have a Standard Library. The goal of this project is to provide a community\ndriven and agreed upon de facto \"standard\" library for Fortran, called a\nFortran Standard Library ( stdlib ). We have a rigorous process how stdlib is\ndeveloped as documented in our Workflow . stdlib is both a\nspecification and a reference implementation. We are cooperating with the\nFortran Standards Committee (e.g., the effort started at the J3\ncommittee repository) and the plan is to continue working with the Committee in\nthe future (such as in the step 5. in the Workflow document), so\nthat if the Committee wants to standardize some feature already available in stdlib , it would\nbase it on stdlib 's implementation. Scope The goal of the Fortran Standard Library is to achieve the following general scope: Utilities (containers, strings, files, OS/environment integration, unit\n testing & assertions, logging, ...) Algorithms (searching and sorting, merging, ...) Mathematics (linear algebra, sparse matrices, special functions, fast Fourier\n transform, random numbers, statistics, ordinary differential equations,\n numerical integration, optimization, ...) Code of Conduct In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. Please read first this Code of Conduct License The stdlib source code and related files and documentation are distributed under the MIT license . Developer Info fortran-lang/stdlib contributors","tags":"home","loc":"index.html"},{"title":"chaining_hashmap_type – Fortran-lang/stdlib ","text":"type, public, extends( hashmap_type ) :: chaining_hashmap_type Type implementing the chaining_hashmap_type types\n( Specifications ) Finalization Procedures final :: free_chaining_map private interface free_chaining_map() Arguments None Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls private pure function calls(map) Returns the number of subroutine calls on an open hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: char_get_other_data private subroutine char_get_other_data(map, value, other, exists) Character key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: char_key_test private subroutine char_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - char array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: char_map_entry private subroutine char_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: char_remove_entry private subroutine char_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: char_set_other_data private subroutine char_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the char value key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: entries private pure function entries(map) Returns the number of entries in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: get_all_keys => get_all_chaining_keys interface private module subroutine get_all_chaining_keys(map, all_keys) Returns all the keys contained in a hashmap\nArguments:\n map - an chaining hash map\n all_keys - all the keys contained in a hash map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(in) :: map type( key_type ), intent(out), allocatable :: all_keys (:) generic, public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data private interface get_other_open_data() Arguments None private subroutine int8_get_other_data(map, value, other, exists) Int8 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists private subroutine int32_get_other_data(map, value, other, exists) Int32 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists private subroutine char_get_other_data(map, value, other, exists) Character key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public :: init => init_chaining_map interface private module subroutine init_chaining_map(map, hasher, slots_bits, status) Routine to allocate an empty map with HASHER as the hash function,\n2 SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited\nto a maximum of 2 MAX_BITS. All fields are initialized.\nArguments:\n map - the chaining hash map to be initialized\n hasher - the hash function to be used to map keys to slots\n slots_bits - the bits of two used to initialize the number of slots\n status - an integer error status flag with the allowed values:\n success - no problems were found\n alloc_fault - map % slots or map % inverse could not be allocated\n array_size_error - slots_bits is less than default_bits or\n greater than max_bits Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(out) :: map procedure( hasher_fun ) :: hasher integer, intent(in), optional :: slots_bits integer(kind=int32), intent(out), optional :: status procedure, public, non_overridable, pass(map) :: int32_get_other_data private subroutine int32_get_other_data(map, value, other, exists) Int32 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int32_key_test private subroutine int32_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int32 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: int32_map_entry private subroutine int32_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: int32_remove_entry private subroutine int32_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: int32_set_other_data private subroutine int32_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int32 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int8_get_other_data private subroutine int8_get_other_data(map, value, other, exists) Int8 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int8_key_test private subroutine int8_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int8 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: int8_map_entry private subroutine int8_map_entry(map, value, other, conflict) Int8 generic interface for map entry\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: int8_remove_entry private subroutine int8_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n value - the int8 array key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: int8_set_other_data private subroutine int8_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int8 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public :: key_get_other_data => get_other_chaining_data interface private module subroutine get_other_chaining_data(map, key, other, exists) Returns the other data associated with the inverse table index\nArguments:\n map - a chaining hash table\n key - the key associated with a map entry\n other - the other data associated with the key\n exists - a logical flag indicating whether an entry with that key exists Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public :: key_key_test => chaining_key_test interface private module subroutine chaining_key_test(map, key, present) Returns a logical flag indicating whether KEY is present in the hash map\nArguments:\n map - the hash map of interest\n key - the key of interest\n present - a logical flag indicating whether key is present in map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out) :: present procedure, public :: key_map_entry => map_chain_entry interface private module subroutine map_chain_entry(map, key, other, conflict) map - the hash table of interest\nkey - the key identifying the entry\nother - other data associated with the key\nconflict - logical flag indicating whether the entry key conflicts\n with an existing key Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public :: key_remove_entry => remove_chaining_entry interface private module subroutine remove_chaining_entry(map, key, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out), optional :: existed procedure, public :: key_set_other_data => set_other_chaining_data interface private module subroutine set_other_chaining_data(map, key, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n key - the key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in) :: other logical, intent(out), optional :: exists generic, public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test private interface open_key_test() Arguments None private subroutine int8_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int8 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out) :: present private subroutine int32_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int32 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out) :: present private subroutine char_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - char array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out) :: present procedure, public :: loading => chaining_loading interface private pure module function chaining_loading(map) Returns the number of entries relative to slots in a hash map\nArguments:\n map - a chaining hash map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(in) :: map Return Value real generic, public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry private interface map_open_entry() Arguments None private subroutine int8_map_entry(map, value, other, conflict) Int8 generic interface for map entry\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict private subroutine int32_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict private subroutine char_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: map_probes private pure function map_probes(map) Returns the total number of table probes on a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: num_slots private pure function num_slots(map) Returns the number of allocated slots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: rehash => rehash_chaining_map interface private module subroutine rehash_chaining_map(map, hasher) Changes the hashing method of the table entries to that of HASHER.\nArguments:\n map the table to be rehashed\n hasher the hasher function to be used for the table Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(inout) :: map procedure( hasher_fun ) :: hasher generic, public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry private interface remove_open_entry() Arguments None private subroutine int8_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n value - the int8 array key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out), optional :: existed private subroutine int32_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out), optional :: existed private subroutine char_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out), optional :: existed generic, public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data private interface set_other_open_data() Arguments None private subroutine int8_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int8 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists private subroutine int32_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int32 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists private subroutine char_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the char value key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: slots_bits private pure function slots_bits(map) Returns the number of bits used to specify the number of allocated\nslots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer procedure, public :: total_depth => total_chaining_depth interface private module function total_chaining_depth(map) result(total_depth) Returns the total number of ones based offsets of slot entries from\ntheir slot index for a hash map\nArguments:\n map - an chaining hash map Arguments Type Intent Optional Attributes Name class( chaining_hashmap_type ), intent(in) :: map Return Value integer(kind=int_depth) Source Code type , extends ( hashmap_type ) :: chaining_hashmap_type !! Version: Experimental !! !! Type implementing the `chaining_hashmap_type` types !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_hashmap_type-derived-type)) private type ( chaining_map_entry_pool ), pointer :: cache => null () !! Pool of allocated chaining_map_entry_type objects type ( chaining_map_entry_type ), pointer :: free_list => null () !! free list of map entries type ( chaining_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) type ( chaining_map_entry_ptr ), allocatable :: slots (:) !! Array of bucket lists Note # slots=size(slots) contains procedure :: get_all_keys => get_all_chaining_keys procedure :: key_get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: loading => chaining_loading procedure :: key_map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map procedure :: key_remove_entry => remove_chaining_entry procedure :: key_set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth procedure :: key_key_test => chaining_key_test final :: free_chaining_map end type chaining_hashmap_type","tags":"","loc":"type/chaining_hashmap_type.html"},{"title":"hashmap_type – Fortran-lang/stdlib ","text":"type, public :: hashmap_type Type implementing an abstract hash map\n( Specifications ) Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls private pure function calls(map) Returns the number of subroutine calls on an open hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: char_get_other_data private subroutine char_get_other_data(map, value, other, exists) Character key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: char_key_test private subroutine char_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - char array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: char_map_entry private subroutine char_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: char_remove_entry private subroutine char_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: char_set_other_data private subroutine char_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the char value key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: entries private pure function entries(map) Returns the number of entries in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure(get_all_keys), public, deferred, pass(map) :: get_all_keys subroutine get_all_keys(map, all_keys) Prototype Returns the all keys contained in a hash map\n( Specifications ) Arguments:\n map - a hash map\n all_keys - all the keys contained in a hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map type( key_type ), intent(out), allocatable :: all_keys (:) generic, public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data private interface get_other_open_data() Arguments None private subroutine int8_get_other_data(map, value, other, exists) Int8 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists private subroutine int32_get_other_data(map, value, other, exists) Int32 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists private subroutine char_get_other_data(map, value, other, exists) Character key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure(init_map), public, deferred, pass(map) :: init subroutine init_map(map, hasher, slots_bits, status) Prototype Routine to allocate an empty map with HASHER as the hash function,\n2 SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a\nmaximum of 2 MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots),\nmap % inverse elements. All fields are initialized.\nArguments:\n map - the hash maap to be initialized\n hasher - the hash function to be used to map keys to slots\n slots_bits - the number of bits initially used to map to the slots\n status - an integer error status flag with the allowed values:\n success - no problems were found\n alloc_fault - map % slots or map % inverse could not be allocated\n array_size_error - slots_bits or max_bits is less than\n default_bits or greater than strict_max_bits\n real_value_error - load_factor is less than 0.375 or greater than\n 0.875 Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(out) :: map procedure( hasher_fun ) :: hasher integer, intent(in), optional :: slots_bits integer(kind=int32), intent(out), optional :: status procedure, public, non_overridable, pass(map) :: int32_get_other_data private subroutine int32_get_other_data(map, value, other, exists) Int32 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int32_key_test private subroutine int32_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int32 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: int32_map_entry private subroutine int32_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: int32_remove_entry private subroutine int32_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: int32_set_other_data private subroutine int32_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int32 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int8_get_other_data private subroutine int8_get_other_data(map, value, other, exists) Int8 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int8_key_test private subroutine int8_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int8 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: int8_map_entry private subroutine int8_map_entry(map, value, other, conflict) Int8 generic interface for map entry\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: int8_remove_entry private subroutine int8_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n value - the int8 array key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: int8_set_other_data private subroutine int8_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int8 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure(key_get_other_data), public, deferred, pass(map) :: key_get_other_data subroutine key_get_other_data(map, key, other, exists) Prototype Returns the other data associated with the inverse table index\nArguments:\n map - a hash map\n key - the key associated with a map entry\n other - the other data associated with the key\n exists - a logical flag indicating whether an entry with that key exists Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure(key_key_test), public, deferred, pass(map) :: key_key_test subroutine key_key_test(map, key, present) Prototype Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n key - the key of interest\n present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out) :: present procedure(key_map_entry), public, deferred, pass(map) :: key_map_entry subroutine key_map_entry(map, key, other, conflict) Prototype Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure(key_remove_entry), public, deferred, pass(map) :: key_remove_entry subroutine key_remove_entry(map, key, existed) Prototype Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out), optional :: existed procedure(key_set_other_data), public, deferred, pass(map) :: key_set_other_data subroutine key_set_other_data(map, key, other, exists) Prototype Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n key - the key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in) :: other logical, intent(out), optional :: exists generic, public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test private interface open_key_test() Arguments None private subroutine int8_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int8 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out) :: present private subroutine int32_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int32 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out) :: present private subroutine char_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - char array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out) :: present procedure(loading), public, deferred, pass(map) :: loading pure function loading(map) Prototype Returns the number of entries relative to slots in a hash map\n( Specifications ) Arguments:\n map - a hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value real generic, public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry private interface map_open_entry() Arguments None private subroutine int8_map_entry(map, value, other, conflict) Int8 generic interface for map entry\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict private subroutine int32_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict private subroutine char_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: map_probes private pure function map_probes(map) Returns the total number of table probes on a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: num_slots private pure function num_slots(map) Returns the number of allocated slots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure(rehash_map), public, deferred, pass(map) :: rehash subroutine rehash_map(map, hasher) Prototype Changes the hashing method of the table entries to that of HASHER.\nArguments:\n map the table to be rehashed\n hasher the hasher function to be used for the table Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map procedure( hasher_fun ) :: hasher generic, public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry private interface remove_open_entry() Arguments None private subroutine int8_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n value - the int8 array key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out), optional :: existed private subroutine int32_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out), optional :: existed private subroutine char_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out), optional :: existed generic, public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data private interface set_other_open_data() Arguments None private subroutine int8_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int8 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists private subroutine int32_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int32 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists private subroutine char_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the char value key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: slots_bits private pure function slots_bits(map) Returns the number of bits used to specify the number of allocated\nslots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer procedure(total_depth), public, deferred, pass(map) :: total_depth Key_test procedures. function total_depth(map) Prototype Returns the total number of ones based offsets of slot entriesyy from\ntheir slot index for a hash map\n( Specifications )\nArguments:\n map - a hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int64) Source Code type , abstract :: hashmap_type !! Version: Experimental !! !! Type implementing an abstract hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-hashmap_type-abstract-type)) private integer ( int_calls ) :: call_count = 0 !! Number of calls integer ( int_calls ) :: probe_count = 0 !! Number of probes since last expansion integer ( int_calls ) :: total_probes = 0 !! Cumulative number of probes integer ( int_index ) :: num_entries = 0 !! Number of entries integer ( int_index ) :: num_free = 0 !! Number of elements in the free_list integer ( int32 ) :: nbits = default_bits !! Number of bits used to address the slots procedure ( hasher_fun ), pointer , nopass :: hasher => fnv_1_hasher !! Hash function contains procedure , non_overridable , pass ( map ) :: calls procedure , non_overridable , pass ( map ) :: entries procedure , non_overridable , pass ( map ) :: map_probes procedure , non_overridable , pass ( map ) :: num_slots procedure , non_overridable , pass ( map ) :: slots_bits procedure ( get_all_keys ), deferred , pass ( map ) :: get_all_keys procedure ( init_map ), deferred , pass ( map ) :: init procedure ( loading ), deferred , pass ( map ) :: loading procedure ( rehash_map ), deferred , pass ( map ) :: rehash procedure ( total_depth ), deferred , pass ( map ) :: total_depth !! Key_test procedures. procedure ( key_key_test ), deferred , pass ( map ) :: key_key_test procedure , non_overridable , pass ( map ) :: int8_key_test procedure , non_overridable , pass ( map ) :: int32_key_test procedure , non_overridable , pass ( map ) :: char_key_test generic , public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test ! Map_entry procedures procedure ( key_map_entry ), deferred , pass ( map ) :: key_map_entry procedure , non_overridable , pass ( map ) :: int8_map_entry procedure , non_overridable , pass ( map ) :: int32_map_entry procedure , non_overridable , pass ( map ) :: char_map_entry generic , public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry ! Get_other_data procedures procedure ( key_get_other_data ), deferred , pass ( map ) :: key_get_other_data procedure , non_overridable , pass ( map ) :: int8_get_other_data procedure , non_overridable , pass ( map ) :: int32_get_other_data procedure , non_overridable , pass ( map ) :: char_get_other_data generic , public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data ! Key_remove_entry procedures procedure ( key_remove_entry ), deferred , pass ( map ) :: key_remove_entry procedure , non_overridable , pass ( map ) :: int8_remove_entry procedure , non_overridable , pass ( map ) :: int32_remove_entry procedure , non_overridable , pass ( map ) :: char_remove_entry generic , public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry ! Set_other_data procedures procedure ( key_set_other_data ), deferred , pass ( map ) :: key_set_other_data procedure , non_overridable , pass ( map ) :: int8_set_other_data procedure , non_overridable , pass ( map ) :: int32_set_other_data procedure , non_overridable , pass ( map ) :: char_set_other_data generic , public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data end type hashmap_type","tags":"","loc":"type/hashmap_type.html"},{"title":"open_hashmap_type – Fortran-lang/stdlib ","text":"type, public, extends( hashmap_type ) :: open_hashmap_type Type implementing an \"open\" hash map Finalization Procedures final :: free_open_map private interface free_open_map() Arguments None Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls private pure function calls(map) Returns the number of subroutine calls on an open hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: char_get_other_data private subroutine char_get_other_data(map, value, other, exists) Character key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: char_key_test private subroutine char_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - char array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: char_map_entry private subroutine char_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: char_remove_entry private subroutine char_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: char_set_other_data private subroutine char_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the char value key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: entries private pure function entries(map) Returns the number of entries in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: get_all_keys => get_all_open_keys interface private module subroutine get_all_open_keys(map, all_keys) Returns all the keys contained in a hashmap\nArguments:\n map - an open hash map\n all_keys - all the keys contained in a hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(in) :: map type( key_type ), intent(out), allocatable :: all_keys (:) generic, public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data private interface get_other_open_data() Arguments None private subroutine int8_get_other_data(map, value, other, exists) Int8 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists private subroutine int32_get_other_data(map, value, other, exists) Int32 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists private subroutine char_get_other_data(map, value, other, exists) Character key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public :: init => init_open_map interface private module subroutine init_open_map(map, hasher, slots_bits, status) Routine to allocate an empty map with HASHER as the hash function,\n2 SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a\nmaximum of 2 MAX_BITS. All fields are initialized.\nArguments:\n map - the open hash maap to be initialized\n hasher - the hash function to be used to map keys to slots\n slots_bits - the number of bits used to map to the slots\n status - an integer error status flag with the allowed values:\n success - no problems were found\n alloc_fault - map % slots or map % inverse could not be allocated\n array_size_error - slots_bits is less than default_bitd or\n greater than max_bits Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(out) :: map procedure( hasher_fun ) :: hasher integer, intent(in), optional :: slots_bits integer(kind=int32), intent(out), optional :: status procedure, public, non_overridable, pass(map) :: int32_get_other_data private subroutine int32_get_other_data(map, value, other, exists) Int32 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int32_key_test private subroutine int32_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int32 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: int32_map_entry private subroutine int32_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: int32_remove_entry private subroutine int32_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: int32_set_other_data private subroutine int32_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int32 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int8_get_other_data private subroutine int8_get_other_data(map, value, other, exists) Int8 key generic interface for get_other_data function Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: int8_key_test private subroutine int8_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int8 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out) :: present procedure, public, non_overridable, pass(map) :: int8_map_entry private subroutine int8_map_entry(map, value, other, conflict) Int8 generic interface for map entry\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: int8_remove_entry private subroutine int8_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n value - the int8 array key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out), optional :: existed procedure, public, non_overridable, pass(map) :: int8_set_other_data private subroutine int8_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int8 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public :: key_get_other_data => get_other_open_data interface private module subroutine get_other_open_data(map, key, other, exists) Returns the other data associated with the inverse table index\nArguments:\n map - an open hash table\n key - the key associated with a map entry\n other - the other data associated with the key\n exists - a logical flag indicating whether an entry with that key exists Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(out) :: other logical, intent(out), optional :: exists procedure, public :: key_key_test => open_key_test interface private module subroutine open_key_test(map, key, present) Returns a logical flag indicating whether KEY exists in the hash map\nArguments:\n map - the hash map of interest\n key - the key of interest\n present - a logical flag indicating whether KEY exists in the hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out) :: present procedure, public :: key_map_entry => map_open_entry interface private module subroutine map_open_entry(map, key, other, conflict) Inserts an entry into the hash table\nArguments:\n map - the hash table of interest\n key - the key identifying the entry\n other - other data associated with the key\n conflict - logical flag indicating whether the entry key conflicts\n with an existing key Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public :: key_remove_entry => remove_open_entry interface private module subroutine remove_open_entry(map, key, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key logical, intent(out), optional :: existed procedure, public :: key_set_other_data => set_other_open_data interface private module subroutine set_other_open_data(map, key, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n key - the key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map type( key_type ), intent(in) :: key type( other_type ), intent(in) :: other logical, intent(out), optional :: exists generic, public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test private interface open_key_test() Arguments None private subroutine int8_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int8 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out) :: present private subroutine int32_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - int32 array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out) :: present private subroutine char_key_test(map, value, present) Returns a logical flag indicating whether KEY exists in the hash map\n( Specifications ) Arguments:\n map - the hash map of interest\n value - char array that is the key to lookup. present - a flag indicating whether key is present in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out) :: present procedure, public :: loading => open_loading interface private pure module function open_loading(map) Returns the number of entries relative to slots in a hash map\nArguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(in) :: map Return Value real generic, public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry private interface map_open_entry() Arguments None private subroutine int8_map_entry(map, value, other, conflict) Int8 generic interface for map entry\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict private subroutine int32_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict private subroutine char_map_entry(map, value, other, conflict) Inserts an entry into the hash table\n( Specifications ) Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in), optional :: other logical, intent(out), optional :: conflict procedure, public, non_overridable, pass(map) :: map_probes private pure function map_probes(map) Returns the total number of table probes on a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_calls) procedure, public, non_overridable, pass(map) :: num_slots private pure function num_slots(map) Returns the number of allocated slots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer(kind=int_index) procedure, public :: rehash => rehash_open_map interface private module subroutine rehash_open_map(map, hasher) Changes the hashing method of the table entries to that of HASHER.\nArguments:\n map the table to be rehashed\n hasher the hasher function to be used for the table Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(inout) :: map procedure( hasher_fun ) :: hasher generic, public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry private interface remove_open_entry() Arguments None private subroutine int8_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n value - the int8 array key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) logical, intent(out), optional :: existed private subroutine int32_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) logical, intent(out), optional :: existed private subroutine char_remove_entry(map, value, existed) Remove the entry, if any, that has the key\nArguments:\n map - the table from which the entry is to be removed\n key - the key to an entry\n existed - a logical flag indicating whether an entry with the key\n was present in the original map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value logical, intent(out), optional :: existed generic, public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data private interface set_other_open_data() Arguments None private subroutine int8_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int8 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int8), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists private subroutine int32_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the int32 array key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map integer(kind=int32), intent(in) :: value (:) type( other_type ), intent(in) :: other logical, intent(out), optional :: exists private subroutine char_set_other_data(map, value, other, exists) Change the other data associated with the key\nArguments:\n map - the map with the entry of interest\n value - the char value key to the entry inthe map\n other - the new data to be associated with the key\n exists - a logical flag indicating whether the key is already entered\n in the map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(inout) :: map character(len=*), intent(in) :: value type( other_type ), intent(in) :: other logical, intent(out), optional :: exists procedure, public, non_overridable, pass(map) :: slots_bits private pure function slots_bits(map) Returns the number of bits used to specify the number of allocated\nslots in a hash map\n( Specifications ) Arguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( hashmap_type ), intent(in) :: map Return Value integer procedure, public :: total_depth => total_open_depth interface private module function total_open_depth(map) result(total_depth) Returns the total number of ones based offsets of slot entries from\ntheir slot index for a hash map\nArguments:\n map - an open hash map Arguments Type Intent Optional Attributes Name class( open_hashmap_type ), intent(in) :: map Return Value integer(kind=int64) Source Code type , extends ( hashmap_type ) :: open_hashmap_type !! Version: Experimental !! !! Type implementing an \"open\" hash map private integer ( int_index ) :: index_mask = 2_int_index ** default_bits - 1 !! Mask used in linear addressing type ( open_map_entry_pool ), pointer :: cache => null () !! Pool of allocated open_map_entry_type objects type ( open_map_entry_list ), pointer :: free_list => null () !! free list of map entries type ( open_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) integer ( int_index ), allocatable :: slots (:) !! Array of indices to the inverse Note # slots=size(slots) contains procedure :: get_all_keys => get_all_open_keys procedure :: key_get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: loading => open_loading procedure :: key_map_entry => map_open_entry procedure :: rehash => rehash_open_map procedure :: key_remove_entry => remove_open_entry procedure :: key_set_other_data => set_other_open_data procedure :: total_depth => total_open_depth procedure :: key_key_test => open_key_test final :: free_open_map end type open_hashmap_type","tags":"","loc":"type/open_hashmap_type.html"},{"title":"string_type – Fortran-lang/stdlib ","text":"type, public :: string_type sequence String type holding an arbitrary sequence of characters. Constructor public interface string_type Constructor for new string instances private elemental module function new_string(string) result(new) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: string Return Value type( string_type ) private elemental module function new_string_from_integer_int16(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int32(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int64(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int8(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_logical_lk(val) result(new) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: val Return Value type( string_type ) Source Code type :: string_type ! Use the sequence statement below as a hack to prevent extending this type. ! It is not used for storage association. sequence private character ( len = :), allocatable :: raw end type string_type","tags":"","loc":"type/string_type.html"},{"title":"stringlist_index_type – Fortran-lang/stdlib ","text":"type, public :: stringlist_index_type Source Code type stringlist_index_type private logical :: forward integer :: offset end type stringlist_index_type","tags":"","loc":"type/stringlist_index_type.html"},{"title":"stringlist_type – Fortran-lang/stdlib ","text":"type, public :: stringlist_type Constructor public interface stringlist_type Constructor for stringlist\nReturns an instance of type stringlist_type Specifications private pure function new_stringlist() Constructor with no argument\nReturns a new instance of type stringlist Arguments None Return Value type( stringlist_type ) private pure function new_stringlist_carray(array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: array Return Value type( stringlist_type ) private pure function new_stringlist_sarray(array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: array Return Value type( stringlist_type ) Type-Bound Procedures procedure, public :: clear => clear_list private subroutine clear_list(list) Resets stringlist 'list' to an empy stringlist of len 0\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list generic, public :: get => get_string_idx private pure function get_string_idx_wrap(list, idx) Returns the string present at stringlist_index 'idx' in stringlist 'list'\nReturns string_type instance Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(in) :: list type( stringlist_index_type ), intent(in) :: idx Return Value type( string_type ) generic, public :: insert_at => insert_at_char_idx, insert_at_string_idx, insert_at_stringlist_idx, insert_at_chararray_idx, insert_at_stringarray_idx private subroutine insert_at_char_idx_wrap(list, idx, string) Inserts character scalar 'string' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx character(len=*), intent(in) :: string private subroutine insert_at_string_idx_wrap(list, idx, string) Inserts string 'string' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx type( string_type ), intent(in) :: string private subroutine insert_at_stringlist_idx_wrap(list, idx, slist) Inserts stringlist 'slist' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx type( stringlist_type ), intent(in) :: slist private subroutine insert_at_chararray_idx_wrap(list, idx, carray) Inserts chararray 'carray' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx character(len=*), intent(in), dimension(:) :: carray private subroutine insert_at_stringarray_idx_wrap(list, idx, sarray) Inserts stringarray 'sarray' AT stringlist_index 'idx' in stringlist 'list'\nModifies the input stringlist 'list' Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(inout) :: list type( stringlist_index_type ), intent(in) :: idx type( string_type ), intent(in), dimension(:) :: sarray procedure, public :: len => length_list private pure function length_list(list) Returns the len (length) of the list\nReturns an integer Arguments Type Intent Optional Attributes Name class( stringlist_type ), intent(in) :: list Return Value integer Source Code type stringlist_type private type ( string_type ), dimension (:), allocatable :: stringarray contains private procedure , public :: clear => clear_list procedure , public :: len => length_list procedure :: to_future_at_idxn => convert_to_future_at_idxn procedure :: to_current_idxn => convert_to_current_idxn procedure :: insert_at_char_idx => insert_at_char_idx_wrap procedure :: insert_at_string_idx => insert_at_string_idx_wrap procedure :: insert_at_stringlist_idx => insert_at_stringlist_idx_wrap procedure :: insert_at_chararray_idx => insert_at_chararray_idx_wrap procedure :: insert_at_stringarray_idx => insert_at_stringarray_idx_wrap generic , public :: insert_at => insert_at_char_idx , & insert_at_string_idx , & insert_at_stringlist_idx , & insert_at_chararray_idx , & insert_at_stringarray_idx procedure :: insert_before_string_int => insert_before_string_int_impl procedure :: insert_before_stringlist_int => insert_before_stringlist_int_impl procedure :: insert_before_chararray_int => insert_before_chararray_int_impl procedure :: insert_before_stringarray_int => insert_before_stringarray_int_impl generic :: insert_before => insert_before_string_int , & insert_before_stringlist_int , & insert_before_chararray_int , & insert_before_stringarray_int procedure :: get_string_idx => get_string_idx_wrap generic , public :: get => get_string_idx end type stringlist_type","tags":"","loc":"type/stringlist_type.html"},{"title":"bitset_64 – Fortran-lang/stdlib ","text":"type, public, extends( bitset_type ) :: bitset_64 Type for bitsets with no more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_64 interface private elemental module function all_64(self) result(all) Returns .true. if all bits in self are 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value logical procedure, public, pass(self) :: any => any_64 interface private elemental module function any_64(self) result(any) Returns .true. if any bit in self is 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value logical procedure, public, pass(self) :: bit_count => bit_count_64 interface private elemental module function bit_count_64(self) result(bit_count) Returns the number of non-zero bits in self . Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value integer(kind=bits_kind) procedure, public, pass(self) :: bits public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) generic, public :: clear => clear_bit , clear_range private interface clear_bit_large() Arguments None private interface clear_range_large() Arguments None procedure, public, pass(self) :: clear_bit => clear_bit_64 interface private elemental module subroutine clear_bit_64(self, pos) Sets to zero the bit at pos position in self . If pos is less than\nzero or greater than bits(self)-1 it is ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: clear_range => clear_range_64 interface private pure module subroutine clear_range_64(self, start_pos, stop_pos) Sets to zero all bits from the start_pos to stop_pos positions in self .\nIf stop_pos < start_pos then no bits are modified. Positions outside\nthe range 0 to bits(set)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos generic, public :: flip => flip_bit , flip_range private interface flip_bit_large() Arguments None private interface flip_range_large() Arguments None procedure, public, pass(self) :: flip_bit => flip_bit_64 interface private elemental module subroutine flip_bit_64(self, pos) Flips the bit value at the pos position in self , provided the position is\nvalid. If pos is less than 0 or greater than bits(self)-1 , no value is\nchanged. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: flip_range => flip_range_64 interface private pure module subroutine flip_range_64(self, start_pos, stop_pos) Flips all valid bits from the start_pos to the stop_pos positions in self . If stop_pos < start_pos no bits are flipped. Positions less than\n0 or greater than bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: from_string => from_string_64 interface private module subroutine from_string_64(self, string, status) Initializes the bitset self treating string as a binary literal status may have the values:\n* success - if no problems were found,\n* alloc_fault - if allocation of the bitset failed\n* char_string_too_large_error - if string was too large, or\n* char_string_invalid_error - if string had an invalid character. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status generic, public :: init => init_zero private interface init_zero_large() Arguments None procedure, public, pass(self) :: init_zero => init_zero_64 interface private module subroutine init_zero_64(self, bits, status) Creates the bitset, self , of size bits , with all bits initialized to\nzero. bits must be non-negative. If an error occurs and status is\nabsent then processing stops with an informative stop code. status will have one of the values:\n* success - if no problems were found,\n* alloc_fault - if memory allocation failed\n* array_size_invalid_error - if bits is either negative or larger\n than 64 with self of class bitset_64 . Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self integer(kind=bits_kind), intent(in) :: bits integer, intent(out), optional :: status procedure, public, pass(self) :: input => input_64 interface private module subroutine input_64(self, unit, status) Reads the components of the bitset, self , from the unformatted I/O\nunit, unit , assuming that the components were written using output .\nIf an error occurs and status is absent then processing stops with\nan informative stop code. status has one of the values:\n* success - if no problem was found\n* alloc_fault - if it failed allocating memory for self , or\n* array_size_invalid_error if the bits(self) in unit is negative\n or greater than 64 for a bitset_64 input.\n* read_failure - if it failed during the reads from unit Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self integer, intent(in) :: unit integer, intent(out), optional :: status procedure, public, pass(self) :: none => none_64 interface private elemental module function none_64(self) result(none) Returns .true. if none of the bits in self have the value 1. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self Return Value logical procedure, public, pass(self) :: not => not_64 interface private elemental module subroutine not_64(self) Sets the bits in self to their logical complement. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self procedure, public, pass(self) :: output => output_64 interface private module subroutine output_64(self, unit, status) Writes the components of the bitset, self , to the unformatted I/O\nunit, unit , in a unformatted sequence compatible with input . If status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success , or the value write_failure if the write failed. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer, intent(in) :: unit integer, intent(out), optional :: status generic, public :: read_bitset => read_bitset_string , read_bitset_unit private interface read_bitset_string_large() Arguments None private interface read_bitset_unit_large() Arguments None procedure, public, pass(self) :: read_bitset_string => read_bitset_string_64 interface private module subroutine read_bitset_string_64(self, string, status) Uses the bitset literal in the default character string , to define\nthe bitset, self . The literal may be preceded by an an arbitrary\nsequence of blank characters. If status is absent an error results\nin an error stop with an informative stop code. If status is present it has one of the values:\n* success - if no problems occurred,\n* alloc_fault - if allocation of memory for SELF failed,\n* array_size_invalid_error - if bits(self) in string is greater\n than 64 for a bitset_64 ,\n* char_string_invalid_error - if the bitset literal has an invalid\n character,\n* char_string_too_small_error - if the string ends before all the bits\n are read.\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented, Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_64 interface private module subroutine read_bitset_unit_64(self, unit, advance, status) Uses the bitset literal at the current position in the formatted\nfile with I/O unit, unit , to define the bitset, self . The literal\nmay be preceded by an an arbitrary sequence of blank characters.\nIf advance is present it must be either 'YES' or 'NO'. If absent\nit has the default value of 'YES' to determine whether advancing\nI/O occurs. If status is absent an error results in an error stop\nwith an informative stop code. If status is present it has one of\nthe values:\n* success - if no problem occurred,\n* alloc_fault - if allocation of self failed,\n* array_size_invalid_error - if bits(self) in the bitset literal\n is greater than 64 for a bitset_64 ,\n* char_string_invalid_error - if the read of the bitset literal found\n an invalid character,\n* eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal,\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented,\n* read_failure - if a read statement fails, Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(out) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status generic, public :: set => set_bit , set_range private interface set_bit_large() Arguments None private interface set_range_large() Arguments None procedure, public, pass(self) :: set_bit => set_bit_64 interface private elemental module subroutine set_bit_64(self, pos) Sets the value at the pos position in self , provided the position is\nvalid. If the position is less than 0 or greater than bits(self)-1 then self is unchanged. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: set_range => set_range_64 interface private pure module subroutine set_range_64(self, start_pos, stop_pos) Sets all valid bits to 1 from the start_pos to the stop_pos positions\nin self . If stop_pos < start_pos no bits are changed. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: test => test_64 interface private elemental module function test_64(self, pos) result(test) Returns .true. if the pos position is set, .false. otherwise. If pos is negative or greater than bits(self)-1 the result is .false. . Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value logical procedure, public, pass(self) :: to_string => to_string_64 interface private module subroutine to_string_64(self, string, status) Represents the value of self as a binary literal in string .\nStatus may have the values success or alloc_fault Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: value => value_64 interface private elemental module function value_64(self, pos) result(value) Returns 1 if the pos position is set, 0 otherwise. If pos is negative\nor greater than bits(set)-1 the result is 0. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value integer generic, public :: write_bitset => write_bitset_string , write_bitset_unit private interface write_bitset_string_large() Arguments None private interface write_bitset_unit_large() Arguments None procedure, public, pass(self) :: write_bitset_string => write_bitset_string_64 interface private module subroutine write_bitset_string_64(self, string, status) Writes a bitset literal to the allocatable default character string ,\nrepresenting the individual bit values in the bitset_64 , self .\nIf status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success , or the value alloc_fault if allocation of\nthe output string failed. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_64 interface private module subroutine write_bitset_unit_64(self, unit, advance, status) Writes a bitset literal to the I/O unit, unit , representing the\nindividual bit values in the bitset, self . By default or if advance is present with the value 'YES', advancing output is used.\nIf advance is present with the value 'NO', then the current record\nis not advanced by the write. If status is absent an error results\nin an error stop with an informative stop code. If status is\npresent it has the default value of success , the value alloc_fault if allocation of the output string failed, or write_failure if the write statement outputting the literal failed. Arguments Type Intent Optional Attributes Name class( bitset_64 ), intent(in) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status Source Code type , extends ( bitset_type ) :: bitset_64 !! Version: experimental !! !! Type for bitsets with no more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private :: block = 0 contains procedure , pass ( self ) :: all => all_64 procedure , pass ( self ) :: any => any_64 procedure , pass ( self ) :: bit_count => bit_count_64 procedure , pass ( self ) :: clear_bit => clear_bit_64 procedure , pass ( self ) :: clear_range => clear_range_64 procedure , pass ( self ) :: flip_bit => flip_bit_64 procedure , pass ( self ) :: flip_range => flip_range_64 procedure , pass ( self ) :: from_string => from_string_64 procedure , pass ( self ) :: init_zero => init_zero_64 procedure , pass ( self ) :: input => input_64 procedure , pass ( self ) :: none => none_64 procedure , pass ( self ) :: not => not_64 procedure , pass ( self ) :: output => output_64 procedure , pass ( self ) :: read_bitset_string => read_bitset_string_64 procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_64 procedure , pass ( self ) :: set_bit => set_bit_64 procedure , pass ( self ) :: set_range => set_range_64 procedure , pass ( self ) :: test => test_64 procedure , pass ( self ) :: to_string => to_string_64 procedure , pass ( self ) :: value => value_64 procedure , pass ( self ) :: write_bitset_string => write_bitset_string_64 procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_64 end type bitset_64","tags":"","loc":"type/bitset_64.html"},{"title":"bitset_large – Fortran-lang/stdlib ","text":"type, public, extends( bitset_type ) :: bitset_large Type for bitsets with more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_large interface private elemental module function all_large(self) result(all) Returns .true. if all bits in self are 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value logical procedure, public, pass(self) :: any => any_large interface private elemental module function any_large(self) result(any) Returns .true. if any bit in self is 1, .false. otherwise. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value logical procedure, public, pass(self) :: bit_count => bit_count_large interface private elemental module function bit_count_large(self) result(bit_count) Returns the number of non-zero bits in self . Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value integer(kind=bits_kind) procedure, public, pass(self) :: bits public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) generic, public :: clear => clear_bit , clear_range private interface clear_bit_large() Arguments None private interface clear_range_large() Arguments None procedure, public, pass(self) :: clear_bit => clear_bit_large interface private elemental module subroutine clear_bit_large(self, pos) Sets to zero the bit at pos position in self . If pos is less than\nzero or greater than bits(self)-1 it is ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: clear_range => clear_range_large interface private pure module subroutine clear_range_large(self, start_pos, stop_pos) Sets to zero all bits from the start_pos to stop_pos positions in self .\nIf stop_pos < start_pos then no bits are modified. Positions outside\nthe range 0 to bits(set)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos generic, public :: flip => flip_bit , flip_range private interface flip_bit_large() Arguments None private interface flip_range_large() Arguments None procedure, public, pass(self) :: flip_bit => flip_bit_large interface private elemental module subroutine flip_bit_large(self, pos) Flips the bit value at the pos position in self , provided the position is\nvalid. If pos is less than 0 or greater than bits(self)-1 , no value is\nchanged. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: flip_range => flip_range_large interface private pure module subroutine flip_range_large(self, start_pos, stop_pos) Flips all valid bits from the start_pos to the stop_pos positions in self . If stop_pos < start_pos no bits are flipped. Positions less than\n0 or greater than bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: from_string => from_string_large interface private module subroutine from_string_large(self, string, status) Initializes the bitset self treating string as a binary literal status may have the values:\n* success - if no problems were found,\n* alloc_fault - if allocation of the bitset failed\n* char_string_too_large_error - if string was too large, or\n* char_string_invalid_error - if string had an invalid character. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status generic, public :: init => init_zero private interface init_zero_large() Arguments None procedure, public, pass(self) :: init_zero => init_zero_large interface private module subroutine init_zero_large(self, bits, status) Creates the bitset, self , of size bits , with all bits initialized to\nzero. bits must be non-negative. If an error occurs and status is\nabsent then processing stops with an informative stop code. status will have one of the values;\n* success - if no problems were found,\n* alloc_fault - if memory allocation failed\n* array_size_invalid_error - if bits is either negative or larger\n than 64 with self of class bitset_64 , or Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self integer(kind=bits_kind), intent(in) :: bits integer, intent(out), optional :: status procedure, public, pass(self) :: input => input_large interface private module subroutine input_large(self, unit, status) Reads the components of the bitset, self , from the unformatted I/O\nunit, unit , assuming that the components were written using output .\nIf an error occurs and status is absent then processing stops with\nan informative stop code. status has one of the values:\n* success - if no problem was found\n* alloc_fault - if it failed allocating memory for self , or\n* array_size_invalid_error if the bits(self) in unit is negative\n or greater than 64 for a bitset_64 input.\n* read_failure - if it failed during the reads from unit Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self integer, intent(in) :: unit integer, intent(out), optional :: status procedure, public, pass(self) :: none => none_large interface private elemental module function none_large(self) result(none) Returns .true. if none of the bits in self have the value 1. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self Return Value logical procedure, public, pass(self) :: not => not_large interface private elemental module subroutine not_large(self) Sets the bits in self to their logical complement Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self procedure, public, pass(self) :: output => output_large interface private module subroutine output_large(self, unit, status) Writes the components of the bitset, self , to the unformatted I/O\nunit, unit , in a unformatted sequence compatible with input . If status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success , or the value write_failure if the write failed. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer, intent(in) :: unit integer, intent(out), optional :: status generic, public :: read_bitset => read_bitset_string , read_bitset_unit private interface read_bitset_string_large() Arguments None private interface read_bitset_unit_large() Arguments None procedure, public, pass(self) :: read_bitset_string => read_bitset_string_large interface private module subroutine read_bitset_string_large(self, string, status) Uses the bitset literal in the default character string , to define\nthe bitset, self . The literal may be preceded by an an arbitrary\nsequence of blank characters. If status is absent an error results\nin an error stop with an informative stop code. If status is present it has one of the values\n* success - if no problems occurred,\n* alloc_fault - if allocation of memory for SELF failed,\n* array_size_invalid_error - if bits(self) in string is greater\n than 64 for a bitset_64 ,\n* char_string_invalid_error - if the bitset literal has an invalid\n character,\n* char_string_too_small_error - if the string ends before all the bits\n are read.\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented, Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_large interface private module subroutine read_bitset_unit_large(self, unit, advance, status) Uses the bitset literal at the current position in the formatted\nfile with I/O unit, unit , to define the bitset, self . The literal\nmay be preceded by an an arbitrary sequence of blank characters.\nIf advance is present it must be either 'YES' or 'NO'. If absent\nit has the default value of 'YES' to determine whether advancing\nI/O occurs. If status is absent an error results in an error stop\nwith an informative stop code. If status is present it has one of\nthe values:\n* success - if no problem occurred,\n* alloc_fault - if allocation of self failed,\n* array_size_invalid_error - if bits(self) in the bitset literal\n is greater than 64 for a bitset_64 ,\n* char_string_invalid_error - if the read of the bitset literal found\n an invalid character,\n* eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal,\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented,\n* read_failure - if a read statement fails, Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(out) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status generic, public :: set => set_bit , set_range private interface set_bit_large() Arguments None private interface set_range_large() Arguments None procedure, public, pass(self) :: set_bit => set_bit_large interface private elemental module subroutine set_bit_large(self, pos) Sets the value at the pos position in self , provided the position is\nvalid. If the position is less than 0 or greater than bits(self)-1 then self is unchanged. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure, public, pass(self) :: set_range => set_range_large interface private pure module subroutine set_range_large(self, start_pos, stop_pos) Sets all valid bits to 1 from the start_pos to the stop_pos positions\nin self . If stop_pos < start_pos no bits are changed. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure, public, pass(self) :: test => test_large interface private elemental module function test_large(self, pos) result(test) Returns .true. if the pos position is set, .false. otherwise. If pos is negative or greater than bits(self) - 1 the result is .false. . Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value logical procedure, public, pass(self) :: to_string => to_string_large interface private module subroutine to_string_large(self, string, status) Represents the value of self as a binary literal in string Status may have the values success or alloc_fault . Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: value => value_large interface private elemental module function value_large(self, pos) result(value) Returns 1 if the pos position is set, 0 otherwise. If pos is negative\nor greater than bits(set) - 1 the result is 0. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value integer generic, public :: write_bitset => write_bitset_string , write_bitset_unit private interface write_bitset_string_large() Arguments None private interface write_bitset_unit_large() Arguments None procedure, public, pass(self) :: write_bitset_string => write_bitset_string_large interface private module subroutine write_bitset_string_large(self, string, status) Writes a bitset literal to the allocatable default character string ,\nrepresenting the individual bit values in the bitset_large, self .\nIf status is absent an error results in an error stop with an\ninformative stop code. If status is present it has the default\nvalue of success, or the value alloc_fault` if allocation of\nthe output string failed. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_large interface private module subroutine write_bitset_unit_large(self, unit, advance, status) Writes a bitset literal to the I/O unit, unit , representing the\nindividual bit values in the bitset, self . By default or if advance is present with the value 'YES', advancing output is used.\nIf advance is present with the value 'NO', then the current record\nis not advanced by the write. If status is absent an error results\nin an error stop with an informative stop code. If status is\npresent it has the default value of success , the value alloc_fault if allocation of the output string failed, or write_failure if the write statement outputting the literal failed. Arguments Type Intent Optional Attributes Name class( bitset_large ), intent(in) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status Source Code type , extends ( bitset_type ) :: bitset_large !! Version: experimental !! !! Type for bitsets with more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private , allocatable :: blocks (:) contains procedure , pass ( self ) :: all => all_large procedure , pass ( self ) :: any => any_large procedure , pass ( self ) :: bit_count => bit_count_large procedure , pass ( self ) :: clear_bit => clear_bit_large procedure , pass ( self ) :: clear_range => clear_range_large procedure , pass ( self ) :: flip_bit => flip_bit_large procedure , pass ( self ) :: flip_range => flip_range_large procedure , pass ( self ) :: from_string => from_string_large procedure , pass ( self ) :: init_zero => init_zero_large procedure , pass ( self ) :: input => input_large procedure , pass ( self ) :: none => none_large procedure , pass ( self ) :: not => not_large procedure , pass ( self ) :: output => output_large procedure , pass ( self ) :: & read_bitset_string => read_bitset_string_large procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_large procedure , pass ( self ) :: set_bit => set_bit_large procedure , pass ( self ) :: set_range => set_range_large procedure , pass ( self ) :: test => test_large procedure , pass ( self ) :: to_string => to_string_large procedure , pass ( self ) :: value => value_large procedure , pass ( self ) :: & write_bitset_string => write_bitset_string_large procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_large end type bitset_large","tags":"","loc":"type/bitset_large.html"},{"title":"bitset_type – Fortran-lang/stdlib ","text":"type, public :: bitset_type Parent type for bitset_64 and bitset_large ( Specification ) Type-Bound Procedures procedure(all_abstract), public, deferred, pass(self) :: all elemental function all_abstract(self) result(all) Prototype Returns .true. if all bits in self are 1, .false. otherwise. Example program example_all use stdlib_bitsets character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if ( bits ( set0 ) /= 33 ) then error stop \"FROM_STRING failed to interpret \" // & 'BITS_ALL' s size properly . \" else if ( .not. set0 % all() ) then error stop \" FROM_STRING failed to interpret \" // & \" BITS_ALL ' s value properly . \" else write(*,*) \" FROM_STRING transferred BITS_ALL properly \" // & \" into set0 . \" end if end program example_all Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value logical procedure(any_abstract), public, deferred, pass(self) :: any elemental function any_abstract(self) result(any) Prototype Returns .true. if any bit in self is 1, .false. otherwise. Example program example_any use stdlib_bitsets character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if ( . not . set0 % any () ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % any () ) then write ( * , * ) \"ANY interpreted SET0's value properly.\" end if end program example_any Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value logical procedure(bit_count_abstract), public, deferred, pass(self) :: bit_count elemental function bit_count_abstract(self) result(bit_count) Prototype Returns the number of non-zero bits in self . Example program example_bit_count use stdlib_bitsets character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % bit_count () == 0 ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % bit_count () == 1 ) then write ( * , * ) \"BIT_COUNT interpreted SET0's value properly.\" end if end program example_bit_count Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) procedure, public, pass(self) :: bits public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) generic, public :: clear => clear_bit , clear_range private interface clear_bit_large() Arguments None private interface clear_range_large() Arguments None procedure(clear_bit_abstract), public, deferred, pass(self) :: clear_bit elemental subroutine clear_bit_abstract(self, pos) Prototype Sets to zero the pos position in self . If pos is less than zero or\n greater than bits(self)-1 it is ignored. Example program example_clear use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( . not . set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is cleared.' call set0 % clear ( 0 , 164 ) if ( set0 % none () ) write ( * , * ) 'All bits are cleared.' end program example_clear Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure(clear_range_abstract), public, deferred, pass(self) :: clear_range pure subroutine clear_range_abstract(self, start_pos, stop_pos) Prototype Sets to zero all bits from the start_pos to stop_pos positions in set .\nIf stop_pos < start_pos then no bits are modified. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos generic, public :: flip => flip_bit , flip_range private interface flip_bit_large() Arguments None private interface flip_range_large() Arguments None procedure(flip_bit_abstract), public, deferred, pass(self) :: flip_bit elemental subroutine flip_bit_abstract(self, pos) Prototype Flips the value at the pos position in self , provided the position is\n valid. If pos is less than 0 or greater than bits(self)-1 , no value is\n changed. Example program example_flip use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % flip ( 165 ) if ( set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is flipped.' call set0 % flip ( 0 , 164 ) if ( set0 % all () ) write ( * , * ) 'All bits are flipped.' end program example_flip Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure(flip_range_abstract), public, deferred, pass(self) :: flip_range pure subroutine flip_range_abstract(self, start_pos, stop_pos) Prototype Flips all valid bits from the start_pos to the stop_pos positions in self . If stop_pos < start_pos no bits are flipped. Positions less than\n0 or greater than bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure(from_string_abstract), public, deferred, pass(self) :: from_string subroutine from_string_abstract(self, string, status) Prototype Initializes the bitset self treating string as a binary literal status may have the values:\n * success - if no problems were found,\n * alloc_fault - if allocation of the bitset failed\n * char_string_too_large_error - if string was too large, or\n * char_string_invalid_error - if string had an invalid character. Example program example_from_string use stdlib_bitsets character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if ( bits ( set0 ) /= 33 ) then error stop \"FROM_STRING failed to interpret \" // & 'BITS_ALL' s size properly . \" else if ( .not. set0 % all() ) then error stop \" FROM_STRING failed to interpret \" // & \" BITS_ALL ' s value properly . \" else write(*,*) \" FROM_STRING transferred BITS_ALL properly \" // & \" into set0 . \" end if end program example_from_string Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status generic, public :: init => init_zero private interface init_zero_large() Arguments None procedure(init_zero_abstract), public, deferred, pass(self) :: init_zero subroutine init_zero_abstract(self, bits, status) Prototype Creates the bitset, self , of size bits , with all bits initialized to\n zero. bits must be non-negative. If an error occurs and status is\n absent then processing stops with an informative stop code. status will have one of the values;\n * success - if no problems were found,\n * alloc_fault - if memory allocation failed\n * array_size_invalid_error - if bits is either negative or larger\n than 64 with self of class bitset_64 , or Example program example_init use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % bits () == 166 ) & write ( * , * ) ` SET0 has the proper size . ' if ( set0 % none() ) write(*,*) ' SET0 is properly initialized . ' end program example_init Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self integer(kind=bits_kind), intent(in) :: bits integer, intent(out), optional :: status procedure(input_abstract), public, deferred, pass(self) :: input subroutine input_abstract(self, unit, status) Prototype Reads the components of the bitset, self , from the unformatted I/O\n unit, unit , assuming that the components were written using output .\n If an error occurs and status is absent then processing stops with\n an informative stop code. status has one of the values:\n * success - if no problem was found\n * alloc_fault - if it failed allocating memory for self , or\n * array_size_invalid_error if the bits(self) in unit is negative\n or greater than 64 for a bitset_64 input.\n * read_failure - if it failed during the reads from unit Example program example_input character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_input Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self integer, intent(in) :: unit integer, intent(out), optional :: status procedure(none_abstract), public, deferred, pass(self) :: none elemental function none_abstract(self) result(none) Prototype Returns .true. if none of the bits in self have the value 1. Example program example_none use stdlib_bitsets character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_large ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % none () ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( . not . set0 % none () ) then write ( * , * ) \"NONE interpreted SET0's value properly.\" end if end program example_none Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value logical procedure(not_abstract), public, deferred, pass(self) :: not elemental subroutine not_abstract(self) Prototype Sets the bits in self to their logical complement Example program example_not use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 155 ) if ( set0 % none () ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % not () if ( set0 % all () ) then write ( * , * ) \"ALL interpreted SET0's value properly.\" end if end program example_not Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self procedure(output_abstract), public, deferred, pass(self) :: output subroutine output_abstract(self, unit, status) Prototype Writes the components of the bitset, self , to the unformatted I/O\n unit, unit , in a unformatted sequence compatible with input . If status is absent an error results in an error stop with an\n informative stop code. If status is present it has the default\n value of success , or the value write_failure if the write failed. Example program example_output character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_output Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer, intent(in) :: unit integer, intent(out), optional :: status generic, public :: read_bitset => read_bitset_string , read_bitset_unit private interface read_bitset_string_large() Arguments None private interface read_bitset_unit_large() Arguments None procedure(read_bitset_string_abstract), public, deferred, pass(self) :: read_bitset_string subroutine read_bitset_string_abstract(self, string, status) Prototype Uses the bitset literal in the default character string , to define\n the bitset, self . The literal may be preceded by an an arbitrary\n sequence of blank characters. If status is absent an error results\n in an error stop with an informative stop code. If status is present it has one of the values\n * success - if no problems occurred,\n * alloc_fault - if allocation of memory for SELF failed,\n * array_size_invalid_error - if bits(self) in string is greater\n than 64 for a bitset_64 ,\n * char_string_invalid_error - if the bitset literal has an invalid\n character,\n * char_string_too_small_error - if the string ends before all the bits\n are read.\n * integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented, Example program example_read_bitset character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_33 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) WRITE_BITSET to READ_BITSET through unit worked . ' end if end program example_read_bitset Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self character(len=*), intent(in) :: string integer, intent(out), optional :: status procedure(read_bitset_unit_abstract), public, deferred, pass(self) :: read_bitset_unit subroutine read_bitset_unit_abstract(self, unit, advance, status) Prototype Uses the bitset literal at the current position in the formatted\nfile with I/O unit, unit , to define the bitset, self . The literal\nmay be preceded by an an arbitrary sequence of blank characters.\nIf advance is present it must be either 'YES' or 'NO'. If absent\nit has the default value of 'YES' to determine whether advancing\nI/O occurs. If status is absent an error results in an error stop\nwith an informative stop code. If status is present it has one of\nthe values:\n* success - if no problem occurred,\n* alloc_fault - if allocation of self failed,\n* array_size_invalid_error - if bits(self) in the bitset literal\n is greater than 64 for a bitset_64 ,\n* char_string_invalid_error - if the read of the bitset literal found\n an invalid character,\n* eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal,\n* integer_overflow_error - if the bitset literal has a bits(self) value too large to be represented,\n* read_failure - if a read statement fails, Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(out) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status generic, public :: set => set_bit , set_range private interface set_bit_large() Arguments None private interface set_range_large() Arguments None procedure(set_bit_abstract), public, deferred, pass(self) :: set_bit elemental subroutine set_bit_abstract(self, pos) Prototype Sets the value at the pos position in self , provided the position is\n valid. If the position is less than 0 or greater than bits(self)-1 then self is unchanged. Example program example_set use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % set ( 165 ) if ( set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is set.' call set0 % set ( 0 , 164 ) if ( set0 % all () ) write ( * , * ) 'All bits are set.' end program example_set Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: pos procedure(set_range_abstract), public, deferred, pass(self) :: set_range pure subroutine set_range_abstract(self, start_pos, stop_pos) Prototype Sets all valid bits to 1 from the start_pos to the stop_pos positions\nin self . If stop_pos < start_pos no bits are changed. Positions outside\nthe range 0 to bits(self)-1 are ignored. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(inout) :: self integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos procedure(test_abstract), public, deferred, pass(self) :: test elemental function test_abstract(self, pos) result(test) Prototype Returns .true. if the pos position is set, .false. otherwise. If pos is negative or greater than bits(self) - 1 the result is .false. . Example program example_test use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( . not . set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % test ( 165 ) ) write ( * , * ) 'Bit 165 is set.' end program example_test Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value logical procedure(to_string_abstract), public, deferred, pass(self) :: to_string subroutine to_string_abstract(self, string, status) Prototype Represents the value of self as a binary literal in string Status may have the values success or alloc_fault . Example program example_to_string use stdlib_bitsets character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 character (:), allocatable :: new_string call set0 % init ( 33 ) call set0 % not () call set0 % to_string ( new_string ) if ( new_string == bits_all ) then write ( * , * ) \"TO_STRING transferred BITS0 properly\" // & \" into NEW_STRING.\" end if end program example_to_string Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure(value_abstract), public, deferred, pass(self) :: value elemental function value_abstract(self, pos) result(value) Prototype Returns 1 if the pos position is set, 0 otherwise. If pos is negative\n or greater than bits(set) - 1 the result is 0. Example program example_value use stdlib_bitsets type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all () ) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( set0 % value ( 165 ) == 0 ) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % value ( 165 ) == 1 ) write ( * , * ) 'Bit 165 is set.' end program example_value Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer(kind=bits_kind), intent(in) :: pos Return Value integer generic, public :: write_bitset => write_bitset_string , write_bitset_unit private interface write_bitset_string_large() Arguments None private interface write_bitset_unit_large() Arguments None procedure(write_bitset_string_abstract), public, deferred, pass(self) :: write_bitset_string subroutine write_bitset_string_abstract(self, string, status) Prototype Writes a bitset literal to the allocatable default character string ,\n representing the individual bit values in the bitset_type , self .\n If status is absent an error results in an error stop with an\n informative stop code. If status is present it has the default\n value of success , or the value alloc_fault if allocation of\n the output string failed. Example program example_write_bitset character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_33 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) WRITE_BITSET to READ_BITSET through unit worked . ' end if end program example_write_bitset Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self character(len=:), intent(out), allocatable :: string integer, intent(out), optional :: status procedure(write_bitset_unit_abstract), public, deferred, pass(self) :: write_bitset_unit subroutine write_bitset_unit_abstract(self, unit, advance, status) Prototype Writes a bitset literal to the I/O unit, unit , representing the\nindividual bit values in the bitset_t , self . If an error occurs then\nprocessing stops with a message to error_unit . By default or if advance is present with the value 'YES', advancing output is used.\nIf advance is present with the value 'NO', then the current record\nis not advanced by the write. If status is absent, an error results\nin an error stop with an informative stop code. If status is\npresent it has the default value of success , the value alloc_fault if allocation of the output string failed, write_failure if the write statement outputting the literal failed. Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self integer, intent(in) :: unit character(len=*), intent(in), optional :: advance integer, intent(out), optional :: status Source Code type , abstract :: bitset_type !! version: experimental !! !! Parent type for bitset_64 and bitset_large ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( bits_kind ) :: num_bits = 0_bits_kind contains procedure ( all_abstract ), deferred , pass ( self ) :: all procedure ( any_abstract ), deferred , pass ( self ) :: any procedure ( bit_count_abstract ), deferred , pass ( self ) :: bit_count procedure , pass ( self ) :: bits procedure ( clear_bit_abstract ), deferred , pass ( self ) :: clear_bit procedure ( clear_range_abstract ), deferred , pass ( self ) :: clear_range generic :: clear => clear_bit , clear_range procedure ( flip_bit_abstract ), deferred , pass ( self ) :: flip_bit procedure ( flip_range_abstract ), deferred , pass ( self ) :: flip_range generic :: flip => flip_bit , flip_range procedure ( from_string_abstract ), deferred , pass ( self ) :: from_string procedure ( init_zero_abstract ), deferred , pass ( self ) :: init_zero generic :: init => init_zero procedure ( input_abstract ), deferred , pass ( self ) :: input procedure ( none_abstract ), deferred , pass ( self ) :: none procedure ( not_abstract ), deferred , pass ( self ) :: not procedure ( output_abstract ), deferred , pass ( self ) :: output procedure ( read_bitset_string_abstract ), deferred , pass ( self ) :: & read_bitset_string procedure ( read_bitset_unit_abstract ), deferred , pass ( self ) :: & read_bitset_unit generic :: read_bitset => read_bitset_string , read_bitset_unit procedure ( set_bit_abstract ), deferred , pass ( self ) :: set_bit procedure ( set_range_abstract ), deferred , pass ( self ) :: set_range generic :: set => set_bit , set_range procedure ( test_abstract ), deferred , pass ( self ) :: test procedure ( to_string_abstract ), deferred , pass ( self ) :: to_string procedure ( value_abstract ), deferred , pass ( self ) :: value procedure ( write_bitset_string_abstract ), deferred , pass ( self ) :: & write_bitset_string procedure ( write_bitset_unit_abstract ), deferred , pass ( self ) :: & write_bitset_unit generic :: write_bitset => write_bitset_string , write_bitset_unit end type bitset_type","tags":"","loc":"type/bitset_type.html"},{"title":"key_type – Fortran-lang/stdlib ","text":"type, public :: key_type A wrapper type for the key's true type Components Type Visibility Attributes Name Initial integer(kind=int8), public, allocatable :: value (:) Source Code type :: key_type !! Version: Experimental !! !! A wrapper type for the key's true type ! private integer ( int8 ), allocatable :: value (:) end type key_type","tags":"","loc":"type/key_type.html"},{"title":"other_type – Fortran-lang/stdlib ","text":"type, public :: other_type A wrapper type for the other data's true type Components Type Visibility Attributes Name Initial class(*), public, allocatable :: value Source Code type :: other_type !! Version: Experimental !! !! A wrapper type for the other data's true type ! private class ( * ), allocatable :: value end type other_type","tags":"","loc":"type/other_type.html"},{"title":"codata_constant_type – Fortran-lang/stdlib ","text":"type, public :: codata_constant_type Derived type for representing a Codata constant.\n( Specification ) Components Type Visibility Attributes Name Initial character(len=64), public :: name real(kind=dp), public :: uncertainty character(len=32), public :: unit real(kind=dp), public :: value Type-Bound Procedures procedure, public :: print private subroutine print(self) Print out the constant's name, value, uncertainty and unit. Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self generic, public :: to_real => to_real_sp , to_real_dp private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp) private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp) procedure, public :: to_real_dp private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp) procedure, public :: to_real_sp private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp)","tags":"","loc":"type/codata_constant_type.html"},{"title":"ansi_code – Fortran-lang/stdlib ","text":"type, public :: ansi_code Container for terminal escape code Source Code type :: ansi_code private !> Style descriptor integer ( i1 ) :: style = - 1_i1 !> Background color descriptor integer ( i1 ) :: bg = - 1_i1 !> Foreground color descriptor integer ( i1 ) :: fg = - 1_i1 end type ansi_code","tags":"","loc":"type/ansi_code.html"},{"title":"logger_type – Fortran-lang/stdlib ","text":"type, public :: logger_type Public derived type ( Specification ) Finalization Procedures final :: final_logger private subroutine final_logger(self) Finalizes the logger_type entity self by flushing the units Arguments Type Intent Optional Attributes Name type( logger_type ), intent(in) :: self Type-Bound Procedures procedure, public, pass(self) :: add_log_file private subroutine add_log_file(self, filename, unit, action, position, status, stat) Opens a formatted sequential access output file, filename using newunit and adds the resulting unit number to self 's log_units array. action , if present, is the action specifier of the open statement, and has the default value of \"write\" . position , if present,\n is the position specifier, and has the default value of \"REWIND\" . status , if present, is the status specifier of the open statement,\n and has the default value of \"REPLACE\" . stat , if present, has the value success if filename could be opened, read_only_error if action is \"read\" , and open_failure otherwise.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self The logger variable to which the file is to be added character(len=*), intent(in) :: filename The name of the file to be added to the logger integer, intent(out), optional :: unit The resulting I/O unit number character(len=*), intent(in), optional :: action The action specifier for the `open`` statement character(len=*), intent(in), optional :: position The position specifier for the open statement character(len=*), intent(in), optional :: status The status specifier for the open statement integer, intent(out), optional :: stat The error status on exit with the possible values\n * success - no errors found\n * read_only_error - file unopened as action1 was \"read\" for an output\n file\n * open_failure - the open` statement failed Example program main\n use stdlib_logger\n ...\n integer :: unit, stat\n ...\n call global_logger % add_log_file( 'error_log.txt', unit, &\n position='asis', stat=stat )\n if ( stat /= success ) then\n error stop 'Unable to open \"error_log.txt\".'\n end if\n ...\n end program main procedure, public, pass(self) :: add_log_unit private subroutine add_log_unit(self, unit, stat) Adds unit to the log file units in log_units . unit must be an open file, of form \"formatted\" , with \"sequential\" access , and an action of \"write\" or \"readwrite\" , otherwise either stat , if present, has a\n value other than success and unit is not entered into log_units ,\n or, if stat is not presecn, processing stops.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self The logger variable to which the I/O unit is to be added integer, intent(in) :: unit The input logical unit number integer, intent(out), optional :: stat An error code with the possible values\n * success - no problems were found\n * non_sequential_error - unit did not have sequential access\n * read_only_error - unit was not writeable\n * unformatted_in_error - unit was an 'unformatted' file\n * unopened_in_error - unit was not opened Example program main\n use stdlib_logger\n ...\n character(256) :: iomsg\n integer :: iostat, unit, stat\n ...\n open( newunit=unit, 'error_log.txt', form='formatted', &\n status='replace', position='rewind', err=999, &\n action='read', iostat=iostat, iomsg=iomsg )\n ...\n call global_logger % add_log_unit( unit, stat )\n select case ( stat )\n ...\n case ( read_only_error )\n error stop 'Unable to write to \"error_log.txt\".'\n ...\n end select\n ...\n 999 error stop 'Unable to open \"error_log.txt\".\n ...\n end program main procedure, public, pass(self) :: configuration private pure subroutine configuration(self, add_blank_line, indent, level, max_width, time_stamp, log_units) Reports the logging configuration of self . The following attributes are\n reported:\n 1. add_blank_line is a logical flag with .true. implying that output\n starts with a blank line, and .false. implying no blank line.\n 2. indent is a logical flag with .true. implying that subsequent columns\n will be indented 4 spaces and .false. implying no indentation.\n 3. level is the lowest level for printing a message\n 4. max_width is the maximum number of columns of output text with max_width == 0 => no bounds on output width.\n 5. time_stamp is a logical flag with .true. implying that the output\n will have a time stamp, and .false. implying that there will be no\n time stamp.\n 6. log_units is an array of the I/O unit numbers to which log output\n will be written.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable whose configuration is being reported logical, intent(out), optional :: add_blank_line A logical flag to add a preceding blank line logical, intent(out), optional :: indent A logical flag to indent subsequent lines integer, intent(out), optional :: level The minimum level for printing a message integer, intent(out), optional :: max_width The maximum number of columns for most outputs logical, intent(out), optional :: time_stamp A logical flag to add a time stamp integer, intent(out), optional, allocatable :: log_units (:) The I/O units used in output Example module example_mod use stdlib_logger ... contains ... subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit ... integer , allocatable :: log_units (:)\n ... call global_logger % configuration ( log_units = log_units ) if ( size ( log_units ) == 0 ) then call add_logger_unit ( unit ) end if .. end subroutine example_sub ... end module example_mod procedure, public, pass(self) :: configure private pure subroutine configure(self, add_blank_line, indent, level, max_width, time_stamp) Configures the logging process for SELF. The following attributes are\n configured:\n 1. add_blank_line is a logical flag with .true. implying that output\n starts with a blank line, and .false. implying no blank line. add_blank_line has a startup value of .false. .\n 2. indent is a logical flag with .true. implying that subsequent lines\n will be indented 4 spaces and .false. implying no indentation. indent has a startup value of .true. .\n 3. level is the lowest level for printing a message\n 4. max_width is the maximum number of columns of output text with max_width == 0 => no bounds on output width. max_width has a startup\n value of 0.\n 5. time_stamp is a logical flag with .true. implying that the output\n will have a time stamp, and .false. implying that there will be no\n time stamp. time_stamp has a startup value of .true. .\n( Specification ) Example program main\n use stdlib_logger\n ...\n call global_logger % configure( indent=.false., max_width=72 )\n ... Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self logical, intent(in), optional :: add_blank_line logical, intent(in), optional :: indent integer, intent(in), optional :: level integer, intent(in), optional :: max_width logical, intent(in), optional :: time_stamp procedure, public, pass(self) :: log_debug private subroutine log_debug(self, message, module, procedure) Writes the string message to self % log_units with optional additional\n text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, and then message is\n written with the prefix 'DEBUG: '. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write ( * , ' ( a ) ' ) \"Enter an integer to select a widget\" read ( * , ' ( i0 ) ' ) selection write ( message , ` ( a , i0 ) ' ) & \"The user selected \" , selection call alogger % log_debug ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' ) ... end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger used to send the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_information character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_information procedure, public, pass(self) :: log_error private subroutine log_error(self, message, module, procedure, stat, errmsg) Writes the string message to self % log_units with optional additional\n text.\n ( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, then message is\n written with the prefix 'ERROR: ', and then if stat or errmsg are present they are written. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( size ) integer , intent ( in ) :: size character ( 128 ) :: errmsg , message integer :: stat allocate ( a ( size ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( message , ` ( a , i0 ) ' ) & \"Allocation of A failed with SIZE = \" , size alogger % call log_error ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' , & stat = stat , & errmsg = errmsg ) end if end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger to be used in logging the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_error character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_error integer, intent(in), optional :: stat The value of the stat specifier returned by a Fortran statement character(len=*), intent(in), optional :: errmsg The value of the errmsg specifier returned by a Fortran statement procedure, public, pass(self) :: log_information private subroutine log_information(self, message, module, procedure) Writes the string message to self % log_units with optional additional\n text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, and then message is\n written with the prefix 'INFO: '. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write ( * , ' ( a ) ' ) \"Enter an integer to select a widget\" read ( * , ' ( i0 ) ' ) selection write ( message , ` ( a , i0 ) ' ) & \"The user selected \" , selection call alogger % log_information ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' ) ... end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger used to send the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_information character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_information procedure, public, pass(self) :: log_io_error private subroutine log_io_error(self, message, module, procedure, iostat, iomsg) Writes the string message to the self % log_units with optional\n additional text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, then message is\n written with a prefix 'I/O ERROR: ', and then if iostat or iomsg are present they are also written. Example program example\n use stdlib_logger\n ...\n character(*), parameter :: filename = 'dummy.txt'\n integer :: iostat, lun\n character(128) :: iomsg\n character(*), parameter :: message = 'Failure in opening \"dummy.txt\".'\n\n open( newunit=lun, file = filename, form='formatted', &\n status='old', iostat=iostat, iomsg=iomsg )\n if ( iostat /= 0 ) then\n call global_logger % log_io_error( message, procedure = 'EXAMPLE', &\n iostat=iostat, iomsg = iomsg )\n error stop 'Error on opening ' // filename\n end if\n ...\nend program example Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable to receivee the message character(len=*), intent(in) :: message A string to be written to LOG_UNIT character(len=*), intent(in), optional :: module The name of the module containing the current invocation of REPORT_ERROR character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of REPORT_ERROR integer, intent(in), optional :: iostat The value of the IOSTAT specifier returned by a Fortran I/O statement character(len=*), intent(in), optional :: iomsg The value of the IOMSG specifier returned by a Fortran I/O statement procedure, public, pass(self) :: log_message private subroutine log_message(self, message, module, procedure, prefix) Writes the string message to the self % log_units with optional\n additional text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, followed by prefix // ': ' if present,\n and then message . Example module example_mod use stdlib_logger ... real , allocatable :: a (:)\n ... contains ... subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write (*, '(a)' ) \"Enter an integer to select a widget\" read (*, '(i0)' ) selection write ( message , `( a , i0 ) ' ) & \"The user selected \", selection call global_logger % log_message( message, & module = ' example_mod' , & procedure = 'example_sub' , & prefix = 'info' ) end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable to receive the message character(len=*), intent(in) :: message A string to be written to log_unit character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_message character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_message character(len=*), intent(in), optional :: prefix To be prepended to message as prefix // ': ' // message . procedure, public, pass(self) :: log_text_error private subroutine log_text_error(self, line, column, summary, filename, line_number, caret, stat) Sends a message to self % log_units describing an error found\n in a line of text.\n( Specification ) Behavior If time stamps are active first a time stamp is written. Then if filename or line_number or column are present they are written.\n Then line is written. Then the symbol caret is written below line at the column indicated by column . Then summary is written. Example program example\n ...\n character(*), parameter :: filename = 'dummy.txt'\n integer :: col_num, line_num, lun\n character(128) :: line\n character(*), parameter :: message = 'Bad text found.'\n\n open( newunit=lun, file = filename, statu='old', form='formatted' )\n line_num = 0\n do\n read( lun, fmt='(a)', end=900 ) line\n line_num = line_num + 1\n call check_line( line, status, col_num )\n if ( status /= 0 )\n call global_logger % log_text_error( line, col_num, message, &\n filename, line_num )\n error stop 'Error in reading ' // filename\n end if\n ...\n end do 900 continue\n ...\n end program example Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger variable to receive the message character(len=*), intent(in) :: line The line of text in which the error was found. integer, intent(in) :: column The one's based column in LINE at which the error starts. character(len=*), intent(in) :: summary A brief description of the error. character(len=*), intent(in), optional :: filename The name of the file, if any, in which the error was found. integer, intent(in), optional :: line_number The one's based line number in the file where line was found. character(len=1), intent(in), optional :: caret The symbol used to mark the column wher the error was first detected integer, intent(out), optional :: stat Integer flag that an error has occurred. Has the value success if no\nerror hass occurred, index_invalid_error if column is less than zero or\ngreater than len(line) , and write_failure if any of the write statements has failed. procedure, public, pass(self) :: log_units_assigned private elemental function log_units_assigned(self) Returns the number of units assigned to self % log_units ( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger subject to the inquiry Return Value integer Example module example_mod use stdlib_logger ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( unit , ... ) integer , intent ( in ) :: unit ... integer , allocatable :: log_units (:) ... if ( alogger % log_units_assigned () == 0 ) then call alogger % add_log_unit ( unit ) end if ... end subroutine example_sub ... end module example_mod procedure, public, pass(self) :: log_warning private subroutine log_warning(self, message, module, procedure) Writes the string message to self % log_units with optional additional\n text.\n( Specification ) Behavior If time stamps are active, a time stamp is written, followed by module and procedure if present, then message is\n written with the prefix 'WARN: '. Example module example_mod use stdlib_logger ... real , allocatable :: a (:) ... type ( logger_type ) :: alogger ... contains ... subroutine example_sub ( size , stat ) integer , intent ( in ) :: size integer , intent ( out ) :: stat allocate ( a ( size ) ) if ( stat /= 0 ) then write ( message , ` ( a , i0 ) ' ) & \"Allocation of A failed with SIZE = \" , size call alogger % log_warning ( message , & module = ' EXAMPLE_MOD ' , & procedure = ' EXAMPLE_SUB ' ) end if end subroutine example_sub ... end module example_mod Arguments Type Intent Optional Attributes Name class( logger_type ), intent(in) :: self The logger to which the message is written character(len=*), intent(in) :: message A string to be written to LOG_UNIT character(len=*), intent(in), optional :: module The name of the module containing the current invocation of log_warning character(len=*), intent(in), optional :: procedure The name of the procedure containing the current invocation of log_warning procedure, public, pass(self) :: remove_log_unit private subroutine remove_log_unit(self, unit, close_unit, stat) Remove the I/O unit from the self % log_units list. If close_unit is\n present and .true. then the corresponding file is closed. If unit is\n not in log_units then nothing is done. If stat is present it, by\n default, has the value success . If closing the unit fails, then if stat is present it has the value close_failure , otherwise processing\n stops with an informative message.\n( Specification ) Arguments Type Intent Optional Attributes Name class( logger_type ), intent(inout) :: self The logger variable whose unit is to be removed integer, intent(in) :: unit The I/O unit to be removed from self logical, intent(in), optional :: close_unit A logical flag to close the unit while removing it from the SELF list integer, intent(out), optional :: stat An error status with the values\n * success - no problems found\n * close_failure - the close statement for unit failed Example module example_mod use stdlib_logger ... type ( logger_type ) :: alogger contains ... subroutine example_sub ( unit , ... ) integer , intent ( in ) :: unit ... call alogger % remove_log_unit ( unit ) ... end subroutine example_sub ... end module example_mod Source Code type :: logger_type !! version: experimental !! Public derived type ([Specification](../page/specs/stdlib_logger.html#the-derived-type-logger_type)) private logical :: add_blank_line = . false . logical :: indent_lines = . true . integer :: level = information_level integer , allocatable :: log_units (:) integer :: max_width = 0 logical :: time_stamp = . true . integer :: units = 0 contains private procedure , public , pass ( self ) :: add_log_file procedure , public , pass ( self ) :: add_log_unit procedure , public , pass ( self ) :: configuration procedure , public , pass ( self ) :: configure procedure , public , pass ( self ) :: log_debug procedure , public , pass ( self ) :: log_error procedure , public , pass ( self ) :: log_information procedure , public , pass ( self ) :: log_io_error procedure , public , pass ( self ) :: log_message procedure , public , pass ( self ) :: log_text_error procedure , public , pass ( self ) :: log_units_assigned procedure , public , pass ( self ) :: log_warning procedure , public , pass ( self ) :: remove_log_unit final :: final_logger end type logger_type","tags":"","loc":"type/logger_type.html"},{"title":"linalg_state_type – Fortran-lang/stdlib ","text":"type, public :: linalg_state_type linalg_state_type defines a state return type for a\nlinear algebra routine. State contains a status flag, a comment, and a\nprocedure specifier that can be used to mark where the error happened Components Type Visibility Attributes Name Initial character(len=MSG_LENGTH), public :: message = repeat(' ', MSG_LENGTH) Message associated to the current state integer(kind=ilp), public :: state = LINALG_SUCCESS The current exit state character(len=NAME_LENGTH), public :: where_at = repeat(' ', NAME_LENGTH) Location of the state change Constructor public interface linalg_state_type private pure function new_state(where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: where_at Location integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) private pure function new_state_nowhere(flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) result(new_state) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) Type-Bound Procedures procedure, public :: destroy => state_destroy Cleanup private elemental subroutine state_destroy(this) Cleanup the object Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(inout) :: this procedure, public :: error => state_is_error private elemental function state_is_error(this) Check if the current state is an error state Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value logical(kind=lk) procedure, public :: ok => state_is_ok State properties private elemental function state_is_ok(this) Check if the current state is successful Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value logical(kind=lk) procedure, public :: print => state_print Print error message private pure function state_print(this) result(msg) Produce a nice error string Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value character(len=:), allocatable procedure, public :: print_msg => state_message private pure function state_message(this) result(msg) Formatted message Arguments Type Intent Optional Attributes Name class( linalg_state_type ), intent(in) :: this Return Value character(len=:), allocatable Source Code type :: linalg_state_type !> The current exit state integer ( ilp ) :: state = LINALG_SUCCESS !> Message associated to the current state character ( len = MSG_LENGTH ) :: message = repeat ( ' ' , MSG_LENGTH ) !> Location of the state change character ( len = NAME_LENGTH ) :: where_at = repeat ( ' ' , NAME_LENGTH ) contains !> Cleanup procedure :: destroy => state_destroy !> Print error message procedure :: print => state_print procedure :: print_msg => state_message !> State properties procedure :: ok => state_is_ok procedure :: error => state_is_error end type linalg_state_type","tags":"","loc":"type/linalg_state_type.html"},{"title":"hasher_fun – Fortran-lang/stdlib","text":"interface Abstract interface to a 64 bit hash function operating on a KEY_TYPE public pure function hasher_fun(key) result(hash_value) Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash)","tags":"","loc":"interface/hasher_fun.html"},{"title":"stdlib_dcabs1 – Fortran-lang/stdlib","text":"public pure function stdlib_dcabs1(z) DCABS1 computes |Re(.)| + |Im(.)| of a double complex number Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dcabs1 ( z ) !! DCABS1 computes |Re(.)| + |Im(.)| of a double complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , real , aimag stdlib_dcabs1 = abs ( real ( z , KIND = dp )) + abs ( aimag ( z )) return end function stdlib_dcabs1","tags":"","loc":"proc/stdlib_dcabs1.html"},{"title":"stdlib_icamax – Fortran-lang/stdlib","text":"public pure function stdlib_icamax(n, cx, incx) ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_icamax ( n , cx , incx ) !! ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix stdlib_icamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_icamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = stdlib_scabs1 ( cx ( 1 )) do i = 2 , n if ( stdlib_scabs1 ( cx ( i )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = stdlib_scabs1 ( cx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_scabs1 ( cx ( ix )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( ix )) end if ix = ix + incx end do end if return end function stdlib_icamax","tags":"","loc":"proc/stdlib_icamax.html"},{"title":"stdlib_idamax – Fortran-lang/stdlib","text":"public pure function stdlib_idamax(n, dx, incx) IDAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_idamax ( n , dx , incx ) !! IDAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_idamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_idamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = abs ( dx ( 1 )) do i = 2 , n if ( abs ( dx ( i )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = abs ( dx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( dx ( ix )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( ix )) end if ix = ix + incx end do end if return end function stdlib_idamax","tags":"","loc":"proc/stdlib_idamax.html"},{"title":"stdlib_isamax – Fortran-lang/stdlib","text":"public pure function stdlib_isamax(n, sx, incx) ISAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_isamax ( n , sx , incx ) !! ISAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_isamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_isamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = abs ( sx ( 1 )) do i = 2 , n if ( abs ( sx ( i )) > smax ) then stdlib_isamax = i smax = abs ( sx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = abs ( sx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( sx ( ix )) > smax ) then stdlib_isamax = i smax = abs ( sx ( ix )) end if ix = ix + incx end do end if return end function stdlib_isamax","tags":"","loc":"proc/stdlib_isamax.html"},{"title":"stdlib_izamax – Fortran-lang/stdlib","text":"public pure function stdlib_izamax(n, zx, incx) IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) Source Code pure integer ( ilp ) function stdlib_izamax ( n , zx , incx ) !! IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix stdlib_izamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_izamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = stdlib_dcabs1 ( zx ( 1 )) do i = 2 , n if ( stdlib_dcabs1 ( zx ( i )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = stdlib_dcabs1 ( zx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_dcabs1 ( zx ( ix )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( ix )) end if ix = ix + incx end do end if return end function stdlib_izamax","tags":"","loc":"proc/stdlib_izamax.html"},{"title":"stdlib_lsame – Fortran-lang/stdlib","text":"public pure function stdlib_lsame(ca, cb) LSAME returns .TRUE. if CA is the same letter as CB regardless of\ncase. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: ca character(len=1), intent(in) :: cb Return Value logical(kind=lk) Source Code pure logical ( lk ) function stdlib_lsame ( ca , cb ) !! LSAME returns .TRUE. if CA is the same letter as CB regardless of !! case. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character , intent ( in ) :: ca , cb ! ===================================================================== ! Intrinsic Functions intrinsic :: ichar ! Local Scalars integer ( ilp ) :: inta , intb , zcode ! test if the characters are equal stdlib_lsame = ca == cb if ( stdlib_lsame ) return ! now test for equivalence if both characters are alphabetic. zcode = ichar ( 'Z' ) ! use 'z' rather than 'a' so that ascii can be detected on prime ! machines, on which ichar returns a value with bit 8 set. ! ichar('a') on prime machines returns 193 which is the same as ! ichar('a') on an ebcdic machine. inta = ichar ( ca ) intb = ichar ( cb ) if ( zcode == 90 . or . zcode == 122 ) then ! ascii is assumed - zcode is the ascii code of either lower or ! upper case 'z'. if ( inta >= 97 . and . inta <= 122 ) inta = inta - 32 if ( intb >= 97 . and . intb <= 122 ) intb = intb - 32 else if ( zcode == 233 . or . zcode == 169 ) then ! ebcdic is assumed - zcode is the ebcdic code of either lower or ! upper case 'z'. if ( inta >= 129 . and . inta <= 137 . or . inta >= 145 . and . inta <= 153 . or . inta >= 162 . and . & inta <= 169 ) inta = inta + 64 if ( intb >= 129 . and . intb <= 137 . or . intb >= 145 . and . intb <= 153 . or . intb >= 162 . and . & intb <= 169 ) intb = intb + 64 else if ( zcode == 218 . or . zcode == 250 ) then ! ascii is assumed, on prime machines - zcode is the ascii code ! plus 128 of either lower or upper case 'z'. if ( inta >= 225 . and . inta <= 250 ) inta = inta - 32 if ( intb >= 225 . and . intb <= 250 ) intb = intb - 32 end if stdlib_lsame = inta == intb ! return end function stdlib_lsame","tags":"","loc":"proc/stdlib_lsame.html"},{"title":"stdlib_scabs1 – Fortran-lang/stdlib","text":"public pure function stdlib_scabs1(z) SCABS1 computes |Re(.)| + |Im(.)| of a complex number Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_scabs1 ( z ) !! SCABS1 computes |Re(.)| + |Im(.)| of a complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scabs1 = abs ( real ( z , KIND = sp )) + abs ( aimag ( z )) return end function stdlib_scabs1","tags":"","loc":"proc/stdlib_scabs1.html"},{"title":"stdlib_xerbla – Fortran-lang/stdlib","text":"public pure subroutine stdlib_xerbla(srname, info) XERBLA is an error handler for the LAPACK routines.\nIt is called by an LAPACK routine if an input parameter has an\ninvalid value. A message is printed and execution stops.\nInstallers may consider modifying the STOP statement in order to\ncall system-specific exception-handling facilities. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: srname integer(kind=ilp), intent(in) :: info Source Code pure subroutine stdlib_xerbla ( srname , info ) !! XERBLA is an error handler for the LAPACK routines. !! It is called by an LAPACK routine if an input parameter has an !! invalid value. A message is printed and execution stops. !! Installers may consider modifying the STOP statement in order to !! call system-specific exception-handling facilities. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character ( len =* ), intent ( in ) :: srname integer ( ilp ), intent ( in ) :: info ! ===================================================================== ! Intrinsic Functions intrinsic :: len_trim ! Executable Statements 9999 format ( ' ** ON ENTRY TO ' , a , ' PARAMETER NUMBER ' , i2 , ' HAD ' , 'AN ILLEGAL VALUE' ) end subroutine stdlib_xerbla","tags":"","loc":"proc/stdlib_xerbla.html"},{"title":"stdlib_xerbla_array – Fortran-lang/stdlib","text":"public pure subroutine stdlib_xerbla_array(srname_array, srname_len, info) XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK\nand BLAS error handler. Rather than taking a Fortran string argument\nas the function's name, XERBLA_ARRAY takes an array of single\ncharacters along with the array's length. XERBLA_ARRAY then copies\nup to 32 characters of that array into a Fortran string and passes\nthat to XERBLA. If called with a non-positive SRNAME_LEN,\nXERBLA_ARRAY will call XERBLA with a string of all blank characters.\nSay some macro or other device makes XERBLA_ARRAY available to C99\nby a name lapack_xerbla and with a common Fortran calling convention.\nThen a C99 program could invoke XERBLA via:\n{\nint flen = strlen( func );\nlapack_xerbla( func ,\n}\nProviding XERBLA_ARRAY is not necessary for intercepting LAPACK\nerrors. XERBLA_ARRAY calls XERBLA. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: srname_array (srname_len) integer(kind=ilp), intent(in) :: srname_len integer(kind=ilp), intent(in) :: info Source Code pure subroutine stdlib_xerbla_array ( srname_array , srname_len , info ) !! XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK !! and BLAS error handler. Rather than taking a Fortran string argument !! as the function's name, XERBLA_ARRAY takes an array of single !! characters along with the array's length. XERBLA_ARRAY then copies !! up to 32 characters of that array into a Fortran string and passes !! that to XERBLA. If called with a non-positive SRNAME_LEN, !! XERBLA_ARRAY will call XERBLA with a string of all blank characters. !! Say some macro or other device makes XERBLA_ARRAY available to C99 !! by a name lapack_xerbla and with a common Fortran calling convention. !! Then a C99 program could invoke XERBLA via: !! { !! int flen = strlen(__func__); !! lapack_xerbla(__func__, !! } !! Providing XERBLA_ARRAY is not necessary for intercepting LAPACK !! errors. XERBLA_ARRAY calls XERBLA. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: srname_len , info ! Array Arguments character ( 1 ), intent ( in ) :: srname_array ( srname_len ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i ! Local Arrays character * 32 srname ! Intrinsic Functions intrinsic :: min , len ! Executable Statements srname = '' do i = 1 , min ( srname_len , len ( srname ) ) srname ( i : i ) = srname_array ( i ) end do call stdlib_xerbla ( srname , info ) return end subroutine stdlib_xerbla_array","tags":"","loc":"proc/stdlib_xerbla_array.html"},{"title":"corr – Fortran-lang/stdlib","text":"public interface corr Pearson correlation of array elements\n( Specification ) Functions private module function corr_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/corr.html"},{"title":"cov – Fortran-lang/stdlib","text":"public interface cov Covariance of array elements\n( Specification ) Functions private module function cov_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/cov.html"},{"title":"mean – Fortran-lang/stdlib","text":"public interface mean Mean of array elements\n( Specification ) Functions private module function mean_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function mean_mask_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function mean_mask_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function mean_mask_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function mean_mask_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function mean_mask_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp)","tags":"","loc":"interface/mean.html"},{"title":"median – Fortran-lang/stdlib","text":"public interface median Median of array elements\n( Specification ) Functions private module function median_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_mask_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_all_mask_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function median_all_mask_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function median_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/median.html"},{"title":"moment – Fortran-lang/stdlib","text":"public interface moment Central moment of array elements\n( Specification ) Functions private module function moment_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_mask_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function moment_mask_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function moment_mask_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function moment_mask_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function moment_mask_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function moment_mask_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function moment_mask_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1","tags":"","loc":"interface/moment.html"},{"title":"var – Fortran-lang/stdlib","text":"public interface var Variance of array elements\n( Specification ) Functions private module function var_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp)","tags":"","loc":"interface/var.html"},{"title":"all_close – Fortran-lang/stdlib","text":"public interface all_close Returns a boolean scalar where two arrays are element-wise equal within a tolerance.\n( Specification ) Functions private pure module function all_close_1_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:) complex(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:) complex(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) real(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) real(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) complex(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) complex(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) real(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) real(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:,:) complex(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:,:) complex(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:,:) real(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:,:) real(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical","tags":"","loc":"interface/all_close.html"},{"title":"arange – Fortran-lang/stdlib","text":"public interface arange arange creates a one-dimensional array of the integer/real type \n with fixed-spaced values of given spacing, within a given interval.\n( Specification ) Functions private pure module function arange_i_int16(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in), optional :: end integer(kind=int16), intent(in), optional :: step Return Value integer(kind=int16), allocatable, (:) private pure module function arange_i_int32(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in), optional :: end integer(kind=int32), intent(in), optional :: step Return Value integer(kind=int32), allocatable, (:) private pure module function arange_i_int64(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in), optional :: end integer(kind=int64), intent(in), optional :: step Return Value integer(kind=int64), allocatable, (:) private pure module function arange_i_int8(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in), optional :: end integer(kind=int8), intent(in), optional :: step Return Value integer(kind=int8), allocatable, (:) private pure module function arange_r_dp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in), optional :: end real(kind=dp), intent(in), optional :: step Return Value real(kind=dp), allocatable, (:) private pure module function arange_r_sp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in), optional :: end real(kind=sp), intent(in), optional :: step Return Value real(kind=sp), allocatable, (:)","tags":"","loc":"interface/arange.html"},{"title":"arg – Fortran-lang/stdlib","text":"public interface arg arg computes the phase angle in the interval (-π,π].\n( Specification ) Module Procedures private elemental function arg_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function arg_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp)","tags":"","loc":"interface/arg.html"},{"title":"argd – Fortran-lang/stdlib","text":"public interface argd argd computes the phase angle of degree version in the interval (-180.0,180.0].\n( Specification ) Module Procedures private elemental function argd_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argd_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp)","tags":"","loc":"interface/argd.html"},{"title":"argpi – Fortran-lang/stdlib","text":"public interface argpi argpi computes the phase angle of circular version in the interval (-1.0,1.0].\n( Specification ) Module Procedures private elemental function argpi_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argpi_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp)","tags":"","loc":"interface/argpi.html"},{"title":"clip – Fortran-lang/stdlib","text":"public interface clip Module Procedures private elemental function clip_int8(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: xmin integer(kind=int8), intent(in) :: xmax Return Value integer(kind=int8) private elemental function clip_int16(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: xmin integer(kind=int16), intent(in) :: xmax Return Value integer(kind=int16) private elemental function clip_int32(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: xmin integer(kind=int32), intent(in) :: xmax Return Value integer(kind=int32) private elemental function clip_int64(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: xmin integer(kind=int64), intent(in) :: xmax Return Value integer(kind=int64) private elemental function clip_sp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: xmin real(kind=sp), intent(in) :: xmax Return Value real(kind=sp) private elemental function clip_dp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: xmin real(kind=dp), intent(in) :: xmax Return Value real(kind=dp)","tags":"","loc":"interface/clip.html"},{"title":"diff – Fortran-lang/stdlib","text":"public interface diff Computes differences between adjacent elements of an array.\n( Specification ) Functions private pure module function diff_1_dp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=dp), intent(in), optional :: prepend (:) real(kind=dp), intent(in), optional :: append (:) Return Value real(kind=dp), allocatable, (:) private pure module function diff_1_int16(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int16), intent(in), optional :: prepend (:) integer(kind=int16), intent(in), optional :: append (:) Return Value integer(kind=int16), allocatable, (:) private pure module function diff_1_int32(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int32), intent(in), optional :: prepend (:) integer(kind=int32), intent(in), optional :: append (:) Return Value integer(kind=int32), allocatable, (:) private pure module function diff_1_int64(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int64), intent(in), optional :: prepend (:) integer(kind=int64), intent(in), optional :: append (:) Return Value integer(kind=int64), allocatable, (:) private pure module function diff_1_int8(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int8), intent(in), optional :: prepend (:) integer(kind=int8), intent(in), optional :: append (:) Return Value integer(kind=int8), allocatable, (:) private pure module function diff_1_sp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=sp), intent(in), optional :: prepend (:) real(kind=sp), intent(in), optional :: append (:) Return Value real(kind=sp), allocatable, (:) private pure module function diff_2_dp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=dp), intent(in), optional :: prepend (:,:) real(kind=dp), intent(in), optional :: append (:,:) Return Value real(kind=dp), allocatable, (:,:) private pure module function diff_2_int16(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int16), intent(in), optional :: prepend (:,:) integer(kind=int16), intent(in), optional :: append (:,:) Return Value integer(kind=int16), allocatable, (:,:) private pure module function diff_2_int32(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int32), intent(in), optional :: prepend (:,:) integer(kind=int32), intent(in), optional :: append (:,:) Return Value integer(kind=int32), allocatable, (:,:) private pure module function diff_2_int64(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int64), intent(in), optional :: prepend (:,:) integer(kind=int64), intent(in), optional :: append (:,:) Return Value integer(kind=int64), allocatable, (:,:) private pure module function diff_2_int8(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int8), intent(in), optional :: prepend (:,:) integer(kind=int8), intent(in), optional :: append (:,:) Return Value integer(kind=int8), allocatable, (:,:) private pure module function diff_2_sp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=sp), intent(in), optional :: prepend (:,:) real(kind=sp), intent(in), optional :: append (:,:) Return Value real(kind=sp), allocatable, (:,:)","tags":"","loc":"interface/diff.html"},{"title":"gcd – Fortran-lang/stdlib","text":"public interface gcd Returns the greatest common divisor of two integers\n( Specification ) Version: experimental Module Procedures private elemental function gcd_int8(a, b) result(res) Returns the greatest common divisor of two integers of kind int8\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a integer(kind=int8), intent(in) :: b Return Value integer(kind=int8) private elemental function gcd_int16(a, b) result(res) Returns the greatest common divisor of two integers of kind int16\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a integer(kind=int16), intent(in) :: b Return Value integer(kind=int16) private elemental function gcd_int32(a, b) result(res) Returns the greatest common divisor of two integers of kind int32\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a integer(kind=int32), intent(in) :: b Return Value integer(kind=int32) private elemental function gcd_int64(a, b) result(res) Returns the greatest common divisor of two integers of kind int64\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a integer(kind=int64), intent(in) :: b Return Value integer(kind=int64)","tags":"","loc":"interface/gcd.html"},{"title":"is_close – Fortran-lang/stdlib","text":"public interface is_close Returns a boolean scalar/array where two scalar/arrays are element-wise equal within a tolerance.\n( Specification ) Functions private elemental module function is_close_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a real(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a real(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical","tags":"","loc":"interface/is_close.html"},{"title":"linspace – Fortran-lang/stdlib","text":"public interface linspace Create rank 1 array of linearly spaced elements\n If the number of elements is not specified, create an array with size 100. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is end\n( Specification ) When dealing with integers as the start and end parameters, the return type is always a real(dp) . Functions private pure module function linspace_default_1_cdp_cdp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_csp_csp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint16_iint16(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint32_iint32(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint64_iint64(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint8_iint8(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rdp_rdp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rsp_rsp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_n_1_cdp_cdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function linspace_n_1_csp_csp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function linspace_n_1_iint16_iint16(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint32_iint32(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint64_iint64(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint8_iint8(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rdp_rdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rsp_rsp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0))","tags":"","loc":"interface/linspace.html"},{"title":"logspace – Fortran-lang/stdlib","text":"public interface logspace Create rank 1 array of logarithmically spaced elements from base start to base end.\n If the number of elements is not specified, create an array with size 50. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is base**end. If no base\n is specified, logspace will default to using a base of 10 ( Specification ) Functions private pure module function logspace_1_cdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_cdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_csp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_csp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_default(start, end) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_iint32_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (n) private pure module function logspace_1_iint32_n_cdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_cspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value integer, (max(n,0)) private pure module function logspace_1_iint32_n_rdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_rspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rsp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rsp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0))","tags":"","loc":"interface/logspace.html"},{"title":"meshgrid – Fortran-lang/stdlib","text":"public interface meshgrid Computes a list of coordinate matrices from coordinate vectors.\n( Specification ) Subroutines private module subroutine meshgrid_1_iint16_iint16(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint32_iint32(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint64_iint64(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint8_iint8(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rdp_rdp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rsp_rsp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint16_iint16(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(out) :: xm1 (:,:) integer(kind=int16), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint32_iint32(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(out) :: xm1 (:,:) integer(kind=int32), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint64_iint64(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(out) :: xm1 (:,:) integer(kind=int64), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint8_iint8(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(out) :: xm1 (:,:) integer(kind=int8), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rdp_rdp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(out) :: xm1 (:,:) real(kind=dp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rsp_rsp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(out) :: xm1 (:,:) real(kind=sp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint16_iint16(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(in) :: x3 (:) integer(kind=int16), intent(out) :: xm1 (:,:,:) integer(kind=int16), intent(out) :: xm2 (:,:,:) integer(kind=int16), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint32_iint32(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(in) :: x3 (:) integer(kind=int32), intent(out) :: xm1 (:,:,:) integer(kind=int32), intent(out) :: xm2 (:,:,:) integer(kind=int32), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint64_iint64(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(in) :: x3 (:) integer(kind=int64), intent(out) :: xm1 (:,:,:) integer(kind=int64), intent(out) :: xm2 (:,:,:) integer(kind=int64), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint8_iint8(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(in) :: x3 (:) integer(kind=int8), intent(out) :: xm1 (:,:,:) integer(kind=int8), intent(out) :: xm2 (:,:,:) integer(kind=int8), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rdp_rdp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(in) :: x3 (:) real(kind=dp), intent(out) :: xm1 (:,:,:) real(kind=dp), intent(out) :: xm2 (:,:,:) real(kind=dp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rsp_rsp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(in) :: x3 (:) real(kind=sp), intent(out) :: xm1 (:,:,:) real(kind=sp), intent(out) :: xm2 (:,:,:) real(kind=sp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing","tags":"","loc":"interface/meshgrid.html"},{"title":"dist_rand – Fortran-lang/stdlib","text":"public interface dist_rand Version experimental Generation of random integers with different kinds\n( Specification ) Module Procedures private function dist_rand_iint8(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value integer(kind=int8) private function dist_rand_iint16(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value integer(kind=int16) private function dist_rand_iint32(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value integer(kind=int32) private function dist_rand_iint64(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value integer(kind=int64)","tags":"","loc":"interface/dist_rand.html"},{"title":"random_seed – Fortran-lang/stdlib","text":"public interface random_seed Version experimental Set seed value for random number generator\n( Specification ) Module Procedures private subroutine random_distribution_seed_iint8(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: put integer(kind=int8), intent(out) :: get private subroutine random_distribution_seed_iint16(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: put integer(kind=int16), intent(out) :: get private subroutine random_distribution_seed_iint32(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: put integer(kind=int32), intent(out) :: get private subroutine random_distribution_seed_iint64(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: put integer(kind=int64), intent(out) :: get","tags":"","loc":"interface/random_seed.html"},{"title":"cdf_exp – Fortran-lang/stdlib","text":"public interface cdf_exp Version experimental Exponential Cumulative Distribution Function\n( Specification ) Module Procedures private elemental function cdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function cdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp)","tags":"","loc":"interface/cdf_exp.html"},{"title":"pdf_exp – Fortran-lang/stdlib","text":"public interface pdf_exp Version experimental Exponential Distribution Probability Density Function\n( Specification ) Module Procedures private elemental function pdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function pdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp)","tags":"","loc":"interface/pdf_exp.html"},{"title":"rvs_exp – Fortran-lang/stdlib","text":"public interface rvs_exp Version experimental Exponential Distribution Random Variates\n( Specification ) Module Procedures private impure function rvs_exp_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_exp_rsp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private impure elemental function rvs_exp_rdp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private impure elemental function rvs_exp_csp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda Return Value complex(kind=sp) private impure elemental function rvs_exp_cdp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda Return Value complex(kind=dp) private impure function rvs_exp_array_rsp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_exp_array_rdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_exp_array_csp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_exp_array_cdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"interface/rvs_exp.html"},{"title":"adjustl – Fortran-lang/stdlib","text":"public interface adjustl Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. Module Procedures private elemental function adjustl_string(string) result(adjusted_string) Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/adjustl.html"},{"title":"adjustr – Fortran-lang/stdlib","text":"public interface adjustr Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. Module Procedures private elemental function adjustr_string(string) result(adjusted_string) Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/adjustr.html"},{"title":"assignment(=) – Fortran-lang/stdlib","text":"public interface assignment(=) Assign a character sequence to a string. Module Procedures private elemental subroutine assign_string_char(lhs, rhs) Assign a character sequence to a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: lhs character(len=*), intent(in) :: rhs","tags":"","loc":"interface/assignment(=).html"},{"title":"char – Fortran-lang/stdlib","text":"public interface char Return the character sequence represented by the string. This method is elemental and returns a scalar character value. Module Procedures private pure function char_string(string) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value character(len=len) private elemental function char_string_pos(string, pos) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: pos Return Value character(len=1) private pure function char_string_range(string, start, last) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: start integer, intent(in) :: last Return Value character(len=last)","tags":"","loc":"interface/char.html"},{"title":"iachar – Fortran-lang/stdlib","text":"public interface iachar Code in ASCII collating sequence. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function iachar_string(string) result(ich) Code in ASCII collating sequence. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/iachar.html"},{"title":"ichar – Fortran-lang/stdlib","text":"public interface ichar Character-to-integer conversion function. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function ichar_string(string) result(ich) Character-to-integer conversion function. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/ichar.html"},{"title":"index – Fortran-lang/stdlib","text":"public interface index Position of a substring within a string . Returns the position of the start of the leftmost or rightmost occurrence\nof string substring in string , counting from one. If substring is not\npresent in string , zero is returned. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function index_string_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version both character sequences are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_string_char(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the main character sequence is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_char_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the sub character sequence is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer","tags":"","loc":"interface/index.html"},{"title":"len – Fortran-lang/stdlib","text":"public interface len Returns the length of the character sequence represented by the string. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function len_string(string) result(length) Returns the length of the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/len.html"},{"title":"len_trim – Fortran-lang/stdlib","text":"public interface len_trim Returns the length of the character sequence without trailing spaces\nrepresented by the string. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function len_trim_string(string) result(length) Returns the length of the character sequence without trailing spaces\nrepresented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer","tags":"","loc":"interface/len_trim.html"},{"title":"lge – Fortran-lang/stdlib","text":"public interface lge Lexically compare the order of two character sequences being greater equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function lge_string_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lge_string_char(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lge_char_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/lge.html"},{"title":"lgt – Fortran-lang/stdlib","text":"public interface lgt Lexically compare the order of two character sequences being greater,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function lgt_string_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lgt_string_char(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lgt_char_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/lgt.html"},{"title":"lle – Fortran-lang/stdlib","text":"public interface lle Lexically compare the order of two character sequences being less equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function lle_string_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lle_string_char(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lle_char_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/lle.html"},{"title":"llt – Fortran-lang/stdlib","text":"public interface llt Lexically compare the order of two character sequences being less,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. Module Procedures private elemental function llt_string_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function llt_string_char(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function llt_char_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/llt.html"},{"title":"move – Fortran-lang/stdlib","text":"public interface move Moves the allocated character scalar from 'from' to 'to' Specifications Module Procedures private elemental subroutine move_string_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout), target :: from type( string_type ), intent(inout), target :: to private pure subroutine move_string_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: from character(len=:), intent(out), allocatable :: to private pure subroutine move_char_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from type( string_type ), intent(out) :: to private pure subroutine move_char_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from character(len=:), intent(out), allocatable :: to","tags":"","loc":"interface/move.html"},{"title":"operator(//) – Fortran-lang/stdlib","text":"public interface operator(//) Concatenate two character sequences, the left-hand side, the right-hand side\nor both character sequences can be represented by a string. This operator is elemental and returns a scalar character value. Module Procedures private elemental function concat_string_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_string_char(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_char_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type )","tags":"","loc":"interface/operator(SLASHSLASH).html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Compare two character sequences for inequality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function ne_string_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ne_string_char(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ne_char_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(SLASH=).html"},{"title":"operator(<) – Fortran-lang/stdlib","text":"public interface operator(<) Compare two character sequences for being less, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function lt_string_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lt_string_char(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lt_char_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(lt).html"},{"title":"operator(<=) – Fortran-lang/stdlib","text":"public interface operator(<=) Compare two character sequences for being less than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function le_string_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function le_string_char(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function le_char_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(lt=).html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Compare two character sequences for equality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function eq_string_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function eq_string_char(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function eq_char_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(==).html"},{"title":"operator(>) – Fortran-lang/stdlib","text":"public interface operator(>) Compare two character sequences for being greater, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function gt_string_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function gt_string_char(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function gt_char_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(gt).html"},{"title":"operator(>=) – Fortran-lang/stdlib","text":"public interface operator(>=) Compare two character sequences for being greater than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. Module Procedures private elemental function ge_string_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ge_string_char(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ge_char_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(gt=).html"},{"title":"read(formatted) – Fortran-lang/stdlib","text":"public interface read(formatted) Read a character sequence from a connected unformatted unit into the string. Module Procedures private subroutine read_formatted(string, unit, iotype, v_list, iostat, iomsg) Read a character sequence from a connected formatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/read(formatted).html"},{"title":"read(unformatted) – Fortran-lang/stdlib","text":"public interface read(unformatted) Read a character sequence from a connected unformatted unit into the string. Module Procedures private subroutine read_unformatted(string, unit, iostat, iomsg) Read a character sequence from a connected unformatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/read(unformatted).html"},{"title":"repeat – Fortran-lang/stdlib","text":"public interface repeat Repeats the character sequence hold by the string by the number of\nspecified copies. This method is elemental and returns a scalar character value. Module Procedures private elemental function repeat_string(string, ncopies) result(repeated_string) Repeats the character sequence hold by the string by the number of\nspecified copies. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: ncopies Return Value type( string_type )","tags":"","loc":"interface/repeat.html"},{"title":"reverse – Fortran-lang/stdlib","text":"public interface reverse Reverses the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nreverse character sequence Module Procedures private elemental function reverse_string(string) result(reversed_string) Reverse the character sequence hold by the input string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/reverse.html"},{"title":"scan – Fortran-lang/stdlib","text":"public interface scan Scan a string for the presence of a set of characters. Scans a string for\nany of the characters in a set of characters. If back is either absent or false , this function returns the position\nof the leftmost character of string that is in set . If back is true ,\nthe rightmost position is returned. If no character of set is found in string , the result is zero. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function scan_string_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version both the character sequence and the character set are\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_string_char(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the character sequences is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_char_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the set of characters is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer","tags":"","loc":"interface/scan.html"},{"title":"string_type – Fortran-lang/stdlib","text":"public interface string_type Constructor for new string instances Functions private elemental module function new_string(string) result(new) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: string Return Value type( string_type ) private elemental module function new_string_from_integer_int16(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int32(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int64(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int8(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_logical_lk(val) result(new) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: val Return Value type( string_type )","tags":"","loc":"interface/string_type.html"},{"title":"to_lower – Fortran-lang/stdlib","text":"public interface to_lower Returns the lowercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nlowercase character sequence Module Procedures private elemental function to_lower_string(string) result(lowercase_string) Convert the character sequence hold by the input string to lower case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_lower.html"},{"title":"to_sentence – Fortran-lang/stdlib","text":"public interface to_sentence Returns the sentencecase version of the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nsentencecase character sequence Module Procedures private elemental function to_sentence_string(string) result(sentence_string) Convert the character sequence hold by the input string to sentence case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_sentence.html"},{"title":"to_title – Fortran-lang/stdlib","text":"public interface to_title Returns the titlecase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\ntitlecase character sequence Module Procedures private elemental function to_title_string(string) result(titlecase_string) Convert the character sequence hold by the input string to title case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_title.html"},{"title":"to_upper – Fortran-lang/stdlib","text":"public interface to_upper Returns the uppercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nuppercase character sequence Module Procedures private elemental function to_upper_string(string) result(uppercase_string) Convert the character sequence hold by the input string to upper case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/to_upper.html"},{"title":"trim – Fortran-lang/stdlib","text":"public interface trim Returns the character sequence hold by the string without trailing spaces. This method is elemental and returns a scalar character value. Module Procedures private elemental function trim_string(string) result(trimmed_string) Returns the character sequence hold by the string without trailing spaces. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type )","tags":"","loc":"interface/trim.html"},{"title":"verify – Fortran-lang/stdlib","text":"public interface verify Scan a string for the absence of a set of characters. Verifies that all\nthe characters in string belong to the set of characters in set. If back is either absent or false , this function returns the position\nof the leftmost character of string that is not in set . If back is true ,\nthe rightmost position is returned. If all characters of string are found\nin set , the result is zero. This method is elemental and returns a default integer scalar value. Module Procedures private elemental function verify_string_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version both the character sequence and\nthe character set are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_string_char(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the character sequences is\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_char_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the set of characters is\nrepresented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer","tags":"","loc":"interface/verify.html"},{"title":"write(formatted) – Fortran-lang/stdlib","text":"public interface write(formatted) Write the character sequence hold by the string to a connected formatted\nunit. Module Procedures private subroutine write_formatted(string, unit, iotype, v_list, iostat, iomsg) Write the character sequence hold by the string to a connected formatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/write(formatted).html"},{"title":"write(unformatted) – Fortran-lang/stdlib","text":"public interface write(unformatted) Write the character sequence hold by the string to a connected unformatted\nunit. Module Procedures private subroutine write_unformatted(string, unit, iostat, iomsg) Write the character sequence hold by the string to a connected unformatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg","tags":"","loc":"interface/write(unformatted).html"},{"title":"bidx – Fortran-lang/stdlib","text":"public interface bidx Returns an instance of type 'stringlist_index_type' representing backward index Specifications Module Procedures private pure function backward_index(idx) Returns an instance of type 'stringlist_index_type' representing backward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type )","tags":"","loc":"interface/bidx.html"},{"title":"fidx – Fortran-lang/stdlib","text":"public interface fidx Returns an instance of type 'stringlist_index_type' representing forward index Specifications Module Procedures private pure function forward_index(idx) Returns an instance of type 'stringlist_index_type' representing forward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type )","tags":"","loc":"interface/fidx.html"},{"title":"operator(//) – Fortran-lang/stdlib","text":"public interface operator(//) Concatenates stringlist with the input entity\nReturns a new stringlist Specifications Module Procedures private function append_char(lhs, rhs) Appends character scalar 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( stringlist_type ) private function append_string(lhs, rhs) Appends string 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_char(lhs, rhs) Prepends character scalar 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_string(lhs, rhs) Prepends string 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_stringlist(lhs, rhs) Appends stringlist 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_carray(lhs, rhs) Appends chararray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function append_sarray(lhs, rhs) Appends stringarray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function prepend_carray(lhs, rhs) Prepends chararray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_sarray(lhs, rhs) Prepends stringarray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type )","tags":"","loc":"interface/operator(SLASHSLASH)~2.html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Compares stringlist for inequality with the input entity\nReturns a logical Specifications Module Procedures private pure function ineq_stringlist(lhs, rhs) Compares stringlist 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for inequality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for inequality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(SLASH=)~2.html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Compares stringlist for equality with the input entity\nReturns a logical Specifications Module Procedures private pure function eq_stringlist(lhs, rhs) Compares stringlist 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for equality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for equality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical","tags":"","loc":"interface/operator(==)~2.html"},{"title":"stringlist_type – Fortran-lang/stdlib","text":"public interface stringlist_type Constructor for stringlist\nReturns an instance of type stringlist_type Specifications Module Procedures private pure function new_stringlist() Constructor with no argument\nReturns a new instance of type stringlist Arguments None Return Value type( stringlist_type ) private pure function new_stringlist_carray(array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: array Return Value type( stringlist_type ) private pure function new_stringlist_sarray(array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: array Return Value type( stringlist_type )","tags":"","loc":"interface/stringlist_type.html"},{"title":"axpy – Fortran-lang/stdlib","text":"public interface axpy AXPY constant times a vector plus a vector. Subroutines public pure subroutine caxpy(n, ca, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine daxpy(n, da, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine saxpy(n, sa, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zaxpy(n, za, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_caxpy (n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_daxpy (n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_saxpy (n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zaxpy (n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/axpy.html"},{"title":"copy – Fortran-lang/stdlib","text":"public interface copy COPY copies a vector x to a vector y. Subroutines public pure subroutine ccopy(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dcopy(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine scopy(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zcopy(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_ccopy (n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dcopy (n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_scopy (n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zcopy (n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/copy.html"},{"title":"dot – Fortran-lang/stdlib","text":"public interface dot DOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Functions public pure function ddot(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function sdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) Module Procedures public pure function stdlib_ddot (n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_sdot (n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp)","tags":"","loc":"interface/dot.html"},{"title":"dotc – Fortran-lang/stdlib","text":"public interface dotc DOTC forms the dot product of two complex vectors\nDOTC = X^H * Y Functions public pure function cdotc(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotc(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Module Procedures public pure function stdlib_cdotc (n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotc (n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp)","tags":"","loc":"interface/dotc.html"},{"title":"dotu – Fortran-lang/stdlib","text":"public interface dotu DOTU forms the dot product of two complex vectors\nDOTU = X^T * Y Functions public pure function cdotu(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotu(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Module Procedures public pure function stdlib_cdotu (n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotu (n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp)","tags":"","loc":"interface/dotu.html"},{"title":"gbmv – Fortran-lang/stdlib","text":"public interface gbmv GBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Subroutines public pure subroutine cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_cgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/gbmv.html"},{"title":"gemm – Fortran-lang/stdlib","text":"public interface gemm GEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Subroutines public pure subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_cgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_sgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/gemm.html"},{"title":"gemv – Fortran-lang/stdlib","text":"public interface gemv GEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Subroutines public pure subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_cgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/gemv.html"},{"title":"ger – Fortran-lang/stdlib","text":"public interface ger GER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Subroutines public pure subroutine dger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine sger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_dger (m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_sger (m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/ger.html"},{"title":"gerc – Fortran-lang/stdlib","text":"public interface gerc GERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Subroutines public pure subroutine cgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cgerc (m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgerc (m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/gerc.html"},{"title":"geru – Fortran-lang/stdlib","text":"public interface geru GERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Subroutines public pure subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cgeru (m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgeru (m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/geru.html"},{"title":"hbmv – Fortran-lang/stdlib","text":"public interface hbmv HBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Subroutines public pure subroutine chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_chbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/hbmv.html"},{"title":"hemm – Fortran-lang/stdlib","text":"public interface hemm HEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Subroutines public pure subroutine chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_chemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/hemm.html"},{"title":"hemv – Fortran-lang/stdlib","text":"public interface hemv HEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Subroutines public pure subroutine chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_chemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/hemv.html"},{"title":"her – Fortran-lang/stdlib","text":"public interface her HER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Subroutines public pure subroutine cher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cher (uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher (uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/her.html"},{"title":"her2 – Fortran-lang/stdlib","text":"public interface her2 HER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Subroutines public pure subroutine cher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_cher2 (uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2 (uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/her2.html"},{"title":"her2k – Fortran-lang/stdlib","text":"public interface her2k HER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Subroutines public pure subroutine cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_cher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/her2k.html"},{"title":"herk – Fortran-lang/stdlib","text":"public interface herk HERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Subroutines public pure subroutine cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_cherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/herk.html"},{"title":"hpmv – Fortran-lang/stdlib","text":"public interface hpmv HPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Subroutines public pure subroutine chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_chpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/hpmv.html"},{"title":"hpr – Fortran-lang/stdlib","text":"public interface hpr HPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Subroutines public pure subroutine chpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_chpr (uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr (uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*)","tags":"","loc":"interface/hpr.html"},{"title":"hpr2 – Fortran-lang/stdlib","text":"public interface hpr2 HPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Subroutines public pure subroutine chpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_chpr2 (uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr2 (uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*)","tags":"","loc":"interface/hpr2.html"},{"title":"nrm2 – Fortran-lang/stdlib","text":"public interface nrm2 NRM2 returns the euclidean norm of a vector via the function\nname, so that\nNRM2 := sqrt( x'*x ) Functions public pure function dnrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function snrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Module Procedures public pure function stdlib_dnrm2 (n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_snrm2 (n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp)","tags":"","loc":"interface/nrm2.html"},{"title":"rot – Fortran-lang/stdlib","text":"public interface rot ROT applies a plane rotation. Subroutines public pure subroutine drot(n, dx, incx, dy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine srot(n, sx, incx, sy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Module Procedures public pure subroutine stdlib_drot (n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_srot (n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s","tags":"","loc":"interface/rot.html"},{"title":"rotg – Fortran-lang/stdlib","text":"public interface rotg The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Subroutines public pure subroutine crotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine drotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine srotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine zrotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s Module Procedures public pure subroutine stdlib_crotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine stdlib_drotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine stdlib_srotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine stdlib_zrotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s","tags":"","loc":"interface/rotg.html"},{"title":"rotm – Fortran-lang/stdlib","text":"public interface rotm ROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See ROTMG for a description of data storage in DPARAM. Subroutines public pure subroutine drotm(n, dx, incx, dy, incy, dparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine srotm(n, sx, incx, sy, incy, sparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) Module Procedures public pure subroutine stdlib_drotm (n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine stdlib_srotm (n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5)","tags":"","loc":"interface/rotm.html"},{"title":"rotmg – Fortran-lang/stdlib","text":"public interface rotmg ROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Subroutines public pure subroutine drotmg(dd1, dd2, dx1, dy1, dparam) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine srotmg(sd1, sd2, sx1, sy1, sparam) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) Module Procedures public pure subroutine stdlib_drotmg (dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine stdlib_srotmg (sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5)","tags":"","loc":"interface/rotmg.html"},{"title":"sbmv – Fortran-lang/stdlib","text":"public interface sbmv SBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Subroutines public pure subroutine dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_dsbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/sbmv.html"},{"title":"scal – Fortran-lang/stdlib","text":"public interface scal SCAL scales a vector by a constant. Subroutines public pure subroutine cscal(n, ca, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dscal(n, da, dx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine sscal(n, sa, sx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine zscal(n, za, zx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_cscal (n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dscal (n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_sscal (n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zscal (n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/scal.html"},{"title":"sdot – Fortran-lang/stdlib","text":"public interface sdot Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Functions public pure function dsdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) Module Procedures public pure function stdlib_dsdot (n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp)","tags":"","loc":"interface/sdot.html"},{"title":"spmv – Fortran-lang/stdlib","text":"public interface spmv SPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Subroutines public pure subroutine dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_dspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/spmv.html"},{"title":"spr – Fortran-lang/stdlib","text":"public interface spr SPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Subroutines public pure subroutine dspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_dspr (uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr (uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*)","tags":"","loc":"interface/spr.html"},{"title":"spr2 – Fortran-lang/stdlib","text":"public interface spr2 SPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Subroutines public pure subroutine dspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) Module Procedures public pure subroutine stdlib_dspr2 (uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr2 (uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*)","tags":"","loc":"interface/spr2.html"},{"title":"srot – Fortran-lang/stdlib","text":"public interface srot SROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Subroutines public pure subroutine csrot(n, cx, incx, cy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Module Procedures public pure subroutine stdlib_csrot (n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s","tags":"","loc":"interface/srot.html"},{"title":"sscal – Fortran-lang/stdlib","text":"public interface sscal SSCAL scales a complex vector by a real constant. Subroutines public pure subroutine csscal(n, sa, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_csscal (n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/sscal.html"},{"title":"swap – Fortran-lang/stdlib","text":"public interface swap SWAP interchanges two vectors. Subroutines public pure subroutine cswap(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dswap(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sswap(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zswap(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_cswap (n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dswap (n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sswap (n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zswap (n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/swap.html"},{"title":"symm – Fortran-lang/stdlib","text":"public interface symm SYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Subroutines public pure subroutine csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_csymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/symm.html"},{"title":"symv – Fortran-lang/stdlib","text":"public interface symv SYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Subroutines public pure subroutine dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Module Procedures public pure subroutine stdlib_dsymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy","tags":"","loc":"interface/symv.html"},{"title":"syr – Fortran-lang/stdlib","text":"public interface syr SYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Subroutines public pure subroutine dsyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_dsyr (uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr (uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/syr.html"},{"title":"syr2 – Fortran-lang/stdlib","text":"public interface syr2 SYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Subroutines public pure subroutine dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Module Procedures public pure subroutine stdlib_dsyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda","tags":"","loc":"interface/syr2.html"},{"title":"syr2k – Fortran-lang/stdlib","text":"public interface syr2k SYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Subroutines public pure subroutine csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_csyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/syr2k.html"},{"title":"syrk – Fortran-lang/stdlib","text":"public interface syrk SYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Subroutines public pure subroutine csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Module Procedures public pure subroutine stdlib_csyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc","tags":"","loc":"interface/syrk.html"},{"title":"tbmv – Fortran-lang/stdlib","text":"public interface tbmv TBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Subroutines public pure subroutine ctbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctbmv (uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbmv (uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbmv (uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbmv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tbmv.html"},{"title":"tbsv – Fortran-lang/stdlib","text":"public interface tbsv TBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Subroutines public pure subroutine ctbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctbsv (uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbsv (uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbsv (uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbsv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tbsv.html"},{"title":"tpmv – Fortran-lang/stdlib","text":"public interface tpmv TPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Subroutines public pure subroutine ctpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctpmv (uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpmv (uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpmv (uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpmv (uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tpmv.html"},{"title":"tpsv – Fortran-lang/stdlib","text":"public interface tpsv TPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Subroutines public pure subroutine ctpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctpsv (uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpsv (uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpsv (uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpsv (uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/tpsv.html"},{"title":"trmm – Fortran-lang/stdlib","text":"public interface trmm TRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Subroutines public pure subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Module Procedures public pure subroutine stdlib_ctrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb","tags":"","loc":"interface/trmm.html"},{"title":"trmv – Fortran-lang/stdlib","text":"public interface trmv TRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Subroutines public pure subroutine ctrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctrmv (uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrmv (uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strmv (uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrmv (uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/trmv.html"},{"title":"trsm – Fortran-lang/stdlib","text":"public interface trsm TRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Subroutines public pure subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Module Procedures public pure subroutine stdlib_ctrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb","tags":"","loc":"interface/trsm.html"},{"title":"trsv – Fortran-lang/stdlib","text":"public interface trsv TRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Subroutines public pure subroutine ctrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Module Procedures public pure subroutine stdlib_ctrsv (uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrsv (uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strsv (uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrsv (uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"interface/trsv.html"},{"title":"arg_select – Fortran-lang/stdlib","text":"public interface arg_select ( Specification ) Module Procedures private subroutine arg_select_1_iint8_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ).","tags":"","loc":"interface/arg_select.html"},{"title":"select – Fortran-lang/stdlib","text":"public interface select ( Specification ) Module Procedures private subroutine select_1_iint8_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ).","tags":"","loc":"interface/select.html"},{"title":"stdlib_sasum – Fortran-lang/stdlib","text":"public pure function stdlib_sasum(n, sx, incx) SASUM takes the sum of the absolute values.\nuses unrolled loops for increment equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_sasum ( n , sx , incx ) !! SASUM takes the sum of the absolute values. !! uses unrolled loops for increment equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_sasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + abs ( sx ( i )) end do if ( n < 6 ) then stdlib_sasum = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 stemp = stemp + abs ( sx ( i )) + abs ( sx ( i + 1 )) + abs ( sx ( i + 2 )) + abs ( sx ( i + 3 )) + abs ( sx ( i + & 4 )) + abs ( sx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( sx ( i )) end do end if stdlib_sasum = stemp return end function stdlib_sasum","tags":"","loc":"proc/stdlib_sasum.html"},{"title":"stdlib_scasum – Fortran-lang/stdlib","text":"public pure function stdlib_scasum(n, cx, incx) SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a single precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_scasum ( n , cx , incx ) !! SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a single precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do end if stdlib_scasum = stemp return end function stdlib_scasum","tags":"","loc":"proc/stdlib_scasum.html"},{"title":"stdlib_scnrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_scnrm2(n, x, incx) SCNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSCNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure function stdlib_scnrm2 ( n , x , incx ) !! SCNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SCNRM2 := sqrt( x**H*x ) real ( sp ) :: stdlib_scnrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_scnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = sp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_scnrm2 = scl * sqrt ( sumsq ) return end function stdlib_scnrm2","tags":"","loc":"proc/stdlib_scnrm2.html"},{"title":"stdlib_sdot – Fortran-lang/stdlib","text":"public pure function stdlib_sdot(n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_sdot ( n , sx , incx , sy , incy ) !! SDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stemp = zero stdlib_sdot = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + sx ( i ) * sy ( i ) end do if ( n < 5 ) then stdlib_sdot = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 stemp = stemp + sx ( i ) * sy ( i ) + sx ( i + 1 ) * sy ( i + 1 ) + sx ( i + 2 ) * sy ( i + 2 ) + sx ( i + 3 ) * sy ( i + 3 ) + & sx ( i + 4 ) * sy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = stemp + sx ( ix ) * sy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_sdot = stemp return end function stdlib_sdot","tags":"","loc":"proc/stdlib_sdot.html"},{"title":"stdlib_sdsdot – Fortran-lang/stdlib","text":"public pure function stdlib_sdsdot(n, sb, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation.\nReturns S.P. result with dot product accumulated in D.P.\nSDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I INCX) SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N) INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sb real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) Source Code pure real ( sp ) function stdlib_sdsdot ( n , sb , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation. !! Returns S.P. result with dot product accumulated in D.P. !! SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sb integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! Local Scalars real ( dp ) :: dsdot integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real dsdot = sb if ( n <= 0 ) then stdlib_sdsdot = dsdot return end if if ( incx == incy . and . incx > 0 ) then ! code for equal and positive increments. ns = n * incx do i = 1 , ns , incx dsdot = dsdot + real ( sx ( i ), KIND = sp ) * real ( sy ( i ), KIND = sp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n dsdot = dsdot + real ( sx ( kx ), KIND = sp ) * real ( sy ( ky ), KIND = sp ) kx = kx + incx ky = ky + incy end do end if stdlib_sdsdot = dsdot return end function stdlib_sdsdot","tags":"","loc":"proc/stdlib_sdsdot.html"},{"title":"stdlib_snrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_snrm2(n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Source Code pure function stdlib_snrm2 ( n , x , incx ) !! SNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SNRM2 := sqrt( x'*x ). real ( sp ) :: stdlib_snrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_snrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_snrm2 = scl * sqrt ( sumsq ) return end function stdlib_snrm2","tags":"","loc":"proc/stdlib_snrm2.html"},{"title":"stdlib_saxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_saxpy(n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_saxpy ( n , sa , sx , incx , sy , incy ) !! SAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( inout ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( sa == 0.0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sy ( i ) + sa * sx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 sy ( i ) = sy ( i ) + sa * sx ( i ) sy ( i + 1 ) = sy ( i + 1 ) + sa * sx ( i + 1 ) sy ( i + 2 ) = sy ( i + 2 ) + sa * sx ( i + 2 ) sy ( i + 3 ) = sy ( i + 3 ) + sa * sx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sy ( iy ) + sa * sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_saxpy","tags":"","loc":"proc/stdlib_saxpy.html"},{"title":"stdlib_scopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_scopy(n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_scopy ( n , sx , incx , sy , incy ) !! SCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( out ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 sy ( i ) = sx ( i ) sy ( i + 1 ) = sx ( i + 1 ) sy ( i + 2 ) = sx ( i + 2 ) sy ( i + 3 ) = sx ( i + 3 ) sy ( i + 4 ) = sx ( i + 4 ) sy ( i + 5 ) = sx ( i + 5 ) sy ( i + 6 ) = sx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_scopy","tags":"","loc":"proc/stdlib_scopy.html"},{"title":"stdlib_sgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! SGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_sgbmv","tags":"","loc":"proc/stdlib_sgbmv.html"},{"title":"stdlib_sgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_sgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_sgemm","tags":"","loc":"proc/stdlib_sgemm.html"},{"title":"stdlib_sgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! SGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_sgemv","tags":"","loc":"proc/stdlib_sgemv.html"},{"title":"stdlib_sger – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sger(m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_sger ( m , n , alpha , x , incx , y , incy , a , lda ) !! SGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_sger","tags":"","loc":"proc/stdlib_sger.html"},{"title":"stdlib_srot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srot(n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Source Code pure subroutine stdlib_srot ( n , sx , incx , sy , incy , c , s ) !! applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n stemp = c * sx ( i ) + s * sy ( i ) sy ( i ) = c * sy ( i ) - s * sx ( i ) sx ( i ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = c * sx ( ix ) + s * sy ( iy ) sy ( iy ) = c * sy ( iy ) - s * sx ( ix ) sx ( ix ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_srot","tags":"","loc":"proc/stdlib_srot.html"},{"title":"stdlib_srotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srotg(a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s Source Code pure subroutine stdlib_srotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( inout ) :: a , b real ( sp ), intent ( out ) :: c , s ! Local Scalars real ( sp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_srotg","tags":"","loc":"proc/stdlib_srotg.html"},{"title":"stdlib_srotm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srotm(n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) Source Code pure subroutine stdlib_srotm ( n , sx , incx , sy , incy , sparam ) !! SROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}SX^T\\\\SY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of SX are in !! SX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for SY using LY and INCY. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SH_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=-2}. !! See SROTMG for a description of data storage in SPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sparam ( 5 ) real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: sflag , sh11 , sh12 , sh21 , sh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_sp two = 2.0_sp sflag = sparam ( 1 ) if ( n <= 0 . or . ( sflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z * sh12 sy ( i ) = w * sh21 + z * sh22 end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w + z * sh12 sy ( i ) = w * sh21 + z end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z sy ( i ) = - w + sh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z * sh12 sy ( ky ) = w * sh21 + z * sh22 kx = kx + incx ky = ky + incy end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w + z * sh12 sy ( ky ) = w * sh21 + z kx = kx + incx ky = ky + incy end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z sy ( ky ) = - w + sh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_srotm","tags":"","loc":"proc/stdlib_srotm.html"},{"title":"stdlib_srotmg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_srotmg(sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) Source Code pure subroutine stdlib_srotmg ( sd1 , sd2 , sx1 , sy1 , sparam ) !! SROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{SD_1}\\cdot SX_1,\\sqrt{SD_2}\\cdot SY_2} \\right]^T. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SD_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=2}. !! Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( inout ) :: sd1 , sd2 , sx1 real ( sp ), intent ( in ) :: sy1 ! Array Arguments real ( sp ), intent ( out ) :: sparam ( 5 ) ! ===================================================================== ! Local Scalars real ( sp ) :: gam , gamsq , one , rgamsq , sflag , sh11 , sh12 , sh21 , sh22 , sp1 , sp2 , sq1 , sq2 ,& stemp , su , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_sp one = 1.0_sp two = 2.0_sp gam = 409 6.0_sp gamsq = 1.67772e7_sp rgamsq = 5.96046e-8_sp if ( sd1 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else ! case-sd1-nonnegative sp2 = sd2 * sy1 if ( sp2 == zero ) then sflag = - two sparam ( 1 ) = sflag return end if ! regular-case.. sp1 = sd1 * sx1 sq2 = sp2 * sy1 sq1 = sp1 * sx1 if ( abs ( sq1 ) > abs ( sq2 )) then sh21 = - sy1 / sx1 sh12 = sp2 / sp1 su = one - sh12 * sh21 if ( su > zero ) then sflag = zero sd1 = sd1 / su sd2 = sd2 / su sx1 = sx1 * su else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero end if else if ( sq2 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else sflag = one sh11 = sp1 / sp2 sh22 = sx1 / sy1 su = one + sh11 * sh22 stemp = sd2 / su sd2 = sd1 / su sd1 = stemp sx1 = sy1 * su end if end if ! procedure..scale-check if ( sd1 /= zero ) then do while (( sd1 <= rgamsq ) . or . ( sd1 >= gamsq )) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( sd1 <= rgamsq ) then sd1 = sd1 * gam ** 2 sx1 = sx1 / gam sh11 = sh11 / gam sh12 = sh12 / gam else sd1 = sd1 / gam ** 2 sx1 = sx1 * gam sh11 = sh11 * gam sh12 = sh12 * gam end if enddo end if if ( sd2 /= zero ) then do while ( ( abs ( sd2 ) <= rgamsq ) . or . ( abs ( sd2 ) >= gamsq ) ) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( abs ( sd2 ) <= rgamsq ) then sd2 = sd2 * gam ** 2 sh21 = sh21 / gam sh22 = sh22 / gam else sd2 = sd2 / gam ** 2 sh21 = sh21 * gam sh22 = sh22 * gam end if end do end if end if if ( sflag < zero ) then sparam ( 2 ) = sh11 sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 sparam ( 5 ) = sh22 else if ( sflag == zero ) then sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 else sparam ( 2 ) = sh11 sparam ( 5 ) = sh22 end if sparam ( 1 ) = sflag return end subroutine stdlib_srotmg","tags":"","loc":"proc/stdlib_srotmg.html"},{"title":"stdlib_ssbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_ssbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! SSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssbmv","tags":"","loc":"proc/stdlib_ssbmv.html"},{"title":"stdlib_sscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sscal(n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_sscal ( n , sa , sx , incx ) !! SSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m sx ( i ) = sa * sx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 sx ( i ) = sa * sx ( i ) sx ( i + 1 ) = sa * sx ( i + 1 ) sx ( i + 2 ) = sa * sx ( i + 2 ) sx ( i + 3 ) = sa * sx ( i + 3 ) sx ( i + 4 ) = sa * sx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx sx ( i ) = sa * sx ( i ) end do end if return end subroutine stdlib_sscal","tags":"","loc":"proc/stdlib_sscal.html"},{"title":"stdlib_sspmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! SSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_sspmv","tags":"","loc":"proc/stdlib_sspmv.html"},{"title":"stdlib_sspr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sspr(uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_sspr ( uplo , n , alpha , x , incx , ap ) !! SSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr","tags":"","loc":"proc/stdlib_sspr.html"},{"title":"stdlib_sspr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sspr2(uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_sspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! SSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr2","tags":"","loc":"proc/stdlib_sspr2.html"},{"title":"stdlib_sswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_sswap(n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_sswap ( n , sx , incx , sy , incy ) !! SSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp stemp = sx ( i + 1 ) sx ( i + 1 ) = sy ( i + 1 ) sy ( i + 1 ) = stemp stemp = sx ( i + 2 ) sx ( i + 2 ) = sy ( i + 2 ) sy ( i + 2 ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = sx ( ix ) sx ( ix ) = sy ( iy ) sy ( iy ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_sswap","tags":"","loc":"proc/stdlib_sswap.html"},{"title":"stdlib_ssymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_ssymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_ssymm","tags":"","loc":"proc/stdlib_ssymm.html"},{"title":"stdlib_ssymv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_ssymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! SSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssymv","tags":"","loc":"proc/stdlib_ssymv.html"},{"title":"stdlib_ssyr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyr(uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_ssyr ( uplo , n , alpha , x , incx , a , lda ) !! SSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_ssyr","tags":"","loc":"proc/stdlib_ssyr.html"},{"title":"stdlib_ssyr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_ssyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! SSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssyr2","tags":"","loc":"proc/stdlib_ssyr2.html"},{"title":"stdlib_ssyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_ssyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_ssyr2k","tags":"","loc":"proc/stdlib_ssyr2k.html"},{"title":"stdlib_ssyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_ssyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! SSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_ssyrk","tags":"","loc":"proc/stdlib_ssyrk.html"},{"title":"stdlib_stbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stbmv(uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_stbmv","tags":"","loc":"proc/stdlib_stbmv.html"},{"title":"stdlib_stbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stbsv(uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_stbsv","tags":"","loc":"proc/stdlib_stbsv.html"},{"title":"stdlib_stpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stpmv(uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stpmv ( uplo , trans , diag , n , ap , x , incx ) !! STPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpmv","tags":"","loc":"proc/stdlib_stpmv.html"},{"title":"stdlib_stpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_stpsv(uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_stpsv ( uplo , trans , diag , n , ap , x , incx ) !! STPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpsv","tags":"","loc":"proc/stdlib_stpsv.html"},{"title":"stdlib_strmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_strmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strmm","tags":"","loc":"proc/stdlib_strmm.html"},{"title":"stdlib_strmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strmv(uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_strmv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_strmv","tags":"","loc":"proc/stdlib_strmv.html"},{"title":"stdlib_strsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_strsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strsm","tags":"","loc":"proc/stdlib_strsm.html"},{"title":"stdlib_strsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_strsv(uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_strsv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_strsv","tags":"","loc":"proc/stdlib_strsv.html"},{"title":"bits – Fortran-lang/stdlib","text":"public elemental function bits(self) Returns the number of bit positions in self . Type Bound bitset_type Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) Source Code elemental function bits ( self ) !! Version: experimental !! !! Returns the number of bit positions in `self`. integer ( bits_kind ) :: bits class ( bitset_type ), intent ( in ) :: self bits = self % num_bits return end function bits","tags":"","loc":"proc/bits.html"},{"title":"error_handler – Fortran-lang/stdlib","text":"public module subroutine error_handler(message, error, status, module, procedure) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: message integer, intent(in) :: error integer, intent(out), optional :: status character(len=*), intent(in), optional :: module character(len=*), intent(in), optional :: procedure Source Code module subroutine error_handler ( message , error , status , & module , procedure ) character ( * ), intent ( in ) :: message integer , intent ( in ) :: error integer , intent ( out ), optional :: status character ( * ), intent ( in ), optional :: module character ( * ), intent ( in ), optional :: procedure end subroutine error_handler","tags":"","loc":"proc/error_handler.html"},{"title":"and – Fortran-lang/stdlib","text":"public interface and Sets the bits in set1 to the bitwise and of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_and use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all none if ( none ( set0 ) ) write ( * , * ) 'Second test of AND worked.' call set1 % not () call and ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of AND worked.' end program example_and Subroutines private elemental module subroutine and_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/and.html"},{"title":"and_not – Fortran-lang/stdlib","text":"public interface and_not Sets the bits in set1 to the bitwise and of the original bits in set1 with the bitwise negation of set2 . The sets must have the same\n number of bits otherwise the result is undefined. ( Specification ) Example program example_and_not use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and_not ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of AND_NOT worked.' call set0 % not () call set1 % not () call and_not ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of AND_NOT worked.' end program example_and_not Subroutines private elemental module subroutine and_not_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_not_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/and_not.html"},{"title":"assignment(=) – Fortran-lang/stdlib","text":"public interface assignment(=) Used to define assignment for bitset_large .\n ( Specification ) Example program example_assignment use stdlib_bitsets logical ( int8 ) :: logical1 ( 64 ) = . true . logical ( int32 ), allocatable :: logical2 (:) type ( bitset_64 ) :: set0 , set1 set0 = logical1 if ( set0 % bits () /= 64 ) then error stop procedure // & ' initialization with logical(int8) failed to set' // & ' the right size.' else if ( . not . set0 % all () ) then error stop procedure // ' initialization with' // & ' logical(int8) failed to set the right values.' else write ( * , * ) 'Initialization with logical(int8) succeeded.' end if set1 = set0 if ( set1 == set0 ) & write ( * , * ) 'Initialization by assignment succeeded' logical2 = set1 if ( all ( logical2 ) ) then write ( * , * ) 'Initialization of logical(int32) succeeded.' end if end program example_assignment Subroutines private pure module subroutine assign_logint16_large(self, logical_vector) Used to define assignment from an array of type logical(int16) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int16), intent(in) :: logical_vector (:) private pure module subroutine assign_logint32_large(self, logical_vector) Used to define assignment from an array of type logical(int32) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int32), intent(in) :: logical_vector (:) private pure module subroutine assign_logint64_large(self, logical_vector) Used to define assignment from an array of type logical(int64) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int64), intent(in) :: logical_vector (:) private pure module subroutine assign_logint8_large(self, logical_vector) Used to define assignment from an array of type logical(int8) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int8), intent(in) :: logical_vector (:) private pure module subroutine logint16_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int16) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int16), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint32_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int32) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int32), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint64_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int64) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int64), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint8_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int8) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int8), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set","tags":"","loc":"interface/assignment(=)~2.html"},{"title":"extract – Fortran-lang/stdlib","text":"public interface extract Creates a new bitset, new , from a range, start_pos to stop_pos , in\n bitset old . If start_pos is greater than stop_pos the new bitset is\n empty. If start_pos is less than zero or stop_pos is greater than bits(old)-1 then if status is present it has the value index_invalid_error and new is undefined, otherwise processing stops\n with an informative message.\n ( Specification ) Example program example_extract use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set0 % set ( 100 , 150 ) call extract ( set1 , set0 , 100 , 150 ) if ( set1 % bits () == 51 ) & write ( * , * ) 'SET1 has the proper size.' if ( set1 % all () ) write ( * , * ) 'SET1 has the proper values.' end program example_extract Subroutines private module subroutine extract_64(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(out) :: new type( bitset_64 ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status private module subroutine extract_large(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: new type( bitset_large ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status","tags":"","loc":"interface/extract.html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Returns .true. if not all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_inequality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 /= set1 . and . set0 /= set2 . and . set1 /= set2 . and . & . not . set0 /= set0 . and . . not . set1 /= set1 . and . . not . & set2 /= set2 ) then write ( * , * ) 'Passed 64 bit inequality tests.' else error stop 'Failed 64 bit inequality tests.' end if end program example_inequality Functions private elemental module function neqv_64(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function neqv_large(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(SLASH=)~3.html"},{"title":"operator(<) – Fortran-lang/stdlib","text":"public interface operator(<) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_lt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 < set1 . and . set1 < set2 . and . set0 < set2 . and . & . not . set0 < set0 . and . . not . set2 < set0 . and . . not . & set2 < set1 ) then write ( * , * ) 'Passed 64 bit less than tests.' else error stop 'Failed 64 bit less than tests.' end if end program example_lt Functions private elemental module function lt_64(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function lt_large(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(lt)~2.html"},{"title":"operator(<=) – Fortran-lang/stdlib","text":"public interface operator(<=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_le use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 <= set1 . and . set1 <= set2 . and . set0 <= set2 . and . & set0 <= set0 . and . set1 <= set1 . and . set2 <= set2 . and . & . not . set1 <= set0 . and . . not . set2 <= set0 . and . . not . & set2 <= set1 ) then write ( * , * ) 'Passed 64 bit less than or equal tests.' else error stop 'Failed 64 bit less than or equal tests.' end if end program example_le Functions private elemental module function le_64(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function le_large(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(lt=)~2.html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Returns .true. if all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_equality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 == set0 . and . set1 == set1 . and . set2 == set2 . and . & . not . set0 == set1 . and . . not . set0 == set2 . and . . not . & set1 == set2 ) then write ( * , * ) 'Passed 64 bit equality tests.' else error stop 'Failed 64 bit equality tests.' end if end program example_equality Functions private elemental module function eqv_64(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function eqv_large(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(==)~3.html"},{"title":"operator(>) – Fortran-lang/stdlib","text":"public interface operator(>) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_gt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 > set0 . and . set2 > set1 . and . set2 > set0 . and . & . not . set0 > set0 . and . . not . set0 > set1 . and . . not . & set1 > set2 ) then write ( * , * ) 'Passed 64 bit greater than tests.' else error stop 'Failed 64 bit greater than tests.' end if end program example_gt Functions private elemental module function gt_64(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function gt_large(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(gt)~2.html"},{"title":"operator(>=) – Fortran-lang/stdlib","text":"public interface operator(>=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_ge use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 >= set0 . and . set2 >= set1 . and . set2 >= set0 . and . & set0 >= set0 . and . set1 >= set1 . and . set2 >= set2 . and . & . not . set0 >= set1 . and . . not . set0 >= set2 . and . . not . & set1 >= set2 ) then write ( * , * ) 'Passed 64 bit greater than or equals tests.' else error stop 'Failed 64 bit greater than or equals tests.' end if end program example_ge Functions private elemental module function ge_64(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function ge_large(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical","tags":"","loc":"interface/operator(gt=)~2.html"},{"title":"or – Fortran-lang/stdlib","text":"public interface or Sets the bits in set1 to the bitwise or of the original bits in set1 and set2 . The sets must have the same number of bits otherwise\n the result is undefined.\n ( Specification ) Example program example_or use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call or ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of OR worked.' call set0 % not () call set1 % not () call or ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of OR worked.' end program example_or Subroutines private elemental module subroutine or_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine or_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/or.html"},{"title":"xor – Fortran-lang/stdlib","text":"public interface xor Sets the bits in set1 to the bitwise xor of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_xor use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call xor ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of XOR worked.' call set0 % not () call set1 % not () call xor ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of XOR worked.' end program example_xor Subroutines private elemental module subroutine xor_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine xor_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2","tags":"","loc":"interface/xor.html"},{"title":"to_num – Fortran-lang/stdlib","text":"public interface to_num Conversion of strings to numbers\n( Specification ) Module Procedures private elemental function to_int8(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int8) Output integer(int8) value private elemental function to_int16(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int16) Output integer(int16) value private elemental function to_int32(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int32) Output integer(int32) value private elemental function to_int64(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int64) Output integer(int64) value private elemental function to_sp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=sp) Output real(sp) value private elemental function to_dp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=dp) Output real(dp) value","tags":"","loc":"interface/to_num.html"},{"title":"to_num_from_stream – Fortran-lang/stdlib","text":"public interface to_num_from_stream Conversion of a stream of values in a string to numbers\n( Specification ) Module Procedures private function to_int8_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int8) Output integer(int8) value private function to_int16_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int16) Output integer(int16) value private function to_int32_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int32) Output integer(int32) value private function to_int64_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int64) Output integer(int64) value private function to_sp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=sp) Output real(sp) value private function to_dp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=dp) Output real(dp) value","tags":"","loc":"interface/to_num_from_stream.html"},{"title":"cdf_uniform – Fortran-lang/stdlib","text":"public interface cdf_uniform Get uniform distribution cumulative distribution function (cdf) for integer,\nreal and complex variables.\n( Specification ) Module Procedures private elemental function cdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function cdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function cdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function cdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function cdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/cdf_uniform.html"},{"title":"pdf_uniform – Fortran-lang/stdlib","text":"public interface pdf_uniform Get uniform distribution probability density (pdf) for integer, real and\ncomplex variables.\n( Specification ) Module Procedures private elemental function pdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function pdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function pdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function pdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function pdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/pdf_uniform.html"},{"title":"rvs_uniform – Fortran-lang/stdlib","text":"public interface rvs_uniform Get uniformly distributed random variate for integer, real and complex\nvariables.\n( Specification ) Module Procedures private impure elemental function rvs_unif_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_unif_1_iint8(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_1_iint16(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_1_iint32(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_1_iint64(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_1_rsp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_1_rdp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_1_csp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_1_cdp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure elemental function rvs_unif_iint8(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_iint16(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_iint32(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_iint64(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private function rvs_unif_array_iint8(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int8), (array_size) private function rvs_unif_array_iint16(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int16), (array_size) private function rvs_unif_array_iint32(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int32), (array_size) private function rvs_unif_array_iint64(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int64), (array_size) private function rvs_unif_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private function rvs_unif_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private function rvs_unif_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private function rvs_unif_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"interface/rvs_uniform.html"},{"title":"shuffle – Fortran-lang/stdlib","text":"public interface shuffle Fisher-Yates shuffle algorithm for a rank one array of integer, real and\ncomplex variables.\n( Specification ) Module Procedures private function shuffle_iint8(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: list (:) Return Value integer(kind=int8), (size(list)) private function shuffle_iint16(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: list (:) Return Value integer(kind=int16), (size(list)) private function shuffle_iint32(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: list (:) Return Value integer(kind=int32), (size(list)) private function shuffle_iint64(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: list (:) Return Value integer(kind=int64), (size(list)) private function shuffle_rsp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: list (:) Return Value real(kind=sp), (size(list)) private function shuffle_rdp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: list (:) Return Value real(kind=dp), (size(list)) private function shuffle_csp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: list (:) Return Value complex(kind=sp), (size(list)) private function shuffle_cdp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: list (:) Return Value complex(kind=dp), (size(list))","tags":"","loc":"interface/shuffle.html"},{"title":"load_npy – Fortran-lang/stdlib","text":"public interface load_npy Load multidimensional array in npy format\n( Specification ) Subroutines private module subroutine load_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg","tags":"","loc":"interface/load_npy.html"},{"title":"save_npy – Fortran-lang/stdlib","text":"public interface save_npy Save multidimensional array in npy format\n( Specification ) Subroutines private module subroutine save_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg","tags":"","loc":"interface/save_npy.html"},{"title":"fnv_1_hasher – Fortran-lang/stdlib","text":"public pure function fnv_1_hasher(key) Hashes a key with the FNV_1 algorithm\nArguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function fnv_1_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1 algorithm !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1_hasher fnv_1_hasher = fnv_1_hash ( key % value ) end function fnv_1_hasher","tags":"","loc":"proc/fnv_1_hasher.html"},{"title":"fnv_1a_hasher – Fortran-lang/stdlib","text":"public pure function fnv_1a_hasher(key) Hashes a key with the FNV_1a algorithm\n( Specifications ) Arguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function fnv_1a_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1a algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#fnv_1a_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1a_hasher fnv_1a_hasher = fnv_1a_hash ( key % value ) end function fnv_1a_hasher","tags":"","loc":"proc/fnv_1a_hasher.html"},{"title":"seeded_nmhash32_hasher – Fortran-lang/stdlib","text":"public pure function seeded_nmhash32_hasher(key) Hashes a key with the NMHASH32 hash algorithm\n( Specifications ) Arguments:\n key - the key to be hashed\n seed - the seed (unused) for the hashing algorithm Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function seeded_nmhash32_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32 hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32_hasher seeded_nmhash32_hasher = nmhash32 ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32_hasher","tags":"","loc":"proc/seeded_nmhash32_hasher.html"},{"title":"seeded_nmhash32x_hasher – Fortran-lang/stdlib","text":"public pure function seeded_nmhash32x_hasher(key) Hashes a key with the NMHASH32X hash algorithm\n( Specifications )\nArguments:\n key - the key to be hashed\n seed - the seed (unused) for the hashing algorithm Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function seeded_nmhash32x_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32X hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32x_hasher-calculates-a-hash-code-from-a-key)) !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32x_hasher seeded_nmhash32x_hasher = nmhash32x ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32x_hasher","tags":"","loc":"proc/seeded_nmhash32x_hasher.html"},{"title":"seeded_water_hasher – Fortran-lang/stdlib","text":"public pure function seeded_water_hasher(key) Hashes a key with the waterhash algorithm\n( Specifications ) Arguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Source Code pure function seeded_water_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the waterhash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_water_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_water_hasher seeded_water_hasher = water_hash ( key % value , & int ( z 'DEADBEEF1EADBEEF' , int64 ) ) end function seeded_water_hasher","tags":"","loc":"proc/seeded_water_hasher.html"},{"title":"copy_key – Fortran-lang/stdlib","text":"public pure subroutine copy_key(old_key, new_key) Copies the contents of the key, old_key, to the key, new_key\n( Specifications ) Arguments:\n old_key - the input key\n new_key - the output copy of old_key Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: old_key type( key_type ), intent(out) :: new_key Source Code pure subroutine copy_key ( old_key , new_key ) !! Version: Experimental !! !! Copies the contents of the key, old_key, to the key, new_key !! ([Specifications](../page/specs/stdlib_hashmaps.html#copy_key-returns-a-copy-of-the-key)) !! !! Arguments: !! old_key - the input key !! new_key - the output copy of old_key type ( key_type ), intent ( in ) :: old_key type ( key_type ), intent ( out ) :: new_key new_key % value = old_key % value end subroutine copy_key","tags":"","loc":"proc/copy_key.html"},{"title":"copy_other – Fortran-lang/stdlib","text":"public subroutine copy_other(other_in, other_out) Copies the other data, other_in, to the variable, other_out\n( Specifications ) Arguments:\n other_in - the input data\n other_out - the output data Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other_in type( other_type ), intent(out) :: other_out Source Code subroutine copy_other ( other_in , other_out ) !! Version: Experimental !! !! Copies the other data, other_in, to the variable, other_out !! ([Specifications](../page/specs/stdlib_hashmaps.html#copy_other-returns-a-copy-of-the-other-data)) !! !! Arguments: !! other_in - the input data !! other_out - the output data type ( other_type ), intent ( in ) :: other_in type ( other_type ), intent ( out ) :: other_out allocate ( other_out % value , source = other_in % value ) end subroutine copy_other","tags":"","loc":"proc/copy_other.html"},{"title":"free_key – Fortran-lang/stdlib","text":"public subroutine free_key(key) Frees the memory in a key\n( Specifications ) Arguments:\n key - the key Arguments Type Intent Optional Attributes Name type( key_type ), intent(inout) :: key Source Code subroutine free_key ( key ) !! Version: Experimental !! !! Frees the memory in a key !! ([Specifications](../page/specs/stdlib_hashmaps.html#free_key-frees-the-memory-associated-with-a-key)) !! !! Arguments: !! key - the key type ( key_type ), intent ( inout ) :: key if ( allocated ( key % value ) ) deallocate ( key % value ) end subroutine free_key","tags":"","loc":"proc/free_key.html"},{"title":"free_other – Fortran-lang/stdlib","text":"public subroutine free_other(other) Frees the memory in the other data\n( Specifications ) Arguments:\n other - the other data Arguments Type Intent Optional Attributes Name type( other_type ), intent(inout) :: other Source Code subroutine free_other ( other ) !! Version: Experimental !! !! Frees the memory in the other data !! ([Specifications](../page/specs/stdlib_hashmaps.html#free_other-frees-the-memory-associated-with-other-data)) !! !! Arguments: !! other - the other data type ( other_type ), intent ( inout ) :: other if ( allocated ( other % value ) ) deallocate ( other % value ) end subroutine free_other","tags":"","loc":"proc/free_other.html"},{"title":"get – Fortran-lang/stdlib","text":"public interface get Module Procedures private subroutine get_char_key(key, value) Gets the contents of the key as a CHARACTER string\nArguments:\n key - the input key\n value - the contents of key mapped to a CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key character(len=:), intent(out), allocatable :: value private subroutine get_int8_key(key, value) Gets the contents of the key as an INTEGER(INT8) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int8), intent(out), allocatable :: value (:) private pure subroutine get_int32_key(key, value) Gets the contents of the key as an INTEGER(INT32) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int32), intent(out), allocatable :: value (:) private subroutine get_other(other, value) Gets the contents of the other as a CLASS( ) string\nArguments:\n other - the input other data\n value - the contents of other mapped to a CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other class(*), intent(out), allocatable :: value","tags":"","loc":"interface/get.html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Module Procedures private function equal_keys(key1, key2) result(test) Compares two keys for equality\n( Specifications ) Arguments:\n key1 - the first key\n key2 - the second key Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key1 type( key_type ), intent(in) :: key2 Return Value logical","tags":"","loc":"interface/operator(==)~4.html"},{"title":"set – Fortran-lang/stdlib","text":"public interface set Module Procedures private subroutine set_char_key(key, value) Sets the contents of the key from a CHARACTER string\nArguments:\n key - the output key\n value - the input CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key character(len=*), intent(in) :: value private subroutine set_int8_key(key, value) Sets the contents of the key from an INTEGER(INT8) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int8), intent(in) :: value (:) private pure subroutine set_int32_key(key, value) Sets the contents of the key from an INTEGER(INT32) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int32), intent(in) :: value (:) private subroutine set_other(other, value) Sets the contents of the other data from a CLASS( ) variable\nArguments:\n other - the output other data\n value - the input CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(out) :: other class(*), intent(in) :: value","tags":"","loc":"interface/set.html"},{"title":"check – Fortran-lang/stdlib","text":"public subroutine check(condition, msg, code, warn) Checks the value of a logical condition\n ( Specification ) Behavior If condition == .false. and: No other arguments are provided, it stops the program with the default\n message and exit code 1 ; msg is provided, it prints the value of msg ; code is provided, it stops the program with the given exit code; warn is provided and .true. , it doesn't stop the program and prints\n the message. Examples If a /= 5 , stops the program with exit code 1 and prints Check failed. call check ( a == 5 ) As above, but prints a == 5 failed . call check ( a == 5 , msg = 'a == 5 failed.' ) As above, but doesn't stop the program. call check ( a == 5 , msg = 'a == 5 failed.' , warn = . true .) As example #2, but stops the program with exit code 77 call check ( a == 5 , msg = 'a == 5 failed.' , code = 77 ) Arguments Type Intent Optional Attributes Name logical, intent(in) :: condition character(len=*), intent(in), optional :: msg integer, intent(in), optional :: code logical, intent(in), optional :: warn Source Code subroutine check ( condition , msg , code , warn ) !! version: experimental !! !! Checks the value of a logical condition !! ([Specification](../page/specs/stdlib_error.html#description)) !! !!##### Behavior !! !! If `condition == .false.` and: !! !! * No other arguments are provided, it stops the program with the default !! message and exit code `1`; !! * `msg` is provided, it prints the value of `msg`; !! * `code` is provided, it stops the program with the given exit code; !! * `warn` is provided and `.true.`, it doesn't stop the program and prints !! the message. !! !!##### Examples !! !!* If `a /= 5`, stops the program with exit code `1` !! and prints `Check failed.` !!``` fortran !! call check(a == 5) !!``` !! !!* As above, but prints `a == 5 failed`. !!``` fortran !! call check(a == 5, msg='a == 5 failed.') !!``` !! !!* As above, but doesn't stop the program. !!``` fortran !! call check(a == 5, msg='a == 5 failed.', warn=.true.) !!``` !! !!* As example #2, but stops the program with exit code `77` !!``` fortran !! call check(a == 5, msg='a == 5 failed.', code=77) !!``` ! ! Arguments ! --------- logical , intent ( in ) :: condition character ( * ), intent ( in ), optional :: msg integer , intent ( in ), optional :: code logical , intent ( in ), optional :: warn character ( * ), parameter :: msg_default = 'Check failed.' if (. not . condition ) then if ( optval ( warn , . false .)) then write ( stderr , * ) optval ( msg , msg_default ) else call error_stop ( optval ( msg , msg_default ), optval ( code , 1 )) end if end if end subroutine check","tags":"","loc":"proc/check.html"},{"title":"error_stop – Fortran-lang/stdlib","text":"interface public module subroutine error_stop(msg, code) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: msg integer, intent(in), optional :: code Description Provides a call to error stop and allows the user to specify a code and message\n( Specification )","tags":"","loc":"interface/error_stop.html"},{"title":"to_real – Fortran-lang/stdlib","text":"public interface to_real Get the constant value or uncertainty. Module Procedures private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp) private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp)","tags":"","loc":"interface/to_real.html"},{"title":"fibonacci_hash – Fortran-lang/stdlib","text":"public elemental function fibonacci_hash(key, nbits) result(sample) Maps the 64 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 64\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int64) Source Code elemental function fibonacci_hash ( key , nbits ) result ( sample ) !! Version: experimental !! !! Maps the 64 bit integer `key` to an unsigned integer value with only `nbits` !! bits where `nbits` is less than 64 !! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * pow64_over_phi , - 64 + nbits ) end function fibonacci_hash","tags":"","loc":"proc/fibonacci_hash.html"},{"title":"universal_mult_hash – Fortran-lang/stdlib","text":"public elemental function universal_mult_hash(key, seed, nbits) result(sample) Uses the \"random\" odd 64 bit integer seed to map the 64 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 64.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer(kind=int64), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int64) Source Code elemental function universal_mult_hash ( key , seed , nbits ) result ( sample ) !! Version: experimental !! !! Uses the \"random\" odd 64 bit integer `seed` to map the 64 bit integer `key` to !! an unsigned integer value with only `nbits` bits where `nbits` is less than 64. !! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * seed , - 64 + nbits ) end function universal_mult_hash","tags":"","loc":"proc/universal_mult_hash.html"},{"title":"odd_random_integer – Fortran-lang/stdlib","text":"public subroutine odd_random_integer(harvest) Returns a 64 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the 64 bit kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(out) :: harvest Source Code subroutine odd_random_integer ( harvest ) !! Version: experimental !! !! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over !! the odd integers of the 64 bit kind. !! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-odd-integer)) integer ( int64 ), intent ( out ) :: harvest real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , int32 ) harvest = transfer ( part , harvest ) harvest = ishft ( harvest , 1 ) + 1_int64 end subroutine odd_random_integer","tags":"","loc":"proc/odd_random_integer.html"},{"title":"fnv_1_hash – Fortran-lang/stdlib","text":"public interface fnv_1_hash FNV_1 interfaces\n( Specification ) Functions private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1_hash.html"},{"title":"fnv_1a_hash – Fortran-lang/stdlib","text":"public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) Functions private elemental module function character_fnv_1a(key) result(hash_code) FNV_1A hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1a_hash.html"},{"title":"new_pengy_hash_seed – Fortran-lang/stdlib","text":"interface public module subroutine new_pengy_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed Description Random seed generator for MIR_HASH_STRICT","tags":"","loc":"interface/new_pengy_hash_seed.html"},{"title":"new_spooky_hash_seed – Fortran-lang/stdlib","text":"interface public module subroutine new_spooky_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed (2) Description Random seed generator for SPOOKY_HASH","tags":"","loc":"interface/new_spooky_hash_seed.html"},{"title":"pengy_hash – Fortran-lang/stdlib","text":"public interface pengy_hash PENGY_HASH interfaces\n( Specification ) Functions private elemental module function character_pengy_hash(key, seed) result(hash_code) MIR HASH STRICT function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int16_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int32_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int64_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int8_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64)","tags":"","loc":"interface/pengy_hash.html"},{"title":"spookyHash_128 – Fortran-lang/stdlib","text":"interface public module subroutine spookyHash_128(key, hash_inout) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), target :: key (0:) integer(kind=int_hash), intent(inout) :: hash_inout (2)","tags":"","loc":"interface/spookyhash_128.html"},{"title":"spooky_hash – Fortran-lang/stdlib","text":"public interface spooky_hash SPOOKY_HASH interfaces\n( Specification ) Functions private module function character_spooky_hash(key, seed) result(hash_code) SPOOKY hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int16_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int32_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int64_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int8_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2)","tags":"","loc":"interface/spooky_hash.html"},{"title":"stdlib_cdotc – Fortran-lang/stdlib","text":"public pure function stdlib_cdotc(n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) Source Code pure complex ( sp ) function stdlib_cdotc ( n , cx , incx , cy , incy ) !! CDOTC forms the dot product of two complex vectors !! CDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotc = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( i )) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( ix )) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotc = ctemp return end function stdlib_cdotc","tags":"","loc":"proc/stdlib_cdotc.html"},{"title":"stdlib_cdotu – Fortran-lang/stdlib","text":"public pure function stdlib_cdotu(n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) Source Code pure complex ( sp ) function stdlib_cdotu ( n , cx , incx , cy , incy ) !! CDOTU forms the dot product of two complex vectors !! CDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotu = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + cx ( i ) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + cx ( ix ) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotu = ctemp return end function stdlib_cdotu","tags":"","loc":"proc/stdlib_cdotu.html"},{"title":"stdlib_caxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_caxpy(n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_caxpy ( n , ca , cx , incx , cy , incy ) !! CAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( inout ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_scabs1 ( ca ) == 0.0e+0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cy ( i ) + ca * cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cy ( iy ) + ca * cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_caxpy","tags":"","loc":"proc/stdlib_caxpy.html"},{"title":"stdlib_ccopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ccopy(n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_ccopy ( n , cx , incx , cy , incy ) !! CCOPY copies a vector x to a vector y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( out ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_ccopy","tags":"","loc":"proc/stdlib_ccopy.html"},{"title":"stdlib_cgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_cgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! CGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_cgbmv","tags":"","loc":"proc/stdlib_cgbmv.html"},{"title":"stdlib_cgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_cgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cgemm","tags":"","loc":"proc/stdlib_cgemm.html"},{"title":"stdlib_cgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_cgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! CGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_cgemv","tags":"","loc":"proc/stdlib_cgemv.html"},{"title":"stdlib_cgerc – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgerc(m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgerc","tags":"","loc":"proc/stdlib_cgerc.html"},{"title":"stdlib_cgeru – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cgeru(m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgeru","tags":"","loc":"proc/stdlib_cgeru.html"},{"title":"stdlib_chbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_chbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! CHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: conjg , max , min , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chbmv","tags":"","loc":"proc/stdlib_chbmv.html"},{"title":"stdlib_chemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_chemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = sp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_chemm","tags":"","loc":"proc/stdlib_chemm.html"},{"title":"stdlib_chemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_chemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! CHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chemv","tags":"","loc":"proc/stdlib_chemv.html"},{"title":"stdlib_cher – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cher(uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cher ( uplo , n , alpha , x , incx , a , lda ) !! CHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_cher","tags":"","loc":"proc/stdlib_cher.html"},{"title":"stdlib_cher2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cher2(uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_cher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! CHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_cher2","tags":"","loc":"proc/stdlib_cher2.html"},{"title":"stdlib_cher2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_cher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha real ( sp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_cher2k","tags":"","loc":"proc/stdlib_cher2k.html"},{"title":"stdlib_cherk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_cherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: cmplx , conjg , max , real ! Local Scalars complex ( sp ) :: temp real ( sp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( i , l ), KIND = sp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( j , l ), KIND = sp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cherk","tags":"","loc":"proc/stdlib_cherk.html"},{"title":"stdlib_chpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_chpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! CHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = sp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_chpmv","tags":"","loc":"proc/stdlib_chpmv.html"},{"title":"stdlib_chpr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chpr(uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_chpr ( uplo , n , alpha , x , incx , ap ) !! CHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr","tags":"","loc":"proc/stdlib_chpr.html"},{"title":"stdlib_chpr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_chpr2(uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_chpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! CHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr2","tags":"","loc":"proc/stdlib_chpr2.html"},{"title":"stdlib_crotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_crotg(a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s Source Code pure subroutine stdlib_crotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in SROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by SROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( out ) :: c complex ( sp ), intent ( inout ) :: a complex ( sp ), intent ( in ) :: b complex ( sp ), intent ( out ) :: s ! Local Scalars real ( sp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( sp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( sp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = sp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = sp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_crotg","tags":"","loc":"proc/stdlib_crotg.html"},{"title":"stdlib_cscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cscal(n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_cscal ( n , ca , cx , incx ) !! CSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = ca * cx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = ca * cx ( i ) end do end if return end subroutine stdlib_cscal","tags":"","loc":"proc/stdlib_cscal.html"},{"title":"stdlib_csrot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csrot(n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s Source Code pure subroutine stdlib_csrot ( n , cx , incx , cy , incy , c , s ) !! CSROT applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: c , s ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( sp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * cx ( i ) + s * cy ( i ) cy ( i ) = c * cy ( i ) - s * cx ( i ) cx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * cx ( ix ) + s * cy ( iy ) cy ( iy ) = c * cy ( iy ) - s * cx ( ix ) cx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_csrot","tags":"","loc":"proc/stdlib_csrot.html"},{"title":"stdlib_csscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csscal(n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_csscal ( n , sa , cx , incx ) !! CSSCAL scales a complex vector by a real constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: aimag , cmplx , real if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do end if return end subroutine stdlib_csscal","tags":"","loc":"proc/stdlib_csscal.html"},{"title":"stdlib_cswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_cswap(n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_cswap ( n , cx , incx , cy , incy ) !! CSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = cx ( i ) cx ( i ) = cy ( i ) cy ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = cx ( ix ) cx ( ix ) = cy ( iy ) cy ( iy ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_cswap","tags":"","loc":"proc/stdlib_cswap.html"},{"title":"stdlib_csymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_csymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_csymm","tags":"","loc":"proc/stdlib_csymm.html"},{"title":"stdlib_csyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_csyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_csyr2k","tags":"","loc":"proc/stdlib_csyr2k.html"},{"title":"stdlib_csyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_csyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_csyrk","tags":"","loc":"proc/stdlib_csyrk.html"},{"title":"stdlib_ctbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctbmv(uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctbmv","tags":"","loc":"proc/stdlib_ctbmv.html"},{"title":"stdlib_ctbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctbsv(uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ctbsv","tags":"","loc":"proc/stdlib_ctbsv.html"},{"title":"stdlib_ctpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctpmv(uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctpmv ( uplo , trans , diag , n , ap , x , incx ) !! CTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpmv","tags":"","loc":"proc/stdlib_ctpmv.html"},{"title":"stdlib_ctpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctpsv(uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctpsv ( uplo , trans , diag , n , ap , x , incx ) !! CTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpsv","tags":"","loc":"proc/stdlib_ctpsv.html"},{"title":"stdlib_ctrmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ctrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ctrmm","tags":"","loc":"proc/stdlib_ctrmm.html"},{"title":"stdlib_ctrmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrmv(uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctrmv","tags":"","loc":"proc/stdlib_ctrmv.html"},{"title":"stdlib_ctrsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ctrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ctrsm","tags":"","loc":"proc/stdlib_ctrsm.html"},{"title":"stdlib_ctrsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ctrsv(uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ctrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ctrsv","tags":"","loc":"proc/stdlib_ctrsv.html"},{"title":"fibonacci_hash – Fortran-lang/stdlib","text":"public elemental function fibonacci_hash(key, nbits) result(sample) Maps the 32 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int32) Source Code elemental function fibonacci_hash ( key , nbits ) result ( sample ) !! Version: experimental !! !! Maps the 32 bit integer `key` to an unsigned integer value with only `nbits` !! bits where `nbits` is less than 32 !! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits)) integer ( int32 ), intent ( in ) :: key integer , intent ( in ) :: nbits integer ( int32 ) :: sample sample = ishft ( key * pow32_over_phi , - 32 + nbits ) end function fibonacci_hash","tags":"","loc":"proc/fibonacci_hash~2.html"},{"title":"universal_mult_hash – Fortran-lang/stdlib","text":"public elemental function universal_mult_hash(key, seed, nbits) result(sample) Uses the \"random\" odd 32 bit integer seed to map the 32 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer(kind=int32), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int32) Source Code elemental function universal_mult_hash ( key , seed , nbits ) result ( sample ) !! Version: experimental !! !! Uses the \"random\" odd 32 bit integer `seed` to map the 32 bit integer `key` to !! an unsigned integer value with only `nbits` bits where `nbits` is less than 32 !! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits)) integer ( int32 ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer , intent ( in ) :: nbits integer ( int32 ) :: sample sample = ishft ( key * seed , - 32 + nbits ) end function universal_mult_hash","tags":"","loc":"proc/universal_mult_hash~2.html"},{"title":"odd_random_integer – Fortran-lang/stdlib","text":"public subroutine odd_random_integer(harvest) Returns a 32 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the int32 kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(out) :: harvest Source Code subroutine odd_random_integer ( harvest ) !! Version: experimental !! !! Returns a 32 bit pseudo random integer, `harvest`, distributed uniformly over !! the odd integers of the `int32` kind. !! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-an-odd-integer)) integer ( int32 ), intent ( out ) :: harvest real ( dp ) :: sample call random_number ( sample ) harvest = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) harvest = ishft ( harvest , 1 ) + 1_int32 end subroutine odd_random_integer","tags":"","loc":"proc/odd_random_integer~2.html"},{"title":"fnv_1_hash – Fortran-lang/stdlib","text":"public interface fnv_1_hash FNV_1 interfaces\n( Specification ) Functions private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1_hash~2.html"},{"title":"fnv_1a_hash – Fortran-lang/stdlib","text":"public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) Functions private elemental module function character_fnv_1a(key) result(hash_value) FNV_1A hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash)","tags":"","loc":"interface/fnv_1a_hash~2.html"},{"title":"new_nmhash32_seed – Fortran-lang/stdlib","text":"public interface new_nmhash32_seed ( Specification Subroutines private module subroutine new_nmhash32_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed","tags":"","loc":"interface/new_nmhash32_seed.html"},{"title":"new_nmhash32x_seed – Fortran-lang/stdlib","text":"public interface new_nmhash32x_seed ( Specification ) Subroutines private module subroutine new_nmhash32x_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed","tags":"","loc":"interface/new_nmhash32x_seed.html"},{"title":"new_water_hash_seed – Fortran-lang/stdlib","text":"public interface new_water_hash_seed ( Specification ) Subroutines private module subroutine new_water_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed","tags":"","loc":"interface/new_water_hash_seed.html"},{"title":"nmhash32 – Fortran-lang/stdlib","text":"public interface nmhash32 NMHASH32 interfaces\n( Specification ) Functions private elemental module function character_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32)","tags":"","loc":"interface/nmhash32.html"},{"title":"nmhash32x – Fortran-lang/stdlib","text":"public interface nmhash32x NMHASH32X interfaces\n( Specification ) Functions private elemental module function character_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32)","tags":"","loc":"interface/nmhash32x.html"},{"title":"water_hash – Fortran-lang/stdlib","text":"public interface water_hash WATER_HASH interfaces\n( Specification ) Functions private elemental module function character_water_hash(key, seed) result(hash_code) WATER hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int16_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int32_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int64_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int8_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash)","tags":"","loc":"interface/water_hash.html"},{"title":"dlegendre – Fortran-lang/stdlib","text":"public interface dlegendre First derivative Legendre polynomial Functions private pure elemental module function dlegendre_fp64(n, x) result(dleg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/dlegendre.html"},{"title":"legendre – Fortran-lang/stdlib","text":"public interface legendre Legendre polynomial Functions private pure elemental module function legendre_fp64(n, x) result(leg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/legendre.html"},{"title":"operator(+) – Fortran-lang/stdlib","text":"public interface operator(+) Functions private pure module function add(lval, rval) result(code) Add two escape sequences, attributes in the right value override the left value ones. Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: lval First escape code type( ansi_code ), intent(in) :: rval Second escape code Return Value type( ansi_code ) Combined escape code","tags":"","loc":"interface/operator(+).html"},{"title":"operator(//) – Fortran-lang/stdlib","text":"public interface operator(//) Functions private pure module function concat_left(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value character(len=:), allocatable Concatenated string private pure module function concat_left_str(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value type( string_type ) Concatenated string private pure module function concat_right(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence character(len=*), intent(in) :: rval String to add the escape code to Return Value character(len=:), allocatable Concatenated string private pure module function concat_right_str(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence type( string_type ), intent(in) :: rval String to add the escape code to Return Value type( string_type ) Concatenated string","tags":"","loc":"interface/operator(SLASHSLASH)~3.html"},{"title":"to_string – Fortran-lang/stdlib","text":"public interface to_string Functions private pure module function to_string_ansi_code(code) result(str) Transform a color code into an actual ANSI escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Color code to be used Return Value character(len=:), allocatable ANSI escape sequence representing the color code","tags":"","loc":"interface/to_string.html"},{"title":"is_alpha – Fortran-lang/stdlib","text":"public pure function is_alpha(c) Checks whether c is an ASCII letter (A .. Z, a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_alpha.html"},{"title":"is_alphanum – Fortran-lang/stdlib","text":"public pure function is_alphanum(c) Checks whether c is a letter or a number (0 .. 9, a .. z, A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_alphanum.html"},{"title":"is_ascii – Fortran-lang/stdlib","text":"public pure function is_ascii(c) Checks whether or not c is in the ASCII character set -\ni.e. in the range 0 .. 0x7F. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_ascii.html"},{"title":"is_blank – Fortran-lang/stdlib","text":"public pure function is_blank(c) Checks whether or not c is a blank character. That includes the\nonly the space and tab characters Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_blank.html"},{"title":"is_control – Fortran-lang/stdlib","text":"public pure function is_control(c) Checks whether c is a control character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_control.html"},{"title":"is_digit – Fortran-lang/stdlib","text":"public pure function is_digit(c) Checks whether c is a digit (0 .. 9). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_digit.html"},{"title":"is_graphical – Fortran-lang/stdlib","text":"public pure function is_graphical(c) Checks whether or not c is a printable character other than the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_graphical.html"},{"title":"is_hex_digit – Fortran-lang/stdlib","text":"public pure function is_hex_digit(c) Checks whether c is a digit in base 16 (0 .. 9, A .. F, a .. f). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_hex_digit.html"},{"title":"is_lower – Fortran-lang/stdlib","text":"public pure function is_lower(c) Checks whether c is a lowercase ASCII letter (a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_lower.html"},{"title":"is_octal_digit – Fortran-lang/stdlib","text":"public pure function is_octal_digit(c) Checks whether c is a digit in base 8 (0 .. 7). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_octal_digit.html"},{"title":"is_printable – Fortran-lang/stdlib","text":"public pure function is_printable(c) Checks whether or not c is a printable character - including the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_printable.html"},{"title":"is_punctuation – Fortran-lang/stdlib","text":"public pure function is_punctuation(c) Checks whether or not c is a punctuation character. That includes\nall ASCII characters which are not control characters, letters,\ndigits, or whitespace. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_punctuation.html"},{"title":"is_upper – Fortran-lang/stdlib","text":"public pure function is_upper(c) Checks whether c is an uppercase ASCII letter (A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_upper.html"},{"title":"is_white – Fortran-lang/stdlib","text":"public pure function is_white(c) Checks whether or not c is a whitespace character. That includes the\nspace, tab, vertical tab, form feed, carriage return, and linefeed\ncharacters. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical","tags":"","loc":"proc/is_white.html"},{"title":"reverse – Fortran-lang/stdlib","text":"public pure function reverse(string) result(reverse_string) Reverse the character order in the input character variable\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function reverse ( string ) result ( reverse_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: reverse_string integer :: i , n n = len ( string ) do i = 1 , n reverse_string ( n - i + 1 : n - i + 1 ) = string ( i : i ) end do end function reverse","tags":"","loc":"proc/reverse.html"},{"title":"to_lower – Fortran-lang/stdlib","text":"public pure function to_lower(string) result(lower_string) Convert character variable to lower case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_lower ( string ) result ( lower_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: lower_string integer :: i do i = 1 , len ( string ) lower_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_lower","tags":"","loc":"proc/to_lower.html"},{"title":"to_sentence – Fortran-lang/stdlib","text":"public pure function to_sentence(string) result(sentence_string) Converts character sequence to sentence case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_sentence ( string ) result ( sentence_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: sentence_string integer :: i , n n = len ( string ) do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then sentence_string ( i : i ) = char_to_upper ( string ( i : i )) n = i exit else sentence_string ( i : i ) = string ( i : i ) end if end do do i = n + 1 , len ( string ) sentence_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_sentence","tags":"","loc":"proc/to_sentence.html"},{"title":"to_title – Fortran-lang/stdlib","text":"public pure function to_title(string) result(title_string) Converts character sequence to title case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_title ( string ) result ( title_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: title_string integer :: i logical :: capitalize_switch capitalize_switch = . true . do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then if ( capitalize_switch ) then title_string ( i : i ) = char_to_upper ( string ( i : i )) capitalize_switch = . false . else title_string ( i : i ) = char_to_lower ( string ( i : i )) end if else title_string ( i : i ) = string ( i : i ) capitalize_switch = . true . end if end do end function to_title","tags":"","loc":"proc/to_title.html"},{"title":"to_upper – Fortran-lang/stdlib","text":"public pure function to_upper(string) result(upper_string) Convert character variable to upper case\n( Specification ) Version: experimental Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) Source Code pure function to_upper ( string ) result ( upper_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: upper_string integer :: i do i = 1 , len ( string ) upper_string ( i : i ) = char_to_upper ( string ( i : i )) end do end function to_upper","tags":"","loc":"proc/to_upper.html"},{"title":"gauss_legendre – Fortran-lang/stdlib","text":"public interface gauss_legendre Computes Gauss-Legendre quadrature nodes and weights. Subroutines private pure module subroutine gauss_legendre_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2)","tags":"","loc":"interface/gauss_legendre.html"},{"title":"gauss_legendre_lobatto – Fortran-lang/stdlib","text":"public interface gauss_legendre_lobatto Computes Gauss-Legendre-Lobatto quadrature nodes and weights. Subroutines private pure module subroutine gauss_legendre_lobatto_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2)","tags":"","loc":"interface/gauss_legendre_lobatto.html"},{"title":"simps – Fortran-lang/stdlib","text":"public interface simps Integrates sampled values using Simpson's rule\n( Specification ) Functions private pure recursive module function simps_dx_dp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=dp) private pure recursive module function simps_dx_sp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=sp) private recursive module function simps_x_dp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp) private recursive module function simps_x_sp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp)","tags":"","loc":"interface/simps.html"},{"title":"simps_weights – Fortran-lang/stdlib","text":"public interface simps_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) Functions private pure recursive module function simps_weights_dp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp), dimension(size(x)) private pure recursive module function simps_weights_sp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp), dimension(size(x))","tags":"","loc":"interface/simps_weights.html"},{"title":"trapz – Fortran-lang/stdlib","text":"public interface trapz Integrates sampled values using trapezoidal rule\n( Specification ) Functions private pure module function trapz_dx_dp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx Return Value real(kind=dp) private pure module function trapz_dx_sp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx Return Value real(kind=sp) private module function trapz_x_dp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp) private module function trapz_x_sp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp)","tags":"","loc":"interface/trapz.html"},{"title":"trapz_weights – Fortran-lang/stdlib","text":"public interface trapz_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) Functions private pure module function trapz_weights_dp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp), dimension(size(x)) private pure module function trapz_weights_sp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp), dimension(size(x))","tags":"","loc":"interface/trapz_weights.html"},{"title":"gamma – Fortran-lang/stdlib","text":"public interface gamma Gamma function for integer and complex numbers Module Procedures private impure elemental function gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value integer(kind=int8) private impure elemental function gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value integer(kind=int16) private impure elemental function gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value integer(kind=int32) private impure elemental function gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value integer(kind=int64) private impure elemental function gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp)","tags":"","loc":"interface/gamma.html"},{"title":"log_factorial – Fortran-lang/stdlib","text":"public interface log_factorial Logarithm of factorial n!, integer variable Module Procedures private impure elemental function l_factorial_iint8(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value real private impure elemental function l_factorial_iint16(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value real private impure elemental function l_factorial_iint32(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value real private impure elemental function l_factorial_iint64(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value real","tags":"","loc":"interface/log_factorial.html"},{"title":"log_gamma – Fortran-lang/stdlib","text":"public interface log_gamma Logarithm of gamma function Module Procedures private impure elemental function l_gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value real private impure elemental function l_gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value real private impure elemental function l_gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value real private impure elemental function l_gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value real private impure elemental function l_gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function l_gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp)","tags":"","loc":"interface/log_gamma.html"},{"title":"log_lower_incomplete_gamma – Fortran-lang/stdlib","text":"public interface log_lower_incomplete_gamma Logarithm of lower incomplete gamma function Module Procedures private impure elemental function l_ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/log_lower_incomplete_gamma.html"},{"title":"log_upper_incomplete_gamma – Fortran-lang/stdlib","text":"public interface log_upper_incomplete_gamma Logarithm of upper incomplete gamma function Module Procedures private impure elemental function l_ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/log_upper_incomplete_gamma.html"},{"title":"lower_incomplete_gamma – Fortran-lang/stdlib","text":"public interface lower_incomplete_gamma Lower incomplete gamma function Module Procedures private impure elemental function ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/lower_incomplete_gamma.html"},{"title":"regularized_gamma_p – Fortran-lang/stdlib","text":"public interface regularized_gamma_p Regularized (normalized) lower incomplete gamma function, P Module Procedures private impure elemental function regamma_p_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/regularized_gamma_p.html"},{"title":"regularized_gamma_q – Fortran-lang/stdlib","text":"public interface regularized_gamma_q Regularized (normalized) upper incomplete gamma function, Q Module Procedures private impure elemental function regamma_q_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/regularized_gamma_q.html"},{"title":"upper_incomplete_gamma – Fortran-lang/stdlib","text":"public interface upper_incomplete_gamma Upper incomplete gamma function Module Procedures private impure elemental function ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"interface/upper_incomplete_gamma.html"},{"title":"optval – Fortran-lang/stdlib","text":"public interface optval Fallback value for optional arguments\n( Specification ) Module Procedures private pure elemental function optval_rsp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), optional :: x real(kind=sp), intent(in) :: default Return Value real(kind=sp) private pure elemental function optval_rdp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), optional :: x real(kind=dp), intent(in) :: default Return Value real(kind=dp) private pure elemental function optval_iint8(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), optional :: x integer(kind=int8), intent(in) :: default Return Value integer(kind=int8) private pure elemental function optval_iint16(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in), optional :: x integer(kind=int16), intent(in) :: default Return Value integer(kind=int16) private pure elemental function optval_iint32(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in), optional :: x integer(kind=int32), intent(in) :: default Return Value integer(kind=int32) private pure elemental function optval_iint64(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in), optional :: x integer(kind=int64), intent(in) :: default Return Value integer(kind=int64) private pure elemental function optval_csp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), optional :: x complex(kind=sp), intent(in) :: default Return Value complex(kind=sp) private pure elemental function optval_cdp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), optional :: x complex(kind=dp), intent(in) :: default Return Value complex(kind=dp) private pure elemental function optval_ll1(x, default) result(y) Arguments Type Intent Optional Attributes Name logical, intent(in), optional :: x logical, intent(in) :: default Return Value logical private pure function optval_character(x, default) result(y) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: x character(len=*), intent(in) :: default Return Value character(len=:), allocatable","tags":"","loc":"interface/optval.html"},{"title":"linalg_error_handling – Fortran-lang/stdlib","text":"public pure subroutine linalg_error_handling(ierr, ierr_out) Flow control: on output flag present, return it; otherwise, halt on error Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: ierr type( linalg_state_type ), intent(out), optional :: ierr_out Source Code pure subroutine linalg_error_handling ( ierr , ierr_out ) type ( linalg_state_type ), intent ( in ) :: ierr type ( linalg_state_type ), optional , intent ( out ) :: ierr_out character ( len = :), allocatable :: err_msg if ( present ( ierr_out )) then ! Return error flag ierr_out = ierr elseif ( ierr % error ()) then err_msg = ierr % print () error stop err_msg end if end subroutine linalg_error_handling","tags":"","loc":"proc/linalg_error_handling.html"},{"title":"linalg_state_type – Fortran-lang/stdlib","text":"public interface linalg_state_type Module Procedures private pure function new_state(where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: where_at Location integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) private pure function new_state_nowhere(flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) result(new_state) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type )","tags":"","loc":"interface/linalg_state_type.html"},{"title":"operator(/=) – Fortran-lang/stdlib","text":"public interface operator(/=) Module Procedures private elemental function state_neq_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_neq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(SLASH=)~4.html"},{"title":"operator(<) – Fortran-lang/stdlib","text":"public interface operator(<) Module Procedures private elemental function state_lt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_lt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(lt)~3.html"},{"title":"operator(<=) – Fortran-lang/stdlib","text":"public interface operator(<=) Module Procedures private elemental function state_le_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_le_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(lt=)~3.html"},{"title":"operator(==) – Fortran-lang/stdlib","text":"public interface operator(==) Comparison operators Module Procedures private elemental function state_eq_flag(err, flag) Compare an error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_eq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(==)~5.html"},{"title":"operator(>) – Fortran-lang/stdlib","text":"public interface operator(>) Module Procedures private elemental function state_gt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_gt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(gt)~3.html"},{"title":"operator(>=) – Fortran-lang/stdlib","text":"public interface operator(>=) Module Procedures private elemental function state_ge_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_ge_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk)","tags":"","loc":"interface/operator(gt=)~3.html"},{"title":"falseloc – Fortran-lang/stdlib","text":"public pure function falseloc(array, lbound) result(loc) Return the positions of the false elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(.not.array)) Locations of false elements Source Code pure function falseloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of false elements integer :: loc ( count (. not . array )) call logicalloc ( loc , array , . false ., lbound ) end function falseloc","tags":"","loc":"proc/falseloc.html"},{"title":"trueloc – Fortran-lang/stdlib","text":"public pure function trueloc(array, lbound) result(loc) Return the positions of the true elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(array)) Locations of true elements Source Code pure function trueloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of true elements integer :: loc ( count ( array )) call logicalloc ( loc , array , . true ., lbound ) end function trueloc","tags":"","loc":"proc/trueloc.html"},{"title":"chomp – Fortran-lang/stdlib","text":"public interface chomp Remove trailing characters in set from string.\nIf no character set is provided trailing whitespace is removed. Version: experimental Module Procedures private pure function chomp_string(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function chomp_char(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable private pure function chomp_set_string_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value type( string_type ) private pure function chomp_set_char_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value character(len=:), allocatable private pure function chomp_substring_string_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value character(len=:), allocatable private pure function chomp_substring_string_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value character(len=:), allocatable","tags":"","loc":"interface/chomp.html"},{"title":"count – Fortran-lang/stdlib","text":"public interface count Returns the number of times substring 'pattern' has appeared in the\ninput string 'string' Specifications Module Procedures private elemental function count_string_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_string_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer","tags":"","loc":"interface/count.html"},{"title":"ends_with – Fortran-lang/stdlib","text":"public interface ends_with Check whether a string ends with substring or not Version: experimental Module Procedures private elemental function ends_with_string_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function ends_with_string_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function ends_with_char_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function ends_with_char_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical","tags":"","loc":"interface/ends_with.html"},{"title":"find – Fortran-lang/stdlib","text":"public interface find Finds the starting index of substring 'pattern' in the input 'string' Specifications Version: experimental Module Procedures private elemental function find_string_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_string_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer","tags":"","loc":"interface/find.html"},{"title":"padl – Fortran-lang/stdlib","text":"public interface padl Left pad the input string Specifications Module Procedures private pure function padl_string_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padl_string_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padl_char_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padl_char_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max)","tags":"","loc":"interface/padl.html"},{"title":"padr – Fortran-lang/stdlib","text":"public interface padr Right pad the input string Specifications Module Procedures private pure function padr_string_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padr_string_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padr_char_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padr_char_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max)","tags":"","loc":"interface/padr.html"},{"title":"replace_all – Fortran-lang/stdlib","text":"public interface replace_all Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nVersion: experimental Module Procedures private pure function replace_all_string_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_string_char_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_char(string, pattern, replacement) result(res) Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable","tags":"","loc":"interface/replace_all.html"},{"title":"slice – Fortran-lang/stdlib","text":"public interface slice Extracts characters from the input string to return a new string Version: experimental Module Procedures private elemental function slice_string(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value type( string_type ) private pure function slice_char(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value character(len=:), allocatable","tags":"","loc":"interface/slice.html"},{"title":"starts_with – Fortran-lang/stdlib","text":"public interface starts_with Check whether a string starts with substring or not Version: experimental Module Procedures private elemental function starts_with_string_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function starts_with_string_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function starts_with_char_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function starts_with_char_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical","tags":"","loc":"interface/starts_with.html"},{"title":"strip – Fortran-lang/stdlib","text":"public interface strip Remove leading and trailing whitespace characters. Version: experimental Module Procedures private pure function strip_string(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function strip_char(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable","tags":"","loc":"interface/strip.html"},{"title":"to_string – Fortran-lang/stdlib","text":"public interface to_string Format or transfer other types as a string.\n( Specification ) Functions private pure module function to_string_1_i_int16(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int32(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int64(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int8(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_l_lk(value) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value Return Value character(len=1) private pure module function to_string_2_i_int16(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int32(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int64(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int8(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_l_lk(value, format) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_c_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_c_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable","tags":"","loc":"interface/to_string~2.html"},{"title":"zfill – Fortran-lang/stdlib","text":"public interface zfill Left pad the input string with zeros. Specifications Module Procedures private pure function zfill_string(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function zfill_char(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max)","tags":"","loc":"interface/zfill.html"},{"title":"stdlib_dasum – Fortran-lang/stdlib","text":"public pure function stdlib_dasum(n, dx, incx) DASUM takes the sum of the absolute values. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dasum ( n , dx , incx ) !! DASUM takes the sum of the absolute values. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_dasum = zero dtemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + abs ( dx ( i )) end do if ( n < 6 ) then stdlib_dasum = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 dtemp = dtemp + abs ( dx ( i )) + abs ( dx ( i + 1 )) + abs ( dx ( i + 2 )) + abs ( dx ( i + 3 )) + abs ( dx ( i + & 4 )) + abs ( dx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dtemp = dtemp + abs ( dx ( i )) end do end if stdlib_dasum = dtemp return end function stdlib_dasum","tags":"","loc":"proc/stdlib_dasum.html"},{"title":"stdlib_ddot – Fortran-lang/stdlib","text":"public pure function stdlib_ddot(n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_ddot ( n , dx , incx , dy , incy ) !! DDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stdlib_ddot = zero dtemp = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + dx ( i ) * dy ( i ) end do if ( n < 5 ) then stdlib_ddot = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 dtemp = dtemp + dx ( i ) * dy ( i ) + dx ( i + 1 ) * dy ( i + 1 ) + dx ( i + 2 ) * dy ( i + 2 ) + dx ( i + 3 ) * dy ( i + 3 ) + & dx ( i + 4 ) * dy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dtemp + dx ( ix ) * dy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_ddot = dtemp return end function stdlib_ddot","tags":"","loc":"proc/stdlib_ddot.html"},{"title":"stdlib_dnrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_dnrm2(n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure function stdlib_dnrm2 ( n , x , incx ) !! DNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DNRM2 := sqrt( x'*x ) real ( dp ) :: stdlib_dnrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dnrm2 = scl * sqrt ( sumsq ) return end function stdlib_dnrm2","tags":"","loc":"proc/stdlib_dnrm2.html"},{"title":"stdlib_dsdot – Fortran-lang/stdlib","text":"public pure function stdlib_dsdot(n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dsdot ( n , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! authors: ! ======== ! lawson, c. l., (jpl), hanson, r. j., (snla), ! kincaid, d. r., (u. of texas), krogh, f. t., (jpl) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real stdlib_dsdot = zero if ( n <= 0 ) return if ( incx == incy . and . incx > 0 ) then ! code for equal, positive, non-unit increments. ns = n * incx do i = 1 , ns , incx stdlib_dsdot = stdlib_dsdot + real ( sx ( i ), KIND = dp ) * real ( sy ( i ), KIND = dp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n stdlib_dsdot = stdlib_dsdot + real ( sx ( kx ), KIND = dp ) * real ( sy ( ky ), KIND = dp ) kx = kx + incx ky = ky + incy end do end if return end function stdlib_dsdot","tags":"","loc":"proc/stdlib_dsdot.html"},{"title":"stdlib_dzasum – Fortran-lang/stdlib","text":"public pure function stdlib_dzasum(n, zx, incx) DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a double precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure real ( dp ) function stdlib_dzasum ( n , zx , incx ) !! DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a double precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: stemp integer ( ilp ) :: i , nincx stdlib_dzasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do end if stdlib_dzasum = stemp return end function stdlib_dzasum","tags":"","loc":"proc/stdlib_dzasum.html"},{"title":"stdlib_dznrm2 – Fortran-lang/stdlib","text":"public pure function stdlib_dznrm2(n, x, incx) DZNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDZNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Source Code pure function stdlib_dznrm2 ( n , x , incx ) !! DZNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DZNRM2 := sqrt( x**H*x ) real ( dp ) :: stdlib_dznrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dznrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = dp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dznrm2 = scl * sqrt ( sumsq ) return end function stdlib_dznrm2","tags":"","loc":"proc/stdlib_dznrm2.html"},{"title":"stdlib_daxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_daxpy(n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_daxpy ( n , da , dx , incx , dy , incy ) !! DAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( inout ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( da == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dy ( i ) + da * dx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 dy ( i ) = dy ( i ) + da * dx ( i ) dy ( i + 1 ) = dy ( i + 1 ) + da * dx ( i + 1 ) dy ( i + 2 ) = dy ( i + 2 ) + da * dx ( i + 2 ) dy ( i + 3 ) = dy ( i + 3 ) + da * dx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dy ( iy ) + da * dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_daxpy","tags":"","loc":"proc/stdlib_daxpy.html"},{"title":"stdlib_dcopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dcopy(n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dcopy ( n , dx , incx , dy , incy ) !! DCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( out ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 dy ( i ) = dx ( i ) dy ( i + 1 ) = dx ( i + 1 ) dy ( i + 2 ) = dx ( i + 2 ) dy ( i + 3 ) = dx ( i + 3 ) dy ( i + 4 ) = dx ( i + 4 ) dy ( i + 5 ) = dx ( i + 5 ) dy ( i + 6 ) = dx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dcopy","tags":"","loc":"proc/stdlib_dcopy.html"},{"title":"stdlib_dgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! DGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_dgbmv","tags":"","loc":"proc/stdlib_dgbmv.html"},{"title":"stdlib_dgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dgemm","tags":"","loc":"proc/stdlib_dgemm.html"},{"title":"stdlib_dgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! DGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_dgemv","tags":"","loc":"proc/stdlib_dgemv.html"},{"title":"stdlib_dger – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dger(m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_dger ( m , n , alpha , x , incx , y , incy , a , lda ) !! DGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_dger","tags":"","loc":"proc/stdlib_dger.html"},{"title":"stdlib_drot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drot(n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s Source Code pure subroutine stdlib_drot ( n , dx , incx , dy , incy , c , s ) !! DROT applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n dtemp = c * dx ( i ) + s * dy ( i ) dy ( i ) = c * dy ( i ) - s * dx ( i ) dx ( i ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = c * dx ( ix ) + s * dy ( iy ) dy ( iy ) = c * dy ( iy ) - s * dx ( ix ) dx ( ix ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_drot","tags":"","loc":"proc/stdlib_drot.html"},{"title":"stdlib_drotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drotg(a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s Source Code pure subroutine stdlib_drotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( inout ) :: a , b real ( dp ), intent ( out ) :: c , s ! Local Scalars real ( dp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_drotg","tags":"","loc":"proc/stdlib_drotg.html"},{"title":"stdlib_drotm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drotm(n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) Source Code pure subroutine stdlib_drotm ( n , dx , incx , dy , incy , dparam ) !! DROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See DROTMG for a description of data storage in DPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dparam ( 5 ) real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_dp two = 2.0_dp dflag = dparam ( 1 ) if ( n <= 0 . or . ( dflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z * dh12 dy ( i ) = w * dh21 + z * dh22 end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w + z * dh12 dy ( i ) = w * dh21 + z end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z dy ( i ) = - w + dh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z * dh12 dy ( ky ) = w * dh21 + z * dh22 kx = kx + incx ky = ky + incy end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w + z * dh12 dy ( ky ) = w * dh21 + z kx = kx + incx ky = ky + incy end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z dy ( ky ) = - w + dh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_drotm","tags":"","loc":"proc/stdlib_drotm.html"},{"title":"stdlib_drotmg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_drotmg(dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) Source Code pure subroutine stdlib_drotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) !! DROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( dp ), intent ( in ) :: dy1 ! Array Arguments real ( dp ), intent ( out ) :: dparam ( 5 ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , dp1 , dp2 , dq1 , dq2 , dtemp , du , gam , gamsq , & one , rgamsq , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_dp one = 1.0_dp two = 2.0_dp gam = 409 6.0_dp gamsq = 1677721 6.0_dp rgamsq = 5.9604645e-8_dp if ( dd1 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else ! case-dd1-nonnegative dp2 = dd2 * dy1 if ( dp2 == zero ) then dflag = - two dparam ( 1 ) = dflag return end if ! regular-case.. dp1 = dd1 * dx1 dq2 = dp2 * dy1 dq1 = dp1 * dx1 if ( abs ( dq1 ) > abs ( dq2 )) then dh21 = - dy1 / dx1 dh12 = dp2 / dp1 du = one - dh12 * dh21 if ( du > zero ) then dflag = zero dd1 = dd1 / du dd2 = dd2 / du dx1 = dx1 * du else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero end if else if ( dq2 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else dflag = one dh11 = dp1 / dp2 dh22 = dx1 / dy1 du = one + dh11 * dh22 dtemp = dd2 / du dd2 = dd1 / du dd1 = dtemp dx1 = dy1 * du end if end if ! procedure..scale-check if ( dd1 /= zero ) then do while (( dd1 <= rgamsq ) . or . ( dd1 >= gamsq )) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( dd1 <= rgamsq ) then dd1 = dd1 * gam ** 2 dx1 = dx1 / gam dh11 = dh11 / gam dh12 = dh12 / gam else dd1 = dd1 / gam ** 2 dx1 = dx1 * gam dh11 = dh11 * gam dh12 = dh12 * gam end if enddo end if if ( dd2 /= zero ) then do while ( ( abs ( dd2 ) <= rgamsq ) . or . ( abs ( dd2 ) >= gamsq ) ) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( abs ( dd2 ) <= rgamsq ) then dd2 = dd2 * gam ** 2 dh21 = dh21 / gam dh22 = dh22 / gam else dd2 = dd2 / gam ** 2 dh21 = dh21 * gam dh22 = dh22 * gam end if end do end if end if if ( dflag < zero ) then dparam ( 2 ) = dh11 dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 dparam ( 5 ) = dh22 else if ( dflag == zero ) then dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 else dparam ( 2 ) = dh11 dparam ( 5 ) = dh22 end if dparam ( 1 ) = dflag return end subroutine stdlib_drotmg","tags":"","loc":"proc/stdlib_drotmg.html"},{"title":"stdlib_dsbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! DSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsbmv","tags":"","loc":"proc/stdlib_dsbmv.html"},{"title":"stdlib_dscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dscal(n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dscal ( n , da , dx , incx ) !! DSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dx ( i ) = da * dx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 dx ( i ) = da * dx ( i ) dx ( i + 1 ) = da * dx ( i + 1 ) dx ( i + 2 ) = da * dx ( i + 2 ) dx ( i + 3 ) = da * dx ( i + 3 ) dx ( i + 4 ) = da * dx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dx ( i ) = da * dx ( i ) end do end if return end subroutine stdlib_dscal","tags":"","loc":"proc/stdlib_dscal.html"},{"title":"stdlib_dspmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! DSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_dspmv","tags":"","loc":"proc/stdlib_dspmv.html"},{"title":"stdlib_dspr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dspr(uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_dspr ( uplo , n , alpha , x , incx , ap ) !! DSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr","tags":"","loc":"proc/stdlib_dspr.html"},{"title":"stdlib_dspr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dspr2(uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_dspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! DSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr2","tags":"","loc":"proc/stdlib_dspr2.html"},{"title":"stdlib_dswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dswap(n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dswap ( n , dx , incx , dy , incy ) !! DSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp dtemp = dx ( i + 1 ) dx ( i + 1 ) = dy ( i + 1 ) dy ( i + 1 ) = dtemp dtemp = dx ( i + 2 ) dx ( i + 2 ) = dy ( i + 2 ) dy ( i + 2 ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dx ( ix ) dx ( ix ) = dy ( iy ) dy ( iy ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dswap","tags":"","loc":"proc/stdlib_dswap.html"},{"title":"stdlib_dsymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_dsymm","tags":"","loc":"proc/stdlib_dsymm.html"},{"title":"stdlib_dsymv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_dsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! DSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsymv","tags":"","loc":"proc/stdlib_dsymv.html"},{"title":"stdlib_dsyr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyr(uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_dsyr ( uplo , n , alpha , x , incx , a , lda ) !! DSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_dsyr","tags":"","loc":"proc/stdlib_dsyr.html"},{"title":"stdlib_dsyr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_dsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! DSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsyr2","tags":"","loc":"proc/stdlib_dsyr2.html"},{"title":"stdlib_dsyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_dsyr2k","tags":"","loc":"proc/stdlib_dsyr2k.html"},{"title":"stdlib_dsyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_dsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! DSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dsyrk","tags":"","loc":"proc/stdlib_dsyrk.html"},{"title":"stdlib_dtbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtbmv(uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtbmv","tags":"","loc":"proc/stdlib_dtbmv.html"},{"title":"stdlib_dtbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtbsv(uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_dtbsv","tags":"","loc":"proc/stdlib_dtbsv.html"},{"title":"stdlib_dtpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtpmv(uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtpmv ( uplo , trans , diag , n , ap , x , incx ) !! DTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpmv","tags":"","loc":"proc/stdlib_dtpmv.html"},{"title":"stdlib_dtpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtpsv(uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtpsv ( uplo , trans , diag , n , ap , x , incx ) !! DTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpsv","tags":"","loc":"proc/stdlib_dtpsv.html"},{"title":"stdlib_dtrmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_dtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrmm","tags":"","loc":"proc/stdlib_dtrmm.html"},{"title":"stdlib_dtrmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrmv(uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtrmv","tags":"","loc":"proc/stdlib_dtrmv.html"},{"title":"stdlib_dtrsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_dtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrsm","tags":"","loc":"proc/stdlib_dtrsm.html"},{"title":"stdlib_dtrsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_dtrsv(uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_dtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_dtrsv","tags":"","loc":"proc/stdlib_dtrsv.html"},{"title":"eye – Fortran-lang/stdlib","text":"public pure function eye(dim1, dim2) result(result) Constructs the identity matrix.\n( Specification ) Arguments Type Intent Optional Attributes Name integer, intent(in) :: dim1 integer, intent(in), optional :: dim2 Return Value integer(kind=int8), allocatable, (:,:) Source Code pure function eye ( dim1 , dim2 ) result ( result ) integer , intent ( in ) :: dim1 integer , intent ( in ), optional :: dim2 integer ( int8 ), allocatable :: result (:, :) integer :: dim2_ integer :: i dim2_ = optval ( dim2 , dim1 ) allocate ( result ( dim1 , dim2_ )) result = 0_int8 do i = 1 , min ( dim1 , dim2_ ) result ( i , i ) = 1_int8 end do end function eye","tags":"","loc":"proc/eye.html"},{"title":"cross_product – Fortran-lang/stdlib","text":"public interface cross_product Computes the cross product of two vectors, returning a rank-1 and size-3 array\n( Specification ) Functions private pure module function cross_product_cdp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (3) complex(kind=dp), intent(in) :: b (3) Return Value complex(kind=dp), (3) private pure module function cross_product_csp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (3) complex(kind=sp), intent(in) :: b (3) Return Value complex(kind=sp), (3) private pure module function cross_product_iint16(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (3) integer(kind=int16), intent(in) :: b (3) Return Value integer(kind=int16), (3) private pure module function cross_product_iint32(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (3) integer(kind=int32), intent(in) :: b (3) Return Value integer(kind=int32), (3) private pure module function cross_product_iint64(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (3) integer(kind=int64), intent(in) :: b (3) Return Value integer(kind=int64), (3) private pure module function cross_product_iint8(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (3) integer(kind=int8), intent(in) :: b (3) Return Value integer(kind=int8), (3) private pure module function cross_product_rdp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (3) real(kind=dp), intent(in) :: b (3) Return Value real(kind=dp), (3) private pure module function cross_product_rsp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (3) real(kind=sp), intent(in) :: b (3) Return Value real(kind=sp), (3)","tags":"","loc":"interface/cross_product.html"},{"title":"det – Fortran-lang/stdlib","text":"public interface det Computes the determinant of a square matrix\n ( Specification ) Summary Interface for computing matrix determinant. Description This interface provides methods for computing the determinant of a matrix.\n Supported data types include real and complex . Note The provided functions are intended for square matrices only. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 3 , 3 ), d type ( linalg_state_type ) :: state a = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) ! ... d = det ( a , err = state ) if ( state % ok ()) then print * , 'Success! det=' , d else print * , state % print () endif ! ... Module Procedures private interface stdlib_linalg_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_cdpdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None","tags":"","loc":"interface/det.html"},{"title":"diag – Fortran-lang/stdlib","text":"public interface diag Creates a diagonal array or extract the diagonal elements of an array\n( Specification ) Functions private module function diag_cdp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(v),size(v)) private module function diag_cdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_cdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp), (minval(shape(A))) private module function diag_cdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=dp), (minval(shape(A))-abs(k)) private module function diag_csp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(v),size(v)) private module function diag_csp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_csp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp), (minval(shape(A))) private module function diag_csp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=sp), (minval(shape(A))-abs(k)) private module function diag_iint16(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(v),size(v)) private module function diag_iint16_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int16), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint16_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16), (minval(shape(A))) private module function diag_iint16_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int16), (minval(shape(A))-abs(k)) private module function diag_iint32(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(v),size(v)) private module function diag_iint32_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int32), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint32_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32), (minval(shape(A))) private module function diag_iint32_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int32), (minval(shape(A))-abs(k)) private module function diag_iint64(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(v),size(v)) private module function diag_iint64_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int64), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint64_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64), (minval(shape(A))) private module function diag_iint64_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int64), (minval(shape(A))-abs(k)) private module function diag_iint8(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(v),size(v)) private module function diag_iint8_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int8), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint8_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8), (minval(shape(A))) private module function diag_iint8_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int8), (minval(shape(A))-abs(k)) private module function diag_rdp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(v),size(v)) private module function diag_rdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp), (minval(shape(A))) private module function diag_rdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=dp), (minval(shape(A))-abs(k)) private module function diag_rsp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(v),size(v)) private module function diag_rsp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rsp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp), (minval(shape(A))) private module function diag_rsp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=sp), (minval(shape(A))-abs(k))","tags":"","loc":"interface/diag.html"},{"title":"is_diagonal – Fortran-lang/stdlib","text":"public interface is_diagonal Checks if a matrix (rank-2 array) is diagonal\n( Specification ) Module Procedures private pure function is_diagonal_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_diagonal.html"},{"title":"is_hermitian – Fortran-lang/stdlib","text":"public interface is_hermitian Checks if a matrix (rank-2 array) is Hermitian\n( Specification ) Module Procedures private pure function is_hermitian_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_hermitian.html"},{"title":"is_hessenberg – Fortran-lang/stdlib","text":"public interface is_hessenberg Checks if a matrix (rank-2 array) is Hessenberg\n( Specification ) Module Procedures private function is_hessenberg_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical","tags":"","loc":"interface/is_hessenberg.html"},{"title":"is_skew_symmetric – Fortran-lang/stdlib","text":"public interface is_skew_symmetric Checks if a matrix (rank-2 array) is skew-symmetric\n( Specification ) Module Procedures private pure function is_skew_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_skew_symmetric.html"},{"title":"is_square – Fortran-lang/stdlib","text":"public interface is_square Checks if a matrix (rank-2 array) is square\n( Specification ) Module Procedures private pure function is_square_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_square.html"},{"title":"is_symmetric – Fortran-lang/stdlib","text":"public interface is_symmetric Checks if a matrix (rank-2 array) is symmetric\n( Specification ) Module Procedures private pure function is_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical","tags":"","loc":"interface/is_symmetric.html"},{"title":"is_triangular – Fortran-lang/stdlib","text":"public interface is_triangular Checks if a matrix (rank-2 array) is triangular\n( Specification ) Module Procedures private function is_triangular_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical","tags":"","loc":"interface/is_triangular.html"},{"title":"kronecker_product – Fortran-lang/stdlib","text":"public interface kronecker_product Computes the Kronecker product of two arrays of size M1xN1, and of M2xN2, returning an (M1 M2)x(N1 N2) array\n( Specification ) Functions private pure module function kronecker_product_cdp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) complex(kind=dp), intent(in) :: B (:,:) Return Value complex(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_csp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) complex(kind=sp), intent(in) :: B (:,:) Return Value complex(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint16(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer(kind=int16), intent(in) :: B (:,:) Return Value integer(kind=int16), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint32(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer(kind=int32), intent(in) :: B (:,:) Return Value integer(kind=int32), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint64(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer(kind=int64), intent(in) :: B (:,:) Return Value integer(kind=int64), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint8(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer(kind=int8), intent(in) :: B (:,:) Return Value integer(kind=int8), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rdp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) real(kind=dp), intent(in) :: B (:,:) Return Value real(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rsp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) real(kind=sp), intent(in) :: B (:,:) Return Value real(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2))","tags":"","loc":"interface/kronecker_product.html"},{"title":"lstsq – Fortran-lang/stdlib","text":"public interface lstsq Computes the squares solution to system . \n ( Specification ) Summary Interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system.\n Supported data types include real and complex . Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Functions private module function stdlib_linalg_c_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs]","tags":"","loc":"interface/lstsq.html"},{"title":"lstsq_space – Fortran-lang/stdlib","text":"public interface lstsq_space Computes the integer, real [, complex] working space required by the least-squares solver\n ( Specification ) Description This interface provides sizes of integer, real [, complex] working spaces required by the \n least-squares solver. These sizes can be used to pre-allocated working arrays in case several \n repeated least-squares solutions to a same system are sought. If pre-allocated working arrays \n are provided, no internal allocations will take place. Subroutines private pure module subroutine stdlib_linalg_c_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_c_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays","tags":"","loc":"interface/lstsq_space.html"},{"title":"operator(.det.) – Fortran-lang/stdlib","text":"public interface operator(.det.) Determinant operator of a square matrix\n ( Specification ) Summary Pure operator interface for computing matrix determinant. Description This pure operator interface provides a convenient way to compute the determinant of a matrix.\n Supported data types include real and complex. Note The provided functions are intended for square matrices. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example ! ... real ( sp ) :: matrix ( 3 , 3 ), d matrix = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) d = . det . matrix ! ... Module Procedures private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None","tags":"","loc":"interface/operator(.det.).html"},{"title":"outer_product – Fortran-lang/stdlib","text":"public interface outer_product Computes the outer product of two vectors, returning a rank-2 array\n( Specification ) Functions private pure module function outer_product_cdp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: u (:) complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(u),size(v)) private pure module function outer_product_csp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: u (:) complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(u),size(v)) private pure module function outer_product_iint16(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: u (:) integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(u),size(v)) private pure module function outer_product_iint32(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: u (:) integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(u),size(v)) private pure module function outer_product_iint64(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: u (:) integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(u),size(v)) private pure module function outer_product_iint8(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: u (:) integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(u),size(v)) private pure module function outer_product_rdp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: u (:) real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(u),size(v)) private pure module function outer_product_rsp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: u (:) real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(u),size(v))","tags":"","loc":"interface/outer_product.html"},{"title":"solve – Fortran-lang/stdlib","text":"public interface solve Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Interface for solving a linear system arising from a general matrix. Description This interface provides methods for computing the solution of a linear matrix system.\n Supported data types include real and complex . No assumption is made on the matrix \n structure. \n The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Functions private pure module function stdlib_linalg_c_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_c_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs]","tags":"","loc":"interface/solve.html"},{"title":"solve_lstsq – Fortran-lang/stdlib","text":"public interface solve_lstsq Computes the squares solution to system . \n ( Specification ) Summary Subroutine interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system using \n a subroutine. Supported data types include real and complex . If pre-allocated work spaces \n are provided, no internal memory allocations take place when using this interface. Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Subroutines private module subroutine stdlib_linalg_c_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_c_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop","tags":"","loc":"interface/solve_lstsq.html"},{"title":"solve_lu – Fortran-lang/stdlib","text":"public interface solve_lu Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Subroutine interface for solving a linear system using LU decomposition. Description This interface provides methods for computing the solution of a linear matrix system using\n a subroutine. Supported data types include real and complex . No assumption is made on the matrix \n structure. Preallocated space for the solution vector x is user-provided, and it may be provided\n for the array of pivot indices, pivot . If all pre-allocated work spaces are provided, no internal \n memory allocations take place when using this interface. The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Subroutines private pure module subroutine stdlib_linalg_c_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_c_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop","tags":"","loc":"interface/solve_lu.html"},{"title":"svd – Fortran-lang/stdlib","text":"public interface svd Computes the singular value decomposition of a real or complex 2d matrix.\n ( Specification ) Summary Interface for computing the singular value decomposition of a real or complex 2d matrix. Description This interface provides methods for computing the singular value decomposition of a matrix.\n Supported data types include real and complex . The subroutine returns a real array of \n singular values, and optionally, left- and right- singular vector matrices, U and V . \n For a matrix A with size [m,n], full matrix storage for U and V should be [m,m] and [n,n]. \n It is possible to use partial storage [m,k] and [k,n], k=min(m,n) , choosing full_matrices=.false. . Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ), u ( 2 , 2 ), vt ( 3 , 3 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) call svd ( A , s , u , v ) print * , 'singular values = ' , s Subroutines private module subroutine stdlib_linalg_svd_c(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values complex(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_d(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values real(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_s(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values real(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_z(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values complex(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop","tags":"","loc":"interface/svd.html"},{"title":"svdvals – Fortran-lang/stdlib","text":"public interface svdvals Computes the singular values of a real or complex 2d matrix.\n ( Specification ) Summary Function interface for computing the array of singular values from the singular value decomposition \n of a real or complex 2d matrix. Description This interface provides methods for computing the singular values a 2d matrix.\n Supported data types include real and complex . The function returns a real array of \n singular values, with size [min(m,n)]. Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) s = svdvals ( A ) print * , 'singular values = ' , s Functions private module function stdlib_linalg_svdvals_c(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_d(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_s(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_z(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values","tags":"","loc":"interface/svdvals.html"},{"title":"trace – Fortran-lang/stdlib","text":"public interface trace Computes the trace of a matrix\n( Specification ) Module Procedures private function trace_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp) private function trace_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp) private function trace_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp) private function trace_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp) private function trace_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8) private function trace_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16) private function trace_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32) private function trace_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64)","tags":"","loc":"interface/trace.html"},{"title":"stdlib_zdotc – Fortran-lang/stdlib","text":"public pure function stdlib_zdotc(n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Source Code pure complex ( dp ) function stdlib_zdotc ( n , zx , incx , zy , incy ) !! ZDOTC forms the dot product of two complex vectors !! ZDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotc = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( i )) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( ix )) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotc = ztemp return end function stdlib_zdotc","tags":"","loc":"proc/stdlib_zdotc.html"},{"title":"stdlib_zdotu – Fortran-lang/stdlib","text":"public pure function stdlib_zdotu(n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Source Code pure complex ( dp ) function stdlib_zdotu ( n , zx , incx , zy , incy ) !! ZDOTU forms the dot product of two complex vectors !! ZDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotu = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + zx ( i ) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + zx ( ix ) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotu = ztemp return end function stdlib_zdotu","tags":"","loc":"proc/stdlib_zdotu.html"},{"title":"stdlib_zaxpy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zaxpy(n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zaxpy ( n , za , zx , incx , zy , incy ) !! ZAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( inout ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_dcabs1 ( za ) == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zy ( i ) + za * zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zy ( iy ) + za * zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zaxpy","tags":"","loc":"proc/stdlib_zaxpy.html"},{"title":"stdlib_zcopy – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zcopy(n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zcopy ( n , zx , incx , zy , incy ) !! ZCOPY copies a vector, x, to a vector, y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( out ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zcopy","tags":"","loc":"proc/stdlib_zcopy.html"},{"title":"stdlib_zdrot – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zdrot(n, zx, incx, zy, incy, c, s) Applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s Source Code pure subroutine stdlib_zdrot ( n , zx , incx , zy , incy , c , s ) !! Applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: c , s ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( dp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * zx ( i ) + s * zy ( i ) zy ( i ) = c * zy ( i ) - s * zx ( i ) zx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * zx ( ix ) + s * zy ( iy ) zy ( iy ) = c * zy ( iy ) - s * zx ( ix ) zx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zdrot","tags":"","loc":"proc/stdlib_zdrot.html"},{"title":"stdlib_zdscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zdscal(n, da, zx, incx) ZDSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_zdscal ( n , da , zx , incx ) !! ZDSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: cmplx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do end if return end subroutine stdlib_zdscal","tags":"","loc":"proc/stdlib_zdscal.html"},{"title":"stdlib_zgbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! ZGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_zgbmv","tags":"","loc":"proc/stdlib_zgbmv.html"},{"title":"stdlib_zgemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zgemm","tags":"","loc":"proc/stdlib_zgemm.html"},{"title":"stdlib_zgemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_zgemv","tags":"","loc":"proc/stdlib_zgemv.html"},{"title":"stdlib_zgerc – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgerc(m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgerc","tags":"","loc":"proc/stdlib_zgerc.html"},{"title":"stdlib_zgeru – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zgeru(m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgeru","tags":"","loc":"proc/stdlib_zgeru.html"},{"title":"stdlib_zhbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zhbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! ZHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: real , conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhbmv","tags":"","loc":"proc/stdlib_zhbmv.html"},{"title":"stdlib_zhemm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zhemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = dp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zhemm","tags":"","loc":"proc/stdlib_zhemm.html"},{"title":"stdlib_zhemv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zhemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhemv","tags":"","loc":"proc/stdlib_zhemv.html"},{"title":"stdlib_zher – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zher(uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zher ( uplo , n , alpha , x , incx , a , lda ) !! ZHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_zher","tags":"","loc":"proc/stdlib_zher.html"},{"title":"stdlib_zher2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zher2(uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda Source Code pure subroutine stdlib_zher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! ZHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zher2","tags":"","loc":"proc/stdlib_zher2.html"},{"title":"stdlib_zher2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha real ( dp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_zher2k","tags":"","loc":"proc/stdlib_zher2k.html"},{"title":"stdlib_zherk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , cmplx , conjg , max ! Local Scalars complex ( dp ) :: temp real ( dp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( i , l ), KIND = dp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( j , l ), KIND = dp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zherk","tags":"","loc":"proc/stdlib_zherk.html"},{"title":"stdlib_zhpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zhpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! ZHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = dp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_zhpmv","tags":"","loc":"proc/stdlib_zhpmv.html"},{"title":"stdlib_zhpr – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhpr(uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_zhpr ( uplo , n , alpha , x , incx , ap ) !! ZHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr","tags":"","loc":"proc/stdlib_zhpr.html"},{"title":"stdlib_zhpr2 – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zhpr2(uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) Source Code pure subroutine stdlib_zhpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! ZHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr2","tags":"","loc":"proc/stdlib_zhpr2.html"},{"title":"stdlib_zrotg – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zrotg(a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s Source Code pure subroutine stdlib_zrotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in DROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by DROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( out ) :: c complex ( dp ), intent ( inout ) :: a complex ( dp ), intent ( in ) :: b complex ( dp ), intent ( out ) :: s ! Local Scalars real ( dp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( dp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( dp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = dp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = dp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_zrotg","tags":"","loc":"proc/stdlib_zrotg.html"},{"title":"stdlib_zscal – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zscal(n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_zscal ( n , za , zx , incx ) !! ZSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = za * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = za * zx ( i ) end do end if return end subroutine stdlib_zscal","tags":"","loc":"proc/stdlib_zscal.html"},{"title":"stdlib_zswap – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zswap(n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy Source Code pure subroutine stdlib_zswap ( n , zx , incx , zy , incy ) !! ZSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = zx ( i ) zx ( i ) = zy ( i ) zy ( i ) = ztemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = zx ( ix ) zx ( ix ) = zy ( iy ) zy ( iy ) = ztemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zswap","tags":"","loc":"proc/stdlib_zswap.html"},{"title":"stdlib_zsymm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zsymm","tags":"","loc":"proc/stdlib_zsymm.html"},{"title":"stdlib_zsyr2k – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_zsyr2k","tags":"","loc":"proc/stdlib_zsyr2k.html"},{"title":"stdlib_zsyrk – Fortran-lang/stdlib","text":"public pure subroutine stdlib_zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc Source Code pure subroutine stdlib_zsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zsyrk","tags":"","loc":"proc/stdlib_zsyrk.html"},{"title":"stdlib_ztbmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztbmv(uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztbmv","tags":"","loc":"proc/stdlib_ztbmv.html"},{"title":"stdlib_ztbsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztbsv(uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ztbsv","tags":"","loc":"proc/stdlib_ztbsv.html"},{"title":"stdlib_ztpmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztpmv(uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztpmv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpmv","tags":"","loc":"proc/stdlib_ztpmv.html"},{"title":"stdlib_ztpsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztpsv(uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztpsv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpsv","tags":"","loc":"proc/stdlib_ztpsv.html"},{"title":"stdlib_ztrmm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ztrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ztrmm","tags":"","loc":"proc/stdlib_ztrmm.html"},{"title":"stdlib_ztrmv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrmv(uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztrmv","tags":"","loc":"proc/stdlib_ztrmv.html"},{"title":"stdlib_ztrsm – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb Source Code pure subroutine stdlib_ztrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ztrsm","tags":"","loc":"proc/stdlib_ztrsm.html"},{"title":"stdlib_ztrsv – Fortran-lang/stdlib","text":"public pure subroutine stdlib_ztrsv(uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx Source Code pure subroutine stdlib_ztrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ztrsv","tags":"","loc":"proc/stdlib_ztrsv.html"},{"title":"open – Fortran-lang/stdlib","text":"public function open(filename, mode, iostat) result(u) Opens a file\n ( Specification ) Behavior To open a file to read: u = open ( \"somefile.txt\" ) ! The default `mode` is \"rt\" u = open ( \"somefile.txt\" , \"r\" ) To open a file to write: u = open ( \"somefile.txt\" , \"w\" ) To append to the end of the file if it exists: u = open ( \"somefile.txt\" , \"a\" ) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename character(len=*), intent(in), optional :: mode integer, intent(out), optional :: iostat Return Value integer Source Code integer function open ( filename , mode , iostat ) result ( u ) !! version: experimental !! !! Opens a file !! ([Specification](../page/specs/stdlib_io.html#description_1)) !! !!##### Behavior !! !! !! To open a file to read: !! !!```fortran !! u = open(\"somefile.txt\") ! The default `mode` is \"rt\" !! u = open(\"somefile.txt\", \"r\") !!``` !! !! To open a file to write: !! !!```fortran !! u = open(\"somefile.txt\", \"w\") !!``` !! !! To append to the end of the file if it exists: !! !!```fortran !! u = open(\"somefile.txt\", \"a\") !!``` character ( * ), intent ( in ) :: filename character ( * ), intent ( in ), optional :: mode integer , intent ( out ), optional :: iostat character ( 3 ) :: mode_ character (:), allocatable :: action_ , position_ , status_ , access_ , form_ mode_ = parse_mode ( optval ( mode , \"\" )) select case ( mode_ ( 1 : 2 )) case ( 'r' ) action_ = 'read' position_ = 'asis' status_ = 'old' case ( 'w' ) action_ = 'write' position_ = 'asis' status_ = 'replace' case ( 'a' ) action_ = 'write' position_ = 'append' status_ = 'old' case ( 'x' ) action_ = 'write' position_ = 'asis' status_ = 'new' case ( 'r+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'old' case ( 'w+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'replace' case ( 'a+' ) action_ = 'readwrite' position_ = 'append' status_ = 'old' case ( 'x+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'new' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 1 : 2 )) end select select case ( mode_ ( 3 : 3 )) case ( 't' ) form_ = 'formatted' case ( 'b' ) form_ = 'unformatted' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 3 : 3 )) end select access_ = 'stream' if ( present ( iostat )) then open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ , & iostat = iostat ) else open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ ) end if end function open","tags":"","loc":"proc/open.html"},{"title":"parse_mode – Fortran-lang/stdlib","text":"public function parse_mode(mode) result(mode_) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: mode Return Value character(len=3) Source Code character ( 3 ) function parse_mode ( mode ) result ( mode_ ) character ( * ), intent ( in ) :: mode integer :: i character (:), allocatable :: a logical :: lfirst ( 3 ) mode_ = 'r t' if ( len_trim ( mode ) == 0 ) return a = trim ( adjustl ( mode )) lfirst = . true . do i = 1 , len ( a ) if ( lfirst ( 1 ) & . and . ( a ( i : i ) == 'r' . or . a ( i : i ) == 'w' . or . a ( i : i ) == 'a' . or . a ( i : i ) == 'x' ) & ) then mode_ ( 1 : 1 ) = a ( i : i ) lfirst ( 1 ) = . false . else if ( lfirst ( 2 ) . and . a ( i : i ) == '+' ) then mode_ ( 2 : 2 ) = a ( i : i ) lfirst ( 2 ) = . false . else if ( lfirst ( 3 ) . and . ( a ( i : i ) == 't' . or . a ( i : i ) == 'b' )) then mode_ ( 3 : 3 ) = a ( i : i ) lfirst ( 3 ) = . false . else if ( a ( i : i ) == ' ' ) then cycle else if ( any (. not . lfirst )) then call error_stop ( \"Wrong mode: \" // trim ( a )) else call error_stop ( \"Wrong character: \" // a ( i : i )) endif end do end function parse_mode","tags":"","loc":"proc/parse_mode.html"},{"title":"getline – Fortran-lang/stdlib","text":"public interface getline Read a whole line from a formatted unit into a string variable Module Procedures private subroutine getline_char(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a deferred length character variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_string(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a string variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_char(line, iostat, iomsg) Read a whole line from the standard input into a deferred length character variable Arguments Type Intent Optional Attributes Name character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_string(line, iostat, iomsg) Read a whole line from the standard input into a string variable Arguments Type Intent Optional Attributes Name type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message","tags":"","loc":"interface/getline.html"},{"title":"loadtxt – Fortran-lang/stdlib","text":"public interface loadtxt Loads a 2D array from a text file\n( Specification ) Module Procedures private subroutine loadtxt_rsp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_rdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint8(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int8), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint16(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int16), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint32(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int32), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint64(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int64), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_csp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_cdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt","tags":"","loc":"interface/loadtxt.html"},{"title":"savetxt – Fortran-lang/stdlib","text":"public interface savetxt Saves a 2D array into a text file\n( Specification ) Module Procedures private subroutine savetxt_rsp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: d (:,:) Example real ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_rdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: d (:,:) Example real ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint8(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: d (:,:) Example integer ( int8 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint16(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: d (:,:) Example integer ( int16 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint32(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: d (:,:) Example integer ( int32 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint64(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: d (:,:) Example integer ( int64 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_csp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: d (:,:) Example complex ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_cdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: d (:,:) Example complex ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data )","tags":"","loc":"interface/savetxt.html"},{"title":"ord_sort – Fortran-lang/stdlib","text":"public interface ord_sort The generic subroutine interface implementing the ORD_SORT algorithm,\na 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 ,\nand insertion sort .\n( Specification ) It is always at worst O(N Ln(N)) in sorting random\ndata, having a performance about 25% slower than SORT on such\ndata, but has much better performance than SORT on partially\nsorted data, having O(N) performance on uniformly non-increasing or\nnon-decreasing data. Subroutines private module subroutine bitset_64_ord_sort(array, work, reverse) bitset_64_ord_sort( array ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) type( bitset_64 ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_ord_sort(array, work, reverse) bitset_large_ord_sort( array ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) type( bitset_large ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine char_ord_sort(array, work, reverse) char_ord_sort( array ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) character(len=len), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine dp_ord_sort(array, work, reverse) dp_ord_sort( array ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) real(kind=dp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int16_ord_sort(array, work, reverse) int16_ord_sort( array ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int16), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int32_ord_sort(array, work, reverse) int32_ord_sort( array ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int32), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int64_ord_sort(array, work, reverse) int64_ord_sort( array ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int64), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int8_ord_sort(array, work, reverse) int8_ord_sort( array ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int8), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine sp_ord_sort(array, work, reverse) sp_ord_sort( array ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) real(kind=sp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine string_type_ord_sort(array, work, reverse) string_type_ord_sort( array ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) type( string_type ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse","tags":"","loc":"interface/ord_sort.html"},{"title":"radix_sort – Fortran-lang/stdlib","text":"public interface radix_sort The generic subroutine interface implementing the LSD radix sort algorithm,\nsee https://en.wikipedia.org/wiki/Radix_sort for more details.\nIt is always O(N) in sorting random data, but need a O(N) buffer.\n( Specification ) Subroutines private module subroutine dp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), dimension(:), target :: array real(kind=dp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int16_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout), dimension(:) :: array integer(kind=int16), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int32_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout), dimension(:) :: array integer(kind=int32), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int64_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout), dimension(:) :: array integer(kind=int64), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int8_radix_sort(array, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout), dimension(:) :: array logical, intent(in), optional :: reverse private module subroutine sp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), dimension(:), target :: array real(kind=sp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse","tags":"","loc":"interface/radix_sort.html"},{"title":"sort – Fortran-lang/stdlib","text":"public interface sort The generic subroutine interface implementing the SORT algorithm, based\non the introsort of David Musser.\n( Specification ) Subroutines private pure module subroutine bitset_64_sort(array, reverse) bitset_64_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine bitset_large_sort(array, reverse) bitset_large_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine char_sort(array, reverse) char_sort( array[, reverse] ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine dp_sort(array, reverse) dp_sort( array[, reverse] ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int16_sort(array, reverse) int16_sort( array[, reverse] ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int32_sort(array, reverse) int32_sort( array[, reverse] ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int64_sort(array, reverse) int64_sort( array[, reverse] ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int8_sort(array, reverse) int8_sort( array[, reverse] ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine sp_sort(array, reverse) sp_sort( array[, reverse] ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine string_type_sort(array, reverse) string_type_sort( array[, reverse] ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse","tags":"","loc":"interface/sort.html"},{"title":"sort_index – Fortran-lang/stdlib","text":"public interface sort_index The generic subroutine interface implementing the SORT_INDEX algorithm,\nbased on the \"Rust\" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159\nbut modified to return an array of indices that would provide a stable\nsort of the rank one ARRAY input.\n( Specification ) The indices by default correspond to a\nnon-decreasing sort, but if the optional argument REVERSE is present\nwith a value of .TRUE. the indices correspond to a non-increasing sort. Subroutines private module subroutine bitset_64_sort_index_default(array, index, work, iwork, reverse) bitset_64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_64_sort_index_low(array, index, work, iwork, reverse) bitset_64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_default(array, index, work, iwork, reverse) bitset_large_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_low(array, index, work, iwork, reverse) bitset_large_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_default(array, index, work, iwork, reverse) char_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_low(array, index, work, iwork, reverse) char_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_default(array, index, work, iwork, reverse) dp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_low(array, index, work, iwork, reverse) dp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_default(array, index, work, iwork, reverse) int16_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_low(array, index, work, iwork, reverse) int16_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_default(array, index, work, iwork, reverse) int32_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_low(array, index, work, iwork, reverse) int32_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_default(array, index, work, iwork, reverse) int64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_low(array, index, work, iwork, reverse) int64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_default(array, index, work, iwork, reverse) int8_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_low(array, index, work, iwork, reverse) int8_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_default(array, index, work, iwork, reverse) sp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_low(array, index, work, iwork, reverse) sp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_default(array, index, work, iwork, reverse) string_type_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_low(array, index, work, iwork, reverse) string_type_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse","tags":"","loc":"interface/sort_index.html"},{"title":"get_stdlib_version – Fortran-lang/stdlib","text":"public pure subroutine get_stdlib_version(major, minor, patch, string) Getter function to retrieve standard library version Arguments Type Intent Optional Attributes Name integer, intent(out), optional :: major Major version number of the standard library version integer, intent(out), optional :: minor Minor version number of the standard library version integer, intent(out), optional :: patch Patch version number of the standard library version character(len=:), intent(out), optional, allocatable :: string String representation of the standard library version Source Code pure subroutine get_stdlib_version ( major , minor , patch , string ) !> Major version number of the standard library version integer , intent ( out ), optional :: major !> Minor version number of the standard library version integer , intent ( out ), optional :: minor !> Patch version number of the standard library version integer , intent ( out ), optional :: patch !> String representation of the standard library version character ( len = :), allocatable , intent ( out ), optional :: string if ( present ( major )) then major = stdlib_major end if if ( present ( minor )) then minor = stdlib_minor end if if ( present ( patch )) then patch = stdlib_patch end if if ( present ( string )) then string = stdlib_version_string end if end subroutine get_stdlib_version","tags":"","loc":"proc/get_stdlib_version.html"},{"title":"cdf_normal – Fortran-lang/stdlib","text":"public interface cdf_normal Normal Distribution Cumulative Distribution Function\n( Specification ) Module Procedures private elemental function cdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/cdf_normal.html"},{"title":"pdf_normal – Fortran-lang/stdlib","text":"public interface pdf_normal Normal Distribution Probability Density Function\n( Specification ) Module Procedures private elemental function pdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp)","tags":"","loc":"interface/pdf_normal.html"},{"title":"rvs_normal – Fortran-lang/stdlib","text":"public interface rvs_normal Normal Distribution Random Variates\n( Specification ) Module Procedures private impure function rvs_norm_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_norm_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_norm_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_norm_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_norm_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure function rvs_norm_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_norm_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_norm_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_norm_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"interface/rvs_normal.html"},{"title":"stdlib_linalg_blas_aux – Fortran-lang/stdlib","text":"Uses stdlib_linalg_constants Functions public pure function stdlib_dcabs1 (z) DCABS1 computes |Re(.)| + |Im(.)| of a double complex number Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public pure function stdlib_icamax (n, cx, incx) ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_idamax (n, dx, incx) IDAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_isamax (n, sx, incx) ISAMAX finds the index of the first element having maximum absolute value. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_izamax (n, zx, incx) IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value integer(kind=ilp) public pure function stdlib_lsame (ca, cb) LSAME returns .TRUE. if CA is the same letter as CB regardless of\ncase. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: ca character(len=1), intent(in) :: cb Return Value logical(kind=lk) public pure function stdlib_scabs1 (z) SCABS1 computes |Re(.)| + |Im(.)| of a complex number Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) Subroutines public pure subroutine stdlib_xerbla (srname, info) XERBLA is an error handler for the LAPACK routines.\nIt is called by an LAPACK routine if an input parameter has an\ninvalid value. A message is printed and execution stops.\nInstallers may consider modifying the STOP statement in order to\ncall system-specific exception-handling facilities. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: srname integer(kind=ilp), intent(in) :: info public pure subroutine stdlib_xerbla_array (srname_array, srname_len, info) XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK\nand BLAS error handler. Rather than taking a Fortran string argument\nas the function's name, XERBLA_ARRAY takes an array of single\ncharacters along with the array's length. XERBLA_ARRAY then copies\nup to 32 characters of that array into a Fortran string and passes\nthat to XERBLA. If called with a non-positive SRNAME_LEN,\nXERBLA_ARRAY will call XERBLA with a string of all blank characters.\nSay some macro or other device makes XERBLA_ARRAY available to C99\nby a name lapack_xerbla and with a common Fortran calling convention.\nThen a C99 program could invoke XERBLA via:\n{\nint flen = strlen( func );\nlapack_xerbla( func ,\n}\nProviding XERBLA_ARRAY is not necessary for intercepting LAPACK\nerrors. XERBLA_ARRAY calls XERBLA. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: srname_array (srname_len) integer(kind=ilp), intent(in) :: srname_len integer(kind=ilp), intent(in) :: info","tags":"","loc":"module/stdlib_linalg_blas_aux.html"},{"title":"stdlib_stats – Fortran-lang/stdlib","text":"Provides support for various statistical methods. This includes currently\ndescriptive statistics\n( Specification ) Uses stdlib_kinds Used by Descendants: stdlib_stats_cov stdlib_stats_mean stdlib_stats_median stdlib_stats_moment stdlib_stats_moment_all stdlib_stats_moment_mask stdlib_stats_moment_scalar stdlib_stats_var stdlib_stats_corr Interfaces public interface corr Pearson correlation of array elements\n( Specification ) private module function corr_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function corr_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function corr_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function corr_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function corr_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function corr_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface cov Covariance of array elements\n( Specification ) private module function cov_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function cov_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function cov_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function cov_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface mean Mean of array elements\n( Specification ) private module function mean_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function mean_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function mean_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function mean_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function mean_mask_1_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_1_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_1_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_2_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_2_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_cdp_cdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_csp_csp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rdp_rdp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_3_rsp_rsp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function mean_mask_all_1_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function mean_mask_all_1_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function mean_mask_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function mean_mask_all_1_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function mean_mask_all_2_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function mean_mask_all_2_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function mean_mask_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function mean_mask_all_2_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function mean_mask_all_3_cdp_cdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function mean_mask_all_3_csp_csp(x, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function mean_mask_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rdp_rdp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function mean_mask_all_3_rsp_rsp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) public interface median Median of array elements\n( Specification ) private module function median_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_all_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=dp) private module function median_all_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask Return Value real(kind=sp) private module function median_all_mask_1_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_all_mask_1_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_all_mask_2_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function median_all_mask_2_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function median_all_mask_3_iint16_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint32_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint64_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_iint8_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rdp_dp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function median_all_mask_3_rsp_sp(x, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function median_mask_1_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function median_mask_1_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function median_mask_2_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_2_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint16_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint32_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint64_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_iint8_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rdp_dp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function median_mask_3_rsp_sp(x, dim, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface moment Central moment of array elements\n( Specification ) private module function moment_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=dp) private module function moment_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value complex(kind=sp) private module function moment_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=dp) private module function moment_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in), optional :: mask Return Value real(kind=sp) private module function moment_mask_1_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_1_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_1_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_1_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in), optional :: center (merge(size(x,1),size(x,2),mask=1 logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_all_1_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=dp) private module function moment_mask_all_1_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value complex(kind=sp) private module function moment_mask_all_1_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=dp) private module function moment_mask_all_1_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:) Return Value real(kind=sp) private module function moment_mask_all_2_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp) private module function moment_mask_all_2_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp) private module function moment_mask_all_2_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp) private module function moment_mask_all_2_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp) private module function moment_mask_all_3_cdp_cdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp) private module function moment_mask_all_3_csp_csp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order complex(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp) private module function moment_mask_all_3_iint16_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint32_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint64_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_iint8_dp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rdp_rdp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=dp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp) private module function moment_mask_all_3_rsp_rsp(x, order, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order real(kind=sp), intent(in), optional :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp) private module function moment_mask_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_mask_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in) :: mask (:,:,:) Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_2_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_cdp_cdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_csp_csp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim complex(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value complex(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint16_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint32_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint64_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_iint8_dp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rdp_rdp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=dp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function moment_scalar_3_rsp_rsp(x, order, dim, center, mask) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: order integer, intent(in) :: dim real(kind=sp), intent(in) :: center logical, intent(in), optional :: mask Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 public interface var Variance of array elements\n( Specification ) private module function var_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in), optional :: mask logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_1_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_1_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in) :: dim logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_2_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_2_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_cdp_cdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_csp_csp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint16_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint32_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint64_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_iint8_dp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rdp_rdp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_3_rsp_rsp(x, dim, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) integer, intent(in) :: dim logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp), (merge(size(x,1),size(x,2),mask=1 private module function var_mask_all_1_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_1_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_1_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) logical, intent(in) :: mask (:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_2_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_2_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) logical, intent(in) :: mask (:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_cdp_cdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_csp_csp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp) private module function var_mask_all_3_iint16_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint32_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint64_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_iint8_dp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rdp_rdp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=dp) private module function var_mask_all_3_rsp_rsp(x, mask, corrected) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:,:) logical, intent(in) :: mask (:,:,:) logical, intent(in), optional :: corrected Return Value real(kind=sp)","tags":"","loc":"module/stdlib_stats.html"},{"title":"stdlib_math – Fortran-lang/stdlib","text":"Uses stdlib_kinds stdlib_optval Used by Descendants: stdlib_math_all_close stdlib_math_arange stdlib_math_diff stdlib_math_is_close stdlib_math_linspace stdlib_math_logspace stdlib_math_meshgrid Variables Type Visibility Attributes Name Initial integer, public, parameter :: DEFAULT_LINSPACE_LENGTH = 100 integer, public, parameter :: DEFAULT_LOGSPACE_BASE = 10 integer, public, parameter :: DEFAULT_LOGSPACE_LENGTH = 50 real(kind=dp), public, parameter :: EULERS_NUMBER_DP = exp(1.0_dp) real(kind=sp), public, parameter :: EULERS_NUMBER_SP = exp(1.0_sp) integer, public, parameter :: stdlib_meshgrid_ij = 1 Values for optional argument indexing of meshgrid integer, public, parameter :: stdlib_meshgrid_xy = 0 Values for optional argument indexing of meshgrid Interfaces public interface all_close Returns a boolean scalar where two arrays are element-wise equal within a tolerance.\n( Specification ) private pure module function all_close_1_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:) complex(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:) complex(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) real(kind=dp), intent(in) :: b (:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_1_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) real(kind=sp), intent(in) :: b (:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) complex(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) complex(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) real(kind=dp), intent(in) :: b (:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_2_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) real(kind=sp), intent(in) :: b (:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:,:) complex(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:,:) complex(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:,:) real(kind=dp), intent(in) :: b (:,:,:) real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private pure module function all_close_3_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:,:) real(kind=sp), intent(in) :: b (:,:,:) real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical public interface arange arange creates a one-dimensional array of the integer/real type \n with fixed-spaced values of given spacing, within a given interval.\n( Specification ) private pure module function arange_i_int16(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in), optional :: end integer(kind=int16), intent(in), optional :: step Return Value integer(kind=int16), allocatable, (:) private pure module function arange_i_int32(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in), optional :: end integer(kind=int32), intent(in), optional :: step Return Value integer(kind=int32), allocatable, (:) private pure module function arange_i_int64(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in), optional :: end integer(kind=int64), intent(in), optional :: step Return Value integer(kind=int64), allocatable, (:) private pure module function arange_i_int8(start, end, step) result(result) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in), optional :: end integer(kind=int8), intent(in), optional :: step Return Value integer(kind=int8), allocatable, (:) private pure module function arange_r_dp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in), optional :: end real(kind=dp), intent(in), optional :: step Return Value real(kind=dp), allocatable, (:) private pure module function arange_r_sp(start, end, step) result(result) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in), optional :: end real(kind=sp), intent(in), optional :: step Return Value real(kind=sp), allocatable, (:) public interface arg arg computes the phase angle in the interval (-π,π].\n( Specification ) private elemental function arg_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function arg_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public interface argd argd computes the phase angle of degree version in the interval (-180.0,180.0].\n( Specification ) private elemental function argd_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argd_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public interface argpi argpi computes the phase angle of circular version in the interval (-1.0,1.0].\n( Specification ) private elemental function argpi_sp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value real(kind=sp) private elemental function argpi_dp(z) result(result) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value real(kind=dp) public interface clip private elemental function clip_int8(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: xmin integer(kind=int8), intent(in) :: xmax Return Value integer(kind=int8) private elemental function clip_int16(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: xmin integer(kind=int16), intent(in) :: xmax Return Value integer(kind=int16) private elemental function clip_int32(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: xmin integer(kind=int32), intent(in) :: xmax Return Value integer(kind=int32) private elemental function clip_int64(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: xmin integer(kind=int64), intent(in) :: xmax Return Value integer(kind=int64) private elemental function clip_sp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: xmin real(kind=sp), intent(in) :: xmax Return Value real(kind=sp) private elemental function clip_dp(x, xmin, xmax) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: xmin real(kind=dp), intent(in) :: xmax Return Value real(kind=dp) public interface diff Computes differences between adjacent elements of an array.\n( Specification ) private pure module function diff_1_dp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=dp), intent(in), optional :: prepend (:) real(kind=dp), intent(in), optional :: append (:) Return Value real(kind=dp), allocatable, (:) private pure module function diff_1_int16(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int16), intent(in), optional :: prepend (:) integer(kind=int16), intent(in), optional :: append (:) Return Value integer(kind=int16), allocatable, (:) private pure module function diff_1_int32(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int32), intent(in), optional :: prepend (:) integer(kind=int32), intent(in), optional :: append (:) Return Value integer(kind=int32), allocatable, (:) private pure module function diff_1_int64(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int64), intent(in), optional :: prepend (:) integer(kind=int64), intent(in), optional :: append (:) Return Value integer(kind=int64), allocatable, (:) private pure module function diff_1_int8(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:) integer, intent(in), optional :: n integer(kind=int8), intent(in), optional :: prepend (:) integer(kind=int8), intent(in), optional :: append (:) Return Value integer(kind=int8), allocatable, (:) private pure module function diff_1_sp(x, n, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:) integer, intent(in), optional :: n real(kind=sp), intent(in), optional :: prepend (:) real(kind=sp), intent(in), optional :: append (:) Return Value real(kind=sp), allocatable, (:) private pure module function diff_2_dp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=dp), intent(in), optional :: prepend (:,:) real(kind=dp), intent(in), optional :: append (:,:) Return Value real(kind=dp), allocatable, (:,:) private pure module function diff_2_int16(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int16), intent(in), optional :: prepend (:,:) integer(kind=int16), intent(in), optional :: append (:,:) Return Value integer(kind=int16), allocatable, (:,:) private pure module function diff_2_int32(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int32), intent(in), optional :: prepend (:,:) integer(kind=int32), intent(in), optional :: append (:,:) Return Value integer(kind=int32), allocatable, (:,:) private pure module function diff_2_int64(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int64), intent(in), optional :: prepend (:,:) integer(kind=int64), intent(in), optional :: append (:,:) Return Value integer(kind=int64), allocatable, (:,:) private pure module function diff_2_int8(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim integer(kind=int8), intent(in), optional :: prepend (:,:) integer(kind=int8), intent(in), optional :: append (:,:) Return Value integer(kind=int8), allocatable, (:,:) private pure module function diff_2_sp(x, n, dim, prepend, append) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x (:,:) integer, intent(in), optional :: n integer, intent(in), optional :: dim real(kind=sp), intent(in), optional :: prepend (:,:) real(kind=sp), intent(in), optional :: append (:,:) Return Value real(kind=sp), allocatable, (:,:) public interface gcd Returns the greatest common divisor of two integers\n( Specification ) Version: experimental private elemental function gcd_int8(a, b) result(res) Returns the greatest common divisor of two integers of kind int8\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a integer(kind=int8), intent(in) :: b Return Value integer(kind=int8) private elemental function gcd_int16(a, b) result(res) Returns the greatest common divisor of two integers of kind int16\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a integer(kind=int16), intent(in) :: b Return Value integer(kind=int16) private elemental function gcd_int32(a, b) result(res) Returns the greatest common divisor of two integers of kind int32\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a integer(kind=int32), intent(in) :: b Return Value integer(kind=int32) private elemental function gcd_int64(a, b) result(res) Returns the greatest common divisor of two integers of kind int64\nusing the Euclidean algorithm. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a integer(kind=int64), intent(in) :: b Return Value integer(kind=int64) public interface is_close Returns a boolean scalar/array where two scalar/arrays are element-wise equal within a tolerance.\n( Specification ) private elemental module function is_close_cdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_csp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rdp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a real(kind=dp), intent(in) :: b real(kind=dp), intent(in), optional :: rel_tol real(kind=dp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical private elemental module function is_close_rsp(a, b, rel_tol, abs_tol, equal_nan) result(close) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a real(kind=sp), intent(in) :: b real(kind=sp), intent(in), optional :: rel_tol real(kind=sp), intent(in), optional :: abs_tol logical, intent(in), optional :: equal_nan Return Value logical public interface linspace Create rank 1 array of linearly spaced elements\n If the number of elements is not specified, create an array with size 100. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is end\n( Specification ) When dealing with integers as the start and end parameters, the return type is always a real(dp) . private pure module function linspace_default_1_cdp_cdp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_csp_csp(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint16_iint16(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint32_iint32(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint64_iint64(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_iint8_iint8(start, end) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rdp_rdp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_default_1_rsp_rsp(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LINSPACE_LENGTH) private pure module function linspace_n_1_cdp_cdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function linspace_n_1_csp_csp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function linspace_n_1_iint16_iint16(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: start integer(kind=int16), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint32_iint32(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: start integer(kind=int32), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint64_iint64(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: start integer(kind=int64), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_iint8_iint8(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: start integer(kind=int8), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rdp_rdp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function linspace_n_1_rsp_rsp(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0)) public interface logspace Create rank 1 array of logarithmically spaced elements from base start to base end.\n If the number of elements is not specified, create an array with size 50. If n is a negative value,\n return an array with size 0. If n = 1, return an array whose only element is base**end. If no base\n is specified, logspace will default to using a base of 10 ( Specification ) private pure module function logspace_1_cdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end Return Value complex(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_cdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_cdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: start complex(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_csp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end Return Value complex(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_csp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_csp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: start complex(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_default(start, end) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_iint32_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (n) private pure module function logspace_1_iint32_n_cdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value complex(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_cspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value complex(kind=sp), (max(n,0)) private pure module function logspace_1_iint32_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value integer, (max(n,0)) private pure module function logspace_1_iint32_n_rdpbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_iint32_n_rspbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name integer, intent(in) :: start integer, intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rdp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end Return Value real(kind=dp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rdp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n complex(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rdp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: start real(kind=dp), intent(in) :: end integer, intent(in) :: n real(kind=dp), intent(in) :: base Return Value real(kind=dp), (max(n,0)) private pure module function logspace_1_rsp_default(start, end) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end Return Value real(kind=sp), (DEFAULT_LOGSPACE_LENGTH) private pure module function logspace_1_rsp_n(start, end, n) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_cbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n complex(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_ibase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n integer, intent(in) :: base Return Value real(kind=sp), (max(n,0)) private pure module function logspace_1_rsp_n_rbase(start, end, n, base) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: start real(kind=sp), intent(in) :: end integer, intent(in) :: n real(kind=sp), intent(in) :: base Return Value real(kind=sp), (max(n,0)) public interface meshgrid Computes a list of coordinate matrices from coordinate vectors.\n( Specification ) private module subroutine meshgrid_1_iint16_iint16(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint32_iint32(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint64_iint64(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_iint8_iint8(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rdp_rdp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_1_rsp_rsp(x1, xm1, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(out) :: xm1 (:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint16_iint16(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(out) :: xm1 (:,:) integer(kind=int16), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint32_iint32(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(out) :: xm1 (:,:) integer(kind=int32), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint64_iint64(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(out) :: xm1 (:,:) integer(kind=int64), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_iint8_iint8(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(out) :: xm1 (:,:) integer(kind=int8), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rdp_rdp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(out) :: xm1 (:,:) real(kind=dp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_2_rsp_rsp(x1, x2, xm1, xm2, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(out) :: xm1 (:,:) real(kind=sp), intent(out) :: xm2 (:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint16_iint16(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x1 (:) integer(kind=int16), intent(in) :: x2 (:) integer(kind=int16), intent(in) :: x3 (:) integer(kind=int16), intent(out) :: xm1 (:,:,:) integer(kind=int16), intent(out) :: xm2 (:,:,:) integer(kind=int16), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint32_iint32(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x1 (:) integer(kind=int32), intent(in) :: x2 (:) integer(kind=int32), intent(in) :: x3 (:) integer(kind=int32), intent(out) :: xm1 (:,:,:) integer(kind=int32), intent(out) :: xm2 (:,:,:) integer(kind=int32), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint64_iint64(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x1 (:) integer(kind=int64), intent(in) :: x2 (:) integer(kind=int64), intent(in) :: x3 (:) integer(kind=int64), intent(out) :: xm1 (:,:,:) integer(kind=int64), intent(out) :: xm2 (:,:,:) integer(kind=int64), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_iint8_iint8(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x1 (:) integer(kind=int8), intent(in) :: x2 (:) integer(kind=int8), intent(in) :: x3 (:) integer(kind=int8), intent(out) :: xm1 (:,:,:) integer(kind=int8), intent(out) :: xm2 (:,:,:) integer(kind=int8), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rdp_rdp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x1 (:) real(kind=dp), intent(in) :: x2 (:) real(kind=dp), intent(in) :: x3 (:) real(kind=dp), intent(out) :: xm1 (:,:,:) real(kind=dp), intent(out) :: xm2 (:,:,:) real(kind=dp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing private module subroutine meshgrid_3_rsp_rsp(x1, x2, x3, xm1, xm2, xm3, indexing) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x1 (:) real(kind=sp), intent(in) :: x2 (:) real(kind=sp), intent(in) :: x3 (:) real(kind=sp), intent(out) :: xm1 (:,:,:) real(kind=sp), intent(out) :: xm2 (:,:,:) real(kind=sp), intent(out) :: xm3 (:,:,:) integer, intent(in), optional :: indexing","tags":"","loc":"module/stdlib_math.html"},{"title":"stdlib_random – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_kinds stdlib_optval Interfaces public interface dist_rand Version experimental Generation of random integers with different kinds\n( Specification ) private function dist_rand_iint8(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value integer(kind=int8) private function dist_rand_iint16(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value integer(kind=int16) private function dist_rand_iint32(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value integer(kind=int32) private function dist_rand_iint64(n) result(res) Random integer generation for various kinds\nresult = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind\nResult will be operated by bitwise operators to generate desired integer\nand real pseudorandom numbers Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value integer(kind=int64) public interface random_seed Version experimental Set seed value for random number generator\n( Specification ) private subroutine random_distribution_seed_iint8(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: put integer(kind=int8), intent(out) :: get private subroutine random_distribution_seed_iint16(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: put integer(kind=int16), intent(out) :: get private subroutine random_distribution_seed_iint32(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: put integer(kind=int32), intent(out) :: get private subroutine random_distribution_seed_iint64(put, get) Set seed value for random number generator Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: put integer(kind=int64), intent(out) :: get","tags":"","loc":"module/stdlib_random.html"},{"title":"stdlib_stats_distribution_exponential – Fortran-lang/stdlib","text":"Uses stdlib_random stdlib_kinds stdlib_stats_distribution_uniform ieee_arithmetic Interfaces public interface cdf_exp Version experimental Exponential Cumulative Distribution Function\n( Specification ) private elemental function cdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function cdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function cdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp) public interface pdf_exp Version experimental Exponential Distribution Probability Density Function\n( Specification ) private elemental function pdf_exp_rsp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_rdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private elemental function pdf_exp_csp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private elemental function pdf_exp_cdp(x, lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: lambda Return Value real(kind=dp) public interface rvs_exp Version experimental Exponential Distribution Random Variates\n( Specification ) private impure function rvs_exp_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_exp_rsp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda Return Value real(kind=sp) private impure elemental function rvs_exp_rdp(lambda) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda Return Value real(kind=dp) private impure elemental function rvs_exp_csp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda Return Value complex(kind=sp) private impure elemental function rvs_exp_cdp(lambda) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda Return Value complex(kind=dp) private impure function rvs_exp_array_rsp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_exp_array_rdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_exp_array_csp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_exp_array_cdp(lambda, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: lambda integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"module/stdlib_stats_distribution_exponential.html"},{"title":"stdlib_hashmaps – Fortran-lang/stdlib","text":"Public data_types\nValues that parameterize David Chase's empirical SLOT expansion code\nAPI for the chaining_hashmap_type API for the open_hashmap_type Uses stdlib_hashmap_wrappers iso_fortran_env stdlib_kinds Used by Descendants: stdlib_hashmap_chaining stdlib_hashmap_open Variables Type Visibility Attributes Name Initial integer, public, parameter :: alloc_fault = 1 integer, public, parameter :: array_size_error = 2 integer, public, parameter :: default_bits = 6 KIND values used to parameterixe the hash map and its procedures integer, public, parameter :: int_calls = int64 Error codes returned by the hash map procedures integer, public, parameter :: int_depth = int64 Error codes returned by the hash map procedures integer, public, parameter :: int_index = int32 Error codes returned by the hash map procedures integer, public, parameter :: int_probes = int64 Error codes returned by the hash map procedures real, public, parameter :: load_factor = 0.5625 The size of the pools of allocated map entries integer, public, parameter :: max_bits = 30 KIND values used to parameterixe the hash map and its procedures integer, public, parameter :: success = 0 Derived Types type, public, extends( hashmap_type ) :: chaining_hashmap_type Type implementing the chaining_hashmap_type types\n( Specifications ) Finalizations Procedures final :: free_chaining_map Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls procedure, public, non_overridable, pass(map) :: char_get_other_data procedure, public, non_overridable, pass(map) :: char_key_test procedure, public, non_overridable, pass(map) :: char_map_entry procedure, public, non_overridable, pass(map) :: char_remove_entry procedure, public, non_overridable, pass(map) :: char_set_other_data procedure, public, non_overridable, pass(map) :: entries procedure, public :: get_all_keys => get_all_chaining_keys generic, public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data procedure, public :: init => init_chaining_map procedure, public, non_overridable, pass(map) :: int32_get_other_data procedure, public, non_overridable, pass(map) :: int32_key_test procedure, public, non_overridable, pass(map) :: int32_map_entry procedure, public, non_overridable, pass(map) :: int32_remove_entry procedure, public, non_overridable, pass(map) :: int32_set_other_data procedure, public, non_overridable, pass(map) :: int8_get_other_data procedure, public, non_overridable, pass(map) :: int8_key_test procedure, public, non_overridable, pass(map) :: int8_map_entry procedure, public, non_overridable, pass(map) :: int8_remove_entry procedure, public, non_overridable, pass(map) :: int8_set_other_data procedure, public :: key_get_other_data => get_other_chaining_data procedure, public :: key_key_test => chaining_key_test procedure, public :: key_map_entry => map_chain_entry procedure, public :: key_remove_entry => remove_chaining_entry procedure, public :: key_set_other_data => set_other_chaining_data generic, public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test procedure, public :: loading => chaining_loading generic, public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry procedure, public, non_overridable, pass(map) :: map_probes procedure, public, non_overridable, pass(map) :: num_slots procedure, public :: rehash => rehash_chaining_map generic, public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry generic, public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data procedure, public, non_overridable, pass(map) :: slots_bits procedure, public :: total_depth => total_chaining_depth type, public :: hashmap_type Type implementing an abstract hash map\n( Specifications ) Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls procedure, public, non_overridable, pass(map) :: char_get_other_data procedure, public, non_overridable, pass(map) :: char_key_test procedure, public, non_overridable, pass(map) :: char_map_entry procedure, public, non_overridable, pass(map) :: char_remove_entry procedure, public, non_overridable, pass(map) :: char_set_other_data procedure, public, non_overridable, pass(map) :: entries procedure(get_all_keys), public, deferred, pass(map) :: get_all_keys generic, public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data procedure(init_map), public, deferred, pass(map) :: init procedure, public, non_overridable, pass(map) :: int32_get_other_data procedure, public, non_overridable, pass(map) :: int32_key_test procedure, public, non_overridable, pass(map) :: int32_map_entry procedure, public, non_overridable, pass(map) :: int32_remove_entry procedure, public, non_overridable, pass(map) :: int32_set_other_data procedure, public, non_overridable, pass(map) :: int8_get_other_data procedure, public, non_overridable, pass(map) :: int8_key_test procedure, public, non_overridable, pass(map) :: int8_map_entry procedure, public, non_overridable, pass(map) :: int8_remove_entry procedure, public, non_overridable, pass(map) :: int8_set_other_data procedure(key_get_other_data), public, deferred, pass(map) :: key_get_other_data procedure(key_key_test), public, deferred, pass(map) :: key_key_test procedure(key_map_entry), public, deferred, pass(map) :: key_map_entry procedure(key_remove_entry), public, deferred, pass(map) :: key_remove_entry procedure(key_set_other_data), public, deferred, pass(map) :: key_set_other_data generic, public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test procedure(loading), public, deferred, pass(map) :: loading generic, public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry procedure, public, non_overridable, pass(map) :: map_probes procedure, public, non_overridable, pass(map) :: num_slots procedure(rehash_map), public, deferred, pass(map) :: rehash generic, public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry generic, public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data procedure, public, non_overridable, pass(map) :: slots_bits procedure(total_depth), public, deferred, pass(map) :: total_depth ../../ Key_test procedures. type, public, extends( hashmap_type ) :: open_hashmap_type Type implementing an \"open\" hash map Finalizations Procedures final :: free_open_map Type-Bound Procedures procedure, public, non_overridable, pass(map) :: calls procedure, public, non_overridable, pass(map) :: char_get_other_data procedure, public, non_overridable, pass(map) :: char_key_test procedure, public, non_overridable, pass(map) :: char_map_entry procedure, public, non_overridable, pass(map) :: char_remove_entry procedure, public, non_overridable, pass(map) :: char_set_other_data procedure, public, non_overridable, pass(map) :: entries procedure, public :: get_all_keys => get_all_open_keys generic, public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data procedure, public :: init => init_open_map procedure, public, non_overridable, pass(map) :: int32_get_other_data procedure, public, non_overridable, pass(map) :: int32_key_test procedure, public, non_overridable, pass(map) :: int32_map_entry procedure, public, non_overridable, pass(map) :: int32_remove_entry procedure, public, non_overridable, pass(map) :: int32_set_other_data procedure, public, non_overridable, pass(map) :: int8_get_other_data procedure, public, non_overridable, pass(map) :: int8_key_test procedure, public, non_overridable, pass(map) :: int8_map_entry procedure, public, non_overridable, pass(map) :: int8_remove_entry procedure, public, non_overridable, pass(map) :: int8_set_other_data procedure, public :: key_get_other_data => get_other_open_data procedure, public :: key_key_test => open_key_test procedure, public :: key_map_entry => map_open_entry procedure, public :: key_remove_entry => remove_open_entry procedure, public :: key_set_other_data => set_other_open_data generic, public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test procedure, public :: loading => open_loading generic, public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry procedure, public, non_overridable, pass(map) :: map_probes procedure, public, non_overridable, pass(map) :: num_slots procedure, public :: rehash => rehash_open_map generic, public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry generic, public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data procedure, public, non_overridable, pass(map) :: slots_bits procedure, public :: total_depth => total_open_depth","tags":"","loc":"module/stdlib_hashmaps.html"},{"title":"stdlib_string_type – Fortran-lang/stdlib","text":"Implementation of a string type to hold an arbitrary sequence of characters. This module provides string type compatible with all Fortran instrinsic character\nprocedures as well as overloaded operators for working with character variables. A string type can be easily constructed by creating a new instance from a\ncharacter variable or literal by invoking its constructor or by assigning it\nto a string type. Generally, the string type behaves similar to a deferred\nlength character in most regards but adds memory access safety. The specification of this module is available here . Uses stdlib_ascii stdlib_kinds stdlib_optval Used by Descendants: stdlib_string_type_constructor Interfaces public interface adjustl Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. private elemental function adjustl_string(string) result(adjusted_string) Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface adjustr Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. This method is elemental and returns a scalar character value. private elemental function adjustr_string(string) result(adjusted_string) Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface assignment(=) Assign a character sequence to a string. private elemental subroutine assign_string_char(lhs, rhs) Assign a character sequence to a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: lhs character(len=*), intent(in) :: rhs public interface char Return the character sequence represented by the string. This method is elemental and returns a scalar character value. private pure function char_string(string) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value character(len=len) private elemental function char_string_pos(string, pos) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: pos Return Value character(len=1) private pure function char_string_range(string, start, last) result(character_string) Return the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: start integer, intent(in) :: last Return Value character(len=last) public interface iachar Code in ASCII collating sequence. This method is elemental and returns a default integer scalar value. private elemental function iachar_string(string) result(ich) Code in ASCII collating sequence. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface ichar Character-to-integer conversion function. This method is elemental and returns a default integer scalar value. private elemental function ichar_string(string) result(ich) Character-to-integer conversion function. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface index Position of a substring within a string . Returns the position of the start of the leftmost or rightmost occurrence\nof string substring in string , counting from one. If substring is not\npresent in string , zero is returned. This method is elemental and returns a default integer scalar value. private elemental function index_string_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version both character sequences are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_string_char(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the main character sequence is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring logical, intent(in), optional :: back Return Value integer private elemental function index_char_string(string, substring, back) result(pos) Position of a sequence of character within a character sequence.\nIn this version the sub character sequence is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring logical, intent(in), optional :: back Return Value integer public interface len Returns the length of the character sequence represented by the string. This method is elemental and returns a default integer scalar value. private elemental function len_string(string) result(length) Returns the length of the character sequence represented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface len_trim Returns the length of the character sequence without trailing spaces\nrepresented by the string. This method is elemental and returns a default integer scalar value. private elemental function len_trim_string(string) result(length) Returns the length of the character sequence without trailing spaces\nrepresented by the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value integer public interface lge Lexically compare the order of two character sequences being greater equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function lge_string_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lge_string_char(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lge_char_string(lhs, rhs) result(is_lge) Lexically compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface lgt Lexically compare the order of two character sequences being greater,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function lgt_string_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lgt_string_char(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lgt_char_string(lhs, rhs) result(is_lgt) Lexically compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface lle Lexically compare the order of two character sequences being less equal,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function lle_string_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lle_string_char(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lle_char_string(lhs, rhs) result(is_lle) Lexically compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface llt Lexically compare the order of two character sequences being less,\nThe left-hand side, the right-hand side or both character sequences can\nbe represented by a string. This method is elemental and returns a default logical scalar value. private elemental function llt_string_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function llt_string_char(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function llt_char_string(lhs, rhs) result(is_llt) Lexically compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface move Moves the allocated character scalar from 'from' to 'to' Specifications private elemental subroutine move_string_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout), target :: from type( string_type ), intent(inout), target :: to private pure subroutine move_string_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: from character(len=:), intent(out), allocatable :: to private pure subroutine move_char_string(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from type( string_type ), intent(out) :: to private pure subroutine move_char_char(from, to) Moves the allocated character scalar from 'from' to 'to'\nNo output Arguments Type Intent Optional Attributes Name character(len=:), intent(inout), allocatable :: from character(len=:), intent(out), allocatable :: to public interface operator(//) Concatenate two character sequences, the left-hand side, the right-hand side\nor both character sequences can be represented by a string. This operator is elemental and returns a scalar character value. private elemental function concat_string_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_string_char(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( string_type ) private elemental function concat_char_string(lhs, rhs) result(string) Concatenate two character sequences.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( string_type ) public interface operator(/=) Compare two character sequences for inequality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function ne_string_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ne_string_char(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ne_char_string(lhs, rhs) result(is_ne) Compare two character sequences for inequality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(<) Compare two character sequences for being less, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function lt_string_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function lt_string_char(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function lt_char_string(lhs, rhs) result(is_lt) Compare two character sequences for being less.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(<=) Compare two character sequences for being less than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function le_string_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function le_string_char(lhs, rhs) result(is_le) Compare two character sequences for being less or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function le_char_string(lhs, rhs) result(is_le) Compare two character sequences for being less or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(==) Compare two character sequences for equality, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function eq_string_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function eq_string_char(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function eq_char_string(lhs, rhs) result(is_eq) Compare two character sequences for equality.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(>) Compare two character sequences for being greater, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function gt_string_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function gt_string_char(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function gt_char_string(lhs, rhs) result(is_gt) Compare two character sequences for being greater.\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface operator(>=) Compare two character sequences for being greater than, the left-hand side,\nthe right-hand side or both character sequences can be represented by\na string. This operator is elemental and returns a default logical scalar value. private elemental function ge_string_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version both character sequences are by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical private elemental function ge_string_char(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal.\nIn this version the left-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value logical private elemental function ge_char_string(lhs, rhs) result(is_ge) Compare two character sequences for being greater or equal\nIn this version the right-hand side character sequences is by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value logical public interface read(formatted) Read a character sequence from a connected unformatted unit into the string. private subroutine read_formatted(string, unit, iotype, v_list, iostat, iomsg) Read a character sequence from a connected formatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg public interface read(unformatted) Read a character sequence from a connected unformatted unit into the string. private subroutine read_unformatted(string, unit, iostat, iomsg) Read a character sequence from a connected unformatted unit into the string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg public interface repeat Repeats the character sequence hold by the string by the number of\nspecified copies. This method is elemental and returns a scalar character value. private elemental function repeat_string(string, ncopies) result(repeated_string) Repeats the character sequence hold by the string by the number of\nspecified copies. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: ncopies Return Value type( string_type ) public interface reverse Reverses the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nreverse character sequence private elemental function reverse_string(string) result(reversed_string) Reverse the character sequence hold by the input string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface scan Scan a string for the presence of a set of characters. Scans a string for\nany of the characters in a set of characters. If back is either absent or false , this function returns the position\nof the leftmost character of string that is in set . If back is true ,\nthe rightmost position is returned. If no character of set is found in string , the result is zero. This method is elemental and returns a default integer scalar value. private elemental function scan_string_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version both the character sequence and the character set are\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_string_char(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the character sequences is represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function scan_char_string(string, set, back) result(pos) Scan a character sequence for any of the characters in a set of characters.\nIn this version the set of characters is represented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer public interface string_type Constructor for new string instances private elemental module function new_string(string) result(new) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: string Return Value type( string_type ) private elemental module function new_string_from_integer_int16(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int32(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int64(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_integer_int8(val) result(new) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: val Return Value type( string_type ) private elemental module function new_string_from_logical_lk(val) result(new) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: val Return Value type( string_type ) public interface to_lower Returns the lowercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nlowercase character sequence private elemental function to_lower_string(string) result(lowercase_string) Convert the character sequence hold by the input string to lower case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface to_sentence Returns the sentencecase version of the character sequence hold by the input string This method is elemental and returns a new string_type instance which holds this\nsentencecase character sequence private elemental function to_sentence_string(string) result(sentence_string) Convert the character sequence hold by the input string to sentence case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface to_title Returns the titlecase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\ntitlecase character sequence private elemental function to_title_string(string) result(titlecase_string) Convert the character sequence hold by the input string to title case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface to_upper Returns the uppercase version of the character sequence hold by the input string This method is Elemental and returns a new string_type instance which holds this\nuppercase character sequence private elemental function to_upper_string(string) result(uppercase_string) Convert the character sequence hold by the input string to upper case Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface trim Returns the character sequence hold by the string without trailing spaces. This method is elemental and returns a scalar character value. private elemental function trim_string(string) result(trimmed_string) Returns the character sequence hold by the string without trailing spaces. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) public interface verify Scan a string for the absence of a set of characters. Verifies that all\nthe characters in string belong to the set of characters in set. If back is either absent or false , this function returns the position\nof the leftmost character of string that is not in set . If back is true ,\nthe rightmost position is returned. If all characters of string are found\nin set , the result is zero. This method is elemental and returns a default integer scalar value. private elemental function verify_string_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version both the character sequence and\nthe character set are represented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_string_char(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the character sequences is\nrepresented by a string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: set logical, intent(in), optional :: back Return Value integer private elemental function verify_char_string(string, set, back) result(pos) Verify a character sequence for the absence any of the characters in\na set of characters. In this version the set of characters is\nrepresented by a string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: set logical, intent(in), optional :: back Return Value integer public interface write(formatted) Write the character sequence hold by the string to a connected formatted\nunit. private subroutine write_formatted(string, unit, iotype, v_list, iostat, iomsg) Write the character sequence hold by the string to a connected formatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list (:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg public interface write(unformatted) Write the character sequence hold by the string to a connected unformatted\nunit. private subroutine write_unformatted(string, unit, iostat, iomsg) Write the character sequence hold by the string to a connected unformatted\nunit. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: unit integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg Derived Types type, public, sequence  :: string_type String type holding an arbitrary sequence of characters. Constructor Constructor for new string instances private\n\n elemental, module\n function new_string (string) private\n\n elemental, module\n function new_string_from_integer_int16 (val) private\n\n elemental, module\n function new_string_from_integer_int32 (val) private\n\n elemental, module\n function new_string_from_integer_int64 (val) private\n\n elemental, module\n function new_string_from_integer_int8 (val) private\n\n elemental, module\n function new_string_from_logical_lk (val)","tags":"","loc":"module/stdlib_string_type.html"},{"title":"stdlib_constants – Fortran-lang/stdlib","text":"Constants\n( Specification ) Uses stdlib_codata stdlib_kinds Variables Type Visibility Attributes Name Initial real(kind=dp), public, parameter :: Avogadro = AVOGADRO_CONSTANT%value Avogadro constant real(kind=dp), public, parameter :: Boltzmann = BOLTZMANN_CONSTANT%value Boltzmann constant real(kind=dp), public, parameter :: G = NEWTONIAN_CONSTANT_OF_GRAVITATION%value Newtonian constant of gravitation real(kind=dp), public, parameter :: N_A = AVOGADRO_CONSTANT%value Avogadro constant real(kind=dp), public, parameter :: PI_dp = acos(-1.0_dp) PI real(kind=sp), public, parameter :: PI_sp = acos(-1.0_sp) PI real(kind=dp), public, parameter :: Planck = PLANCK_CONSTANT%value Planck constant real(kind=dp), public, parameter :: R = MOLAR_GAS_CONSTANT%value Molar gas constant real(kind=dp), public, parameter :: Rydberg = RYDBERG_CONSTANT%value Rydberg constant real(kind=dp), public, parameter :: Stefan_Boltzmann = STEFAN_BOLTZMANN_CONSTANT%value Stefan-Boltzmann constant real(kind=dp), public, parameter :: Wien = WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT%value Wien wavelength displacement law constant real(kind=dp), public, parameter :: alpha = FINE_STRUCTURE_CONSTANT%value Fine structure constant real(kind=dp), public, parameter :: c = SPEED_OF_LIGHT_IN_VACUUM%value Speed of light in vacuum real(kind=dp), public, parameter :: e = ELEMENTARY_CHARGE%value Elementary charge real(kind=dp), public, parameter :: epsilon_0 = VACUUM_ELECTRIC_PERMITTIVITY%value vacuum mag. permeability real(kind=dp), public, parameter :: fine_structure = FINE_STRUCTURE_CONSTANT%value Fine structure constant real(kind=dp), public, parameter :: g2 = STANDARD_ACCELERATION_OF_GRAVITY%value Standard acceleration of gravity real(kind=dp), public, parameter :: gas_constant = MOLAR_GAS_CONSTANT%value Molar gas constant real(kind=dp), public, parameter :: gravitation_constant = NEWTONIAN_CONSTANT_OF_GRAVITATION%value Newtonian constant of gravitation real(kind=dp), public, parameter :: h = PLANCK_CONSTANT%value Planck constant real(kind=dp), public, parameter :: hbar = PLANCK_CONSTANT%value/PI_dp Reduced Planck constant real(kind=dp), public, parameter :: k = BOLTZMANN_CONSTANT%value Boltzmann constant real(kind=dp), public, parameter :: m_e = ELECTRON_MASS%value Electron mass real(kind=dp), public, parameter :: m_n = NEUTRON_MASS%value Neutron mass real(kind=dp), public, parameter :: m_p = PROTON_MASS%value Proton mass real(kind=dp), public, parameter :: m_u = ATOMIC_MASS_CONSTANT%value Atomic mass constant real(kind=dp), public, parameter :: mu_0 = VACUUM_MAG_PERMEABILITY%value vacuum mag. permeability real(kind=dp), public, parameter :: sigma = STEFAN_BOLTZMANN_CONSTANT%value Stefan-Boltzmann constant real(kind=dp), public, parameter :: speed_of_light = SPEED_OF_LIGHT_IN_VACUUM%value Speed of light in vacuum real(kind=dp), public, parameter :: u = ATOMIC_MASS_CONSTANT%value Atomic mass constant","tags":"","loc":"module/stdlib_constants.html"},{"title":"stdlib_stringlist_type – Fortran-lang/stdlib","text":"Uses stdlib_math stdlib_string_type Variables Type Visibility Attributes Name Initial type( stringlist_index_type ), public, parameter :: list_head = stringlist_index_type(.true., 1) type( stringlist_index_type ), public, parameter :: list_tail = stringlist_index_type(.false., 1) Interfaces public interface bidx Returns an instance of type 'stringlist_index_type' representing backward index Specifications private pure function backward_index(idx) Returns an instance of type 'stringlist_index_type' representing backward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type ) public interface fidx Returns an instance of type 'stringlist_index_type' representing forward index Specifications private pure function forward_index(idx) Returns an instance of type 'stringlist_index_type' representing forward index 'idx' Arguments Type Intent Optional Attributes Name integer, intent(in) :: idx Return Value type( stringlist_index_type ) public interface operator(//) Concatenates stringlist with the input entity\nReturns a new stringlist Specifications private function append_char(lhs, rhs) Appends character scalar 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in) :: rhs Return Value type( stringlist_type ) private function append_string(lhs, rhs) Appends string 'rhs' to the stringlist 'list'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_char(lhs, rhs) Prepends character scalar 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_string(lhs, rhs) Prepends string 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_stringlist(lhs, rhs) Appends stringlist 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function append_carray(lhs, rhs) Appends chararray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function append_sarray(lhs, rhs) Appends stringarray 'rhs' to the stringlist 'lhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value type( stringlist_type ) private function prepend_carray(lhs, rhs) Prepends chararray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) private function prepend_sarray(lhs, rhs) Prepends stringarray 'lhs' to the stringlist 'rhs'\nReturns a new stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value type( stringlist_type ) public interface operator(/=) Compares stringlist for inequality with the input entity\nReturns a logical Specifications private pure function ineq_stringlist(lhs, rhs) Compares stringlist 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for inequality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for inequality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function ineq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function ineq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for inequality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical public interface operator(==) Compares stringlist for equality with the input entity\nReturns a logical Specifications private pure function eq_stringlist(lhs, rhs) Compares stringlist 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_stringlist_carray(lhs, rhs) Compares stringlist 'lhs' for equality with chararray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs character(len=*), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_stringlist_sarray(lhs, rhs) Compares stringlist 'lhs' for equality with stringarray 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( stringlist_type ), intent(in) :: lhs type( string_type ), intent(in), dimension(:) :: rhs Return Value logical private pure function eq_carray_stringlist(lhs, rhs) Compares chararray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical private pure function eq_sarray_stringlist(lhs, rhs) Compares stringarray 'lhs' for equality with stringlist 'rhs'\nReturns a logical Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: lhs type( stringlist_type ), intent(in) :: rhs Return Value logical public interface stringlist_type Constructor for stringlist\nReturns an instance of type stringlist_type Specifications private pure function new_stringlist() Constructor with no argument\nReturns a new instance of type stringlist Arguments None Return Value type( stringlist_type ) private pure function new_stringlist_carray(array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name character(len=*), intent(in), dimension(:) :: array Return Value type( stringlist_type ) private pure function new_stringlist_sarray(array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Arguments Type Intent Optional Attributes Name type( string_type ), intent(in), dimension(:) :: array Return Value type( stringlist_type ) Derived Types type, public :: stringlist_index_type type, public :: stringlist_type Constructor Constructor for stringlist\nReturns an instance of type stringlist_type Specifications private\n\n pure\n function new_stringlist () Constructor with no argument\nReturns a new instance of type stringlist private\n\n pure\n function new_stringlist_carray (array) Constructor to convert chararray to stringlist\nReturns a new instance of type stringlist private\n\n pure\n function new_stringlist_sarray (array) Constructor to convert stringarray to stringlist\nReturns a new instance of type stringlist Type-Bound Procedures procedure, public :: clear => clear_list generic, public :: get => get_string_idx generic, public :: insert_at => insert_at_char_idx, insert_at_string_idx, insert_at_stringlist_idx, insert_at_chararray_idx, insert_at_stringarray_idx procedure, public :: len => length_list","tags":"","loc":"module/stdlib_stringlist_type.html"},{"title":"stdlib_linalg_blas – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_aux stdlib_linalg_blas_s stdlib_linalg_blas_z stdlib_linalg_blas_d stdlib_linalg_constants stdlib_linalg_blas_c Interfaces public interface axpy AXPY constant times a vector plus a vector. public pure subroutine caxpy(n, ca, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine daxpy(n, da, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine saxpy(n, sa, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zaxpy(n, za, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_caxpy (n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_daxpy (n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_saxpy (n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zaxpy (n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public interface copy COPY copies a vector x to a vector y. public pure subroutine ccopy(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dcopy(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine scopy(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zcopy(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ccopy (n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dcopy (n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_scopy (n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zcopy (n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy public interface dot DOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. public pure function ddot(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function sdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public pure function stdlib_ddot (n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_sdot (n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public interface dotc DOTC forms the dot product of two complex vectors\nDOTC = X^H * Y public pure function cdotc(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotc(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public pure function stdlib_cdotc (n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotc (n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public interface dotu DOTU forms the dot product of two complex vectors\nDOTU = X^T * Y public pure function cdotu(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function zdotu(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public pure function stdlib_cdotu (n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_zdotu (n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public interface gbmv GBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. public pure subroutine cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface gemm GEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. public pure subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_sgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface gemv GEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. public pure subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface ger GER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. public pure subroutine dger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine sger(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dger (m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_sger (m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface gerc GERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. public pure subroutine cgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgerc(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cgerc (m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgerc (m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface geru GERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. public pure subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cgeru (m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgeru (m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface hbmv HBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. public pure subroutine chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface hemm HEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. public pure subroutine chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_chemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface hemv HEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. public pure subroutine chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface her HER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. public pure subroutine cher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher (uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher (uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface her2 HER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. public pure subroutine cher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine zher2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher2 (uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2 (uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface her2k HER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. public pure subroutine cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface herk HERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. public pure subroutine cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface hpmv HPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. public pure subroutine chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface hpr HPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. public pure subroutine chpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_chpr (uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr (uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) public interface hpr2 HPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. public pure subroutine chpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_chpr2 (uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr2 (uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) public interface nrm2 NRM2 returns the euclidean norm of a vector via the function\nname, so that\nNRM2 := sqrt( x'*x ) public pure function dnrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function snrm2(n, x, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_dnrm2 (n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_snrm2 (n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public interface rot ROT applies a plane rotation. public pure subroutine drot(n, dx, incx, dy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine srot(n, sx, incx, sy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_drot (n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_srot (n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public interface rotg The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. public pure subroutine crotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine drotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine srotg(a, b, c, s) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine zrotg(a, b, c, s) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s public pure subroutine stdlib_crotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine stdlib_drotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine stdlib_srotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine stdlib_zrotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s public interface rotm ROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See ROTMG for a description of data storage in DPARAM. public pure subroutine drotm(n, dx, incx, dy, incy, dparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine srotm(n, sx, incx, sy, incy, sparam) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) public pure subroutine stdlib_drotm (n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine stdlib_srotm (n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) public interface rotmg ROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. public pure subroutine drotmg(dd1, dd2, dx1, dy1, dparam) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine srotmg(sd1, sd2, sx1, sy1, sparam) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) public pure subroutine stdlib_drotmg (dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine stdlib_srotmg (sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) public interface sbmv SBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. public pure subroutine dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface scal SCAL scales a vector by a constant. public pure subroutine cscal(n, ca, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dscal(n, da, dx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine sscal(n, sa, sx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine zscal(n, za, zx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_cscal (n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dscal (n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_sscal (n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zscal (n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public interface sdot Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. public pure function dsdot(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_dsdot (n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public interface spmv SPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. public pure subroutine dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface spr SPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. public pure subroutine dspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr(uplo, n, alpha, x, incx, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_dspr (uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr (uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) public interface spr2 SPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. public pure subroutine dspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine sspr2(uplo, n, alpha, x, incx, y, incy, ap) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_dspr2 (uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr2 (uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) public interface srot SROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. public pure subroutine csrot(n, cx, incx, cy, incy, c, s) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_csrot (n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public interface sscal SSCAL scales a complex vector by a real constant. public pure subroutine csscal(n, sa, cx, incx) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_csscal (n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public interface swap SWAP interchanges two vectors. public pure subroutine cswap(n, cx, incx, cy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine dswap(n, dx, incx, dy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine sswap(n, sx, incx, sy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine zswap(n, zx, incx, zy, incy) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cswap (n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dswap (n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sswap (n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zswap (n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public interface symm SYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. public pure subroutine csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface symv SYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. public pure subroutine dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public interface syr SYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. public pure subroutine dsyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr(uplo, n, alpha, x, incx, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr (uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr (uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface syr2 SYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. public pure subroutine dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public interface syr2k SYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. public pure subroutine csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface syrk SYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. public pure subroutine csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public interface tbmv TBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. public pure subroutine ctbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctbmv (uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbmv (uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbmv (uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbmv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface tbsv TBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. public pure subroutine ctbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztbsv(uplo, trans, diag, n, k, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctbsv (uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbsv (uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbsv (uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbsv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface tpmv TPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. public pure subroutine ctpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpmv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpmv (uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpmv (uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpmv (uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpmv (uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface tpsv TPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. public pure subroutine ctpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztpsv(uplo, trans, diag, n, ap, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpsv (uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpsv (uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpsv (uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpsv (uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface trmm TRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. public pure subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public interface trmv TRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. public pure subroutine ctrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrmv (uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrmv (uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strmv (uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrmv (uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public interface trsm TRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. public pure subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public interface trsv TRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. public pure subroutine ctrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine dtrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine strsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine ztrsv(uplo, trans, diag, n, a, lda, x, incx) Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrsv (uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrsv (uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strsv (uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrsv (uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas.html"},{"title":"stdlib_selection – Fortran-lang/stdlib","text":"Quickly find the k-th smallest value of an array, or the index of the k-th smallest value.\n( Specification ) Uses stdlib_kinds Interfaces public interface arg_select ( Specification ) private subroutine arg_select_1_iint8_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint8_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint16_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint32_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_iint64_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rsp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int8(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int8), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int8), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int16(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int16), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int16), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int32(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int32), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int32), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). private subroutine arg_select_1_rdp_int64(a, indx, k, kth_smallest, left, right) arg_select - find the index of the k-th smallest entry in a(:) Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:) Array in which we seek the k-th smallest entry. integer(kind=int64), intent(inout) :: indx (:) Array of indices into a(:) . Must contain each integer\nfrom 1:size(a) exactly once. On output it will be partially\nsorted such that all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.\n all( a(indx(k)) <= a(indx( (k+1):size(a) )) ) . integer(kind=int64), intent(in) :: k We want index of the k-th smallest entry. E.G. k=1 leads to a(kth_smallest) = min(a) , and k=size(a) leads to a(kth_smallest) = max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the index with the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(indx(left:right)) and also that: maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right))) and: maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a)))) then one or both bounds can be specified to reduce the search\ntime. These constraints are available if we have previously\ncalled the subroutine with a different k (due to the way that indx(:) becomes partially sorted, see documentation for indx(:) ). public interface select ( Specification ) private subroutine select_1_iint8_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint8_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int8), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint16_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int16), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint32_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int32), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_iint64_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) integer(kind=int64), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rsp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=sp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int8(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int8), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int8), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int8), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int16(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int16), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int16), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int16), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int32(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int32), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int32), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int32), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). private subroutine select_1_rdp_int64(a, k, kth_smallest, left, right) select - select the k-th smallest entry in a(:). Partly derived from the \"Coretran\" implementation of \nquickSelect by Leon Foks, https://github.com/leonfoks/coretran Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a (:) Array in which we seek the k-th smallest entry.\nOn output it will be partially sorted such that all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a))) is true. integer(kind=int64), intent(in) :: k We want the k-th smallest entry. E.G. k=1 leads to kth_smallest=min(a) , and k=size(a) leads to kth_smallest=max(a) real(kind=dp), intent(out) :: kth_smallest On output contains the k-th smallest value of a(:) integer(kind=int64), intent(in), optional :: left If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ). integer(kind=int64), intent(in), optional :: right If we know that:\n the k-th smallest entry of a is in a(left:right) and also that: maxval(a(1:(left-1))) <= minval(a(left:right)) and: maxval(a(left:right))) <= minval(a((right+1):size(a))) then one or both bounds can be specified to narrow the search.\nThe constraints are available if we have previously called the\nsubroutine with different k (because of how a(:) becomes\npartially sorted, see documentation for a(:) ).","tags":"","loc":"module/stdlib_selection.html"},{"title":"stdlib_kinds – Fortran-lang/stdlib","text":"The specification of this module is available here . Uses iso_fortran_env iso_c_binding Variables Type Visibility Attributes Name Initial integer, public, parameter :: dp = selected_real_kind(15) Double precision real numbers integer, public, parameter :: lk = kind(.true.) Default logical kind parameter integer, public, parameter :: qp = -1 Quadruple precision real numbers integer, public, parameter :: sp = selected_real_kind(6) Single precision real numbers integer, public, parameter :: xdp = -1 Extended double precision real numbers","tags":"","loc":"module/stdlib_kinds.html"},{"title":"stdlib_linalg_blas_s – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_aux stdlib_linalg_constants Functions public pure function stdlib_sasum (n, sx, incx) SASUM takes the sum of the absolute values.\nuses unrolled loops for increment equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_scasum (n, cx, incx) SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a single precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_scnrm2 (n, x, incx) SCNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSCNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) public pure function stdlib_sdot (n, sx, incx, sy, incy) SDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public pure function stdlib_sdsdot (n, sb, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation.\nReturns S.P. result with dot product accumulated in D.P.\nSDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I INCX) SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N) INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sb real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=sp) public pure function stdlib_snrm2 (n, x, incx) SNRM2 returns the euclidean norm of a vector via the function\nname, so that\nSNRM2 := sqrt( x'*x ). Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=sp) Subroutines public pure subroutine stdlib_saxpy (n, sa, sx, incx, sy, incy) SAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_scopy (n, sx, incx, sy, incy) SCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(out) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) SGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_sgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) SGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sger (m, n, alpha, x, incx, y, incy, a, lda) SGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_srot (n, sx, incx, sy, incy, c, s) applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_srotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: a real(kind=sp), intent(inout) :: b real(kind=sp), intent(out) :: c real(kind=sp), intent(out) :: s public pure subroutine stdlib_srotm (n, sx, incx, sy, incy, sparam) SROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nSX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for SY using LY and INCY. \nWith SPARAM(1)=SFLAG, has one of the following forms: See SROTMG for a description of data storage in SPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: sparam (5) public pure subroutine stdlib_srotmg (sd1, sd2, sx1, sy1, sparam) SROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With SPARAM(1)=SFLAG, has one of the following forms: Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: sd1 real(kind=sp), intent(inout) :: sd2 real(kind=sp), intent(inout) :: sx1 real(kind=sp), intent(in) :: sy1 real(kind=sp), intent(out) :: sparam (5) public pure subroutine stdlib_ssbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) SSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sscal (n, sa, sx, incx) SSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_sspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) SSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_sspr (uplo, n, alpha, x, incx, ap) SSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_sspr2 (uplo, n, alpha, x, incx, y, incy, ap) SSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_sswap (n, sx, incx, sy, incy) SSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(inout) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: sy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) SSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) SSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ssyr (uplo, n, alpha, x, incx, a, lda) SSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) SSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_ssyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) SSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ssyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) SSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta real(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_stbmv (uplo, trans, diag, n, k, a, lda, x, incx) STBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stbsv (uplo, trans, diag, n, k, a, lda, x, incx) STBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpmv (uplo, trans, diag, n, ap, x, incx) STPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_stpsv (uplo, trans, diag, n, ap, x, incx) STPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: ap (*) real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strmv (uplo, trans, diag, n, a, lda, x, incx) STRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_strsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) STRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_strsv (uplo, trans, diag, n, a, lda, x, incx) STRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_s.html"},{"title":"stdlib_bitsets – Fortran-lang/stdlib","text":"Implements zero based bitsets of size up to huge(0_int32) .\n The current code uses 64 bit integers to store the bits and uses all 64 bits.\n The code assumes two's complement integers, and treats negative integers as\n having the sign bit set.\n( Specification ) Public procedures Uses iso_fortran_env stdlib_kinds stdlib_optval Used by Descendants: stdlib_bitsets_64 stdlib_bitsets_large Variables Type Visibility Attributes Name Initial integer, public, parameter :: alloc_fault = 1 Error flag indicating a memory allocation failure integer, public, parameter :: array_size_invalid_error = 2 Error flag indicating an invalid bits value integer, public, parameter :: char_string_invalid_error = 3 Error flag indicating an invalid character string integer, public, parameter :: char_string_too_large_error = 4 Error flag indicating a too large character string integer, public, parameter :: char_string_too_small_error = 5 Error flag indicating a too small character string integer, public, parameter :: eof_failure = 6 Error flag indicating unexpected End-of-File on a READ integer, public, parameter :: index_invalid_error = 7 Error flag indicating an invalid index integer, public, parameter :: integer_overflow_error = 8 Error flag indicating integer overflow integer, public, parameter :: max_digits = 10 integer(kind=bits_kind), public, parameter :: overflow_bits = 2_bits_kind**30/5 integer, public, parameter :: read_failure = 9 Error flag indicating failure of a READ statement integer, public, parameter :: success = 0 Error flag indicating no errors integer, public, parameter :: write_failure = 10 Error flag indicating a failure on a WRITE statement Interfaces public interface and Sets the bits in set1 to the bitwise and of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_and use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all none if ( none ( set0 ) ) write ( * , * ) 'Second test of AND worked.' call set1 % not () call and ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of AND worked.' end program example_and private elemental module subroutine and_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 public interface and_not Sets the bits in set1 to the bitwise and of the original bits in set1 with the bitwise negation of set2 . The sets must have the same\n number of bits otherwise the result is undefined. ( Specification ) Example program example_and_not use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and_not ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of AND_NOT worked.' call set0 % not () call set1 % not () call and_not ( set0 , set1 ) ! none all if ( none ( set0 ) ) write ( * , * ) 'Third test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of AND_NOT worked.' end program example_and_not private elemental module subroutine and_not_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine and_not_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 public interface assignment(=) Used to define assignment for bitset_large .\n ( Specification ) Example program example_assignment use stdlib_bitsets logical ( int8 ) :: logical1 ( 64 ) = . true . logical ( int32 ), allocatable :: logical2 (:) type ( bitset_64 ) :: set0 , set1 set0 = logical1 if ( set0 % bits () /= 64 ) then error stop procedure // & ' initialization with logical(int8) failed to set' // & ' the right size.' else if ( . not . set0 % all () ) then error stop procedure // ' initialization with' // & ' logical(int8) failed to set the right values.' else write ( * , * ) 'Initialization with logical(int8) succeeded.' end if set1 = set0 if ( set1 == set0 ) & write ( * , * ) 'Initialization by assignment succeeded' logical2 = set1 if ( all ( logical2 ) ) then write ( * , * ) 'Initialization of logical(int32) succeeded.' end if end program example_assignment private pure module subroutine assign_logint16_large(self, logical_vector) Used to define assignment from an array of type logical(int16) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int16), intent(in) :: logical_vector (:) private pure module subroutine assign_logint32_large(self, logical_vector) Used to define assignment from an array of type logical(int32) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int32), intent(in) :: logical_vector (:) private pure module subroutine assign_logint64_large(self, logical_vector) Used to define assignment from an array of type logical(int64) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int64), intent(in) :: logical_vector (:) private pure module subroutine assign_logint8_large(self, logical_vector) Used to define assignment from an array of type logical(int8) to a bitset_large . Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: self logical(kind=int8), intent(in) :: logical_vector (:) private pure module subroutine logint16_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int16) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int16), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint32_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int32) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int32), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint64_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int64) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int64), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set private pure module subroutine logint8_assign_large(logical_vector, set) Used to define assignment to an array of type logical(int8) from a bitset_large . Arguments Type Intent Optional Attributes Name logical(kind=int8), intent(out), allocatable :: logical_vector (:) type( bitset_large ), intent(in) :: set public interface extract Creates a new bitset, new , from a range, start_pos to stop_pos , in\n bitset old . If start_pos is greater than stop_pos the new bitset is\n empty. If start_pos is less than zero or stop_pos is greater than bits(old)-1 then if status is present it has the value index_invalid_error and new is undefined, otherwise processing stops\n with an informative message.\n ( Specification ) Example program example_extract use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set0 % set ( 100 , 150 ) call extract ( set1 , set0 , 100 , 150 ) if ( set1 % bits () == 51 ) & write ( * , * ) 'SET1 has the proper size.' if ( set1 % all () ) write ( * , * ) 'SET1 has the proper values.' end program example_extract private module subroutine extract_64(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(out) :: new type( bitset_64 ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status private module subroutine extract_large(new, old, start_pos, stop_pos, status) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(out) :: new type( bitset_large ), intent(in) :: old integer(kind=bits_kind), intent(in) :: start_pos integer(kind=bits_kind), intent(in) :: stop_pos integer, intent(out), optional :: status public interface operator(/=) Returns .true. if not all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_inequality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 /= set1 . and . set0 /= set2 . and . set1 /= set2 . and . & . not . set0 /= set0 . and . . not . set1 /= set1 . and . . not . & set2 /= set2 ) then write ( * , * ) 'Passed 64 bit inequality tests.' else error stop 'Failed 64 bit inequality tests.' end if end program example_inequality private elemental module function neqv_64(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function neqv_large(set1, set2) result(neqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(<) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_lt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 < set1 . and . set1 < set2 . and . set0 < set2 . and . & . not . set0 < set0 . and . . not . set2 < set0 . and . . not . & set2 < set1 ) then write ( * , * ) 'Passed 64 bit less than tests.' else error stop 'Failed 64 bit less than tests.' end if end program example_lt private elemental module function lt_64(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function lt_large(set1, set2) result(lt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(<=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_le use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 <= set1 . and . set1 <= set2 . and . set0 <= set2 . and . & set0 <= set0 . and . set1 <= set1 . and . set2 <= set2 . and . & . not . set1 <= set0 . and . . not . set2 <= set0 . and . . not . & set2 <= set1 ) then write ( * , * ) 'Passed 64 bit less than or equal tests.' else error stop 'Failed 64 bit less than or equal tests.' end if end program example_le private elemental module function le_64(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function le_large(set1, set2) result(le) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(==) Returns .true. if all bits in set1 and set2 have the same value, .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_equality use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 == set0 . and . set1 == set1 . and . set2 == set2 . and . & . not . set0 == set1 . and . . not . set0 == set2 . and . . not . & set1 == set2 ) then write ( * , * ) 'Passed 64 bit equality tests.' else error stop 'Failed 64 bit equality tests.' end if end program example_equality private elemental module function eqv_64(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function eqv_large(set1, set2) result(eqv) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(>) Returns .true. if the bits in set1 and set2 differ and the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_gt use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 > set0 . and . set2 > set1 . and . set2 > set0 . and . & . not . set0 > set0 . and . . not . set0 > set1 . and . . not . & set1 > set2 ) then write ( * , * ) 'Passed 64 bit greater than tests.' else error stop 'Failed 64 bit greater than tests.' end if end program example_gt private elemental module function gt_64(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function gt_large(set1, set2) result(gt) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface operator(>=) Returns .true. if the bits in set1 and set2 are the same or the\n highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must have the same number of bits\n otherwise the result is undefined.\n ( Specification ) Example program example_ge use stdlib_bitsets type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 >= set0 . and . set2 >= set1 . and . set2 >= set0 . and . & set0 >= set0 . and . set1 >= set1 . and . set2 >= set2 . and . & . not . set0 >= set1 . and . . not . set0 >= set2 . and . . not . & set1 >= set2 ) then write ( * , * ) 'Passed 64 bit greater than or equals tests.' else error stop 'Failed 64 bit greater than or equals tests.' end if end program example_ge private elemental module function ge_64(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(in) :: set1 type( bitset_64 ), intent(in) :: set2 Return Value logical private elemental module function ge_large(set1, set2) result(ge) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(in) :: set1 type( bitset_large ), intent(in) :: set2 Return Value logical public interface or Sets the bits in set1 to the bitwise or of the original bits in set1 and set2 . The sets must have the same number of bits otherwise\n the result is undefined.\n ( Specification ) Example program example_or use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call or ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of OR worked.' call set0 % not () call set1 % not () call or ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all all if ( all ( set0 ) ) write ( * , * ) 'Fourth test of OR worked.' end program example_or private elemental module subroutine or_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine or_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 public interface xor Sets the bits in set1 to the bitwise xor of the original bits in set1 and set2 . The sets must have the same number of bits\n otherwise the result is undefined.\n( Specification ) Example program example_xor use stdlib_bitsets type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call xor ( set0 , set1 ) ! none none if ( none ( set0 ) ) write ( * , * ) 'First test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all none if ( all ( set0 ) ) write ( * , * ) 'Second test of XOR worked.' call set0 % not () call set1 % not () call xor ( set0 , set1 ) ! none all if ( all ( set0 ) ) write ( * , * ) 'Third test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all all if ( none ( set0 ) ) write ( * , * ) 'Fourth test of XOR worked.' end program example_xor private elemental module subroutine xor_64(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: set1 type( bitset_64 ), intent(in) :: set2 private elemental module subroutine xor_large(set1, set2) Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: set1 type( bitset_large ), intent(in) :: set2 Derived Types type, public, extends( bitset_type ) :: bitset_64 Type for bitsets with no more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_64 procedure, public, pass(self) :: any => any_64 procedure, public, pass(self) :: bit_count => bit_count_64 procedure, public, pass(self) :: bits generic, public :: clear => clear_bit , clear_range procedure, public, pass(self) :: clear_bit => clear_bit_64 procedure, public, pass(self) :: clear_range => clear_range_64 generic, public :: flip => flip_bit , flip_range procedure, public, pass(self) :: flip_bit => flip_bit_64 procedure, public, pass(self) :: flip_range => flip_range_64 procedure, public, pass(self) :: from_string => from_string_64 generic, public :: init => init_zero procedure, public, pass(self) :: init_zero => init_zero_64 procedure, public, pass(self) :: input => input_64 procedure, public, pass(self) :: none => none_64 procedure, public, pass(self) :: not => not_64 procedure, public, pass(self) :: output => output_64 generic, public :: read_bitset => read_bitset_string , read_bitset_unit procedure, public, pass(self) :: read_bitset_string => read_bitset_string_64 procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_64 generic, public :: set => set_bit , set_range procedure, public, pass(self) :: set_bit => set_bit_64 procedure, public, pass(self) :: set_range => set_range_64 procedure, public, pass(self) :: test => test_64 procedure, public, pass(self) :: to_string => to_string_64 procedure, public, pass(self) :: value => value_64 generic, public :: write_bitset => write_bitset_string , write_bitset_unit procedure, public, pass(self) :: write_bitset_string => write_bitset_string_64 procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_64 type, public, extends( bitset_type ) :: bitset_large Type for bitsets with more than 64 bits ( Specification ) Type-Bound Procedures procedure, public, pass(self) :: all => all_large procedure, public, pass(self) :: any => any_large procedure, public, pass(self) :: bit_count => bit_count_large procedure, public, pass(self) :: bits generic, public :: clear => clear_bit , clear_range procedure, public, pass(self) :: clear_bit => clear_bit_large procedure, public, pass(self) :: clear_range => clear_range_large generic, public :: flip => flip_bit , flip_range procedure, public, pass(self) :: flip_bit => flip_bit_large procedure, public, pass(self) :: flip_range => flip_range_large procedure, public, pass(self) :: from_string => from_string_large generic, public :: init => init_zero procedure, public, pass(self) :: init_zero => init_zero_large procedure, public, pass(self) :: input => input_large procedure, public, pass(self) :: none => none_large procedure, public, pass(self) :: not => not_large procedure, public, pass(self) :: output => output_large generic, public :: read_bitset => read_bitset_string , read_bitset_unit procedure, public, pass(self) :: read_bitset_string => read_bitset_string_large procedure, public, pass(self) :: read_bitset_unit => read_bitset_unit_large generic, public :: set => set_bit , set_range procedure, public, pass(self) :: set_bit => set_bit_large procedure, public, pass(self) :: set_range => set_range_large procedure, public, pass(self) :: test => test_large procedure, public, pass(self) :: to_string => to_string_large procedure, public, pass(self) :: value => value_large generic, public :: write_bitset => write_bitset_string , write_bitset_unit procedure, public, pass(self) :: write_bitset_string => write_bitset_string_large procedure, public, pass(self) :: write_bitset_unit => write_bitset_unit_large type, public :: bitset_type Parent type for bitset_64 and bitset_large ( Specification ) Type-Bound Procedures procedure(all_abstract), public, deferred, pass(self) :: all procedure(any_abstract), public, deferred, pass(self) :: any procedure(bit_count_abstract), public, deferred, pass(self) :: bit_count procedure, public, pass(self) :: bits generic, public :: clear => clear_bit , clear_range procedure(clear_bit_abstract), public, deferred, pass(self) :: clear_bit procedure(clear_range_abstract), public, deferred, pass(self) :: clear_range generic, public :: flip => flip_bit , flip_range procedure(flip_bit_abstract), public, deferred, pass(self) :: flip_bit procedure(flip_range_abstract), public, deferred, pass(self) :: flip_range procedure(from_string_abstract), public, deferred, pass(self) :: from_string generic, public :: init => init_zero procedure(init_zero_abstract), public, deferred, pass(self) :: init_zero procedure(input_abstract), public, deferred, pass(self) :: input procedure(none_abstract), public, deferred, pass(self) :: none procedure(not_abstract), public, deferred, pass(self) :: not procedure(output_abstract), public, deferred, pass(self) :: output generic, public :: read_bitset => read_bitset_string , read_bitset_unit procedure(read_bitset_string_abstract), public, deferred, pass(self) :: read_bitset_string procedure(read_bitset_unit_abstract), public, deferred, pass(self) :: read_bitset_unit generic, public :: set => set_bit , set_range procedure(set_bit_abstract), public, deferred, pass(self) :: set_bit procedure(set_range_abstract), public, deferred, pass(self) :: set_range procedure(test_abstract), public, deferred, pass(self) :: test procedure(to_string_abstract), public, deferred, pass(self) :: to_string procedure(value_abstract), public, deferred, pass(self) :: value generic, public :: write_bitset => write_bitset_string , write_bitset_unit procedure(write_bitset_string_abstract), public, deferred, pass(self) :: write_bitset_string procedure(write_bitset_unit_abstract), public, deferred, pass(self) :: write_bitset_unit Functions public elemental function bits (self) License Version experimental Returns the number of bit positions in self . Arguments Type Intent Optional Attributes Name class( bitset_type ), intent(in) :: self Return Value integer(kind=bits_kind) Subroutines public module subroutine error_handler (message, error, status, module, procedure) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: message integer, intent(in) :: error integer, intent(out), optional :: status character(len=*), intent(in), optional :: module character(len=*), intent(in), optional :: procedure","tags":"","loc":"module/stdlib_bitsets.html"},{"title":"stdlib_str2num – Fortran-lang/stdlib","text":"The stdlib_str2num module provides procedures and interfaces for conversion\nof characters to numerical types. Currently supported: integer and real .\n( Specification ) This code was modified from https://github.com/jalvesz/Fortran-String-to-Num by Alves Jose\nAnd was possible thanks to all the discussions in this thread https://fortran-lang.discourse.group/t/faster-string-to-double/ Known precisions limits of current proposal :\nConversion to double precision is exact up to epsilon(0.0_dp)\n example: input : 123456.78901234567890123456789012345678901234567890+2 formatted read : 12345678.90123457 to_num : 12345678.90123457 difference abs : 0.1862645149230957E-08 difference rel : 0.1508742584455759E-13% Conversion to quadruple precision can deviate at about 200*epsilon(0.0_qp)\n example: input : 0.140129846432481707092372958328991613128026194187651577175706828388979108268586060148663818836212158203125E-443 formatted read : 0.140129846432481707092372958328991608E-443 to_num : 0.140129846432481707092372958328996233E-443 difference abs : 0.4625E-475 difference rel : 0.3300E-029% Uses stdlib_kinds ieee_arithmetic Interfaces public interface to_num Conversion of strings to numbers\n( Specification ) private elemental function to_int8(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int8) Output integer(int8) value private elemental function to_int16(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int16) Output integer(int16) value private elemental function to_int32(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int32) Output integer(int32) value private elemental function to_int64(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value integer(kind=int64) Output integer(int64) value private elemental function to_sp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=sp) Output real(sp) value private elemental function to_dp(s, mold) result(v) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface Return Value real(kind=dp) Output real(dp) value public interface to_num_from_stream Conversion of a stream of values in a string to numbers\n( Specification ) private function to_int8_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int8), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int8) Output integer(int8) value private function to_int16_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int16), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int16) Output integer(int16) value private function to_int32_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int32), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int32) Output integer(int32) value private function to_int64_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string integer(kind=int64), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value integer(kind=int64) Output integer(int64) value private function to_sp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=sp) Output real(sp) value private function to_dp_from_stream(s, mold, stat) result(v) Arguments Type Intent Optional Attributes Name character(len=:), pointer :: s input string real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface integer(kind=int8), intent(inout), optional :: stat Return Value real(kind=dp) Output real(dp) value","tags":"","loc":"module/stdlib_str2num.html"},{"title":"stdlib_stats_distribution_uniform – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_random stdlib_kinds Interfaces public interface cdf_uniform Get uniform distribution cumulative distribution function (cdf) for integer,\nreal and complex variables.\n( Specification ) private elemental function cdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function cdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function cdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function cdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function cdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface pdf_uniform Get uniform distribution probability density (pdf) for integer, real and\ncomplex variables.\n( Specification ) private elemental function pdf_unif_iint8(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: x integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value real private elemental function pdf_unif_iint16(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: x integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value real private elemental function pdf_unif_iint32(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: x integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value real private elemental function pdf_unif_iint64(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: x integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value real private elemental function pdf_unif_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_unif_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_unif_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface rvs_uniform Get uniformly distributed random variate for integer, real and complex\nvariables.\n( Specification ) private impure elemental function rvs_unif_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_unif_1_iint8(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_1_iint16(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_1_iint32(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_1_iint64(scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_1_rsp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_1_rdp(scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_1_csp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_1_cdp(scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure elemental function rvs_unif_iint8(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale Return Value integer(kind=int8) private impure elemental function rvs_unif_iint16(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale Return Value integer(kind=int16) private impure elemental function rvs_unif_iint32(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale Return Value integer(kind=int32) private impure elemental function rvs_unif_iint64(loc, scale) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale Return Value integer(kind=int64) private impure elemental function rvs_unif_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_unif_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_unif_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_unif_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private function rvs_unif_array_iint8(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: loc integer(kind=int8), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int8), (array_size) private function rvs_unif_array_iint16(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: loc integer(kind=int16), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int16), (array_size) private function rvs_unif_array_iint32(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: loc integer(kind=int32), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int32), (array_size) private function rvs_unif_array_iint64(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: loc integer(kind=int64), intent(in) :: scale integer, intent(in) :: array_size Return Value integer(kind=int64), (array_size) private function rvs_unif_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private function rvs_unif_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private function rvs_unif_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private function rvs_unif_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size) public interface shuffle Fisher-Yates shuffle algorithm for a rank one array of integer, real and\ncomplex variables.\n( Specification ) private function shuffle_iint8(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: list (:) Return Value integer(kind=int8), (size(list)) private function shuffle_iint16(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: list (:) Return Value integer(kind=int16), (size(list)) private function shuffle_iint32(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: list (:) Return Value integer(kind=int32), (size(list)) private function shuffle_iint64(list) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: list (:) Return Value integer(kind=int64), (size(list)) private function shuffle_rsp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: list (:) Return Value real(kind=sp), (size(list)) private function shuffle_rdp(list) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: list (:) Return Value real(kind=dp), (size(list)) private function shuffle_csp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: list (:) Return Value complex(kind=sp), (size(list)) private function shuffle_cdp(list) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: list (:) Return Value complex(kind=dp), (size(list))","tags":"","loc":"module/stdlib_stats_distribution_uniform.html"},{"title":"stdlib_io_npy – Fortran-lang/stdlib","text":"Description of the npy format taken from\n https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html Format Version 1.0 The first 6 bytes are a magic string: exactly \\x93NUMPY. The next 1 byte is an unsigned byte:\n the major version number of the file format, e.g. \\x01. The next 1 byte is an unsigned byte:\n the minor version number of the file format, e.g. \\x00.\n Note: the version of the file format is not tied to the version of the numpy package. The next 2 bytes form a little-endian unsigned short int:\n the length of the header data HEADER_LEN. The next HEADER_LEN bytes form the header data describing the array’s format.\n It is an ASCII string which contains a Python literal expression of a dictionary.\n It is terminated by a newline (\\n) and padded with spaces (\\x20) to make the total\n of len(magic string) + 2 + len(length) + HEADER_LEN be evenly divisible by 64 for\n alignment purposes. The dictionary contains three keys: “descr”: dtype.descr\n An object that can be passed as an argument to the numpy.dtype constructor\n to create the array’s dtype. “fortran_order”: bool\n Whether the array data is Fortran-contiguous or not. Since Fortran-contiguous\n arrays are a common form of non-C-contiguity, we allow them to be written directly\n to disk for efficiency. “shape”: tuple of int\n The shape of the array. For repeatability and readability, the dictionary keys are sorted in alphabetic order.\n This is for convenience only. A writer SHOULD implement this if possible. A reader MUST\n NOT depend on this. Following the header comes the array data. If the dtype contains Python objects\n (i.e. dtype.hasobject is True), then the data is a Python pickle of the array.\n Otherwise the data is the contiguous (either C- or Fortran-, depending on fortran_order)\n bytes of the array. Consumers can figure out the number of bytes by multiplying the\n number of elements given by the shape (noting that shape=() means there is 1 element)\n by dtype.itemsize. Format Version 2.0 The version 1.0 format only allowed the array header to have a total size of 65535 bytes.\n This can be exceeded by structured arrays with a large number of columns.\n The version 2.0 format extends the header size to 4 GiB. numpy.save will automatically\n save in 2.0 format if the data requires it, else it will always use the more compatible\n 1.0 format. The description of the fourth element of the header therefore has become:\n “The next 4 bytes form a little-endian unsigned int: the length of the header data\n HEADER_LEN.” Format Version 3.0 This version replaces the ASCII string (which in practice was latin1) with a\n utf8-encoded string, so supports structured types with any unicode field names. Uses stdlib_kinds Used by Descendants: stdlib_io_npy_load stdlib_io_npy_save Interfaces public interface load_npy Load multidimensional array in npy format\n( Specification ) private module subroutine load_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine load_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(out), allocatable :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg public interface save_npy Save multidimensional array in npy format\n( Specification ) private module subroutine save_npy_cdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_cdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_csp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint16_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint32_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint64_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_iint8_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rdp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_1(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_2(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg private module subroutine save_npy_rsp_3(filename, array, iostat, iomsg) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: array (:,:,:) integer, intent(out), optional :: iostat character(len=:), intent(out), optional, allocatable :: iomsg","tags":"","loc":"module/stdlib_io_npy.html"},{"title":"stdlib_hashmap_wrappers – Fortran-lang/stdlib","text":"Public procedures\nPublic types\nPublic integers Uses iso_fortran_env stdlib_kinds stdlib_hash_32bit Interfaces public interface get private subroutine get_char_key(key, value) Gets the contents of the key as a CHARACTER string\nArguments:\n key - the input key\n value - the contents of key mapped to a CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key character(len=:), intent(out), allocatable :: value private subroutine get_int8_key(key, value) Gets the contents of the key as an INTEGER(INT8) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int8), intent(out), allocatable :: value (:) private pure subroutine get_int32_key(key, value) Gets the contents of the key as an INTEGER(INT32) vector\nArguments:\n key - the input key\n value - the contents of key mapped to an INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key integer(kind=int32), intent(out), allocatable :: value (:) private subroutine get_other(other, value) Gets the contents of the other as a CLASS( ) string\nArguments:\n other - the input other data\n value - the contents of other mapped to a CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other class(*), intent(out), allocatable :: value public interface operator(==) private function equal_keys(key1, key2) result(test) Compares two keys for equality\n( Specifications ) Arguments:\n key1 - the first key\n key2 - the second key Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key1 type( key_type ), intent(in) :: key2 Return Value logical public interface set private subroutine set_char_key(key, value) Sets the contents of the key from a CHARACTER string\nArguments:\n key - the output key\n value - the input CHARACTER string Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key character(len=*), intent(in) :: value private subroutine set_int8_key(key, value) Sets the contents of the key from an INTEGER(INT8) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT8) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int8), intent(in) :: value (:) private pure subroutine set_int32_key(key, value) Sets the contents of the key from an INTEGER(INT32) vector\nArguments:\n key - the output key\n value - the input INTEGER(INT32) vector Arguments Type Intent Optional Attributes Name type( key_type ), intent(out) :: key integer(kind=int32), intent(in) :: value (:) private subroutine set_other(other, value) Sets the contents of the other data from a CLASS( ) variable\nArguments:\n other - the output other data\n value - the input CLASS( ) variable Arguments Type Intent Optional Attributes Name type( other_type ), intent(out) :: other class(*), intent(in) :: value Abstract Interfaces abstract interface Abstract interface to a 64 bit hash function operating on a KEY_TYPE public pure function hasher_fun(key) result(hash_value) Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Derived Types type, public :: key_type A wrapper type for the key's true type Components Type Visibility Attributes Name Initial integer(kind=int8), public, allocatable :: value (:) type, public :: other_type A wrapper type for the other data's true type Components Type Visibility Attributes Name Initial class(*), public, allocatable :: value Functions public pure function fnv_1_hasher (key) License Version Experimental Hashes a key with the FNV_1 algorithm\nArguments:\n key - the key to be hashed Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function fnv_1a_hasher (key) License Version Experimental Hashes a key with the FNV_1a algorithm\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function seeded_nmhash32_hasher (key) License Version Experimental Hashes a key with the NMHASH32 hash algorithm\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function seeded_nmhash32x_hasher (key) License Version Experimental Hashes a key with the NMHASH32X hash algorithm\n( Specifications )\nArguments:\n key - the key to be hashed\n seed - the seed (unused) for the hashing algorithm Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) public pure function seeded_water_hasher (key) License Version Experimental Hashes a key with the waterhash algorithm\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: key Return Value integer(kind=int_hash) Subroutines public pure subroutine copy_key (old_key, new_key) License Version Experimental Copies the contents of the key, old_key, to the key, new_key\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(in) :: old_key type( key_type ), intent(out) :: new_key public subroutine copy_other (other_in, other_out) License Version Experimental Copies the other data, other_in, to the variable, other_out\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( other_type ), intent(in) :: other_in type( other_type ), intent(out) :: other_out public subroutine free_key (key) License Version Experimental Frees the memory in a key\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( key_type ), intent(inout) :: key public subroutine free_other (other) License Version Experimental Frees the memory in the other data\n( Specifications ) Read more… Arguments Type Intent Optional Attributes Name type( other_type ), intent(inout) :: other","tags":"","loc":"module/stdlib_hashmap_wrappers.html"},{"title":"stdlib_error – Fortran-lang/stdlib","text":"Provides support for catching and handling errors\n( Specification ) Uses iso_fortran_env stdlib_optval Used by Descendants: f08estop f18estop Interfaces interface public module subroutine error_stop(msg, code) Provides a call to error stop and allows the user to specify a code and message\n( Specification ) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: msg integer, intent(in), optional :: code Subroutines public subroutine check (condition, msg, code, warn) License Version experimental Checks the value of a logical condition\n ( Specification ) Read more… Arguments Type Intent Optional Attributes Name logical, intent(in) :: condition character(len=*), intent(in), optional :: msg integer, intent(in), optional :: code logical, intent(in), optional :: warn","tags":"","loc":"module/stdlib_error.html"},{"title":"stdlib_codata_type – Fortran-lang/stdlib","text":"Codata constant type\n( Specification ) Uses stdlib_io stdlib_kinds stdlib_optval Interfaces public interface to_real Get the constant value or uncertainty. private pure elemental function to_real_sp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind sp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=sp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=sp) private pure elemental function to_real_dp(self, mold, uncertainty) result(r) Get the constant value or uncertainty for the kind dp\n( Specification ) Arguments Type Intent Optional Attributes Name class( codata_constant_type ), intent(in) :: self Codata constant real(kind=dp), intent(in) :: mold dummy argument to disambiguate at compile time the generic interface logical, intent(in), optional :: uncertainty Set to true if the uncertainty is required. Default to .false.. Return Value real(kind=dp) Derived Types type, public :: codata_constant_type Derived type for representing a Codata constant.\n( Specification ) Components Type Visibility Attributes Name Initial character(len=64), public :: name real(kind=dp), public :: uncertainty character(len=32), public :: unit real(kind=dp), public :: value Type-Bound Procedures procedure, public :: print generic, public :: to_real => to_real_sp , to_real_dp procedure, public :: to_real_dp procedure, public :: to_real_sp","tags":"","loc":"module/stdlib_codata_type.html"},{"title":"stdlib_hash_64bit – Fortran-lang/stdlib","text":"Uses iso_fortran_env stdlib_kinds Used by Descendants: stdlib_hash_64bit_fnv stdlib_hash_64bit_pengy stdlib_hash_64bit_spookyv2 Variables Type Visibility Attributes Name Initial integer, public, parameter :: bits_char = character_storage_size integer, public, parameter :: bits_int16 = bit_size(0_int16) integer, public, parameter :: bits_int32 = bit_size(0_int32) integer, public, parameter :: bits_int64 = bit_size(0_int64) integer, public, parameter :: bits_int8 = bit_size(0_int8) integer, public, parameter :: bytes_char = bits_char/bits_int8 integer, public, parameter :: bytes_int16 = bits_int16/bits_int8 integer, public, parameter :: bytes_int32 = bits_int32/bits_int8 integer, public, parameter :: bytes_int64 = bits_int64/bits_int8 integer, public, parameter :: bytes_int8 = bits_int8/bits_int8 integer, public, parameter :: int_hash = int64 The number of bits in the output hash logical, public, parameter :: little_endian = (1==transfer([1_int8, 0_int8], 0_int16)) Interfaces public interface fnv_1_hash FNV_1 interfaces\n( Specification ) private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) private elemental module function character_fnv_1a(key) result(hash_code) FNV_1A hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_code) FNV_1A hash function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) interface public module subroutine new_pengy_hash_seed(seed) Random seed generator for MIR_HASH_STRICT Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed interface public module subroutine new_spooky_hash_seed(seed) Random seed generator for SPOOKY_HASH Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed (2) public interface pengy_hash PENGY_HASH interfaces\n( Specification ) private elemental module function character_pengy_hash(key, seed) result(hash_code) MIR HASH STRICT function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int16_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int32_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int64_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) private pure module function int8_pengy_hash(key, seed) result(hash_code) PENGY_HASH hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int64) interface public module subroutine spookyHash_128(key, hash_inout) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), target :: key (0:) integer(kind=int_hash), intent(inout) :: hash_inout (2) public interface spooky_hash SPOOKY_HASH interfaces\n( Specification ) private module function character_spooky_hash(key, seed) result(hash_code) SPOOKY hash function for character strings Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int16_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int32_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int64_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) private module function int8_spooky_hash(key, seed) result(hash_code) SPOOKY HASH function for rank 1 arrays of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int_hash), intent(in) :: seed (2) Return Value integer(kind=int_hash), (2) Functions public elemental function fibonacci_hash (key, nbits) result(sample) License Version experimental Maps the 64 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 64\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int64) public elemental function universal_mult_hash (key, seed, nbits) result(sample) License Version experimental Uses the \"random\" odd 64 bit integer seed to map the 64 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 64.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key integer(kind=int64), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int64) Subroutines public subroutine odd_random_integer (harvest) License Version experimental Returns a 64 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the 64 bit kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(out) :: harvest","tags":"","loc":"module/stdlib_hash_64bit.html"},{"title":"stdlib_linalg_blas_c – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_aux stdlib_linalg_constants stdlib_linalg_blas_s Functions public pure function stdlib_cdotc (n, cx, incx, cy, incy) CDOTC forms the dot product of two complex vectors\nCDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) public pure function stdlib_cdotu (n, cx, incx, cy, incy) CDOTU forms the dot product of two complex vectors\nCDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: cy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=sp) Subroutines public pure subroutine stdlib_caxpy (n, ca, cx, incx, cy, incy) CAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_ccopy (n, cx, incx, cy, incy) CCOPY copies a vector x to a vector y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(out) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) CGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) CGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cgerc (m, n, alpha, x, incx, y, incy, a, lda) CGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cgeru (m, n, alpha, x, incx, y, incy, a, lda) CGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_chbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) CHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_chemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) CHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_cher (uplo, n, alpha, x, incx, a, lda) CHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher2 (uplo, n, alpha, x, incx, y, incy, a, lda) CHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_cher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_cherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_chpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) CHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_chpr (uplo, n, alpha, x, incx, ap) CHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_chpr2 (uplo, n, alpha, x, incx, y, incy, ap) CHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=sp), intent(inout) :: ap (*) public pure subroutine stdlib_crotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in SROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by SROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout) :: a complex(kind=sp), intent(in) :: b real(kind=sp), intent(out) :: c complex(kind=sp), intent(out) :: s public pure subroutine stdlib_cscal (n, ca, cx, incx) CSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ca complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_csrot (n, cx, incx, cy, incy, c, s) CSROT applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy real(kind=sp), intent(in) :: c real(kind=sp), intent(in) :: s public pure subroutine stdlib_csscal (n, sa, cx, incx) CSSCAL scales a complex vector by a real constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sa complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_cswap (n, cx, incx, cy, incy) CSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(inout) :: cx (*) integer(kind=ilp), intent(in) :: incx complex(kind=sp), intent(inout) :: cy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_csymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) CSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) CSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_csyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) CSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(in) :: beta complex(kind=sp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ctbmv (uplo, trans, diag, n, k, a, lda, x, incx) CTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctbsv (uplo, trans, diag, n, k, a, lda, x, incx) CTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpmv (uplo, trans, diag, n, ap, x, incx) CTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctpsv (uplo, trans, diag, n, ap, x, incx) CTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: ap (*) complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrmv (uplo, trans, diag, n, a, lda, x, incx) CTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ctrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) CTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: alpha complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ctrsv (uplo, trans, diag, n, a, lda, x, incx) CTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=sp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=sp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_c.html"},{"title":"stdlib_hash_32bit – Fortran-lang/stdlib","text":"Uses iso_fortran_env stdlib_kinds Used by Descendants: stdlib_hash_32bit_fnv stdlib_hash_32bit_nm stdlib_hash_32bit_water Variables Type Visibility Attributes Name Initial integer, public, parameter :: int_hash = int32 The number of bits in the output hash logical, public, parameter :: little_endian = (1==transfer([1_int8, 0_int8], 0_int16)) Interfaces public interface fnv_1_hash FNV_1 interfaces\n( Specification ) private elemental module function character_fnv_1(key) result(hash_code) FNV_1 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1(key) result(hash_code) FNV_1 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) public interface fnv_1a_hash FNV_1A interfaces\n( Specification ) private elemental module function character_fnv_1a(key) result(hash_value) FNV_1A hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key Return Value integer(kind=int_hash) private pure module function int16_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int32_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int64_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (:) Return Value integer(kind=int_hash) private pure module function int8_fnv_1a(key) result(hash_value) FNV_1A hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (:) Return Value integer(kind=int_hash) public interface new_nmhash32_seed ( Specification private module subroutine new_nmhash32_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed public interface new_nmhash32x_seed ( Specification ) private module subroutine new_nmhash32x_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: seed public interface new_water_hash_seed ( Specification ) private module subroutine new_water_hash_seed(seed) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: seed public interface nmhash32 NMHASH32 interfaces\n( Specification ) private elemental module function character_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) public interface nmhash32x NMHASH32X interfaces\n( Specification ) private elemental module function character_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int16_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int32_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int64_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) private pure module function int8_nmhash32x(key, seed) result(hash_value) NMHASH32 hash function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int32), intent(in) :: seed Return Value integer(kind=int32) public interface water_hash WATER_HASH interfaces\n( Specification ) private elemental module function character_water_hash(key, seed) result(hash_code) WATER hash function for default character string keys Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: key integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int16_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int16 Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int32_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int32 Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int64_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int64 Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) private pure module function int8_water_hash(key, seed) result(hash_code) WATER HASH function for rank 1 array keys of kind int8 Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: key (0:) integer(kind=int64), intent(in) :: seed Return Value integer(kind=int_hash) Functions public elemental function fibonacci_hash (key, nbits) result(sample) License Version experimental Maps the 32 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer, intent(in) :: nbits Return Value integer(kind=int32) public elemental function universal_mult_hash (key, seed, nbits) result(sample) License Version experimental Uses the \"random\" odd 32 bit integer seed to map the 32 bit integer key to\nan unsigned integer value with only nbits bits where nbits is less than 32\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: key integer(kind=int32), intent(in) :: seed integer, intent(in) :: nbits Return Value integer(kind=int32) Subroutines public subroutine odd_random_integer (harvest) License Version experimental Returns a 32 bit pseudo random integer, harvest , distributed uniformly over\nthe odd integers of the int32 kind.\n( Specification ) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(out) :: harvest","tags":"","loc":"module/stdlib_hash_32bit.html"},{"title":"stdlib_codata – Fortran-lang/stdlib","text":"Codata Constants - Autogenerated Uses stdlib_codata_type stdlib_kinds Variables Type Visibility Attributes Name Initial type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_ELECTRON_MASS_RATIO = codata_constant_type(\"alpha particle-electron mass ratio\", 7294.29954171_dp, 0.00000017_dp, \"\") alpha particle-electron mass ratio type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS = codata_constant_type(\"alpha particle mass\", 6.6446573450e-27_dp, 0.0000000021e-27_dp, \"kg\") alpha particle mass type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"alpha particle mass energy equivalent\", 5.9719201997e-10_dp, 0.0000000019e-10_dp, \"J\") alpha particle mass energy equivalent type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"alpha particle mass energy equivalent in MeV\", 3727.3794118_dp, 0.0000012_dp, \"MeV\") alpha particle mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MASS_IN_U = codata_constant_type(\"alpha particle mass in u\", 4.001506179129_dp, 0.000000000062_dp, \"u\") alpha particle mass in u type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_MOLAR_MASS = codata_constant_type(\"alpha particle molar mass\", 4.0015061833e-3_dp, 0.0000000012e-3_dp, \"kg mol^-1\") alpha particle molar mass type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_PROTON_MASS_RATIO = codata_constant_type(\"alpha particle-proton mass ratio\", 3.972599690252_dp, 0.000000000070_dp, \"\") alpha particle-proton mass ratio type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_RELATIVE_ATOMIC_MASS = codata_constant_type(\"alpha particle relative atomic mass\", 4.001506179129_dp, 0.000000000062_dp, \"\") alpha particle relative atomic mass type( codata_constant_type ), public, parameter :: ALPHA_PARTICLE_RMS_CHARGE_RADIUS = codata_constant_type(\"alpha particle rms charge radius\", 1.6785e-15_dp, 0.0021e-15_dp, \"m\") alpha particle rms charge radius type( codata_constant_type ), public, parameter :: ANGSTROM_STAR = codata_constant_type(\"Angstrom star\", 1.00001495e-10_dp, 0.00000090e-10_dp, \"m\") Angstrom star type( codata_constant_type ), public, parameter :: ATOMIC_MASS_CONSTANT = codata_constant_type(\"atomic mass constant\", 1.66053906892e-27_dp, 0.00000000052e-27_dp, \"kg\") atomic mass constant type( codata_constant_type ), public, parameter :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT = codata_constant_type(\"atomic mass constant energy equivalent\", 1.49241808768e-10_dp, 0.00000000046e-10_dp, \"J\") atomic mass constant energy equivalent type( codata_constant_type ), public, parameter :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"atomic mass constant energy equivalent in MeV\", 931.49410372_dp, 0.00000029_dp, \"MeV\") atomic mass constant energy equivalent in MeV type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"atomic mass unit-electron volt relationship\", 9.3149410372e8_dp, 0.0000000029e8_dp, \"eV\") atomic mass unit-electron volt relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_HARTREE_RELATIONSHIP = codata_constant_type(\"atomic mass unit-hartree relationship\", 3.4231776922e7_dp, 0.0000000011e7_dp, \"E_h\") atomic mass unit-hartree relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_HERTZ_RELATIONSHIP = codata_constant_type(\"atomic mass unit-hertz relationship\", 2.25234272185e23_dp, 0.00000000070e23_dp, \"Hz\") atomic mass unit-hertz relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"atomic mass unit-inverse meter relationship\", 7.5130066209e14_dp, 0.0000000023e14_dp, \"m^-1\") atomic mass unit-inverse meter relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_JOULE_RELATIONSHIP = codata_constant_type(\"atomic mass unit-joule relationship\", 1.49241808768e-10_dp, 0.00000000046e-10_dp, \"J\") atomic mass unit-joule relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_KELVIN_RELATIONSHIP = codata_constant_type(\"atomic mass unit-kelvin relationship\", 1.08095402067e13_dp, 0.00000000034e13_dp, \"K\") atomic mass unit-kelvin relationship type( codata_constant_type ), public, parameter :: ATOMIC_MASS_UNIT_KILOGRAM_RELATIONSHIP = codata_constant_type(\"atomic mass unit-kilogram relationship\", 1.66053906892e-27_dp, 0.00000000052e-27_dp, \"kg\") atomic mass unit-kilogram relationship type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_1ST_HYPERPOLARIZABILITY = codata_constant_type(\"atomic unit of 1st hyperpolarizability\", 3.2063612996e-53_dp, 0.0000000015e-53_dp, \"C^3 m^3 J^-2\") atomic unit of 1st hyperpolarizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_2ND_HYPERPOLARIZABILITY = codata_constant_type(\"atomic unit of 2nd hyperpolarizability\", 6.2353799735e-65_dp, 0.0000000039e-65_dp, \"C^4 m^4 J^-3\") atomic unit of 2nd hyperpolarizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ACTION = codata_constant_type(\"atomic unit of action\", 1.054571817e-34_dp, 0.0_dp, \"J s\") atomic unit of action type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_CHARGE = codata_constant_type(\"atomic unit of charge\", 1.602176634e-19_dp, 0.0_dp, \"C\") atomic unit of charge type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_CHARGE_DENSITY = codata_constant_type(\"atomic unit of charge density\", 1.08120238677e12_dp, 0.00000000051e12_dp, \"C m^-3\") atomic unit of charge density type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_CURRENT = codata_constant_type(\"atomic unit of current\", 6.6236182375082e-3_dp, 0.0000000000072e-3_dp, \"A\") atomic unit of current type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_DIPOLE_MOM = codata_constant_type(\"atomic unit of electric dipole mom.\", 8.4783536198e-30_dp, 0.0000000013e-30_dp, \"C m\") atomic unit of electric dipole mom. type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_FIELD = codata_constant_type(\"atomic unit of electric field\", 5.14220675112e11_dp, 0.00000000080e11_dp, \"V m^-1\") atomic unit of electric field type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_FIELD_GRADIENT = codata_constant_type(\"atomic unit of electric field gradient\", 9.7173624424e21_dp, 0.0000000030e21_dp, \"V m^-2\") atomic unit of electric field gradient type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_POLARIZABILITY = codata_constant_type(\"atomic unit of electric polarizability\", 1.64877727212e-41_dp, 0.00000000051e-41_dp, \"C^2 m^2 J^-1\") atomic unit of electric polarizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_POTENTIAL = codata_constant_type(\"atomic unit of electric potential\", 27.211386245981_dp, 0.000000000030_dp, \"V\") atomic unit of electric potential type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ELECTRIC_QUADRUPOLE_MOM = codata_constant_type(\"atomic unit of electric quadrupole mom.\", 4.4865515185e-40_dp, 0.0000000014e-40_dp, \"C m^2\") atomic unit of electric quadrupole mom. type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_ENERGY = codata_constant_type(\"atomic unit of energy\", 4.3597447222060e-18_dp, 0.0000000000048e-18_dp, \"J\") atomic unit of energy type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_FORCE = codata_constant_type(\"atomic unit of force\", 8.2387235038e-8_dp, 0.0000000013e-8_dp, \"N\") atomic unit of force type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_LENGTH = codata_constant_type(\"atomic unit of length\", 5.29177210544e-11_dp, 0.00000000082e-11_dp, \"m\") atomic unit of length type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MAGNETIZABILITY = codata_constant_type(\"atomic unit of magnetizability\", 7.8910365794e-29_dp, 0.0000000049e-29_dp, \"J T^-2\") atomic unit of magnetizability type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MAG_DIPOLE_MOM = codata_constant_type(\"atomic unit of mag. dipole mom.\", 1.85480201315e-23_dp, 0.00000000058e-23_dp, \"J T^-1\") atomic unit of mag. dipole mom. type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MAG_FLUX_DENSITY = codata_constant_type(\"atomic unit of mag. flux density\", 2.35051757077e5_dp, 0.00000000073e5_dp, \"T\") atomic unit of mag. flux density type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MASS = codata_constant_type(\"atomic unit of mass\", 9.1093837139e-31_dp, 0.0000000028e-31_dp, \"kg\") atomic unit of mass type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_MOMENTUM = codata_constant_type(\"atomic unit of momentum\", 1.99285191545e-24_dp, 0.00000000031e-24_dp, \"kg m s^-1\") atomic unit of momentum type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_PERMITTIVITY = codata_constant_type(\"atomic unit of permittivity\", 1.11265005620e-10_dp, 0.00000000017e-10_dp, \"F m^-1\") atomic unit of permittivity type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_TIME = codata_constant_type(\"atomic unit of time\", 2.4188843265864e-17_dp, 0.0000000000026e-17_dp, \"s\") atomic unit of time type( codata_constant_type ), public, parameter :: ATOMIC_UNIT_OF_VELOCITY = codata_constant_type(\"atomic unit of velocity\", 2.18769126216e6_dp, 0.00000000034e6_dp, \"m s^-1\") atomic unit of velocity type( codata_constant_type ), public, parameter :: AVOGADRO_CONSTANT = codata_constant_type(\"Avogadro constant\", 6.02214076e23_dp, 0.0_dp, \"mol^-1\") Avogadro constant type( codata_constant_type ), public, parameter :: BOHR_MAGNETON = codata_constant_type(\"Bohr magneton\", 9.2740100657e-24_dp, 0.0000000029e-24_dp, \"J T^-1\") Bohr magneton type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_EV_T = codata_constant_type(\"Bohr magneton in eV/T\", 5.7883817982e-5_dp, 0.0000000018e-5_dp, \"eV T^-1\") Bohr magneton in eV/T type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_HZ_T = codata_constant_type(\"Bohr magneton in Hz/T\", 1.39962449171e10_dp, 0.00000000044e10_dp, \"Hz T^-1\") Bohr magneton in Hz/T type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_INVERSE_METER_PER_TESLA = codata_constant_type(\"Bohr magneton in inverse meter per tesla\", 46.686447719_dp, 0.000000015_dp, \"m^-1 T^-1\") Bohr magneton in inverse meter per tesla type( codata_constant_type ), public, parameter :: BOHR_MAGNETON_IN_K_T = codata_constant_type(\"Bohr magneton in K/T\", 0.67171381472_dp, 0.00000000021_dp, \"K T^-1\") Bohr magneton in K/T type( codata_constant_type ), public, parameter :: BOHR_RADIUS = codata_constant_type(\"Bohr radius\", 5.29177210544e-11_dp, 0.00000000082e-11_dp, \"m\") Bohr radius type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT = codata_constant_type(\"Boltzmann constant\", 1.380649e-23_dp, 0.0_dp, \"J K^-1\") Boltzmann constant type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT_IN_EV_K = codata_constant_type(\"Boltzmann constant in eV/K\", 8.617333262e-5_dp, 0.0_dp, \"eV K^-1\") Boltzmann constant in eV/K type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT_IN_HZ_K = codata_constant_type(\"Boltzmann constant in Hz/K\", 2.083661912e10_dp, 0.0_dp, \"Hz K^-1\") Boltzmann constant in Hz/K type( codata_constant_type ), public, parameter :: BOLTZMANN_CONSTANT_IN_INVERSE_METER_PER_KELVIN = codata_constant_type(\"Boltzmann constant in inverse meter per kelvin\", 69.50348004_dp, 0.0_dp, \"m^-1 K^-1\") Boltzmann constant in inverse meter per kelvin type( codata_constant_type ), public, parameter :: CHARACTERISTIC_IMPEDANCE_OF_VACUUM = codata_constant_type(\"characteristic impedance of vacuum\", 376.730313412_dp, 0.000000059_dp, \"ohm\") characteristic impedance of vacuum type( codata_constant_type ), public, parameter :: CLASSICAL_ELECTRON_RADIUS = codata_constant_type(\"classical electron radius\", 2.8179403205e-15_dp, 0.0000000013e-15_dp, \"m\") classical electron radius type( codata_constant_type ), public, parameter :: COMPTON_WAVELENGTH = codata_constant_type(\"Compton wavelength\", 2.42631023538e-12_dp, 0.00000000076e-12_dp, \"m\") Compton wavelength type( codata_constant_type ), public, parameter :: CONDUCTANCE_QUANTUM = codata_constant_type(\"conductance quantum\", 7.748091729e-5_dp, 0.0_dp, \"S\") conductance quantum type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_AMPERE_90 = codata_constant_type(\"conventional value of ampere-90\", 1.00000008887_dp, 0.0_dp, \"A\") conventional value of ampere-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_COULOMB_90 = codata_constant_type(\"conventional value of coulomb-90\", 1.00000008887_dp, 0.0_dp, \"C\") conventional value of coulomb-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_FARAD_90 = codata_constant_type(\"conventional value of farad-90\", 0.99999998220_dp, 0.0_dp, \"F\") conventional value of farad-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_HENRY_90 = codata_constant_type(\"conventional value of henry-90\", 1.00000001779_dp, 0.0_dp, \"H\") conventional value of henry-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_JOSEPHSON_CONSTANT = codata_constant_type(\"conventional value of Josephson constant\", 483597.9e9_dp, 0.0_dp, \"Hz V^-1\") conventional value of Josephson constant type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_OHM_90 = codata_constant_type(\"conventional value of ohm-90\", 1.00000001779_dp, 0.0_dp, \"ohm\") conventional value of ohm-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_VOLT_90 = codata_constant_type(\"conventional value of volt-90\", 1.00000010666_dp, 0.0_dp, \"V\") conventional value of volt-90 type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_VON_KLITZING_CONSTANT = codata_constant_type(\"conventional value of von Klitzing constant\", 25812.807_dp, 0.0_dp, \"ohm\") conventional value of von Klitzing constant type( codata_constant_type ), public, parameter :: CONVENTIONAL_VALUE_OF_WATT_90 = codata_constant_type(\"conventional value of watt-90\", 1.00000019553_dp, 0.0_dp, \"W\") conventional value of watt-90 type( codata_constant_type ), public, parameter :: COPPER_X_UNIT = codata_constant_type(\"Copper x unit\", 1.00207697e-13_dp, 0.00000028e-13_dp, \"m\") Copper x unit type( codata_constant_type ), public, parameter :: DEUTERON_ELECTRON_MAG_MOM_RATIO = codata_constant_type(\"deuteron-electron mag. mom. ratio\", -4.664345550e-4_dp, 0.000000012e-4_dp, \"\") deuteron-electron mag. mom. ratio type( codata_constant_type ), public, parameter :: DEUTERON_ELECTRON_MASS_RATIO = codata_constant_type(\"deuteron-electron mass ratio\", 3670.482967655_dp, 0.000000063_dp, \"\") deuteron-electron mass ratio type( codata_constant_type ), public, parameter :: DEUTERON_G_FACTOR = codata_constant_type(\"deuteron g factor\", 0.8574382335_dp, 0.0000000022_dp, \"\") deuteron g factor type( codata_constant_type ), public, parameter :: DEUTERON_MAG_MOM = codata_constant_type(\"deuteron mag. mom.\", 4.330735087e-27_dp, 0.000000011e-27_dp, \"J T^-1\") deuteron mag. mom. type( codata_constant_type ), public, parameter :: DEUTERON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"deuteron mag. mom. to Bohr magneton ratio\", 4.669754568e-4_dp, 0.000000012e-4_dp, \"\") deuteron mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: DEUTERON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"deuteron mag. mom. to nuclear magneton ratio\", 0.8574382335_dp, 0.0000000022_dp, \"\") deuteron mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: DEUTERON_MASS = codata_constant_type(\"deuteron mass\", 3.3435837768e-27_dp, 0.0000000010e-27_dp, \"kg\") deuteron mass type( codata_constant_type ), public, parameter :: DEUTERON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"deuteron mass energy equivalent\", 3.00506323491e-10_dp, 0.00000000094e-10_dp, \"J\") deuteron mass energy equivalent type( codata_constant_type ), public, parameter :: DEUTERON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"deuteron mass energy equivalent in MeV\", 1875.61294500_dp, 0.00000058_dp, \"MeV\") deuteron mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: DEUTERON_MASS_IN_U = codata_constant_type(\"deuteron mass in u\", 2.013553212544_dp, 0.000000000015_dp, \"u\") deuteron mass in u type( codata_constant_type ), public, parameter :: DEUTERON_MOLAR_MASS = codata_constant_type(\"deuteron molar mass\", 2.01355321466e-3_dp, 0.00000000063e-3_dp, \"kg mol^-1\") deuteron molar mass type( codata_constant_type ), public, parameter :: DEUTERON_NEUTRON_MAG_MOM_RATIO = codata_constant_type(\"deuteron-neutron mag. mom. ratio\", -0.44820652_dp, 0.00000011_dp, \"\") deuteron-neutron mag. mom. ratio type( codata_constant_type ), public, parameter :: DEUTERON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"deuteron-proton mag. mom. ratio\", 0.30701220930_dp, 0.00000000079_dp, \"\") deuteron-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: DEUTERON_PROTON_MASS_RATIO = codata_constant_type(\"deuteron-proton mass ratio\", 1.9990075012699_dp, 0.0000000000084_dp, \"\") deuteron-proton mass ratio type( codata_constant_type ), public, parameter :: DEUTERON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"deuteron relative atomic mass\", 2.013553212544_dp, 0.000000000015_dp, \"\") deuteron relative atomic mass type( codata_constant_type ), public, parameter :: DEUTERON_RMS_CHARGE_RADIUS = codata_constant_type(\"deuteron rms charge radius\", 2.12778e-15_dp, 0.00027e-15_dp, \"m\") deuteron rms charge radius type( codata_constant_type ), public, parameter :: ELECTRON_CHARGE_TO_MASS_QUOTIENT = codata_constant_type(\"electron charge to mass quotient\", -1.75882000838e11_dp, 0.00000000055e11_dp, \"C kg^-1\") electron charge to mass quotient type( codata_constant_type ), public, parameter :: ELECTRON_DEUTERON_MAG_MOM_RATIO = codata_constant_type(\"electron-deuteron mag. mom. ratio\", -2143.9234921_dp, 0.0000056_dp, \"\") electron-deuteron mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_DEUTERON_MASS_RATIO = codata_constant_type(\"electron-deuteron mass ratio\", 2.724437107629e-4_dp, 0.000000000047e-4_dp, \"\") electron-deuteron mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_GYROMAG_RATIO = codata_constant_type(\"electron gyromag. ratio\", 1.76085962784e11_dp, 0.00000000055e11_dp, \"s^-1 T^-1\") electron gyromag. ratio type( codata_constant_type ), public, parameter :: ELECTRON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"electron gyromag. ratio in MHz/T\", 28024.9513861_dp, 0.0000087_dp, \"MHz T^-1\") electron gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: ELECTRON_G_FACTOR = codata_constant_type(\"electron g factor\", -2.00231930436092_dp, 0.00000000000036_dp, \"\") electron g factor type( codata_constant_type ), public, parameter :: ELECTRON_HELION_MASS_RATIO = codata_constant_type(\"electron-helion mass ratio\", 1.819543074649e-4_dp, 0.000000000053e-4_dp, \"\") electron-helion mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM = codata_constant_type(\"electron mag. mom.\", -9.2847646917e-24_dp, 0.0000000029e-24_dp, \"J T^-1\") electron mag. mom. type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM_ANOMALY = codata_constant_type(\"electron mag. mom. anomaly\", 1.15965218046e-3_dp, 0.00000000018e-3_dp, \"\") electron mag. mom. anomaly type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"electron mag. mom. to Bohr magneton ratio\", -1.00115965218046_dp, 0.00000000000018_dp, \"\") electron mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: ELECTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"electron mag. mom. to nuclear magneton ratio\", -1838.281971877_dp, 0.000000032_dp, \"\") electron mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: ELECTRON_MASS = codata_constant_type(\"electron mass\", 9.1093837139e-31_dp, 0.0000000028e-31_dp, \"kg\") electron mass type( codata_constant_type ), public, parameter :: ELECTRON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"electron mass energy equivalent\", 8.1871057880e-14_dp, 0.0000000026e-14_dp, \"J\") electron mass energy equivalent type( codata_constant_type ), public, parameter :: ELECTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"electron mass energy equivalent in MeV\", 0.51099895069_dp, 0.00000000016_dp, \"MeV\") electron mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: ELECTRON_MASS_IN_U = codata_constant_type(\"electron mass in u\", 5.485799090441e-4_dp, 0.000000000097e-4_dp, \"u\") electron mass in u type( codata_constant_type ), public, parameter :: ELECTRON_MOLAR_MASS = codata_constant_type(\"electron molar mass\", 5.4857990962e-7_dp, 0.0000000017e-7_dp, \"kg mol^-1\") electron molar mass type( codata_constant_type ), public, parameter :: ELECTRON_MUON_MAG_MOM_RATIO = codata_constant_type(\"electron-muon mag. mom. ratio\", 206.7669881_dp, 0.0000046_dp, \"\") electron-muon mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_MUON_MASS_RATIO = codata_constant_type(\"electron-muon mass ratio\", 4.83633170e-3_dp, 0.00000011e-3_dp, \"\") electron-muon mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_NEUTRON_MAG_MOM_RATIO = codata_constant_type(\"electron-neutron mag. mom. ratio\", 960.92048_dp, 0.00023_dp, \"\") electron-neutron mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_NEUTRON_MASS_RATIO = codata_constant_type(\"electron-neutron mass ratio\", 5.4386734416e-4_dp, 0.0000000022e-4_dp, \"\") electron-neutron mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"electron-proton mag. mom. ratio\", -658.21068789_dp, 0.00000019_dp, \"\") electron-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_PROTON_MASS_RATIO = codata_constant_type(\"electron-proton mass ratio\", 5.446170214889e-4_dp, 0.000000000094e-4_dp, \"\") electron-proton mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"electron relative atomic mass\", 5.485799090441e-4_dp, 0.000000000097e-4_dp, \"\") electron relative atomic mass type( codata_constant_type ), public, parameter :: ELECTRON_TAU_MASS_RATIO = codata_constant_type(\"electron-tau mass ratio\", 2.87585e-4_dp, 0.00019e-4_dp, \"\") electron-tau mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_TO_ALPHA_PARTICLE_MASS_RATIO = codata_constant_type(\"electron to alpha particle mass ratio\", 1.370933554733e-4_dp, 0.000000000032e-4_dp, \"\") electron to alpha particle mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_TO_SHIELDED_HELION_MAG_MOM_RATIO = codata_constant_type(\"electron to shielded helion mag. mom. ratio\", 864.05823986_dp, 0.00000070_dp, \"\") electron to shielded helion mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = codata_constant_type(\"electron to shielded proton mag. mom. ratio\", -658.2275856_dp, 0.0000027_dp, \"\") electron to shielded proton mag. mom. ratio type( codata_constant_type ), public, parameter :: ELECTRON_TRITON_MASS_RATIO = codata_constant_type(\"electron-triton mass ratio\", 1.819200062327e-4_dp, 0.000000000068e-4_dp, \"\") electron-triton mass ratio type( codata_constant_type ), public, parameter :: ELECTRON_VOLT = codata_constant_type(\"electron volt\", 1.602176634e-19_dp, 0.0_dp, \"J\") electron volt type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"electron volt-atomic mass unit relationship\", 1.07354410083e-9_dp, 0.00000000033e-9_dp, \"u\") electron volt-atomic mass unit relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_HARTREE_RELATIONSHIP = codata_constant_type(\"electron volt-hartree relationship\", 3.6749322175665e-2_dp, 0.0000000000040e-2_dp, \"E_h\") electron volt-hartree relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_HERTZ_RELATIONSHIP = codata_constant_type(\"electron volt-hertz relationship\", 2.417989242e14_dp, 0.0_dp, \"Hz\") electron volt-hertz relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"electron volt-inverse meter relationship\", 8.065543937e5_dp, 0.0_dp, \"m^-1\") electron volt-inverse meter relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_JOULE_RELATIONSHIP = codata_constant_type(\"electron volt-joule relationship\", 1.602176634e-19_dp, 0.0_dp, \"J\") electron volt-joule relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_KELVIN_RELATIONSHIP = codata_constant_type(\"electron volt-kelvin relationship\", 1.160451812e4_dp, 0.0_dp, \"K\") electron volt-kelvin relationship type( codata_constant_type ), public, parameter :: ELECTRON_VOLT_KILOGRAM_RELATIONSHIP = codata_constant_type(\"electron volt-kilogram relationship\", 1.782661921e-36_dp, 0.0_dp, \"kg\") electron volt-kilogram relationship type( codata_constant_type ), public, parameter :: ELEMENTARY_CHARGE = codata_constant_type(\"elementary charge\", 1.602176634e-19_dp, 0.0_dp, \"C\") elementary charge type( codata_constant_type ), public, parameter :: ELEMENTARY_CHARGE_OVER_H_BAR = codata_constant_type(\"elementary charge over h-bar\", 1.519267447e15_dp, 0.0_dp, \"A J^-1\") elementary charge over h-bar type( codata_constant_type ), public, parameter :: FARADAY_CONSTANT = codata_constant_type(\"Faraday constant\", 96485.33212_dp, 0.0_dp, \"C mol^-1\") Faraday constant type( codata_constant_type ), public, parameter :: FERMI_COUPLING_CONSTANT = codata_constant_type(\"Fermi coupling constant\", 1.1663787e-5_dp, 0.0000006e-5_dp, \"GeV^-2\") Fermi coupling constant type( codata_constant_type ), public, parameter :: FINE_STRUCTURE_CONSTANT = codata_constant_type(\"fine-structure constant\", 7.2973525643e-3_dp, 0.0000000011e-3_dp, \"\") fine-structure constant type( codata_constant_type ), public, parameter :: FIRST_RADIATION_CONSTANT = codata_constant_type(\"first radiation constant\", 3.741771852e-16_dp, 0.0_dp, \"W m^2\") first radiation constant type( codata_constant_type ), public, parameter :: FIRST_RADIATION_CONSTANT_FOR_SPECTRAL_RADIANCE = codata_constant_type(\"first radiation constant for spectral radiance\", 1.191042972e-16_dp, 0.0_dp, \"W m^2 sr^-1\") first radiation constant for spectral radiance type( codata_constant_type ), public, parameter :: HARTREE_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"hartree-atomic mass unit relationship\", 2.92126231797e-8_dp, 0.00000000091e-8_dp, \"u\") hartree-atomic mass unit relationship type( codata_constant_type ), public, parameter :: HARTREE_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"hartree-electron volt relationship\", 27.211386245981_dp, 0.000000000030_dp, \"eV\") hartree-electron volt relationship type( codata_constant_type ), public, parameter :: HARTREE_ENERGY = codata_constant_type(\"Hartree energy\", 4.3597447222060e-18_dp, 0.0000000000048e-18_dp, \"J\") Hartree energy type( codata_constant_type ), public, parameter :: HARTREE_ENERGY_IN_EV = codata_constant_type(\"Hartree energy in eV\", 27.211386245981_dp, 0.000000000030_dp, \"eV\") Hartree energy in eV type( codata_constant_type ), public, parameter :: HARTREE_HERTZ_RELATIONSHIP = codata_constant_type(\"hartree-hertz relationship\", 6.5796839204999e15_dp, 0.0000000000072e15_dp, \"Hz\") hartree-hertz relationship type( codata_constant_type ), public, parameter :: HARTREE_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"hartree-inverse meter relationship\", 2.1947463136314e7_dp, 0.0000000000024e7_dp, \"m^-1\") hartree-inverse meter relationship type( codata_constant_type ), public, parameter :: HARTREE_JOULE_RELATIONSHIP = codata_constant_type(\"hartree-joule relationship\", 4.3597447222060e-18_dp, 0.0000000000048e-18_dp, \"J\") hartree-joule relationship type( codata_constant_type ), public, parameter :: HARTREE_KELVIN_RELATIONSHIP = codata_constant_type(\"hartree-kelvin relationship\", 3.1577502480398e5_dp, 0.0000000000034e5_dp, \"K\") hartree-kelvin relationship type( codata_constant_type ), public, parameter :: HARTREE_KILOGRAM_RELATIONSHIP = codata_constant_type(\"hartree-kilogram relationship\", 4.8508702095419e-35_dp, 0.0000000000053e-35_dp, \"kg\") hartree-kilogram relationship type( codata_constant_type ), public, parameter :: HELION_ELECTRON_MASS_RATIO = codata_constant_type(\"helion-electron mass ratio\", 5495.88527984_dp, 0.00000016_dp, \"\") helion-electron mass ratio type( codata_constant_type ), public, parameter :: HELION_G_FACTOR = codata_constant_type(\"helion g factor\", -4.2552506995_dp, 0.0000000034_dp, \"\") helion g factor type( codata_constant_type ), public, parameter :: HELION_MAG_MOM = codata_constant_type(\"helion mag. mom.\", -1.07461755198e-26_dp, 0.00000000093e-26_dp, \"J T^-1\") helion mag. mom. type( codata_constant_type ), public, parameter :: HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"helion mag. mom. to Bohr magneton ratio\", -1.15874098083e-3_dp, 0.00000000094e-3_dp, \"\") helion mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"helion mag. mom. to nuclear magneton ratio\", -2.1276253498_dp, 0.0000000017_dp, \"\") helion mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: HELION_MASS = codata_constant_type(\"helion mass\", 5.0064127862e-27_dp, 0.0000000016e-27_dp, \"kg\") helion mass type( codata_constant_type ), public, parameter :: HELION_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"helion mass energy equivalent\", 4.4995394185e-10_dp, 0.0000000014e-10_dp, \"J\") helion mass energy equivalent type( codata_constant_type ), public, parameter :: HELION_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"helion mass energy equivalent in MeV\", 2808.39161112_dp, 0.00000088_dp, \"MeV\") helion mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: HELION_MASS_IN_U = codata_constant_type(\"helion mass in u\", 3.014932246932_dp, 0.000000000074_dp, \"u\") helion mass in u type( codata_constant_type ), public, parameter :: HELION_MOLAR_MASS = codata_constant_type(\"helion molar mass\", 3.01493225010e-3_dp, 0.00000000094e-3_dp, \"kg mol^-1\") helion molar mass type( codata_constant_type ), public, parameter :: HELION_PROTON_MASS_RATIO = codata_constant_type(\"helion-proton mass ratio\", 2.993152671552_dp, 0.000000000070_dp, \"\") helion-proton mass ratio type( codata_constant_type ), public, parameter :: HELION_RELATIVE_ATOMIC_MASS = codata_constant_type(\"helion relative atomic mass\", 3.014932246932_dp, 0.000000000074_dp, \"\") helion relative atomic mass type( codata_constant_type ), public, parameter :: HELION_SHIELDING_SHIFT = codata_constant_type(\"helion shielding shift\", 5.9967029e-5_dp, 0.0000023e-5_dp, \"\") helion shielding shift type( codata_constant_type ), public, parameter :: HERTZ_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"hertz-atomic mass unit relationship\", 4.4398216590e-24_dp, 0.0000000014e-24_dp, \"u\") hertz-atomic mass unit relationship type( codata_constant_type ), public, parameter :: HERTZ_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"hertz-electron volt relationship\", 4.135667696e-15_dp, 0.0_dp, \"eV\") hertz-electron volt relationship type( codata_constant_type ), public, parameter :: HERTZ_HARTREE_RELATIONSHIP = codata_constant_type(\"hertz-hartree relationship\", 1.5198298460574e-16_dp, 0.0000000000017e-16_dp, \"E_h\") hertz-hartree relationship type( codata_constant_type ), public, parameter :: HERTZ_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"hertz-inverse meter relationship\", 3.335640951e-9_dp, 0.0_dp, \"m^-1\") hertz-inverse meter relationship type( codata_constant_type ), public, parameter :: HERTZ_JOULE_RELATIONSHIP = codata_constant_type(\"hertz-joule relationship\", 6.62607015e-34_dp, 0.0_dp, \"J\") hertz-joule relationship type( codata_constant_type ), public, parameter :: HERTZ_KELVIN_RELATIONSHIP = codata_constant_type(\"hertz-kelvin relationship\", 4.799243073e-11_dp, 0.0_dp, \"K\") hertz-kelvin relationship type( codata_constant_type ), public, parameter :: HERTZ_KILOGRAM_RELATIONSHIP = codata_constant_type(\"hertz-kilogram relationship\", 7.372497323e-51_dp, 0.0_dp, \"kg\") hertz-kilogram relationship type( codata_constant_type ), public, parameter :: HYPERFINE_TRANSITION_FREQUENCY_OF_CS_133 = codata_constant_type(\"hyperfine transition frequency of Cs-133\", 9192631770_dp, 0.0_dp, \"Hz\") hyperfine transition frequency of Cs-133 type( codata_constant_type ), public, parameter :: INVERSE_FINE_STRUCTURE_CONSTANT = codata_constant_type(\"inverse fine-structure constant\", 137.035999177_dp, 0.000000021_dp, \"\") inverse fine-structure constant type( codata_constant_type ), public, parameter :: INVERSE_METER_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"inverse meter-atomic mass unit relationship\", 1.33102504824e-15_dp, 0.00000000041e-15_dp, \"u\") inverse meter-atomic mass unit relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"inverse meter-electron volt relationship\", 1.239841984e-6_dp, 0.0_dp, \"eV\") inverse meter-electron volt relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_HARTREE_RELATIONSHIP = codata_constant_type(\"inverse meter-hartree relationship\", 4.5563352529132e-8_dp, 0.0000000000050e-8_dp, \"E_h\") inverse meter-hartree relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_HERTZ_RELATIONSHIP = codata_constant_type(\"inverse meter-hertz relationship\", 299792458_dp, 0.0_dp, \"Hz\") inverse meter-hertz relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_JOULE_RELATIONSHIP = codata_constant_type(\"inverse meter-joule relationship\", 1.986445857e-25_dp, 0.0_dp, \"J\") inverse meter-joule relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_KELVIN_RELATIONSHIP = codata_constant_type(\"inverse meter-kelvin relationship\", 1.438776877e-2_dp, 0.0_dp, \"K\") inverse meter-kelvin relationship type( codata_constant_type ), public, parameter :: INVERSE_METER_KILOGRAM_RELATIONSHIP = codata_constant_type(\"inverse meter-kilogram relationship\", 2.210219094e-42_dp, 0.0_dp, \"kg\") inverse meter-kilogram relationship type( codata_constant_type ), public, parameter :: INVERSE_OF_CONDUCTANCE_QUANTUM = codata_constant_type(\"inverse of conductance quantum\", 12906.40372_dp, 0.0_dp, \"ohm\") inverse of conductance quantum type( codata_constant_type ), public, parameter :: JOSEPHSON_CONSTANT = codata_constant_type(\"Josephson constant\", 483597.8484e9_dp, 0.0_dp, \"Hz V^-1\") Josephson constant type( codata_constant_type ), public, parameter :: JOULE_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"joule-atomic mass unit relationship\", 6.7005352471e9_dp, 0.0000000021e9_dp, \"u\") joule-atomic mass unit relationship type( codata_constant_type ), public, parameter :: JOULE_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"joule-electron volt relationship\", 6.241509074e18_dp, 0.0_dp, \"eV\") joule-electron volt relationship type( codata_constant_type ), public, parameter :: JOULE_HARTREE_RELATIONSHIP = codata_constant_type(\"joule-hartree relationship\", 2.2937122783969e17_dp, 0.0000000000025e17_dp, \"E_h\") joule-hartree relationship type( codata_constant_type ), public, parameter :: JOULE_HERTZ_RELATIONSHIP = codata_constant_type(\"joule-hertz relationship\", 1.509190179e33_dp, 0.0_dp, \"Hz\") joule-hertz relationship type( codata_constant_type ), public, parameter :: JOULE_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"joule-inverse meter relationship\", 5.034116567e24_dp, 0.0_dp, \"m^-1\") joule-inverse meter relationship type( codata_constant_type ), public, parameter :: JOULE_KELVIN_RELATIONSHIP = codata_constant_type(\"joule-kelvin relationship\", 7.242970516e22_dp, 0.0_dp, \"K\") joule-kelvin relationship type( codata_constant_type ), public, parameter :: JOULE_KILOGRAM_RELATIONSHIP = codata_constant_type(\"joule-kilogram relationship\", 1.112650056e-17_dp, 0.0_dp, \"kg\") joule-kilogram relationship type( codata_constant_type ), public, parameter :: KELVIN_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"kelvin-atomic mass unit relationship\", 9.2510872884e-14_dp, 0.0000000029e-14_dp, \"u\") kelvin-atomic mass unit relationship type( codata_constant_type ), public, parameter :: KELVIN_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"kelvin-electron volt relationship\", 8.617333262e-5_dp, 0.0_dp, \"eV\") kelvin-electron volt relationship type( codata_constant_type ), public, parameter :: KELVIN_HARTREE_RELATIONSHIP = codata_constant_type(\"kelvin-hartree relationship\", 3.1668115634564e-6_dp, 0.0000000000035e-6_dp, \"E_h\") kelvin-hartree relationship type( codata_constant_type ), public, parameter :: KELVIN_HERTZ_RELATIONSHIP = codata_constant_type(\"kelvin-hertz relationship\", 2.083661912e10_dp, 0.0_dp, \"Hz\") kelvin-hertz relationship type( codata_constant_type ), public, parameter :: KELVIN_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"kelvin-inverse meter relationship\", 69.50348004_dp, 0.0_dp, \"m^-1\") kelvin-inverse meter relationship type( codata_constant_type ), public, parameter :: KELVIN_JOULE_RELATIONSHIP = codata_constant_type(\"kelvin-joule relationship\", 1.380649e-23_dp, 0.0_dp, \"J\") kelvin-joule relationship type( codata_constant_type ), public, parameter :: KELVIN_KILOGRAM_RELATIONSHIP = codata_constant_type(\"kelvin-kilogram relationship\", 1.536179187e-40_dp, 0.0_dp, \"kg\") kelvin-kilogram relationship type( codata_constant_type ), public, parameter :: KILOGRAM_ATOMIC_MASS_UNIT_RELATIONSHIP = codata_constant_type(\"kilogram-atomic mass unit relationship\", 6.0221407537e26_dp, 0.0000000019e26_dp, \"u\") kilogram-atomic mass unit relationship type( codata_constant_type ), public, parameter :: KILOGRAM_ELECTRON_VOLT_RELATIONSHIP = codata_constant_type(\"kilogram-electron volt relationship\", 5.609588603e35_dp, 0.0_dp, \"eV\") kilogram-electron volt relationship type( codata_constant_type ), public, parameter :: KILOGRAM_HARTREE_RELATIONSHIP = codata_constant_type(\"kilogram-hartree relationship\", 2.0614857887415e34_dp, 0.0000000000022e34_dp, \"E_h\") kilogram-hartree relationship type( codata_constant_type ), public, parameter :: KILOGRAM_HERTZ_RELATIONSHIP = codata_constant_type(\"kilogram-hertz relationship\", 1.356392489e50_dp, 0.0_dp, \"Hz\") kilogram-hertz relationship type( codata_constant_type ), public, parameter :: KILOGRAM_INVERSE_METER_RELATIONSHIP = codata_constant_type(\"kilogram-inverse meter relationship\", 4.524438335e41_dp, 0.0_dp, \"m^-1\") kilogram-inverse meter relationship type( codata_constant_type ), public, parameter :: KILOGRAM_JOULE_RELATIONSHIP = codata_constant_type(\"kilogram-joule relationship\", 8.987551787e16_dp, 0.0_dp, \"J\") kilogram-joule relationship type( codata_constant_type ), public, parameter :: KILOGRAM_KELVIN_RELATIONSHIP = codata_constant_type(\"kilogram-kelvin relationship\", 6.509657260e39_dp, 0.0_dp, \"K\") kilogram-kelvin relationship type( codata_constant_type ), public, parameter :: LATTICE_PARAMETER_OF_SILICON = codata_constant_type(\"lattice parameter of silicon\", 5.431020511e-10_dp, 0.000000089e-10_dp, \"m\") lattice parameter of silicon type( codata_constant_type ), public, parameter :: LATTICE_SPACING_OF_IDEAL_SI_220 = codata_constant_type(\"lattice spacing of ideal Si (220)\", 1.920155716e-10_dp, 0.000000032e-10_dp, \"m\") lattice spacing of ideal Si (220) type( codata_constant_type ), public, parameter :: LOSCHMIDT_CONSTANT_273_15_K_100_KPA = codata_constant_type(\"Loschmidt constant (273.15 K, 100 kPa)\", 2.651645804e25_dp, 0.0_dp, \"m^-3\") Loschmidt constant (273.15 K, 100 kPa) type( codata_constant_type ), public, parameter :: LOSCHMIDT_CONSTANT_273_15_K_101_325_KPA = codata_constant_type(\"Loschmidt constant (273.15 K, 101.325 kPa)\", 2.686780111e25_dp, 0.0_dp, \"m^-3\") Loschmidt constant (273.15 K, 101.325 kPa) type( codata_constant_type ), public, parameter :: LUMINOUS_EFFICACY = codata_constant_type(\"luminous efficacy\", 683_dp, 0.0_dp, \"lm W^-1\") luminous efficacy type( codata_constant_type ), public, parameter :: MAG_FLUX_QUANTUM = codata_constant_type(\"mag. flux quantum\", 2.067833848e-15_dp, 0.0_dp, \"Wb\") mag. flux quantum type( codata_constant_type ), public, parameter :: MOLAR_GAS_CONSTANT = codata_constant_type(\"molar gas constant\", 8.314462618_dp, 0.0_dp, \"J mol^-1 K^-1\") molar gas constant type( codata_constant_type ), public, parameter :: MOLAR_MASS_CONSTANT = codata_constant_type(\"molar mass constant\", 1.00000000105e-3_dp, 0.00000000031e-3_dp, \"kg mol^-1\") molar mass constant type( codata_constant_type ), public, parameter :: MOLAR_MASS_OF_CARBON_12 = codata_constant_type(\"molar mass of carbon-12\", 12.0000000126e-3_dp, 0.0000000037e-3_dp, \"kg mol^-1\") molar mass of carbon-12 type( codata_constant_type ), public, parameter :: MOLAR_PLANCK_CONSTANT = codata_constant_type(\"molar Planck constant\", 3.990312712e-10_dp, 0.0_dp, \"J Hz^-1 mol^-1\") molar Planck constant type( codata_constant_type ), public, parameter :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_100_KPA = codata_constant_type(\"molar volume of ideal gas (273.15 K, 100 kPa)\", 22.71095464e-3_dp, 0.0_dp, \"m^3 mol^-1\") molar volume of ideal gas (273.15 K, 100 kPa) type( codata_constant_type ), public, parameter :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA = codata_constant_type(\"molar volume of ideal gas (273.15 K, 101.325 kPa)\", 22.41396954e-3_dp, 0.0_dp, \"m^3 mol^-1\") molar volume of ideal gas (273.15 K, 101.325 kPa) type( codata_constant_type ), public, parameter :: MOLAR_VOLUME_OF_SILICON = codata_constant_type(\"molar volume of silicon\", 1.205883199e-5_dp, 0.000000060e-5_dp, \"m^3 mol^-1\") molar volume of silicon type( codata_constant_type ), public, parameter :: MOLYBDENUM_X_UNIT = codata_constant_type(\"Molybdenum x unit\", 1.00209952e-13_dp, 0.00000053e-13_dp, \"m\") Molybdenum x unit type( codata_constant_type ), public, parameter :: MUON_COMPTON_WAVELENGTH = codata_constant_type(\"muon Compton wavelength\", 1.173444110e-14_dp, 0.000000026e-14_dp, \"m\") muon Compton wavelength type( codata_constant_type ), public, parameter :: MUON_ELECTRON_MASS_RATIO = codata_constant_type(\"muon-electron mass ratio\", 206.7682827_dp, 0.0000046_dp, \"\") muon-electron mass ratio type( codata_constant_type ), public, parameter :: MUON_G_FACTOR = codata_constant_type(\"muon g factor\", -2.00233184123_dp, 0.00000000082_dp, \"\") muon g factor type( codata_constant_type ), public, parameter :: MUON_MAG_MOM = codata_constant_type(\"muon mag. mom.\", -4.49044830e-26_dp, 0.00000010e-26_dp, \"J T^-1\") muon mag. mom. type( codata_constant_type ), public, parameter :: MUON_MAG_MOM_ANOMALY = codata_constant_type(\"muon mag. mom. anomaly\", 1.16592062e-3_dp, 0.00000041e-3_dp, \"\") muon mag. mom. anomaly type( codata_constant_type ), public, parameter :: MUON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"muon mag. mom. to Bohr magneton ratio\", -4.84197048e-3_dp, 0.00000011e-3_dp, \"\") muon mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: MUON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"muon mag. mom. to nuclear magneton ratio\", -8.89059704_dp, 0.00000020_dp, \"\") muon mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: MUON_MASS = codata_constant_type(\"muon mass\", 1.883531627e-28_dp, 0.000000042e-28_dp, \"kg\") muon mass type( codata_constant_type ), public, parameter :: MUON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"muon mass energy equivalent\", 1.692833804e-11_dp, 0.000000038e-11_dp, \"J\") muon mass energy equivalent type( codata_constant_type ), public, parameter :: MUON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"muon mass energy equivalent in MeV\", 105.6583755_dp, 0.0000023_dp, \"MeV\") muon mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: MUON_MASS_IN_U = codata_constant_type(\"muon mass in u\", 0.1134289257_dp, 0.0000000025_dp, \"u\") muon mass in u type( codata_constant_type ), public, parameter :: MUON_MOLAR_MASS = codata_constant_type(\"muon molar mass\", 1.134289258e-4_dp, 0.000000025e-4_dp, \"kg mol^-1\") muon molar mass type( codata_constant_type ), public, parameter :: MUON_NEUTRON_MASS_RATIO = codata_constant_type(\"muon-neutron mass ratio\", 0.1124545168_dp, 0.0000000025_dp, \"\") muon-neutron mass ratio type( codata_constant_type ), public, parameter :: MUON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"muon-proton mag. mom. ratio\", -3.183345146_dp, 0.000000071_dp, \"\") muon-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: MUON_PROTON_MASS_RATIO = codata_constant_type(\"muon-proton mass ratio\", 0.1126095262_dp, 0.0000000025_dp, \"\") muon-proton mass ratio type( codata_constant_type ), public, parameter :: MUON_TAU_MASS_RATIO = codata_constant_type(\"muon-tau mass ratio\", 5.94635e-2_dp, 0.00040e-2_dp, \"\") muon-tau mass ratio type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ACTION = codata_constant_type(\"natural unit of action\", 1.054571817e-34_dp, 0.0_dp, \"J s\") natural unit of action type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ACTION_IN_EV_S = codata_constant_type(\"natural unit of action in eV s\", 6.582119569e-16_dp, 0.0_dp, \"eV s\") natural unit of action in eV s type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ENERGY = codata_constant_type(\"natural unit of energy\", 8.1871057880e-14_dp, 0.0000000026e-14_dp, \"J\") natural unit of energy type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_ENERGY_IN_MEV = codata_constant_type(\"natural unit of energy in MeV\", 0.51099895069_dp, 0.00000000016_dp, \"MeV\") natural unit of energy in MeV type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_LENGTH = codata_constant_type(\"natural unit of length\", 3.8615926744e-13_dp, 0.0000000012e-13_dp, \"m\") natural unit of length type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_MASS = codata_constant_type(\"natural unit of mass\", 9.1093837139e-31_dp, 0.0000000028e-31_dp, \"kg\") natural unit of mass type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_MOMENTUM = codata_constant_type(\"natural unit of momentum\", 2.73092453446e-22_dp, 0.00000000085e-22_dp, \"kg m s^-1\") natural unit of momentum type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_MOMENTUM_IN_MEV_C = codata_constant_type(\"natural unit of momentum in MeV/c\", 0.51099895069_dp, 0.00000000016_dp, \"MeV/c\") natural unit of momentum in MeV/c type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_TIME = codata_constant_type(\"natural unit of time\", 1.28808866644e-21_dp, 0.00000000040e-21_dp, \"s\") natural unit of time type( codata_constant_type ), public, parameter :: NATURAL_UNIT_OF_VELOCITY = codata_constant_type(\"natural unit of velocity\", 299792458_dp, 0.0_dp, \"m s^-1\") natural unit of velocity type( codata_constant_type ), public, parameter :: NEUTRON_COMPTON_WAVELENGTH = codata_constant_type(\"neutron Compton wavelength\", 1.31959090382e-15_dp, 0.00000000067e-15_dp, \"m\") neutron Compton wavelength type( codata_constant_type ), public, parameter :: NEUTRON_ELECTRON_MAG_MOM_RATIO = codata_constant_type(\"neutron-electron mag. mom. ratio\", 1.04066884e-3_dp, 0.00000024e-3_dp, \"\") neutron-electron mag. mom. ratio type( codata_constant_type ), public, parameter :: NEUTRON_ELECTRON_MASS_RATIO = codata_constant_type(\"neutron-electron mass ratio\", 1838.68366200_dp, 0.00000074_dp, \"\") neutron-electron mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_GYROMAG_RATIO = codata_constant_type(\"neutron gyromag. ratio\", 1.83247174e8_dp, 0.00000043e8_dp, \"s^-1 T^-1\") neutron gyromag. ratio type( codata_constant_type ), public, parameter :: NEUTRON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"neutron gyromag. ratio in MHz/T\", 29.1646935_dp, 0.0000069_dp, \"MHz T^-1\") neutron gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: NEUTRON_G_FACTOR = codata_constant_type(\"neutron g factor\", -3.82608552_dp, 0.00000090_dp, \"\") neutron g factor type( codata_constant_type ), public, parameter :: NEUTRON_MAG_MOM = codata_constant_type(\"neutron mag. mom.\", -9.6623653e-27_dp, 0.0000023e-27_dp, \"J T^-1\") neutron mag. mom. type( codata_constant_type ), public, parameter :: NEUTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"neutron mag. mom. to Bohr magneton ratio\", -1.04187565e-3_dp, 0.00000025e-3_dp, \"\") neutron mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: NEUTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"neutron mag. mom. to nuclear magneton ratio\", -1.91304276_dp, 0.00000045_dp, \"\") neutron mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: NEUTRON_MASS = codata_constant_type(\"neutron mass\", 1.67492750056e-27_dp, 0.00000000085e-27_dp, \"kg\") neutron mass type( codata_constant_type ), public, parameter :: NEUTRON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"neutron mass energy equivalent\", 1.50534976514e-10_dp, 0.00000000076e-10_dp, \"J\") neutron mass energy equivalent type( codata_constant_type ), public, parameter :: NEUTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"neutron mass energy equivalent in MeV\", 939.56542194_dp, 0.00000048_dp, \"MeV\") neutron mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: NEUTRON_MASS_IN_U = codata_constant_type(\"neutron mass in u\", 1.00866491606_dp, 0.00000000040_dp, \"u\") neutron mass in u type( codata_constant_type ), public, parameter :: NEUTRON_MOLAR_MASS = codata_constant_type(\"neutron molar mass\", 1.00866491712e-3_dp, 0.00000000051e-3_dp, \"kg mol^-1\") neutron molar mass type( codata_constant_type ), public, parameter :: NEUTRON_MUON_MASS_RATIO = codata_constant_type(\"neutron-muon mass ratio\", 8.89248408_dp, 0.00000020_dp, \"\") neutron-muon mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MAG_MOM_RATIO = codata_constant_type(\"neutron-proton mag. mom. ratio\", -0.68497935_dp, 0.00000016_dp, \"\") neutron-proton mag. mom. ratio type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE = codata_constant_type(\"neutron-proton mass difference\", 2.30557461e-30_dp, 0.00000067e-30_dp, \"kg\") neutron-proton mass difference type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT = codata_constant_type(\"neutron-proton mass difference energy equivalent\", 2.07214712e-13_dp, 0.00000060e-13_dp, \"J\") neutron-proton mass difference energy equivalent type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"neutron-proton mass difference energy equivalent in MeV\", 1.29333251_dp, 0.00000038_dp, \"MeV\") neutron-proton mass difference energy equivalent in MeV type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_DIFFERENCE_IN_U = codata_constant_type(\"neutron-proton mass difference in u\", 1.38844948e-3_dp, 0.00000040e-3_dp, \"u\") neutron-proton mass difference in u type( codata_constant_type ), public, parameter :: NEUTRON_PROTON_MASS_RATIO = codata_constant_type(\"neutron-proton mass ratio\", 1.00137841946_dp, 0.00000000040_dp, \"\") neutron-proton mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"neutron relative atomic mass\", 1.00866491606_dp, 0.00000000040_dp, \"\") neutron relative atomic mass type( codata_constant_type ), public, parameter :: NEUTRON_TAU_MASS_RATIO = codata_constant_type(\"neutron-tau mass ratio\", 0.528779_dp, 0.000036_dp, \"\") neutron-tau mass ratio type( codata_constant_type ), public, parameter :: NEUTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = codata_constant_type(\"neutron to shielded proton mag. mom. ratio\", -0.68499694_dp, 0.00000016_dp, \"\") neutron to shielded proton mag. mom. ratio type( codata_constant_type ), public, parameter :: NEWTONIAN_CONSTANT_OF_GRAVITATION = codata_constant_type(\"Newtonian constant of gravitation\", 6.67430e-11_dp, 0.00015e-11_dp, \"m^3 kg^-1 s^-2\") Newtonian constant of gravitation type( codata_constant_type ), public, parameter :: NEWTONIAN_CONSTANT_OF_GRAVITATION_OVER_H_BAR_C = codata_constant_type(\"Newtonian constant of gravitation over h-bar c\", 6.70883e-39_dp, 0.00015e-39_dp, \"(GeV/c^2)^-2\") Newtonian constant of gravitation over h-bar c type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON = codata_constant_type(\"nuclear magneton\", 5.0507837393e-27_dp, 0.0000000016e-27_dp, \"J T^-1\") nuclear magneton type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_EV_T = codata_constant_type(\"nuclear magneton in eV/T\", 3.15245125417e-8_dp, 0.00000000098e-8_dp, \"eV T^-1\") nuclear magneton in eV/T type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_INVERSE_METER_PER_TESLA = codata_constant_type(\"nuclear magneton in inverse meter per tesla\", 2.54262341009e-2_dp, 0.00000000079e-2_dp, \"m^-1 T^-1\") nuclear magneton in inverse meter per tesla type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_K_T = codata_constant_type(\"nuclear magneton in K/T\", 3.6582677706e-4_dp, 0.0000000011e-4_dp, \"K T^-1\") nuclear magneton in K/T type( codata_constant_type ), public, parameter :: NUCLEAR_MAGNETON_IN_MHZ_T = codata_constant_type(\"nuclear magneton in MHz/T\", 7.6225932188_dp, 0.0000000024_dp, \"MHz T^-1\") nuclear magneton in MHz/T type( codata_constant_type ), public, parameter :: PLANCK_CONSTANT = codata_constant_type(\"Planck constant\", 6.62607015e-34_dp, 0.0_dp, \"J Hz^-1\") Planck constant type( codata_constant_type ), public, parameter :: PLANCK_CONSTANT_IN_EV_HZ = codata_constant_type(\"Planck constant in eV/Hz\", 4.135667696e-15_dp, 0.0_dp, \"eV Hz^-1\") Planck constant in eV/Hz type( codata_constant_type ), public, parameter :: PLANCK_LENGTH = codata_constant_type(\"Planck length\", 1.616255e-35_dp, 0.000018e-35_dp, \"m\") Planck length type( codata_constant_type ), public, parameter :: PLANCK_MASS = codata_constant_type(\"Planck mass\", 2.176434e-8_dp, 0.000024e-8_dp, \"kg\") Planck mass type( codata_constant_type ), public, parameter :: PLANCK_MASS_ENERGY_EQUIVALENT_IN_GEV = codata_constant_type(\"Planck mass energy equivalent in GeV\", 1.220890e19_dp, 0.000014e19_dp, \"GeV\") Planck mass energy equivalent in GeV type( codata_constant_type ), public, parameter :: PLANCK_TEMPERATURE = codata_constant_type(\"Planck temperature\", 1.416784e32_dp, 0.000016e32_dp, \"K\") Planck temperature type( codata_constant_type ), public, parameter :: PLANCK_TIME = codata_constant_type(\"Planck time\", 5.391247e-44_dp, 0.000060e-44_dp, \"s\") Planck time type( codata_constant_type ), public, parameter :: PROTON_CHARGE_TO_MASS_QUOTIENT = codata_constant_type(\"proton charge to mass quotient\", 9.5788331430e7_dp, 0.0000000030e7_dp, \"C kg^-1\") proton charge to mass quotient type( codata_constant_type ), public, parameter :: PROTON_COMPTON_WAVELENGTH = codata_constant_type(\"proton Compton wavelength\", 1.32140985360e-15_dp, 0.00000000041e-15_dp, \"m\") proton Compton wavelength type( codata_constant_type ), public, parameter :: PROTON_ELECTRON_MASS_RATIO = codata_constant_type(\"proton-electron mass ratio\", 1836.152673426_dp, 0.000000032_dp, \"\") proton-electron mass ratio type( codata_constant_type ), public, parameter :: PROTON_GYROMAG_RATIO = codata_constant_type(\"proton gyromag. ratio\", 2.6752218708e8_dp, 0.0000000011e8_dp, \"s^-1 T^-1\") proton gyromag. ratio type( codata_constant_type ), public, parameter :: PROTON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"proton gyromag. ratio in MHz/T\", 42.577478461_dp, 0.000000018_dp, \"MHz T^-1\") proton gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: PROTON_G_FACTOR = codata_constant_type(\"proton g factor\", 5.5856946893_dp, 0.0000000016_dp, \"\") proton g factor type( codata_constant_type ), public, parameter :: PROTON_MAG_MOM = codata_constant_type(\"proton mag. mom.\", 1.41060679545e-26_dp, 0.00000000060e-26_dp, \"J T^-1\") proton mag. mom. type( codata_constant_type ), public, parameter :: PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"proton mag. mom. to Bohr magneton ratio\", 1.52103220230e-3_dp, 0.00000000045e-3_dp, \"\") proton mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"proton mag. mom. to nuclear magneton ratio\", 2.79284734463_dp, 0.00000000082_dp, \"\") proton mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: PROTON_MAG_SHIELDING_CORRECTION = codata_constant_type(\"proton mag. shielding correction\", 2.56715e-5_dp, 0.00041e-5_dp, \"\") proton mag. shielding correction type( codata_constant_type ), public, parameter :: PROTON_MASS = codata_constant_type(\"proton mass\", 1.67262192595e-27_dp, 0.00000000052e-27_dp, \"kg\") proton mass type( codata_constant_type ), public, parameter :: PROTON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"proton mass energy equivalent\", 1.50327761802e-10_dp, 0.00000000047e-10_dp, \"J\") proton mass energy equivalent type( codata_constant_type ), public, parameter :: PROTON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"proton mass energy equivalent in MeV\", 938.27208943_dp, 0.00000029_dp, \"MeV\") proton mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: PROTON_MASS_IN_U = codata_constant_type(\"proton mass in u\", 1.0072764665789_dp, 0.0000000000083_dp, \"u\") proton mass in u type( codata_constant_type ), public, parameter :: PROTON_MOLAR_MASS = codata_constant_type(\"proton molar mass\", 1.00727646764e-3_dp, 0.00000000031e-3_dp, \"kg mol^-1\") proton molar mass type( codata_constant_type ), public, parameter :: PROTON_MUON_MASS_RATIO = codata_constant_type(\"proton-muon mass ratio\", 8.88024338_dp, 0.00000020_dp, \"\") proton-muon mass ratio type( codata_constant_type ), public, parameter :: PROTON_NEUTRON_MAG_MOM_RATIO = codata_constant_type(\"proton-neutron mag. mom. ratio\", -1.45989802_dp, 0.00000034_dp, \"\") proton-neutron mag. mom. ratio type( codata_constant_type ), public, parameter :: PROTON_NEUTRON_MASS_RATIO = codata_constant_type(\"proton-neutron mass ratio\", 0.99862347797_dp, 0.00000000040_dp, \"\") proton-neutron mass ratio type( codata_constant_type ), public, parameter :: PROTON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"proton relative atomic mass\", 1.0072764665789_dp, 0.0000000000083_dp, \"\") proton relative atomic mass type( codata_constant_type ), public, parameter :: PROTON_RMS_CHARGE_RADIUS = codata_constant_type(\"proton rms charge radius\", 8.4075e-16_dp, 0.0064e-16_dp, \"m\") proton rms charge radius type( codata_constant_type ), public, parameter :: PROTON_TAU_MASS_RATIO = codata_constant_type(\"proton-tau mass ratio\", 0.528051_dp, 0.000036_dp, \"\") proton-tau mass ratio type( codata_constant_type ), public, parameter :: QUANTUM_OF_CIRCULATION = codata_constant_type(\"quantum of circulation\", 3.6369475467e-4_dp, 0.0000000011e-4_dp, \"m^2 s^-1\") quantum of circulation type( codata_constant_type ), public, parameter :: QUANTUM_OF_CIRCULATION_TIMES_2 = codata_constant_type(\"quantum of circulation times 2\", 7.2738950934e-4_dp, 0.0000000023e-4_dp, \"m^2 s^-1\") quantum of circulation times 2 type( codata_constant_type ), public, parameter :: REDUCED_COMPTON_WAVELENGTH = codata_constant_type(\"reduced Compton wavelength\", 3.8615926744e-13_dp, 0.0000000012e-13_dp, \"m\") reduced Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_MUON_COMPTON_WAVELENGTH = codata_constant_type(\"reduced muon Compton wavelength\", 1.867594306e-15_dp, 0.000000042e-15_dp, \"m\") reduced muon Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_NEUTRON_COMPTON_WAVELENGTH = codata_constant_type(\"reduced neutron Compton wavelength\", 2.1001941520e-16_dp, 0.0000000011e-16_dp, \"m\") reduced neutron Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_PLANCK_CONSTANT = codata_constant_type(\"reduced Planck constant\", 1.054571817e-34_dp, 0.0_dp, \"J s\") reduced Planck constant type( codata_constant_type ), public, parameter :: REDUCED_PLANCK_CONSTANT_IN_EV_S = codata_constant_type(\"reduced Planck constant in eV s\", 6.582119569e-16_dp, 0.0_dp, \"eV s\") reduced Planck constant in eV s type( codata_constant_type ), public, parameter :: REDUCED_PLANCK_CONSTANT_TIMES_C_IN_MEV_FM = codata_constant_type(\"reduced Planck constant times c in MeV fm\", 197.3269804_dp, 0.0_dp, \"MeV fm\") reduced Planck constant times c in MeV fm type( codata_constant_type ), public, parameter :: REDUCED_PROTON_COMPTON_WAVELENGTH = codata_constant_type(\"reduced proton Compton wavelength\", 2.10308910051e-16_dp, 0.00000000066e-16_dp, \"m\") reduced proton Compton wavelength type( codata_constant_type ), public, parameter :: REDUCED_TAU_COMPTON_WAVELENGTH = codata_constant_type(\"reduced tau Compton wavelength\", 1.110538e-16_dp, 0.000075e-16_dp, \"m\") reduced tau Compton wavelength type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT = codata_constant_type(\"Rydberg constant\", 10973731.568157_dp, 0.000012_dp, \"m^-1\") Rydberg constant type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT_TIMES_C_IN_HZ = codata_constant_type(\"Rydberg constant times c in Hz\", 3.2898419602500e15_dp, 0.0000000000036e15_dp, \"Hz\") Rydberg constant times c in Hz type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT_TIMES_HC_IN_EV = codata_constant_type(\"Rydberg constant times hc in eV\", 13.605693122990_dp, 0.000000000015_dp, \"eV\") Rydberg constant times hc in eV type( codata_constant_type ), public, parameter :: RYDBERG_CONSTANT_TIMES_HC_IN_J = codata_constant_type(\"Rydberg constant times hc in J\", 2.1798723611030e-18_dp, 0.0000000000024e-18_dp, \"J\") Rydberg constant times hc in J type( codata_constant_type ), public, parameter :: SACKUR_TETRODE_CONSTANT_1_K_100_KPA = codata_constant_type(\"Sackur-Tetrode constant (1 K, 100 kPa)\", -1.15170753496_dp, 0.00000000047_dp, \"\") Sackur-Tetrode constant (1 K, 100 kPa) type( codata_constant_type ), public, parameter :: SACKUR_TETRODE_CONSTANT_1_K_101_325_KPA = codata_constant_type(\"Sackur-Tetrode constant (1 K, 101.325 kPa)\", -1.16487052149_dp, 0.00000000047_dp, \"\") Sackur-Tetrode constant (1 K, 101.325 kPa) type( codata_constant_type ), public, parameter :: SECOND_RADIATION_CONSTANT = codata_constant_type(\"second radiation constant\", 1.438776877e-2_dp, 0.0_dp, \"m K\") second radiation constant type( codata_constant_type ), public, parameter :: SHIELDED_HELION_GYROMAG_RATIO = codata_constant_type(\"shielded helion gyromag. ratio\", 2.0378946078e8_dp, 0.0000000018e8_dp, \"s^-1 T^-1\") shielded helion gyromag. ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"shielded helion gyromag. ratio in MHz/T\", 32.434100033_dp, 0.000000028_dp, \"MHz T^-1\") shielded helion gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: SHIELDED_HELION_MAG_MOM = codata_constant_type(\"shielded helion mag. mom.\", -1.07455311035e-26_dp, 0.00000000093e-26_dp, \"J T^-1\") shielded helion mag. mom. type( codata_constant_type ), public, parameter :: SHIELDED_HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"shielded helion mag. mom. to Bohr magneton ratio\", -1.15867149457e-3_dp, 0.00000000094e-3_dp, \"\") shielded helion mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"shielded helion mag. mom. to nuclear magneton ratio\", -2.1274977624_dp, 0.0000000017_dp, \"\") shielded helion mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_TO_PROTON_MAG_MOM_RATIO = codata_constant_type(\"shielded helion to proton mag. mom. ratio\", -0.76176657721_dp, 0.00000000066_dp, \"\") shielded helion to proton mag. mom. ratio type( codata_constant_type ), public, parameter :: SHIELDED_HELION_TO_SHIELDED_PROTON_MAG_MOM_RATIO = codata_constant_type(\"shielded helion to shielded proton mag. mom. ratio\", -0.7617861334_dp, 0.0000000031_dp, \"\") shielded helion to shielded proton mag. mom. ratio type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_GYROMAG_RATIO = codata_constant_type(\"shielded proton gyromag. ratio\", 2.675153194e8_dp, 0.000000011e8_dp, \"s^-1 T^-1\") shielded proton gyromag. ratio type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_GYROMAG_RATIO_IN_MHZ_T = codata_constant_type(\"shielded proton gyromag. ratio in MHz/T\", 42.57638543_dp, 0.00000017_dp, \"MHz T^-1\") shielded proton gyromag. ratio in MHz/T type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_MAG_MOM = codata_constant_type(\"shielded proton mag. mom.\", 1.4105705830e-26_dp, 0.0000000058e-26_dp, \"J T^-1\") shielded proton mag. mom. type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"shielded proton mag. mom. to Bohr magneton ratio\", 1.5209931551e-3_dp, 0.0000000062e-3_dp, \"\") shielded proton mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: SHIELDED_PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"shielded proton mag. mom. to nuclear magneton ratio\", 2.792775648_dp, 0.000000011_dp, \"\") shielded proton mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: SHIELDING_DIFFERENCE_OF_D_AND_P_IN_HD = codata_constant_type(\"shielding difference of d and p in HD\", 1.98770e-8_dp, 0.00010e-8_dp, \"\") shielding difference of d and p in HD type( codata_constant_type ), public, parameter :: SHIELDING_DIFFERENCE_OF_T_AND_P_IN_HT = codata_constant_type(\"shielding difference of t and p in HT\", 2.39450e-8_dp, 0.00020e-8_dp, \"\") shielding difference of t and p in HT type( codata_constant_type ), public, parameter :: SPEED_OF_LIGHT_IN_VACUUM = codata_constant_type(\"speed of light in vacuum\", 299792458_dp, 0.0_dp, \"m s^-1\") speed of light in vacuum type( codata_constant_type ), public, parameter :: STANDARD_ACCELERATION_OF_GRAVITY = codata_constant_type(\"standard acceleration of gravity\", 9.80665_dp, 0.0_dp, \"m s^-2\") standard acceleration of gravity type( codata_constant_type ), public, parameter :: STANDARD_ATMOSPHERE = codata_constant_type(\"standard atmosphere\", 101325_dp, 0.0_dp, \"Pa\") standard atmosphere type( codata_constant_type ), public, parameter :: STANDARD_STATE_PRESSURE = codata_constant_type(\"standard-state pressure\", 100000_dp, 0.0_dp, \"Pa\") standard-state pressure type( codata_constant_type ), public, parameter :: STEFAN_BOLTZMANN_CONSTANT = codata_constant_type(\"Stefan-Boltzmann constant\", 5.670374419e-8_dp, 0.0_dp, \"W m^-2 K^-4\") Stefan-Boltzmann constant type( codata_constant_type ), public, parameter :: TAU_COMPTON_WAVELENGTH = codata_constant_type(\"tau Compton wavelength\", 6.97771e-16_dp, 0.00047e-16_dp, \"m\") tau Compton wavelength type( codata_constant_type ), public, parameter :: TAU_ELECTRON_MASS_RATIO = codata_constant_type(\"tau-electron mass ratio\", 3477.23_dp, 0.23_dp, \"\") tau-electron mass ratio type( codata_constant_type ), public, parameter :: TAU_ENERGY_EQUIVALENT = codata_constant_type(\"tau energy equivalent\", 1776.86_dp, 0.12_dp, \"MeV\") tau energy equivalent type( codata_constant_type ), public, parameter :: TAU_MASS = codata_constant_type(\"tau mass\", 3.16754e-27_dp, 0.00021e-27_dp, \"kg\") tau mass type( codata_constant_type ), public, parameter :: TAU_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"tau mass energy equivalent\", 2.84684e-10_dp, 0.00019e-10_dp, \"J\") tau mass energy equivalent type( codata_constant_type ), public, parameter :: TAU_MASS_IN_U = codata_constant_type(\"tau mass in u\", 1.90754_dp, 0.00013_dp, \"u\") tau mass in u type( codata_constant_type ), public, parameter :: TAU_MOLAR_MASS = codata_constant_type(\"tau molar mass\", 1.90754e-3_dp, 0.00013e-3_dp, \"kg mol^-1\") tau molar mass type( codata_constant_type ), public, parameter :: TAU_MUON_MASS_RATIO = codata_constant_type(\"tau-muon mass ratio\", 16.8170_dp, 0.0011_dp, \"\") tau-muon mass ratio type( codata_constant_type ), public, parameter :: TAU_NEUTRON_MASS_RATIO = codata_constant_type(\"tau-neutron mass ratio\", 1.89115_dp, 0.00013_dp, \"\") tau-neutron mass ratio type( codata_constant_type ), public, parameter :: TAU_PROTON_MASS_RATIO = codata_constant_type(\"tau-proton mass ratio\", 1.89376_dp, 0.00013_dp, \"\") tau-proton mass ratio type( codata_constant_type ), public, parameter :: THOMSON_CROSS_SECTION = codata_constant_type(\"Thomson cross section\", 6.6524587051e-29_dp, 0.0000000062e-29_dp, \"m^2\") Thomson cross section type( codata_constant_type ), public, parameter :: TRITON_ELECTRON_MASS_RATIO = codata_constant_type(\"triton-electron mass ratio\", 5496.92153551_dp, 0.00000021_dp, \"\") triton-electron mass ratio type( codata_constant_type ), public, parameter :: TRITON_G_FACTOR = codata_constant_type(\"triton g factor\", 5.957924930_dp, 0.000000012_dp, \"\") triton g factor type( codata_constant_type ), public, parameter :: TRITON_MAG_MOM = codata_constant_type(\"triton mag. mom.\", 1.5046095178e-26_dp, 0.0000000030e-26_dp, \"J T^-1\") triton mag. mom. type( codata_constant_type ), public, parameter :: TRITON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = codata_constant_type(\"triton mag. mom. to Bohr magneton ratio\", 1.6223936648e-3_dp, 0.0000000032e-3_dp, \"\") triton mag. mom. to Bohr magneton ratio type( codata_constant_type ), public, parameter :: TRITON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = codata_constant_type(\"triton mag. mom. to nuclear magneton ratio\", 2.9789624650_dp, 0.0000000059_dp, \"\") triton mag. mom. to nuclear magneton ratio type( codata_constant_type ), public, parameter :: TRITON_MASS = codata_constant_type(\"triton mass\", 5.0073567512e-27_dp, 0.0000000016e-27_dp, \"kg\") triton mass type( codata_constant_type ), public, parameter :: TRITON_MASS_ENERGY_EQUIVALENT = codata_constant_type(\"triton mass energy equivalent\", 4.5003878119e-10_dp, 0.0000000014e-10_dp, \"J\") triton mass energy equivalent type( codata_constant_type ), public, parameter :: TRITON_MASS_ENERGY_EQUIVALENT_IN_MEV = codata_constant_type(\"triton mass energy equivalent in MeV\", 2808.92113668_dp, 0.00000088_dp, \"MeV\") triton mass energy equivalent in MeV type( codata_constant_type ), public, parameter :: TRITON_MASS_IN_U = codata_constant_type(\"triton mass in u\", 3.01550071597_dp, 0.00000000010_dp, \"u\") triton mass in u type( codata_constant_type ), public, parameter :: TRITON_MOLAR_MASS = codata_constant_type(\"triton molar mass\", 3.01550071913e-3_dp, 0.00000000094e-3_dp, \"kg mol^-1\") triton molar mass type( codata_constant_type ), public, parameter :: TRITON_PROTON_MASS_RATIO = codata_constant_type(\"triton-proton mass ratio\", 2.99371703403_dp, 0.00000000010_dp, \"\") triton-proton mass ratio type( codata_constant_type ), public, parameter :: TRITON_RELATIVE_ATOMIC_MASS = codata_constant_type(\"triton relative atomic mass\", 3.01550071597_dp, 0.00000000010_dp, \"\") triton relative atomic mass type( codata_constant_type ), public, parameter :: TRITON_TO_PROTON_MAG_MOM_RATIO = codata_constant_type(\"triton to proton mag. mom. ratio\", 1.0666399189_dp, 0.0000000021_dp, \"\") triton to proton mag. mom. ratio type( codata_constant_type ), public, parameter :: UNIFIED_ATOMIC_MASS_UNIT = codata_constant_type(\"unified atomic mass unit\", 1.66053906892e-27_dp, 0.00000000052e-27_dp, \"kg\") unified atomic mass unit type( codata_constant_type ), public, parameter :: VACUUM_ELECTRIC_PERMITTIVITY = codata_constant_type(\"vacuum electric permittivity\", 8.8541878188e-12_dp, 0.0000000014e-12_dp, \"F m^-1\") vacuum electric permittivity type( codata_constant_type ), public, parameter :: VACUUM_MAG_PERMEABILITY = codata_constant_type(\"vacuum mag. permeability\", 1.25663706127e-6_dp, 0.00000000020e-6_dp, \"N A^-2\") vacuum mag. permeability type( codata_constant_type ), public, parameter :: VON_KLITZING_CONSTANT = codata_constant_type(\"von Klitzing constant\", 25812.80745_dp, 0.0_dp, \"ohm\") von Klitzing constant type( codata_constant_type ), public, parameter :: WEAK_MIXING_ANGLE = codata_constant_type(\"weak mixing angle\", 0.22305_dp, 0.00023_dp, \"\") weak mixing angle type( codata_constant_type ), public, parameter :: WIEN_FREQUENCY_DISPLACEMENT_LAW_CONSTANT = codata_constant_type(\"Wien frequency displacement law constant\", 5.878925757e10_dp, 0.0_dp, \"Hz K^-1\") Wien frequency displacement law constant type( codata_constant_type ), public, parameter :: WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT = codata_constant_type(\"Wien wavelength displacement law constant\", 2.897771955e-3_dp, 0.0_dp, \"m K\") Wien wavelength displacement law constant type( codata_constant_type ), public, parameter :: W_TO_Z_MASS_RATIO = codata_constant_type(\"W to Z mass ratio\", 0.88145_dp, 0.00013_dp, \"\") W to Z mass ratio integer(kind=int32), public, parameter :: YEAR = 2022 Year of release.","tags":"","loc":"module/stdlib_codata.html"},{"title":"stdlib_specialfunctions – Fortran-lang/stdlib","text":"Uses stdlib_kinds Used by Descendants: stdlib_specialfunctions_legendre Interfaces public interface dlegendre First derivative Legendre polynomial private pure elemental module function dlegendre_fp64(n, x) result(dleg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface legendre Legendre polynomial private pure elemental module function legendre_fp64(n, x) result(leg) Arguments Type Intent Optional Attributes Name integer, intent(in) :: n real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"module/stdlib_specialfunctions.html"},{"title":"stdlib_ansi – Fortran-lang/stdlib","text":"Terminal color and style escape sequences Uses stdlib_string_type stdlib_kinds Used by Descendants: stdlib_ansi_operator stdlib_ansi_to_string Variables Type Visibility Attributes Name Initial type( ansi_code ), public, parameter :: bg_color_black = ansi_code(bg=0) Identifier for black background color type( ansi_code ), public, parameter :: bg_color_blue = ansi_code(bg=4) Identifier for blue background color type( ansi_code ), public, parameter :: bg_color_cyan = ansi_code(bg=6) Identifier for cyan background color type( ansi_code ), public, parameter :: bg_color_default = ansi_code(bg=9) Identifier for the default background color type( ansi_code ), public, parameter :: bg_color_green = ansi_code(bg=2) Identifier for green background color type( ansi_code ), public, parameter :: bg_color_magenta = ansi_code(bg=5) Identifier for magenta background color type( ansi_code ), public, parameter :: bg_color_red = ansi_code(bg=1) Identifier for red background color type( ansi_code ), public, parameter :: bg_color_white = ansi_code(bg=7) Identifier for white background color type( ansi_code ), public, parameter :: bg_color_yellow = ansi_code(bg=3) Identifier for yellow background color type( ansi_code ), public, parameter :: fg_color_black = ansi_code(fg=0) Identifier for black foreground color type( ansi_code ), public, parameter :: fg_color_blue = ansi_code(fg=4) Identifier for blue foreground color type( ansi_code ), public, parameter :: fg_color_cyan = ansi_code(fg=6) Identifier for cyan foreground color type( ansi_code ), public, parameter :: fg_color_default = ansi_code(fg=9) Identifier for the default foreground color type( ansi_code ), public, parameter :: fg_color_green = ansi_code(fg=2) Identifier for green foreground color type( ansi_code ), public, parameter :: fg_color_magenta = ansi_code(fg=5) Identifier for magenta foreground color type( ansi_code ), public, parameter :: fg_color_red = ansi_code(fg=1) Identifier for red foreground color type( ansi_code ), public, parameter :: fg_color_white = ansi_code(fg=7) Identifier for white foreground color type( ansi_code ), public, parameter :: fg_color_yellow = ansi_code(fg=3) Identifier for yellow foreground color type( ansi_code ), public, parameter :: style_blink = ansi_code(style=5) Identifier for blink style type( ansi_code ), public, parameter :: style_blink_fast = ansi_code(style=6) Identifier for (fast) blink style type( ansi_code ), public, parameter :: style_bold = ansi_code(style=1) Identifier for bold style type( ansi_code ), public, parameter :: style_dim = ansi_code(style=2) Identifier for dim style type( ansi_code ), public, parameter :: style_hidden = ansi_code(style=8) Identifier for hidden style type( ansi_code ), public, parameter :: style_italic = ansi_code(style=3) Identifier for italic style type( ansi_code ), public, parameter :: style_reset = ansi_code(style=0) Identifier for reset style type( ansi_code ), public, parameter :: style_reverse = ansi_code(style=7) Identifier for reverse style type( ansi_code ), public, parameter :: style_strikethrough = ansi_code(style=9) Identifier for strikethrough style type( ansi_code ), public, parameter :: style_underline = ansi_code(style=4) Identifier for underline style Interfaces public interface operator(+) private pure module function add(lval, rval) result(code) Add two escape sequences, attributes in the right value override the left value ones. Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: lval First escape code type( ansi_code ), intent(in) :: rval Second escape code Return Value type( ansi_code ) Combined escape code public interface operator(//) private pure module function concat_left(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value character(len=:), allocatable Concatenated string private pure module function concat_left_str(lval, code) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: lval String to add the escape code to type( ansi_code ), intent(in) :: code Escape sequence Return Value type( string_type ) Concatenated string private pure module function concat_right(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence character(len=*), intent(in) :: rval String to add the escape code to Return Value character(len=:), allocatable Concatenated string private pure module function concat_right_str(code, rval) result(str) Concatenate an escape code with a string and turn it into an actual escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Escape sequence type( string_type ), intent(in) :: rval String to add the escape code to Return Value type( string_type ) Concatenated string public interface to_string private pure module function to_string_ansi_code(code) result(str) Transform a color code into an actual ANSI escape sequence Arguments Type Intent Optional Attributes Name type( ansi_code ), intent(in) :: code Color code to be used Return Value character(len=:), allocatable ANSI escape sequence representing the color code Derived Types type, public :: ansi_code Container for terminal escape code","tags":"","loc":"module/stdlib_ansi.html"},{"title":"stdlib_logger – Fortran-lang/stdlib","text":"Module stdlib_logger This module defines a derived type, procedures, a variable, and\n constants to be used for logging information and reporting errors\n in Fortran applications.\n( Specification ) The derived type, logger_type , is to be used to define variables to\n serve as both local and global loggers. A logger directs its messages\n to selected I/O units so the user has a record (a log) of major events.\n For each entity of logger_type the reports go to a list of I/O units\n represented by the private internal array, log_units . If log_units is\n empty then output by default goes to output_unit . Otherwise reports\n go to output_unit only if it has been explicitly added to log_units .\n Each entity of type logger_type also maintains an internal state\n controlling the formatting of output. The procedures are as follows. The logical function log_units_assigned returns the number of I/O units in log_units . The\n subroutines add_log_file and add_log_unit include the specified file\n in log_units . remove_log_units removes the specified logical unit from\n the log_units array and optionally closes the file. configure configures the details of the logging process. configuration reports the details of that configuration. The subroutines log_error , log_information , log_io_error , log_message , log_text_error , and log_warning send messages to the log units. The variable global_logger of type logger_type can be used\n as a default global logger anywhere in the source code. The constants are used to report errors by some of the subroutines\n in their optional stat arguments. The constants are as follows. success indicates that no error has occurred. close_failure indicates that a close statement for an I/O unit failed. index_invalid_error indicates that column was invalid for\n the given line . open_failure indicates that an open statement\n failed. read_only_error indicates that an output unit did not have a \"write\" or \"readwrite\" action. non_sequential_error indicates\n that the unit did not have sequential access. unformatted_in_error indicates that the unit did not have a form of \"formatted\" . unopened_in_error indicates that the unit was not opened. write_failure indicates that at least one of the writes to log_units failed. public constants used as error flags\n Variable of type logger_type to be used as a global logger Uses iso_fortran_env stdlib_ascii stdlib_optval Variables Type Visibility Attributes Name Initial integer, public, parameter :: all_level = -10+min(debug_level, information_level, warning_level, error_level, io_error_level, text_error_level) integer, public, parameter :: close_failure = 1 integer, public, parameter :: debug_level = 10 integer, public, parameter :: error_level = 40 type( logger_type ), public :: global_logger integer, public, parameter :: index_invalid_error = 2 integer, public, parameter :: information_level = 20 integer, public, parameter :: io_error_level = 40 integer, public, parameter :: non_sequential_error = 3 integer, public, parameter :: none_level = 10+max(debug_level, information_level, warning_level, error_level, io_error_level, text_error_level) integer, public, parameter :: open_failure = 4 integer, public, parameter :: read_only_error = 5 integer, public, parameter :: success = 0 integer, public, parameter :: text_error_level = 50 integer, public, parameter :: unformatted_in_error = 6 integer, public, parameter :: unopened_in_error = 7 integer, public, parameter :: warning_level = 30 integer, public, parameter :: write_failure = 8 Derived Types type, public :: logger_type Public derived type ( Specification ) Finalizations Procedures final :: final_logger Type-Bound Procedures procedure, public, pass(self) :: add_log_file procedure, public, pass(self) :: add_log_unit procedure, public, pass(self) :: configuration procedure, public, pass(self) :: configure procedure, public, pass(self) :: log_debug procedure, public, pass(self) :: log_error procedure, public, pass(self) :: log_information procedure, public, pass(self) :: log_io_error procedure, public, pass(self) :: log_message procedure, public, pass(self) :: log_text_error procedure, public, pass(self) :: log_units_assigned procedure, public, pass(self) :: log_warning procedure, public, pass(self) :: remove_log_unit","tags":"","loc":"module/stdlib_logger.html"},{"title":"stdlib_ascii – Fortran-lang/stdlib","text":"The stdlib_ascii module provides procedures for handling and manipulating\nintrinsic character variables and constants. The specification of this module is available here . Uses stdlib_kinds Variables Type Visibility Attributes Name Initial character(len=1), public, parameter :: ACK = achar(int(z'06')) Acknowledge character(len=1), public, parameter :: BEL = achar(int(z'07')) Bell character(len=1), public, parameter :: BS = achar(int(z'08')) Backspace character(len=1), public, parameter :: CAN = achar(int(z'18')) Cancel character(len=1), public, parameter :: CR = achar(int(z'0D')) Carriage return character(len=1), public, parameter :: DC1 = achar(int(z'11')) Device control 1 character(len=1), public, parameter :: DC2 = achar(int(z'12')) Device control 2 character(len=1), public, parameter :: DC3 = achar(int(z'13')) Device control 3 character(len=1), public, parameter :: DC4 = achar(int(z'14')) Device control 4 character(len=1), public, parameter :: DEL = achar(int(z'7F')) Delete character(len=1), public, parameter :: DLE = achar(int(z'10')) Data link escape character(len=1), public, parameter :: EM = achar(int(z'19')) End of medium character(len=1), public, parameter :: ENQ = achar(int(z'05')) Enquiry character(len=1), public, parameter :: EOT = achar(int(z'04')) End of transmission character(len=1), public, parameter :: ESC = achar(int(z'1B')) Escape character(len=1), public, parameter :: ETB = achar(int(z'17')) End of transmission block character(len=1), public, parameter :: ETX = achar(int(z'03')) End of text character(len=1), public, parameter :: FF = achar(int(z'0C')) NP form feed, new page character(len=1), public, parameter :: FS = achar(int(z'1C')) File separator character(len=1), public, parameter :: GS = achar(int(z'1D')) Group separator character(len=1), public, parameter :: LF = achar(int(z'0A')) NL line feed, new line character(len=1), public, parameter :: NAK = achar(int(z'15')) Negative acknowledge character(len=1), public, parameter :: NUL = achar(int(z'00')) Null character(len=1), public, parameter :: RS = achar(int(z'1E')) Record separator character(len=1), public, parameter :: SI = achar(int(z'0F')) Shift in character(len=1), public, parameter :: SO = achar(int(z'0E')) Shift out character(len=1), public, parameter :: SOH = achar(int(z'01')) Start of heading character(len=1), public, parameter :: STX = achar(int(z'02')) Start of text character(len=1), public, parameter :: SUB = achar(int(z'1A')) Substitute character(len=1), public, parameter :: SYN = achar(int(z'16')) Synchronous idle character(len=1), public, parameter :: TAB = achar(int(z'09')) Horizontal tab character(len=1), public, parameter :: US = achar(int(z'1F')) Unit separator character(len=1), public, parameter :: VT = achar(int(z'0B')) Vertical tab character(len=*), public, parameter :: digits = hex_digits(1:10) 0 .. 9 character(len=*), public, parameter :: fullhex_digits = \"0123456789ABCDEFabcdef\" 0 .. 9A .. Fa .. f character(len=*), public, parameter :: hex_digits = fullhex_digits(1:16) 0 .. 9A .. F character(len=*), public, parameter :: letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\" A .. Za .. z character(len=*), public, parameter :: lowercase = letters(27:) a .. z character(len=*), public, parameter :: lowerhex_digits = \"0123456789abcdef\" 0 .. 9a .. f character(len=*), public, parameter :: octal_digits = digits(1:8) 0 .. 7 character(len=*), public, parameter :: uppercase = letters(1:26) A .. Z character(len=*), public, parameter :: whitespace = \" \"//TAB//VT//CR//LF//FF ASCII _whitespace Functions public pure function is_alpha (c) Checks whether c is an ASCII letter (A .. Z, a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_alphanum (c) Checks whether c is a letter or a number (0 .. 9, a .. z, A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_ascii (c) Checks whether or not c is in the ASCII character set -\ni.e. in the range 0 .. 0x7F. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_blank (c) Checks whether or not c is a blank character. That includes the\nonly the space and tab characters Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_control (c) Checks whether c is a control character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_digit (c) Checks whether c is a digit (0 .. 9). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_graphical (c) Checks whether or not c is a printable character other than the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_hex_digit (c) Checks whether c is a digit in base 16 (0 .. 9, A .. F, a .. f). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_lower (c) Checks whether c is a lowercase ASCII letter (a .. z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_octal_digit (c) Checks whether c is a digit in base 8 (0 .. 7). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_printable (c) Checks whether or not c is a printable character - including the\nspace character. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_punctuation (c) Checks whether or not c is a punctuation character. That includes\nall ASCII characters which are not control characters, letters,\ndigits, or whitespace. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_upper (c) Checks whether c is an uppercase ASCII letter (A .. Z). Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function is_white (c) Checks whether or not c is a whitespace character. That includes the\nspace, tab, vertical tab, form feed, carriage return, and linefeed\ncharacters. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: c The character to test. Return Value logical public pure function reverse (string) result(reverse_string) Reverse the character order in the input character variable\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_lower (string) result(lower_string) Convert character variable to lower case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_sentence (string) result(sentence_string) Converts character sequence to sentence case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_title (string) result(title_string) Converts character sequence to title case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len) public pure function to_upper (string) result(upper_string) Convert character variable to upper case\n( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=len)","tags":"","loc":"module/stdlib_ascii.html"},{"title":"stdlib_quadrature – Fortran-lang/stdlib","text":"( Specification ) Uses stdlib_kinds Used by Descendants: stdlib_quadrature_gauss stdlib_quadrature_simps stdlib_quadrature_trapz Interfaces public interface gauss_legendre Computes Gauss-Legendre quadrature nodes and weights. private pure module subroutine gauss_legendre_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2) public interface gauss_legendre_lobatto Computes Gauss-Legendre-Lobatto quadrature nodes and weights. private pure module subroutine gauss_legendre_lobatto_fp64(x, w, interval) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(out) :: x (:) real(kind=dp), intent(out) :: w (:) real(kind=dp), intent(in), optional :: interval (2) public interface simps Integrates sampled values using Simpson's rule\n( Specification ) private pure recursive module function simps_dx_dp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=dp) private pure recursive module function simps_dx_sp(y, dx, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx integer, intent(in), optional :: even Return Value real(kind=sp) private recursive module function simps_x_dp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp) private recursive module function simps_x_sp(y, x, even) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp) public interface simps_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) private pure recursive module function simps_weights_dp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=dp), dimension(size(x)) private pure recursive module function simps_weights_sp(x, even) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x integer, intent(in), optional :: even Return Value real(kind=sp), dimension(size(x)) public interface trapz Integrates sampled values using trapezoidal rule\n( Specification ) private pure module function trapz_dx_dp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in) :: dx Return Value real(kind=dp) private pure module function trapz_dx_sp(y, dx) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in) :: dx Return Value real(kind=sp) private module function trapz_x_dp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: y real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp) private module function trapz_x_sp(y, x) result(integral) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: y real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp) public interface trapz_weights Integrates sampled values using trapezoidal rule weights for given abscissas\n( Specification ) private pure module function trapz_weights_dp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), dimension(:) :: x Return Value real(kind=dp), dimension(size(x)) private pure module function trapz_weights_sp(x) result(w) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), dimension(:) :: x Return Value real(kind=sp), dimension(size(x))","tags":"","loc":"module/stdlib_quadrature.html"},{"title":"stdlib_linalg_constants – Fortran-lang/stdlib","text":"Uses stdlib_kinds ieee_arithmetic Variables Type Visibility Attributes Name Initial integer, public, parameter :: ilp = int32","tags":"","loc":"module/stdlib_linalg_constants.html"},{"title":"stdlib_specialfunctions_gamma – Fortran-lang/stdlib","text":"Uses stdlib_error iso_fortran_env stdlib_kinds Interfaces public interface gamma Gamma function for integer and complex numbers private impure elemental function gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value integer(kind=int8) private impure elemental function gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value integer(kind=int16) private impure elemental function gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value integer(kind=int32) private impure elemental function gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value integer(kind=int64) private impure elemental function gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp) public interface log_factorial Logarithm of factorial n!, integer variable private impure elemental function l_factorial_iint8(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: n Return Value real private impure elemental function l_factorial_iint16(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: n Return Value real private impure elemental function l_factorial_iint32(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: n Return Value real private impure elemental function l_factorial_iint64(n) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: n Return Value real public interface log_gamma Logarithm of gamma function private impure elemental function l_gamma_iint8(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: z Return Value real private impure elemental function l_gamma_iint16(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: z Return Value real private impure elemental function l_gamma_iint32(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: z Return Value real private impure elemental function l_gamma_iint64(z) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: z Return Value real private impure elemental function l_gamma_csp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: z Return Value complex(kind=sp) private impure elemental function l_gamma_cdp(z) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: z Return Value complex(kind=dp) public interface log_lower_incomplete_gamma Logarithm of lower incomplete gamma function private impure elemental function l_ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface log_upper_incomplete_gamma Logarithm of upper incomplete gamma function private impure elemental function l_ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function l_ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function l_ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface lower_incomplete_gamma Lower incomplete gamma function private impure elemental function ingamma_low_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_low_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_low_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface regularized_gamma_p Regularized (normalized) lower incomplete gamma function, P private impure elemental function regamma_p_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_p_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_p_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface regularized_gamma_q Regularized (normalized) upper incomplete gamma function, Q private impure elemental function regamma_q_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function regamma_q_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function regamma_q_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) public interface upper_incomplete_gamma Upper incomplete gamma function private impure elemental function ingamma_up_iint8sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint8dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint16sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint16dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint32sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint32dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_iint64sp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_iint64dp(p, x) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp) private impure elemental function ingamma_up_rsp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: p real(kind=sp), intent(in) :: x Return Value real(kind=sp) private impure elemental function ingamma_up_rdp(p, x) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: p real(kind=dp), intent(in) :: x Return Value real(kind=dp)","tags":"","loc":"module/stdlib_specialfunctions_gamma.html"},{"title":"stdlib_optval – Fortran-lang/stdlib","text":"Provides a generic function optval , which can be used to\nconveniently implement fallback values for optional arguments\nto subprograms\n( Specification ) If x is an optional parameter of a\nsubprogram, then the expression optval(x, default) inside that\nsubprogram evaluates to x if it is present, otherwise default . It is an error to call optval with a single actual argument. Uses stdlib_kinds Interfaces public interface optval Fallback value for optional arguments\n( Specification ) private pure elemental function optval_rsp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), optional :: x real(kind=sp), intent(in) :: default Return Value real(kind=sp) private pure elemental function optval_rdp(x, default) result(y) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), optional :: x real(kind=dp), intent(in) :: default Return Value real(kind=dp) private pure elemental function optval_iint8(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in), optional :: x integer(kind=int8), intent(in) :: default Return Value integer(kind=int8) private pure elemental function optval_iint16(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in), optional :: x integer(kind=int16), intent(in) :: default Return Value integer(kind=int16) private pure elemental function optval_iint32(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in), optional :: x integer(kind=int32), intent(in) :: default Return Value integer(kind=int32) private pure elemental function optval_iint64(x, default) result(y) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in), optional :: x integer(kind=int64), intent(in) :: default Return Value integer(kind=int64) private pure elemental function optval_csp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), optional :: x complex(kind=sp), intent(in) :: default Return Value complex(kind=sp) private pure elemental function optval_cdp(x, default) result(y) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), optional :: x complex(kind=dp), intent(in) :: default Return Value complex(kind=dp) private pure elemental function optval_ll1(x, default) result(y) Arguments Type Intent Optional Attributes Name logical, intent(in), optional :: x logical, intent(in) :: default Return Value logical private pure function optval_character(x, default) result(y) Arguments Type Intent Optional Attributes Name character(len=*), intent(in), optional :: x character(len=*), intent(in) :: default Return Value character(len=:), allocatable","tags":"","loc":"module/stdlib_optval.html"},{"title":"stdlib_linalg_state – Fortran-lang/stdlib","text":"Provides a state/error handling derived type for advanced error handling of\nBLAS/LAPACK based linear algebra procedures. All procedures are pure.\n( Specification )\nVersion: experimental A fixed-storage state variable for error handling of linear algebra routines Version: experimental Error state handling: if the user requested the error state variable on\noutput, just return it to the user. Otherwise, halt the program on error. Version: experimental Interfaces for comparison operators of error states with integer flags Uses stdlib_io stdlib_linalg_constants stdlib_kinds Variables Type Visibility Attributes Name Initial integer(kind=ilp), public, parameter :: LINALG_ERROR = -2_ilp integer(kind=ilp), public, parameter :: LINALG_INTERNAL_ERROR = -3_ilp integer(kind=ilp), public, parameter :: LINALG_SUCCESS = 0_ilp State return types integer(kind=ilp), public, parameter :: LINALG_VALUE_ERROR = -1_ilp Interfaces public interface linalg_state_type private pure function new_state(where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: where_at Location integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) private pure function new_state_nowhere(flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) result(new_state) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag Input error flag class(*), intent(in), optional, dimension(..) :: a1 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a2 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a3 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a4 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a5 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a6 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a7 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a8 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a9 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a10 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a11 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a12 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a13 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a14 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a15 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a16 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a17 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a18 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a19 Optional rank-agnostic arguments class(*), intent(in), optional, dimension(..) :: a20 Optional rank-agnostic arguments Return Value type( linalg_state_type ) public interface operator(/=) private elemental function state_neq_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_neq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(<) private elemental function state_lt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_lt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(<=) private elemental function state_le_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_le_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(==) Comparison operators private elemental function state_eq_flag(err, flag) Compare an error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_eq_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(>) private elemental function state_gt_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_gt_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) public interface operator(>=) private elemental function state_ge_flag(err, flag) Compare the error state with an integer flag Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: err integer, intent(in) :: flag Return Value logical(kind=lk) private elemental function flag_ge_state(flag, err) Compare an integer flag with the error state Arguments Type Intent Optional Attributes Name integer, intent(in) :: flag type( linalg_state_type ), intent(in) :: err Return Value logical(kind=lk) Derived Types type, public :: linalg_state_type linalg_state_type defines a state return type for a\nlinear algebra routine. State contains a status flag, a comment, and a\nprocedure specifier that can be used to mark where the error happened Components Type Visibility Attributes Name Initial character(len=MSG_LENGTH), public :: message = repeat(' ', MSG_LENGTH) Message associated to the current state integer(kind=ilp), public :: state = LINALG_SUCCESS The current exit state character(len=NAME_LENGTH), public :: where_at = repeat(' ', NAME_LENGTH) Location of the state change Constructor private\n\n pure\n function new_state (where_at, flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, with location location Create state with no message Add location private\n\n pure\n function new_state_nowhere (flag, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Error creation message, from N input variables (numeric or strings) Set error flag Set chain Type-Bound Procedures procedure, public :: destroy => state_destroy ../../ Cleanup procedure, public :: error => state_is_error procedure, public :: ok => state_is_ok ../../ State properties procedure, public :: print => state_print ../../ Print error message procedure, public :: print_msg => state_message Subroutines public pure subroutine linalg_error_handling (ierr, ierr_out) Flow control: on output flag present, return it; otherwise, halt on error Arguments Type Intent Optional Attributes Name type( linalg_state_type ), intent(in) :: ierr type( linalg_state_type ), intent(out), optional :: ierr_out","tags":"","loc":"module/stdlib_linalg_state.html"},{"title":"stdlib_array – Fortran-lang/stdlib","text":"Module for index manipulation and general array handling The specification of this module is available here . Functions public pure function falseloc (array, lbound) result(loc) License Version experimental Return the positions of the false elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(.not.array)) Locations of false elements public pure function trueloc (array, lbound) result(loc) License Version experimental Return the positions of the true elements in array. Specification Arguments Type Intent Optional Attributes Name logical, intent(in) :: array (:) Mask of logicals integer, intent(in), optional :: lbound Lower bound of array to index Return Value integer, (count(array)) Locations of true elements","tags":"","loc":"module/stdlib_array.html"},{"title":"stdlib_strings – Fortran-lang/stdlib","text":"This module implements basic string handling routines. The specification of this module is available here . Uses stdlib_optval stdlib_ascii stdlib_kinds stdlib_string_type Used by Descendants: stdlib_strings_to_string Interfaces public interface chomp Remove trailing characters in set from string.\nIf no character set is provided trailing whitespace is removed. Version: experimental private pure function chomp_string(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function chomp_char(string) result(chomped_string) Remove trailing characters in set from string.\nDefault character set variant where trailing whitespace is removed. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable private pure function chomp_set_string_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value type( string_type ) private pure function chomp_set_char_char(string, set) result(chomped_string) Remove trailing characters in set from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=1), intent(in) :: set (:) Return Value character(len=:), allocatable private pure function chomp_substring_string_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_string(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value character(len=:), allocatable private pure function chomp_substring_string_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value type( string_type ) private pure function chomp_substring_char_char(string, substring) result(chomped_string) Remove trailing substrings from string. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value character(len=:), allocatable public interface count Returns the number of times substring 'pattern' has appeared in the\ninput string 'string' Specifications private elemental function count_string_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_string_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_string(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function count_char_char(string, pattern, consider_overlapping) result(res) Returns the number of times substring 'pattern' has appeared in the\ninput string 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern logical, intent(in), optional :: consider_overlapping Return Value integer public interface ends_with Check whether a string ends with substring or not Version: experimental private elemental function ends_with_string_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function ends_with_string_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function ends_with_char_string(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function ends_with_char_char(string, substring) result(match) Check whether a string ends with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical public interface find Finds the starting index of substring 'pattern' in the input 'string' Specifications Version: experimental private elemental function find_string_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_string_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_string(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer private elemental function find_char_char(string, pattern, occurrence, consider_overlapping) result(res) Returns the starting index of the 'occurrence'th occurrence of substring 'pattern'\nin input 'string'\nReturns an integer Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping Return Value integer public interface padl Left pad the input string Specifications private pure function padl_string_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padl_string_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padl_char_default(string, output_length) result(res) Left pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padl_char_pad_with(string, output_length, pad_with) result(res) Left pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max) public interface padr Right pad the input string Specifications private pure function padr_string_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function padr_string_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value type( string_type ) private pure function padr_char_default(string, output_length) result(res) Right pad the input string with \" \" (1 whitespace) Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max) private pure function padr_char_pad_with(string, output_length, pad_with) result(res) Right pad the input string with the 'pad_with' character Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length character(len=1), intent(in) :: pad_with Return Value character(kind=output_length), len=max) public interface replace_all Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nVersion: experimental private pure function replace_all_string_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_string_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_string_char_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value type( string_type ) private pure function replace_all_char_string_char(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_string(string, pattern, replacement) result(res) Replaces all occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern type( string_type ), intent(in) :: replacement Return Value character(len=:), allocatable private pure function replace_all_char_char_char(string, pattern, replacement) result(res) Replaces all the occurrences of substring 'pattern' in the input 'string'\nwith the replacement 'replacement'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: pattern character(len=*), intent(in) :: replacement Return Value character(len=:), allocatable public interface slice Extracts characters from the input string to return a new string Version: experimental private elemental function slice_string(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value type( string_type ) private pure function slice_char(string, first, last, stride) result(sliced_string) Extract the characters from the region between 'first' and 'last' index (both inclusive)\nof the input 'string' by taking strides of length 'stride'\nReturns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in), optional :: first integer, intent(in), optional :: last integer, intent(in), optional :: stride Return Value character(len=:), allocatable public interface starts_with Check whether a string starts with substring or not Version: experimental private elemental function starts_with_string_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private elemental function starts_with_string_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical private elemental function starts_with_char_string(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string type( string_type ), intent(in) :: substring Return Value logical private pure function starts_with_char_char(string, substring) result(match) Check whether a string starts with substring or not Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string character(len=*), intent(in) :: substring Return Value logical public interface strip Remove leading and trailing whitespace characters. Version: experimental private pure function strip_string(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string Return Value type( string_type ) private pure function strip_char(string) result(stripped_string) Remove leading and trailing whitespace characters. Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string Return Value character(len=:), allocatable public interface to_string Format or transfer other types as a string.\n( Specification ) private pure module function to_string_1_i_int16(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int32(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int64(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_i_int8(value) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value Return Value character(len=:), allocatable private pure module function to_string_1_l_lk(value) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value Return Value character(len=1) private pure module function to_string_2_i_int16(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int32(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int64(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_i_int8(value, format) result(string) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_2_l_lk(value, format) result(string) Arguments Type Intent Optional Attributes Name logical(kind=lk), intent(in) :: value character(len=*), intent(in) :: format Return Value character(len=:), allocatable private pure module function to_string_c_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_c_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_dp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable private pure module function to_string_r_sp(value, format) result(string) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: value character(len=*), intent(in), optional :: format Return Value character(len=:), allocatable public interface zfill Left pad the input string with zeros. Specifications private pure function zfill_string(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name type( string_type ), intent(in) :: string integer, intent(in) :: output_length Return Value type( string_type ) private pure function zfill_char(string, output_length) result(res) Left pad the input string with zeros Returns a new string Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: string integer, intent(in) :: output_length Return Value character(kind=output_length), len=max)","tags":"","loc":"module/stdlib_strings.html"},{"title":"stdlib_linalg_blas_d – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_aux stdlib_linalg_constants stdlib_linalg_blas_c stdlib_linalg_blas_s Functions public pure function stdlib_dasum (n, dx, incx) DASUM takes the sum of the absolute values. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_ddot (n, dx, incx, dy, incy) DDOT forms the dot product of two vectors.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: dy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_dnrm2 (n, x, incx) DNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDNRM2 := sqrt( x'*x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_dsdot (n, sx, incx, sy, incy) Compute the inner product of two vectors with extended\nprecision accumulation and result.\nReturns D.P. dot product accumulated in D.P., for S.P. SX and SY\nDSDOT = sum for I = 0 to N-1 of SX(LX+I INCX) * SY(LY+I INCY),\nwhere LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is\ndefined in a similar way using INCY. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=sp), intent(in) :: sx (*) integer(kind=ilp), intent(in) :: incx real(kind=sp), intent(in) :: sy (*) integer(kind=ilp), intent(in) :: incy Return Value real(kind=dp) public pure function stdlib_dzasum (n, zx, incx) DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and\nreturns a double precision result. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) public pure function stdlib_dznrm2 (n, x, incx) DZNRM2 returns the euclidean norm of a vector via the function\nname, so that\nDZNRM2 := sqrt( x* H x ) Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx Return Value real(kind=dp) Subroutines public pure subroutine stdlib_daxpy (n, da, dx, incx, dy, incy) DAXPY constant times a vector plus a vector.\nuses unrolled loops for increments equal to one. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dcopy (n, dx, incx, dy, incy) DCOPY copies a vector, x, to a vector, y.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(out) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) DGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X *T,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) DGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dger (m, n, alpha, x, incx, y, incy, a, lda) DGER performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_drot (n, dx, incx, dy, incy, c, s) DROT applies a plane rotation. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_drotg (a, b, c, s) The computation uses the formulas\nsigma = sgn(a) if |a| > |b|\n= sgn(b) if |b| >= |a|\nr = sigma sqrt( a 2 + b 2 )\nc = 1; s = 0 if r = 0\nc = a/r; s = b/r if r != 0\nThe subroutine also computes\nz = s if |a| > |b|,\n= 1/c if |b| >= |a| and c != 0\n= 1 if c = 0\nThis allows c and s to be reconstructed from z as follows:\nIf z = 1, set c = 0, s = 1.\nIf |z| < 1, set c = sqrt(1 - z 2) and s = z.\nIf |z| > 1, set c = 1/z and s = sqrt( 1 - c *2). Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: a real(kind=dp), intent(inout) :: b real(kind=dp), intent(out) :: c real(kind=dp), intent(out) :: s public pure subroutine stdlib_drotm (n, dx, incx, dy, incy, dparam) DROTM applies the modified Givens transformation, , to the 2-by-N matrix where indicates transpose. The elements of are in \nDX(LX+I INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX) N, \nand similarly for DY using LY and INCY. \nWith DPARAM(1)=DFLAG, has one of the following forms: See DROTMG for a description of data storage in DPARAM. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: dparam (5) public pure subroutine stdlib_drotmg (dd1, dd2, dx1, dy1, dparam) DROTMG Constructs the modified Givens transformation matrix which zeros the \nsecond component of the 2-vector With DPARAM(1)=DFLAG, has one of the following forms: Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively.\n(Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.)\nThe values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only \nused for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: dd1 real(kind=dp), intent(inout) :: dd2 real(kind=dp), intent(inout) :: dx1 real(kind=dp), intent(in) :: dy1 real(kind=dp), intent(out) :: dparam (5) public pure subroutine stdlib_dsbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) DSBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dscal (n, da, dx, incx) DSCAL scales a vector by a constant.\nuses unrolled loops for increment equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dspmv (uplo, n, alpha, ap, x, incx, beta, y, incy) DSPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dspr (uplo, n, alpha, x, incx, ap) DSPR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_dspr2 (uplo, n, alpha, x, incx, y, incy, ap) DSPR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n symmetric matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_dswap (n, dx, incx, dy, incy) DSWAP interchanges two vectors.\nuses unrolled loops for increments equal to 1. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(inout) :: dx (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: dy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) DSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsymv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) DSYMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_dsyr (uplo, n, alpha, x, incx, a, lda) DSYR performs the symmetric rank 1 operation\nA := alpha x x**T + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr2 (uplo, n, alpha, x, incx, y, incy, a, lda) DSYR2 performs the symmetric rank 2 operation\nA := alpha x y T + alpha y x T + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n symmetric matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx real(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_dsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) DSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) DSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta real(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_dtbmv (uplo, trans, diag, n, k, a, lda, x, incx) DTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtbsv (uplo, trans, diag, n, k, a, lda, x, incx) DTBSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpmv (uplo, trans, diag, n, ap, x, incx) DTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtpsv (uplo, trans, diag, n, ap, x, incx) DTPSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: ap (*) real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A ),\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrmv (uplo, trans, diag, n, a, lda, x, incx) DTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_dtrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) DTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A**T.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_dtrsv (uplo, trans, diag, n, a, lda, x, incx) DTRSV solves one of the systems of equations\nA x = b, or A T x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_d.html"},{"title":"stdlib_linalg – Fortran-lang/stdlib","text":"Provides a support for various linear algebra procedures\n ( Specification ) Uses stdlib_kinds stdlib_optval stdlib_error stdlib_linalg_constants stdlib_linalg_state Used by Descendants: stdlib_linalg_cross_product stdlib_linalg_determinant stdlib_linalg_diag stdlib_linalg_kronecker stdlib_linalg_least_squares stdlib_linalg_outer_product stdlib_linalg_solve stdlib_linalg_svd Interfaces public interface cross_product Computes the cross product of two vectors, returning a rank-1 and size-3 array\n( Specification ) private pure module function cross_product_cdp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (3) complex(kind=dp), intent(in) :: b (3) Return Value complex(kind=dp), (3) private pure module function cross_product_csp(a, b) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (3) complex(kind=sp), intent(in) :: b (3) Return Value complex(kind=sp), (3) private pure module function cross_product_iint16(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: a (3) integer(kind=int16), intent(in) :: b (3) Return Value integer(kind=int16), (3) private pure module function cross_product_iint32(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: a (3) integer(kind=int32), intent(in) :: b (3) Return Value integer(kind=int32), (3) private pure module function cross_product_iint64(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: a (3) integer(kind=int64), intent(in) :: b (3) Return Value integer(kind=int64), (3) private pure module function cross_product_iint8(a, b) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: a (3) integer(kind=int8), intent(in) :: b (3) Return Value integer(kind=int8), (3) private pure module function cross_product_rdp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (3) real(kind=dp), intent(in) :: b (3) Return Value real(kind=dp), (3) private pure module function cross_product_rsp(a, b) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (3) real(kind=sp), intent(in) :: b (3) Return Value real(kind=sp), (3) public interface det Computes the determinant of a square matrix\n ( Specification ) Summary Interface for computing matrix determinant. Description This interface provides methods for computing the determinant of a matrix.\n Supported data types include real and complex . Note The provided functions are intended for square matrices only. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 3 , 3 ), d type ( linalg_state_type ) :: state a = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) ! ... d = det ( a , err = state ) if ( state % ok ()) then print * , 'Success! det=' , d else print * , state % print () endif ! ... private interface stdlib_linalg_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_cdpdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None public interface diag Creates a diagonal array or extract the diagonal elements of an array\n( Specification ) private module function diag_cdp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(v),size(v)) private module function diag_cdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_cdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp), (minval(shape(A))) private module function diag_cdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=dp), (minval(shape(A))-abs(k)) private module function diag_csp(v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(v),size(v)) private module function diag_csp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value complex(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_csp_mat(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp), (minval(shape(A))) private module function diag_csp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value complex(kind=sp), (minval(shape(A))-abs(k)) private module function diag_iint16(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(v),size(v)) private module function diag_iint16_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int16), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint16_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16), (minval(shape(A))) private module function diag_iint16_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int16), (minval(shape(A))-abs(k)) private module function diag_iint32(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(v),size(v)) private module function diag_iint32_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int32), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint32_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32), (minval(shape(A))) private module function diag_iint32_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int32), (minval(shape(A))-abs(k)) private module function diag_iint64(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(v),size(v)) private module function diag_iint64_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int64), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint64_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64), (minval(shape(A))) private module function diag_iint64_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int64), (minval(shape(A))-abs(k)) private module function diag_iint8(v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(v),size(v)) private module function diag_iint8_k(v, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: v (:) integer, intent(in) :: k Return Value integer(kind=int8), (size(v)+abs(k),size(v)+abs(k)) private module function diag_iint8_mat(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8), (minval(shape(A))) private module function diag_iint8_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer, intent(in) :: k Return Value integer(kind=int8), (minval(shape(A))-abs(k)) private module function diag_rdp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(v),size(v)) private module function diag_rdp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=dp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rdp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp), (minval(shape(A))) private module function diag_rdp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=dp), (minval(shape(A))-abs(k)) private module function diag_rsp(v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(v),size(v)) private module function diag_rsp_k(v, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: v (:) integer, intent(in) :: k Return Value real(kind=sp), (size(v)+abs(k),size(v)+abs(k)) private module function diag_rsp_mat(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp), (minval(shape(A))) private module function diag_rsp_mat_k(A, k) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) integer, intent(in) :: k Return Value real(kind=sp), (minval(shape(A))-abs(k)) public interface is_diagonal Checks if a matrix (rank-2 array) is diagonal\n( Specification ) private pure function is_diagonal_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_diagonal_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_hermitian Checks if a matrix (rank-2 array) is Hermitian\n( Specification ) private pure function is_hermitian_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_hermitian_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_hessenberg Checks if a matrix (rank-2 array) is Hessenberg\n( Specification ) private function is_hessenberg_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_hessenberg_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical public interface is_skew_symmetric Checks if a matrix (rank-2 array) is skew-symmetric\n( Specification ) private pure function is_skew_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_skew_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_square Checks if a matrix (rank-2 array) is square\n( Specification ) private pure function is_square_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_square_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_square_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_symmetric Checks if a matrix (rank-2 array) is symmetric\n( Specification ) private pure function is_symmetric_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value logical private pure function is_symmetric_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value logical public interface is_triangular Checks if a matrix (rank-2 array) is triangular\n( Specification ) private function is_triangular_rsp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_rdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_csp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_cdp(A, uplo) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint8(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint16(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint32(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical private function is_triangular_iint64(A, uplo) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) character(len=1), intent(in) :: uplo Return Value logical public interface kronecker_product Computes the Kronecker product of two arrays of size M1xN1, and of M2xN2, returning an (M1 M2)x(N1 N2) array\n( Specification ) private pure module function kronecker_product_cdp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) complex(kind=dp), intent(in) :: B (:,:) Return Value complex(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_csp(A, B) result(C) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) complex(kind=sp), intent(in) :: B (:,:) Return Value complex(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint16(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) integer(kind=int16), intent(in) :: B (:,:) Return Value integer(kind=int16), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint32(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) integer(kind=int32), intent(in) :: B (:,:) Return Value integer(kind=int32), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint64(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) integer(kind=int64), intent(in) :: B (:,:) Return Value integer(kind=int64), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_iint8(A, B) result(C) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) integer(kind=int8), intent(in) :: B (:,:) Return Value integer(kind=int8), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rdp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) real(kind=dp), intent(in) :: B (:,:) Return Value real(kind=dp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) private pure module function kronecker_product_rsp(A, B) result(C) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) real(kind=sp), intent(in) :: B (:,:) Return Value real(kind=sp), (size(A,dim=1)*size(B,dim=1),size(A,dim=2)*size(B,dim=2)) public interface lstsq Computes the squares solution to system . \n ( Specification ) Summary Interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system.\n Supported data types include real and complex . Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private module function stdlib_linalg_c_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_many(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_lstsq_one(a, b, cond, overwrite_a, rank, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] public interface lstsq_space Computes the integer, real [, complex] working space required by the least-squares solver\n ( Specification ) Description This interface provides sizes of integer, real [, complex] working spaces required by the \n least-squares solver. These sizes can be used to pre-allocated working arrays in case several \n repeated least-squares solutions to a same system are sought. If pre-allocated working arrays \n are provided, no internal allocations will take place. private pure module subroutine stdlib_linalg_c_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_c_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_d_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_many(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_s_lstsq_space_one(a, b, lrwork, liwork) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix a[m,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_many(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays private pure module subroutine stdlib_linalg_z_lstsq_space_one(a, b, lrwork, liwork, lcwork) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix a[m,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] integer(kind=ilp), intent(out) :: lrwork Size of the working space arrays integer(kind=ilp), intent(out) :: liwork Size of the working space arrays integer(kind=ilp), intent(out) :: lcwork Size of the working space arrays public interface operator(.det.) Determinant operator of a square matrix\n ( Specification ) Summary Pure operator interface for computing matrix determinant. Description This pure operator interface provides a convenient way to compute the determinant of a matrix.\n Supported data types include real and complex. Note The provided functions are intended for square matrices. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example ! ... real ( sp ) :: matrix ( 3 , 3 ), d matrix = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) d = . det . matrix ! ... private interface stdlib_linalg_pure_rspdeterminant() Arguments None private interface stdlib_linalg_pure_rdpdeterminant() Arguments None private interface stdlib_linalg_pure_cspdeterminant() Arguments None private interface stdlib_linalg_pure_cdpdeterminant() Arguments None public interface outer_product Computes the outer product of two vectors, returning a rank-2 array\n( Specification ) private pure module function outer_product_cdp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: u (:) complex(kind=dp), intent(in) :: v (:) Return Value complex(kind=dp), (size(u),size(v)) private pure module function outer_product_csp(u, v) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: u (:) complex(kind=sp), intent(in) :: v (:) Return Value complex(kind=sp), (size(u),size(v)) private pure module function outer_product_iint16(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: u (:) integer(kind=int16), intent(in) :: v (:) Return Value integer(kind=int16), (size(u),size(v)) private pure module function outer_product_iint32(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: u (:) integer(kind=int32), intent(in) :: v (:) Return Value integer(kind=int32), (size(u),size(v)) private pure module function outer_product_iint64(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: u (:) integer(kind=int64), intent(in) :: v (:) Return Value integer(kind=int64), (size(u),size(v)) private pure module function outer_product_iint8(u, v) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: u (:) integer(kind=int8), intent(in) :: v (:) Return Value integer(kind=int8), (size(u),size(v)) private pure module function outer_product_rdp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: u (:) real(kind=dp), intent(in) :: v (:) Return Value real(kind=dp), (size(u),size(v)) private pure module function outer_product_rsp(u, v) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: u (:) real(kind=sp), intent(in) :: v (:) Return Value real(kind=sp), (size(u),size(v)) public interface solve Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Interface for solving a linear system arising from a general matrix. Description This interface provides methods for computing the solution of a linear matrix system.\n Supported data types include real and complex . No assumption is made on the matrix \n structure. \n The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private pure module function stdlib_linalg_c_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_c_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_c_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_d_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_d_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_s_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_s_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_many(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private pure module function stdlib_linalg_z_pure_solve_one(a, b) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_many(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:,:) Result array/matrix x[n] or x[n,nrhs] private module function stdlib_linalg_z_solve_one(a, b, overwrite_a, err) result(x) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out) :: err [optional] state return flag. On error if not requested, the code will stop Return Value complex(kind=dp), allocatable, target, (:) Result array/matrix x[n] or x[n,nrhs] public interface solve_lstsq Computes the squares solution to system . \n ( Specification ) Summary Subroutine interface for computing least squares, i.e. the 2-norm minimizing solution. Description This interface provides methods for computing the least squares of a linear matrix system using \n a subroutine. Supported data types include real and complex . If pre-allocated work spaces \n are provided, no internal memory allocations take place when using this interface. Note The solution is based on LAPACK's singular value decomposition *GELSD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private module subroutine stdlib_linalg_c_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_c_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=sp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_d_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_many(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_s_solve_lstsq_one(a, b, x, real_storage, int_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=sp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space real(kind=sp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=sp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_many(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_z_solve_lstsq_one(a, b, x, real_storage, int_storage, cmpl_storage, cond, singvals, overwrite_a, rank, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] real(kind=dp), intent(inout), optional, target :: real_storage (:) [optional] real working storage space integer(kind=ilp), intent(inout), optional, target :: int_storage (:) [optional] integer working storage space complex(kind=dp), intent(inout), optional, target :: cmpl_storage (:) [optional] complex working storage space real(kind=dp), intent(in), optional :: cond [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real(kind=dp), intent(out), optional, target :: singvals (:) [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A,b data be overwritten and destroyed? integer(kind=ilp), intent(out), optional :: rank [optional] Return rank of A type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop public interface solve_lu Solves the linear system for the unknown vector from a square matrix . \n ( Specification ) Summary Subroutine interface for solving a linear system using LU decomposition. Description This interface provides methods for computing the solution of a linear matrix system using\n a subroutine. Supported data types include real and complex . No assumption is made on the matrix \n structure. Preallocated space for the solution vector x is user-provided, and it may be provided\n for the array of pivot indices, pivot . If all pre-allocated work spaces are provided, no internal \n memory allocations take place when using this interface. The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:) ) \n or several (from a 2-d right-hand-side vector b(:,:) ) systems. Note The solution is based on LAPACK's generic LU decomposition based solvers *GESV . Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). private pure module subroutine stdlib_linalg_c_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_c_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_d_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_s_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix a[n,n] real(kind=sp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] real(kind=sp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_many(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:,:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:,:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private pure module subroutine stdlib_linalg_z_solve_lu_one(a, b, x, pivot, overwrite_a, err) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix a[n,n] complex(kind=dp), intent(in) :: b (:) Right hand side vector or array, b[n] or b[n,nrhs] complex(kind=dp), intent(inout), contiguous, target :: x (:) Result array/matrix x[n] or x[n,nrhs] integer(kind=ilp), intent(inout), optional, target :: pivot (:) [optional] Storage array for the diagonal pivot indices logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop public interface svd Computes the singular value decomposition of a real or complex 2d matrix.\n ( Specification ) Summary Interface for computing the singular value decomposition of a real or complex 2d matrix. Description This interface provides methods for computing the singular value decomposition of a matrix.\n Supported data types include real and complex . The subroutine returns a real array of \n singular values, and optionally, left- and right- singular vector matrices, U and V . \n For a matrix A with size [m,n], full matrix storage for U and V should be [m,m] and [n,n]. \n It is possible to use partial storage [m,k] and [k,n], k=min(m,n) , choosing full_matrices=.false. . Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ), u ( 2 , 2 ), vt ( 3 , 3 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) call svd ( A , s , u , v ) print * , 'singular values = ' , s private module subroutine stdlib_linalg_svd_c(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values complex(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_d(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values real(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_s(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=sp), intent(out) :: s (:) Array of singular values real(kind=sp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors real(kind=sp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop private module subroutine stdlib_linalg_svd_z(a, s, u, vt, overwrite_a, full_matrices, err) Summary Compute singular value decomposition of a matrix Description This function computes the singular value decomposition of a real or complex matrix , \n and returns the array of singular values, and optionally the left matrix containing the \n left unitary singular vectors, and the right matrix , containing the right unitary \n singular vectors. param: a Input matrix of size [m,n].\n param: s Output real array of size [min(m,n)] returning a list of singular values.\n param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns.\n param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten.\n param: full_matrices [optional] If .true. (default), matrices and have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with k=min(m,n) .\n param: err [optional] State return flag. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout), target :: a (:,:) Input matrix A[m,n] real(kind=dp), intent(out) :: s (:) Array of singular values complex(kind=dp), intent(out), optional, target :: u (:,:) The columns of U contain the left singular vectors complex(kind=dp), intent(out), optional, target :: vt (:,:) The rows of V^T contain the right singular vectors logical(kind=lk), intent(in), optional :: overwrite_a [optional] Can A data be overwritten and destroyed? logical(kind=lk), intent(in), optional :: full_matrices [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise\nthey are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop public interface svdvals Computes the singular values of a real or complex 2d matrix.\n ( Specification ) Summary Function interface for computing the array of singular values from the singular value decomposition \n of a real or complex 2d matrix. Description This interface provides methods for computing the singular values a 2d matrix.\n Supported data types include real and complex . The function returns a real array of \n singular values, with size [min(m,n)]. Note The solution is based on LAPACK's singular value decomposition *GESDD methods. Note BLAS/LAPACK backends do not currently support extended precision ( xdp ). Example real ( sp ) :: a ( 2 , 3 ), s ( 2 ) a = reshape ([ 3 , 2 , 2 , 3 , 2 , - 2 ],[ 2 , 3 ]) s = svdvals ( A ) print * , 'singular values = ' , s private module function stdlib_linalg_svdvals_c(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_d(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_s(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=sp), allocatable, (:) Array of singular values private module function stdlib_linalg_svdvals_z(a, err) result(s) Summary Compute singular values from the singular-value decomposition of a matrix . Description This function returns the array of singular values from the singular value decomposition of a real or complex matrix . param: a Input matrix of size [m,n].\n param: err [optional] State return flag. Return value param: s real array of size [min(m,n)] returning a list of singular values. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in), target :: a (:,:) Input matrix A[m,n] type( linalg_state_type ), intent(out), optional :: err [optional] state return flag. On error if not requested, the code will stop Return Value real(kind=dp), allocatable, (:) Array of singular values public interface trace Computes the trace of a matrix\n( Specification ) private function trace_rsp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: A (:,:) Return Value real(kind=sp) private function trace_rdp(A) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: A (:,:) Return Value real(kind=dp) private function trace_csp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: A (:,:) Return Value complex(kind=sp) private function trace_cdp(A) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: A (:,:) Return Value complex(kind=dp) private function trace_iint8(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(in) :: A (:,:) Return Value integer(kind=int8) private function trace_iint16(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(in) :: A (:,:) Return Value integer(kind=int16) private function trace_iint32(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(in) :: A (:,:) Return Value integer(kind=int32) private function trace_iint64(A) result(res) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(in) :: A (:,:) Return Value integer(kind=int64) Functions public pure function eye (dim1, dim2) result(result) License Version experimental Constructs the identity matrix.\n( Specification ) Arguments Type Intent Optional Attributes Name integer, intent(in) :: dim1 integer, intent(in), optional :: dim2 Return Value integer(kind=int8), allocatable, (:,:)","tags":"","loc":"module/stdlib_linalg.html"},{"title":"stdlib_linalg_blas_z – Fortran-lang/stdlib","text":"Uses stdlib_linalg_blas_aux stdlib_linalg_blas_s stdlib_linalg_blas_d stdlib_linalg_constants stdlib_linalg_blas_c Functions public pure function stdlib_zdotc (n, zx, incx, zy, incy) ZDOTC forms the dot product of two complex vectors\nZDOTC = X^H * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) public pure function stdlib_zdotu (n, zx, incx, zy, incy) ZDOTU forms the dot product of two complex vectors\nZDOTU = X^T * Y Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: zy (*) integer(kind=ilp), intent(in) :: incy Return Value complex(kind=dp) Subroutines public pure subroutine stdlib_zaxpy (n, za, zx, incx, zy, incy) ZAXPY constant times a vector plus a vector. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zcopy (n, zx, incx, zy, incy) ZCOPY copies a vector, x, to a vector, y. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(out) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zdrot (n, zx, incx, zy, incy, c, s) Applies a plane rotation, where the cos and sin (c and s) are real\nand the vectors cx and cy are complex.\njack dongarra, linpack, 3/11/78. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy real(kind=dp), intent(in) :: c real(kind=dp), intent(in) :: s public pure subroutine stdlib_zdscal (n, da, zx, incx) ZDSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: da complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zgbmv (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy) ZGBMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n band matrix, with kl sub-diagonals and ku super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: kl integer(kind=ilp), intent(in) :: ku complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgemm (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZGEMM performs one of the matrix-matrix operations\nC := alpha op( A ) op( B ) + beta C,\nwhere op( X ) is one of\nop( X ) = X or op( X ) = X T or op( X ) = X *H,\nalpha and beta are scalars, and A, B and C are matrices, with op( A )\nan m by k matrix, op( B ) a k by n matrix and C an m by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: transa character(len=1), intent(in) :: transb integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zgemv (trans, m, n, alpha, a, lda, x, incx, beta, y, incy) ZGEMV performs one of the matrix-vector operations\ny := alpha A x + beta y, or y := alpha A T x + beta y, or\ny := alpha*A H x + beta y,\nwhere alpha and beta are scalars, x and y are vectors and A is an\nm by n matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zgerc (m, n, alpha, x, incx, y, incy, a, lda) ZGERC performs the rank 1 operation\nA := alpha x y**H + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zgeru (m, n, alpha, x, incx, y, incy, a, lda) ZGERU performs the rank 1 operation\nA := alpha x y**T + A,\nwhere alpha is a scalar, x is an m element vector, y is an n element\nvector and A is an m by n matrix. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zhbmv (uplo, n, k, alpha, a, lda, x, incx, beta, y, incy) ZHBMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian band matrix, with k super-diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZHEMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is an hermitian matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhemv (uplo, n, alpha, a, lda, x, incx, beta, y, incy) ZHEMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zher (uplo, n, alpha, x, incx, a, lda) ZHER performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2 (uplo, n, alpha, x, incx, y, incy, a, lda) ZHER2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an n\nby n hermitian matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: a (lda,*) integer(kind=ilp), intent(in) :: lda public pure subroutine stdlib_zher2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZHER2K performs one of the hermitian rank 2k operations\nC := alpha A B H + conjg( alpha ) B A H + beta C,\nor\nC := alpha A H B + conjg( alpha ) B H A + beta C,\nwhere alpha and beta are scalars with beta real, C is an n by n\nhermitian matrix and A and B are n by k matrices in the first case\nand k by n matrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zherk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZHERK performs one of the hermitian rank k operations\nC := alpha A A H + beta C,\nor\nC := alpha A H A + beta C,\nwhere alpha and beta are real scalars, C is an n by n hermitian\nmatrix and A is an n by k matrix in the first case and a k by n\nmatrix in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda real(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zhpmv (uplo, n, alpha, ap, x, incx, beta, y, incy) ZHPMV performs the matrix-vector operation\ny := alpha A x + beta*y,\nwhere alpha and beta are scalars, x and y are n element vectors and\nA is an n by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: y (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zhpr (uplo, n, alpha, x, incx, ap) ZHPR performs the hermitian rank 1 operation\nA := alpha x x**H + A,\nwhere alpha is a real scalar, x is an n element vector and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n real(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_zhpr2 (uplo, n, alpha, x, incx, y, incy, ap) ZHPR2 performs the hermitian rank 2 operation\nA := alpha x y H + conjg( alpha ) y x H + A,\nwhere alpha is a scalar, x and y are n element vectors and A is an\nn by n hermitian matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: x (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(in) :: y (*) integer(kind=ilp), intent(in) :: incy complex(kind=dp), intent(inout) :: ap (*) public pure subroutine stdlib_zrotg (a, b, c, s) The computation uses the formulas\n|x| = sqrt( Re(x) 2 + Im(x) 2 )\nsgn(x) = x / |x| if x /= 0\n= 1 if x = 0\nc = |a| / sqrt(|a| 2 + |b| 2)\ns = sgn(a) * conjg(b) / sqrt(|a| 2 + |b| 2)\nWhen a and b are real and r /= 0, the formulas simplify to\nr = sgn(a) sqrt(|a| 2 + |b| *2)\nc = a / r\ns = b / r\nthe same as in DROTG when |a| > |b|. When |b| >= |a|, the\nsign of c and s will be different from those computed by DROTG\nif the signs of a and b are not the same. Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(inout) :: a complex(kind=dp), intent(in) :: b real(kind=dp), intent(out) :: c complex(kind=dp), intent(out) :: s public pure subroutine stdlib_zscal (n, za, zx, incx) ZSCAL scales a vector by a constant. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: za complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_zswap (n, zx, incx, zy, incy) ZSWAP interchanges two vectors. Arguments Type Intent Optional Attributes Name integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(inout) :: zx (*) integer(kind=ilp), intent(in) :: incx complex(kind=dp), intent(inout) :: zy (*) integer(kind=ilp), intent(in) :: incy public pure subroutine stdlib_zsymm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) ZSYMM performs one of the matrix-matrix operations\nC := alpha A B + beta C,\nor\nC := alpha B A + beta C,\nwhere alpha and beta are scalars, A is a symmetric matrix and B and\nC are m by n matrices. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyr2k (uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc) ZSYR2K performs one of the symmetric rank 2k operations\nC := alpha A B T + alpha B A T + beta C,\nor\nC := alpha A T B + alpha B T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A and B are n by k matrices in the first case and k by n\nmatrices in the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_zsyrk (uplo, trans, n, k, alpha, a, lda, beta, c, ldc) ZSYRK performs one of the symmetric rank k operations\nC := alpha A A T + beta C,\nor\nC := alpha A T A + beta C,\nwhere alpha and beta are scalars, C is an n by n symmetric matrix\nand A is an n by k matrix in the first case and a k by n matrix\nin the second case. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(in) :: beta complex(kind=dp), intent(inout) :: c (ldc,*) integer(kind=ilp), intent(in) :: ldc public pure subroutine stdlib_ztbmv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular band matrix, with ( k + 1 ) diagonals. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztbsv (uplo, trans, diag, n, k, a, lda, x, incx) ZTBSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular band matrix, with ( k + 1 )\ndiagonals.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n integer(kind=ilp), intent(in) :: k complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpmv (uplo, trans, diag, n, ap, x, incx) ZTPMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix, supplied in packed form. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztpsv (uplo, trans, diag, n, ap, x, incx) ZTPSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix, supplied in packed form.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: ap (*) complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRMM performs one of the matrix-matrix operations\nB := alpha op( A ) B, or B := alpha B op( A )\nwhere alpha is a scalar, B is an m by n matrix, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrmv (uplo, trans, diag, n, a, lda, x, incx) ZTRMV performs one of the matrix-vector operations\nx := A x, or x := A T x, or x := A* H x,\nwhere x is an n element vector and A is an n by n unit, or non-unit,\nupper or lower triangular matrix. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx public pure subroutine stdlib_ztrsm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb) ZTRSM solves one of the matrix equations\nop( A ) X = alpha B, or X op( A ) = alpha B,\nwhere alpha is a scalar, X and B are m by n matrices, A is a unit, or\nnon-unit, upper or lower triangular matrix and op( A ) is one of\nop( A ) = A or op( A ) = A T or op( A ) = A H.\nThe matrix X is overwritten on B. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: side character(len=1), intent(in) :: uplo character(len=1), intent(in) :: transa character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: m integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: alpha complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: b (ldb,*) integer(kind=ilp), intent(in) :: ldb public pure subroutine stdlib_ztrsv (uplo, trans, diag, n, a, lda, x, incx) ZTRSV solves one of the systems of equations\nA x = b, or A T x = b, or A* H x = b,\nwhere b and x are n element vectors and A is an n by n unit, or\nnon-unit, upper or lower triangular matrix.\nNo test for singularity or near-singularity is included in this\nroutine. Such tests must be performed before calling this routine. Arguments Type Intent Optional Attributes Name character(len=1), intent(in) :: uplo character(len=1), intent(in) :: trans character(len=1), intent(in) :: diag integer(kind=ilp), intent(in) :: n complex(kind=dp), intent(in) :: a (lda,*) integer(kind=ilp), intent(in) :: lda complex(kind=dp), intent(inout) :: x (*) integer(kind=ilp), intent(in) :: incx","tags":"","loc":"module/stdlib_linalg_blas_z.html"},{"title":"stdlib_io – Fortran-lang/stdlib","text":"Provides a support for file handling\n( Specification ) Uses stdlib_ascii stdlib_kinds stdlib_optval stdlib_error stdlib_string_type iso_fortran_env Variables Type Visibility Attributes Name Initial character(len=*), public, parameter :: FMT_COMPLEX_DP = '(es24.16e3,1x,es24.16e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_COMPLEX_QP = '(es44.35e4,1x,es44.35e4)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_COMPLEX_SP = '(es15.8e2,1x,es15.8e2)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_COMPLEX_XDP = '(es26.18e3,1x,es26.18e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_INT = '(i0)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_DP = '(es24.16e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_QP = '(es44.35e4)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_SP = '(es15.8e2)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers character(len=*), public, parameter :: FMT_REAL_XDP = '(es26.18e3)' Format strings with edit descriptors for each type and kind\n( Specification )\nFormat string for integers\nFormat string for single precision real numbers\nFormat string for souble precision real numbers\nFormat string for extended double precision real numbers\nFormat string for quadruple precision real numbers\nFormat string for single precision complex numbers\nFormat string for double precision complex numbers\nFormat string for extended double precision complex numbers\nFormat string for quadruple precision complex numbers Interfaces public interface getline Read a whole line from a formatted unit into a string variable private subroutine getline_char(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a deferred length character variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_string(unit, line, iostat, iomsg) Read a whole line from a formatted unit into a string variable Arguments Type Intent Optional Attributes Name integer, intent(in) :: unit Formatted IO unit type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_char(line, iostat, iomsg) Read a whole line from the standard input into a deferred length character variable Arguments Type Intent Optional Attributes Name character(len=:), intent(out), allocatable :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message private subroutine getline_input_string(line, iostat, iomsg) Read a whole line from the standard input into a string variable Arguments Type Intent Optional Attributes Name type( string_type ), intent(out) :: line Line to read integer, intent(out), optional :: iostat Status of operation character(len=:), optional, allocatable :: iomsg Error message public interface loadtxt Loads a 2D array from a text file\n( Specification ) private subroutine loadtxt_rsp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_rdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions real(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint8(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int8), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint16(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int16), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint32(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int32), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_iint64(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions integer(kind=int64), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_csp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=sp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt private subroutine loadtxt_cdp(filename, d, skiprows, max_rows, fmt) Loads a 2D array from a text file. Arguments Filename to load the array from Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename The array 'd' will be automatically allocated with the correct dimensions complex(kind=dp), intent(out), allocatable :: d (:,:) Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer, intent(in), optional :: skiprows Read max_rows lines of content after skiprows lines.\nA negative value results in reading all lines.\nA value of zero results in no lines to be read.\nThe default value is -1. integer, intent(in), optional :: max_rows character(len=*), intent(in), optional :: fmt public interface savetxt Saves a 2D array into a text file\n( Specification ) private subroutine savetxt_rsp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=sp), intent(in) :: d (:,:) Example real ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_rdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename real(kind=dp), intent(in) :: d (:,:) Example real ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint8(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int8), intent(in) :: d (:,:) Example integer ( int8 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint16(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int16), intent(in) :: d (:,:) Example integer ( int16 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint32(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int32), intent(in) :: d (:,:) Example integer ( int32 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_iint64(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename integer(kind=int64), intent(in) :: d (:,:) Example integer ( int64 ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_csp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=sp), intent(in) :: d (:,:) Example complex ( sp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) private subroutine savetxt_cdp(filename, d) Saves a 2D array into a text file. Arguments Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename complex(kind=dp), intent(in) :: d (:,:) Example complex ( dp ) :: data ( 3 , 2 ) call savetxt ( \"log.txt\" , data ) Functions public function open (filename, mode, iostat) result(u) License Version experimental Opens a file\n ( Specification ) Read more… Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: filename character(len=*), intent(in), optional :: mode integer, intent(out), optional :: iostat Return Value integer public function parse_mode (mode) result(mode_) Arguments Type Intent Optional Attributes Name character(len=*), intent(in) :: mode Return Value character(len=3)","tags":"","loc":"module/stdlib_io.html"},{"title":"stdlib_sorting – Fortran-lang/stdlib","text":"This module implements overloaded sorting subroutines named ORD_SORT , SORT_INDEX , and SORT , that each can be used to sort four kinds\n of INTEGER arrays, three kinds of REAL arrays, character(len=*) arrays,\n and arrays of type(string_type) .\n ( Specification ) By default sorting is in order of \n increasing value, but there is an option to sort in decreasing order. \n All the subroutines have worst case run time performance of O(N Ln(N)) , \n but on largely sorted data ORD_SORT and SORT_INDEX can have a run time \n performance of O(N) . ORD_SORT is a translation of the \"Rust\" sort sorting algorithm in slice.rs :\n https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs\n which in turn is inspired by the timsort algorithm of Tim Peters,\n http://svn.python.org/projects/python/trunk/Objects/listsort.txt. ORD_SORT is a hybrid stable comparison algorithm combining merge sort ,\n and insertion sort . It is always at worst O(N Ln(N)) in sorting random\n data, having a performance about 25% slower than SORT on such\n data, but has much better performance than SORT on partially\n sorted data, having O(N) performance on uniformly non-increasing or\n non-decreasing data. SORT_INDEX is a modification of ORD_SORT so that in addition to\n sorting the input array, it returns the indices that map to a\n stable sort of the original array. These indices are\n intended to be used to sort data that is correlated with the input\n array, e.g., different arrays in a database, different columns of a\n rank 2 array, different elements of a derived type. It is less\n efficient than ORD_SORT at sorting a simple array. SORT uses the INTROSORT sorting algorithm of David Musser,\n http://www.cs.rpi.edu/~musser/gp/introsort.ps. introsort is a hybrid\n unstable comparison algorithm combining quicksort , insertion sort , and heap sort . While this algorithm is always O(N Ln(N)) it is relatively\n fast on randomly ordered data, but inconsistent in performance on partly\n sorted data, sometimes having merge sort performance, sometimes having\n better than quicksort performance. UNORD_SOORT is about 25%\n more efficient than ORD_SORT at sorting purely random data, but af an\n order of Ln(N) less efficient at sorting partially sorted data. Version: experimental The generic subroutine implementing the ORD_SORT algorithm to return\n an input array with its elements sorted in order of (non-)decreasing\n value. Its use has the syntax: call ord_sort( array[, work, reverse] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) , real(real128) , character(*) , type(string_type) , type(bitset_64) , type(bitset_large) . If both the \n type of array is real and at least one of the elements is a NaN , then the ordering of the result is undefined. Otherwise it \n is defined to be the original elements in non-decreasing order. work (optional): shall be a rank 1 array of the same type as array , and shall have at least size(array)/2 elements. It is an intent(out) argument to be used as \"scratch\" memory\n for internal record keeping. If associated with an array in static\n storage, its use can significantly reduce the stack memory requirements\n for the code. Its value on return is undefined. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in stable\n order. Otherwise index will sort array in order of non-decreasing\n values in stable order. Example ... ! Read arrays from sorted files call read_sorted_file ( 'dummy_file1' , array1 ) call read_sorted_file ( 'dummy_file2' , array2 ) ! Concatenate the arrays allocate ( array ( size ( array1 ) + size ( array2 ) ) ) array ( 1 : size ( array1 ) ) = array1 (:) array ( size ( array1 ) + 1 : size ( array1 ) + size ( array2 ) ) = array2 (:) ! Sort the resulting array call ord_sort ( array , work ) ! Process the sorted array call array_search ( array , values ) ... Version: experimental The generic subroutine implementing the SORT algorithm to return\n an input array with its elements sorted in order of (non-)decreasing\n value. Its use has the syntax: call sort( array[, reverse] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) , real(real128) , character(*) , type(string_type) , type(bitset_64) , type(bitset_large) . If both the type\n of array is real and at least one of the elements is a NaN , then\n the ordering of the result is undefined. Otherwise it is defined to be the\n original elements in non-decreasing order. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in unstable\n order. Otherwise index will sort array in order of non-decreasing\n values in unstable order. Example ... ! Read random data from a file call read_file ( 'dummy_file' , array ) ! Sort the random data call sort ( array ) ! Process the sorted data call array_search ( array , values ) ... Version: experimental The generic subroutine implementing the LSD radix sort algorithm to return\n an input array with its elements sorted in order of (non-)decreasing\n value. Its use has the syntax: call radix_sort( array[, work, reverse] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) .\n If both the type of array is real and at least one of the\n elements is a NaN , then the ordering of the result is undefined.\n Otherwise it is defined to be the original elements in\n non-decreasing order. Especially, -0.0 is lesser than 0.0. work (optional): shall be a rank 1 array of the same type as array , and shall have at least size(array) elements. It is an intent(inout) argument to be used as buffer. Its value on return is\n undefined. If it is not present, radix_sort will allocate a\n buffer for use, and deallocate it before return. If you do several\n similar radix_sort s, reusing the work array is a good parctice.\n This argument is not present for int8_radix_sort because it use\n counting sort, so no buffer is needed. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in stable\n order. Otherwise index will sort array in order of non-decreasing\n values in stable order. Example ... ! Read random data from a file call read_file ( 'dummy_file' , array ) ! Sort the random data call radix_sort ( array ) ... Version: experimental The generic subroutine implementing the SORT_INDEX algorithm to\n return an index array whose elements would sort the input array in the\n desired direction. It is primarily intended to be used to sort a\n derived type array based on the values of a component of the array.\n Its use has the syntax: call sort_index( array, index[, work, iwork, reverse ] ) with the arguments: array: the rank 1 array to be sorted. It is an intent(inout) argument of any of the types integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(real32) , real(real64) , real(real128) , character(*) , type(string_type) , type(bitset_64) , type(bitset_large) . If both the \n type of array is real and at least one of the elements is a NaN , \n then the ordering of the array and index results is undefined. \n Otherwise it is defined to be as specified by reverse. index: a rank 1 array of sorting indices. It is an intent(out) argument of the type integer(int_index) . Its size shall be the\n same as array . On return, if defined, its elements would\n sort the input array in the direction specified by reverse . work (optional): shall be a rank 1 array of the same type as array , and shall have at least size(array)/2 elements. It is an intent(out) argument to be used as \"scratch\" memory\n for internal record keeping. If associated with an array in static\n storage, its use can significantly reduce the stack memory requirements\n for the code. Its value on return is undefined. iwork (optional): shall be a rank 1 integer array of kind int_index ,\n and shall have at least size(array)/2 elements. It is an intent(out) argument to be used as \"scratch\" memory\n for internal record keeping. If associated with an array in static\n storage, its use can significantly reduce the stack memory requirements\n for the code. Its value on return is undefined. reverse (optional): shall be a scalar of type default logical. It\n is an intent(in) argument. If present with a value of .true. then index will sort array in order of non-increasing values in stable\n order. Otherwise index will sort array in order of non-decreasing\n values in stable order. Examples Sorting a related rank one array: subroutine sort_related_data ( a , b , work , index , iwork ) ! Sort `b` in terms or its related array `a` integer , intent ( inout ) :: a (:) integer ( int32 ), intent ( inout ) :: b (:) ! The same size as a integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Find the indices to sort a call sort_index ( a , index ( 1 : size ( a )),& work ( 1 : size ( a ) / 2 ), iwork ( 1 : size ( a ) / 2 )) ! Sort b based on the sorting of a b (:) = b ( index ( 1 : size ( a )) ) end subroutine sort_related_data Sorting a rank 2 array based on the data in a column subroutine sort_related_data ( array , column , work , index , iwork ) ! Sort `a_data` in terms or its component `a` integer , intent ( inout ) :: a (:,:) integer ( int32 ), intent ( in ) :: column integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) integer , allocatable :: dummy (:) integer :: i allocate ( dummy ( size ( a , dim = 1 ))) ! Extract a component of `a_data` dummy (:) = a (:, column ) ! Find the indices to sort the column call sort_index ( dummy , index ( 1 : size ( dummy )),& work ( 1 : size ( dummy ) / 2 ), iwork ( 1 : size ( dummy ) / 2 )) ! Sort a based on the sorting of its column do i = 1 , size ( a , dim = 2 ) a (:, i ) = a ( index ( 1 : size ( a , dim = 1 )), i ) end do end subroutine sort_related_data Sorting an array of a derived type based on the dsta in one component subroutine sort_a_data ( a_data , a , work , index , iwork ) ! Sort `a_data` in terms or its component `a` type ( a_type ), intent ( inout ) :: a_data (:) integer ( int32 ), intent ( inout ) :: a (:) integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Extract a component of `a_data` a ( 1 : size ( a_data )) = a_data (:) % a ! Find the indices to sort the component call sort_index ( a ( 1 : size ( a_data )), index ( 1 : size ( a_data )),& work ( 1 : size ( a_data ) / 2 ), iwork ( 1 : size ( a_data ) / 2 )) ! Sort a_data based on the sorting of that component a_data (:) = a_data ( index ( 1 : size ( a_data )) ) end subroutine sort_a_data Uses stdlib_bitsets stdlib_string_type stdlib_kinds stdlib_optval Used by Descendants: stdlib_sorting_ord_sort stdlib_sorting_radix_sort stdlib_sorting_sort stdlib_sorting_sort_index Variables Type Visibility Attributes Name Initial integer, public, parameter :: int_index = int64 Integer kind for indexing integer, public, parameter :: int_index_low = int32 Integer kind for indexing using less than huge(1_int32) values Interfaces public interface ord_sort The generic subroutine interface implementing the ORD_SORT algorithm,\na 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 ,\nand insertion sort .\n( Specification ) It is always at worst O(N Ln(N)) in sorting random\ndata, having a performance about 25% slower than SORT on such\ndata, but has much better performance than SORT on partially\nsorted data, having O(N) performance on uniformly non-increasing or\nnon-decreasing data. private module subroutine bitset_64_ord_sort(array, work, reverse) bitset_64_ord_sort( array ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) type( bitset_64 ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_ord_sort(array, work, reverse) bitset_large_ord_sort( array ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) type( bitset_large ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine char_ord_sort(array, work, reverse) char_ord_sort( array ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) character(len=len), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine dp_ord_sort(array, work, reverse) dp_ord_sort( array ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) real(kind=dp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int16_ord_sort(array, work, reverse) int16_ord_sort( array ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int16), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int32_ord_sort(array, work, reverse) int32_ord_sort( array ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int32), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int64_ord_sort(array, work, reverse) int64_ord_sort( array ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int64), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine int8_ord_sort(array, work, reverse) int8_ord_sort( array ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int8), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine sp_ord_sort(array, work, reverse) sp_ord_sort( array ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) real(kind=sp), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse private module subroutine string_type_ord_sort(array, work, reverse) string_type_ord_sort( array ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) type( string_type ), intent(out), optional :: work (0:) logical, intent(in), optional :: reverse public interface radix_sort The generic subroutine interface implementing the LSD radix sort algorithm,\nsee https://en.wikipedia.org/wiki/Radix_sort for more details.\nIt is always O(N) in sorting random data, but need a O(N) buffer.\n( Specification ) private module subroutine dp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout), dimension(:), target :: array real(kind=dp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int16_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout), dimension(:) :: array integer(kind=int16), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int32_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout), dimension(:) :: array integer(kind=int32), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int64_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout), dimension(:) :: array integer(kind=int64), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse private pure module subroutine int8_radix_sort(array, reverse) Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout), dimension(:) :: array logical, intent(in), optional :: reverse private module subroutine sp_radix_sort(array, work, reverse) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout), dimension(:), target :: array real(kind=sp), intent(inout), optional, dimension(:), target :: work logical, intent(in), optional :: reverse public interface sort The generic subroutine interface implementing the SORT algorithm, based\non the introsort of David Musser.\n( Specification ) private pure module subroutine bitset_64_sort(array, reverse) bitset_64_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine bitset_large_sort(array, reverse) bitset_large_sort( array[, reverse] ) sorts the input ARRAY of type type(bitset_large) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine char_sort(array, reverse) char_sort( array[, reverse] ) sorts the input ARRAY of type character(len=*) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine dp_sort(array, reverse) dp_sort( array[, reverse] ) sorts the input ARRAY of type real(dp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int16_sort(array, reverse) int16_sort( array[, reverse] ) sorts the input ARRAY of type integer(int16) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int32_sort(array, reverse) int32_sort( array[, reverse] ) sorts the input ARRAY of type integer(int32) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int64_sort(array, reverse) int64_sort( array[, reverse] ) sorts the input ARRAY of type integer(int64) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine int8_sort(array, reverse) int8_sort( array[, reverse] ) sorts the input ARRAY of type integer(int8) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine sp_sort(array, reverse) sp_sort( array[, reverse] ) sorts the input ARRAY of type real(sp) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) logical, intent(in), optional :: reverse private pure module subroutine string_type_sort(array, reverse) string_type_sort( array[, reverse] ) sorts the input ARRAY of type type(string_type) using a hybrid sort based on the introsort of David Musser.\nThe algorithm is of order O(N Ln(N)) for all inputs.\nBecause it relies on quicksort , the coefficient of the O(N Ln(N))\nbehavior is small for random data compared to other sorting algorithms. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) logical, intent(in), optional :: reverse public interface sort_index The generic subroutine interface implementing the SORT_INDEX algorithm,\nbased on the \"Rust\" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159\nbut modified to return an array of indices that would provide a stable\nsort of the rank one ARRAY input.\n( Specification ) The indices by default correspond to a\nnon-decreasing sort, but if the optional argument REVERSE is present\nwith a value of .TRUE. the indices correspond to a non-increasing sort. private module subroutine bitset_64_sort_index_default(array, index, work, iwork, reverse) bitset_64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_64_sort_index_low(array, index, work, iwork, reverse) bitset_64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_64 ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_64 ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_default(array, index, work, iwork, reverse) bitset_large_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine bitset_large_sort_index_low(array, index, work, iwork, reverse) bitset_large_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(bitset_large) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( bitset_large ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( bitset_large ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_default(array, index, work, iwork, reverse) char_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine char_sort_index_low(array, index, work, iwork, reverse) char_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type character(len=*) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name character(len=*), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) character(len=len), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_default(array, index, work, iwork, reverse) dp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine dp_sort_index_low(array, index, work, iwork, reverse) dp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(dp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=dp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=dp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_default(array, index, work, iwork, reverse) int16_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int16_sort_index_low(array, index, work, iwork, reverse) int16_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int16) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int16), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int16), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_default(array, index, work, iwork, reverse) int32_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int32_sort_index_low(array, index, work, iwork, reverse) int32_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int32) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int32), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int32), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_default(array, index, work, iwork, reverse) int64_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int64_sort_index_low(array, index, work, iwork, reverse) int64_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int64) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int64), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int64), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_default(array, index, work, iwork, reverse) int8_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine int8_sort_index_low(array, index, work, iwork, reverse) int8_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type integer(int8) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name integer(kind=int8), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) integer(kind=int8), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_default(array, index, work, iwork, reverse) sp_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine sp_sort_index_low(array, index, work, iwork, reverse) sp_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type real(sp) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name real(kind=sp), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) real(kind=sp), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_default(array, index, work, iwork, reverse) string_type_sort_index_default( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse private module subroutine string_type_sort_index_low(array, index, work, iwork, reverse) string_type_sort_index_low( array, index[, work, iwork, reverse] ) sorts\nan input ARRAY of type type(string_type) using a hybrid sort based on the \"Rust\" sort algorithm found in slice.rs and returns the sorted ARRAY and an array INDEX of indices in the\norder that would sort the input ARRAY in the desired direction. Arguments Type Intent Optional Attributes Name type( string_type ), intent(inout) :: array (0:) integer(kind=int_index_low), intent(out) :: index (0:) type( string_type ), intent(out), optional :: work (0:) integer(kind=int_index_low), intent(out), optional :: iwork (0:) logical, intent(in), optional :: reverse","tags":"","loc":"module/stdlib_sorting.html"},{"title":"stdlib_version – Fortran-lang/stdlib","text":"Version information on stdlib Variables Type Visibility Attributes Name Initial integer, public, parameter :: stdlib_version_compact = stdlib_major*10000+stdlib_minor*100+stdlib_patch Compact numeric representation of the standard library version character(len=*), public, parameter :: stdlib_version_string = \"0.0.0\" String representation of the standard library version Subroutines public pure subroutine get_stdlib_version (major, minor, patch, string) Getter function to retrieve standard library version Arguments Type Intent Optional Attributes Name integer, intent(out), optional :: major Major version number of the standard library version integer, intent(out), optional :: minor Minor version number of the standard library version integer, intent(out), optional :: patch Patch version number of the standard library version character(len=:), intent(out), optional, allocatable :: string String representation of the standard library version","tags":"","loc":"module/stdlib_version.html"},{"title":"stdlib_stats_distribution_normal – Fortran-lang/stdlib","text":"Uses stdlib_random stdlib_kinds stdlib_stats_distribution_uniform ieee_arithmetic Interfaces public interface cdf_normal Normal Distribution Cumulative Distribution Function\n( Specification ) private elemental function cdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function cdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function cdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface pdf_normal Normal Distribution Probability Density Function\n( Specification ) private elemental function pdf_norm_rsp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: x real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_rdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: x real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private elemental function pdf_norm_csp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: x complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value real(kind=sp) private elemental function pdf_norm_cdp(x, loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: x complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value real(kind=dp) public interface rvs_normal Normal Distribution Random Variates\n( Specification ) private impure function rvs_norm_0_rsp() result(res) Arguments None Return Value real(kind=sp) private impure elemental function rvs_norm_rsp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale Return Value real(kind=sp) private impure elemental function rvs_norm_rdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale Return Value real(kind=dp) private impure elemental function rvs_norm_csp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale Return Value complex(kind=sp) private impure elemental function rvs_norm_cdp(loc, scale) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale Return Value complex(kind=dp) private impure function rvs_norm_array_rsp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=sp), intent(in) :: loc real(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=sp), (array_size) private impure function rvs_norm_array_rdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name real(kind=dp), intent(in) :: loc real(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value real(kind=dp), (array_size) private impure function rvs_norm_array_csp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=sp), intent(in) :: loc complex(kind=sp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=sp), (array_size) private impure function rvs_norm_array_cdp(loc, scale, array_size) result(res) Arguments Type Intent Optional Attributes Name complex(kind=dp), intent(in) :: loc complex(kind=dp), intent(in) :: scale integer, intent(in) :: array_size Return Value complex(kind=dp), (array_size)","tags":"","loc":"module/stdlib_stats_distribution_normal.html"},{"title":"stdlib_io_npy_load – Fortran-lang/stdlib","text":"Implementation of loading npy files into multidimensional arrays Uses stdlib_strings stdlib_error Ancestors: stdlib_io_npy","tags":"","loc":"module/stdlib_io_npy_load.html"},{"title":"stdlib_sorting_ord_sort – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_ord_sort.html"},{"title":"stdlib_linalg_cross_product – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_cross_product.html"},{"title":"stdlib_math_is_close – Fortran-lang/stdlib","text":"Uses ieee_arithmetic Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_is_close.html"},{"title":"stdlib_linalg_diag – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_diag.html"},{"title":"stdlib_sorting_sort – Fortran-lang/stdlib","text":"This submodule implements the overloaded sorting subroutine SORT that can be used to sort four kinds of INTEGER arrays and three kinds\nof REAL arrays. Sorting is in order of increasing value, with the worst\ncase run time performance of O(N Ln(N)) . SORT uses the INTROSORT sorting algorithm of David Musser,\nhttp://www.cs.rpi.edu/~musser/gp/introsort.ps. introsort is a hybrid\nunstable comparison algorithm combining quicksort , insertion sort , and heap sort . While this algorithm is always O(N Ln(N)) it is relatively\nfast on randomly ordered data, but inconsistent in performance on partly\nsorted data, sometimes having merge sort performance, sometimes having\nbetter than quicksort performance. Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_sort.html"},{"title":"stdlib_linalg_kronecker – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_kronecker.html"},{"title":"stdlib_stats_moment_mask – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment_mask.html"},{"title":"stdlib_sorting_radix_sort – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_radix_sort.html"},{"title":"f08estop – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_error","tags":"","loc":"module/f08estop.html"},{"title":"stdlib_math_meshgrid – Fortran-lang/stdlib","text":"Uses stdlib_error Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_meshgrid.html"},{"title":"stdlib_math_arange – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_arange.html"},{"title":"stdlib_hashmap_open – Fortran-lang/stdlib","text":"Uses stdlib_hashmap_wrappers iso_fortran_env Ancestors: stdlib_hashmaps","tags":"","loc":"module/stdlib_hashmap_open.html"},{"title":"f18estop – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_error","tags":"","loc":"module/f18estop.html"},{"title":"stdlib_hash_64bit_spookyv2 – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_64bit","tags":"","loc":"module/stdlib_hash_64bit_spookyv2.html"},{"title":"stdlib_stats_corr – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_linalg stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_corr.html"},{"title":"stdlib_math_logspace – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_logspace.html"},{"title":"stdlib_stats_mean – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_mean.html"},{"title":"stdlib_stats_moment_all – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment_all.html"},{"title":"stdlib_quadrature_simps – Fortran-lang/stdlib","text":"Uses stdlib_error Ancestors: stdlib_quadrature","tags":"","loc":"module/stdlib_quadrature_simps.html"},{"title":"stdlib_hash_64bit_pengy – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_64bit","tags":"","loc":"module/stdlib_hash_64bit_pengy.html"},{"title":"stdlib_io_npy_save – Fortran-lang/stdlib","text":"Implementation of saving multidimensional arrays to npy files Uses stdlib_strings stdlib_error Ancestors: stdlib_io_npy","tags":"","loc":"module/stdlib_io_npy_save.html"},{"title":"stdlib_linalg_solve – Fortran-lang/stdlib","text":"Solve linear system Ax=b Uses stdlib_linalg_constants stdlib_linalg_lapack stdlib_linalg_state Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_solve.html"},{"title":"stdlib_stats_moment_scalar – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment_scalar.html"},{"title":"stdlib_specialfunctions_legendre – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_specialfunctions","tags":"","loc":"module/stdlib_specialfunctions_legendre.html"},{"title":"stdlib_hash_32bit_water – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_32bit","tags":"","loc":"module/stdlib_hash_32bit_water.html"},{"title":"stdlib_math_all_close – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_all_close.html"},{"title":"stdlib_linalg_determinant – Fortran-lang/stdlib","text":"Determinant of a rectangular matrix Uses stdlib_linalg_constants stdlib_linalg_lapack stdlib_linalg_state Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_determinant.html"},{"title":"stdlib_hashmap_chaining – Fortran-lang/stdlib","text":"Implements a simple separate chaining hash map. Uses Ancestors: stdlib_hashmaps","tags":"","loc":"module/stdlib_hashmap_chaining.html"},{"title":"stdlib_linalg_svd – Fortran-lang/stdlib","text":"Singular-Value Decomposition Uses stdlib_linalg_constants stdlib_linalg_lapack stdlib_linalg_state Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_svd.html"},{"title":"stdlib_math_linspace – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_linspace.html"},{"title":"stdlib_hash_32bit_fnv – Fortran-lang/stdlib","text":"An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt\nNoll, and Kiem-Phong-Vo,\nhttps://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function Uses Ancestors: stdlib_hash_32bit","tags":"","loc":"module/stdlib_hash_32bit_fnv.html"},{"title":"stdlib_stats_median – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_selection stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_median.html"},{"title":"stdlib_linalg_outer_product – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_outer_product.html"},{"title":"stdlib_sorting_sort_index – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_sorting","tags":"","loc":"module/stdlib_sorting_sort_index.html"},{"title":"stdlib_bitsets_large – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_bitsets","tags":"","loc":"module/stdlib_bitsets_large.html"},{"title":"stdlib_linalg_least_squares – Fortran-lang/stdlib","text":"Least-squares solution to Ax=b Uses stdlib_linalg_constants stdlib_linalg_lapack stdlib_linalg_state Ancestors: stdlib_linalg","tags":"","loc":"module/stdlib_linalg_least_squares.html"},{"title":"stdlib_bitsets_64 – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_bitsets","tags":"","loc":"module/stdlib_bitsets_64.html"},{"title":"stdlib_stats_cov – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_cov.html"},{"title":"stdlib_stats_moment – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_moment.html"},{"title":"stdlib_stats_var – Fortran-lang/stdlib","text":"Uses stdlib_error stdlib_optval ieee_arithmetic Ancestors: stdlib_stats","tags":"","loc":"module/stdlib_stats_var.html"},{"title":"stdlib_hash_64bit_fnv – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_64bit","tags":"","loc":"module/stdlib_hash_64bit_fnv.html"},{"title":"stdlib_hash_32bit_nm – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_hash_32bit","tags":"","loc":"module/stdlib_hash_32bit_nm.html"},{"title":"stdlib_quadrature_trapz – Fortran-lang/stdlib","text":"Uses stdlib_error Ancestors: stdlib_quadrature","tags":"","loc":"module/stdlib_quadrature_trapz.html"},{"title":"stdlib_ansi_to_string – Fortran-lang/stdlib","text":"Implementation of the conversion to enumerator and identifier types to strings Uses Ancestors: stdlib_ansi","tags":"","loc":"module/stdlib_ansi_to_string.html"},{"title":"stdlib_string_type_constructor – Fortran-lang/stdlib","text":"Uses stdlib_strings Ancestors: stdlib_string_type","tags":"","loc":"module/stdlib_string_type_constructor.html"},{"title":"stdlib_ansi_operator – Fortran-lang/stdlib","text":"Implementation of the conversion to enumerator and identifier types to strings Uses stdlib_string_type Ancestors: stdlib_ansi","tags":"","loc":"module/stdlib_ansi_operator.html"},{"title":"stdlib_strings_to_string – Fortran-lang/stdlib","text":"Uses Ancestors: stdlib_strings","tags":"","loc":"module/stdlib_strings_to_string.html"},{"title":"stdlib_quadrature_gauss – Fortran-lang/stdlib","text":"Uses stdlib_specialfunctions Ancestors: stdlib_quadrature","tags":"","loc":"module/stdlib_quadrature_gauss.html"},{"title":"stdlib_math_diff – Fortran-lang/stdlib","text":"Inspired by original code (MIT license) written in 2016 by Keurfon Luu (keurfonluu@outlook.com)\nhttps://github.com/keurfonluu/Forlab Uses Ancestors: stdlib_math","tags":"","loc":"module/stdlib_math_diff.html"},{"title":"stdlib_io_npy_load.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES !> Implementation of loading npy files into multidimensional arrays submodule ( stdlib_io_npy ) stdlib_io_npy_load use stdlib_error , only : error_stop use stdlib_strings , only : to_string , starts_with implicit none contains #:for k1, t1 in KINDS_TYPES # : for rank in RANKS !> Load a ${rank}$-dimensional array from a npy file module subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) !> Name of the npy file to load from character ( len =* ), intent ( in ) :: filename !> Array to be loaded from the npy file ${ t1 }$ , allocatable , intent ( out ) :: array ${ ranksuffix ( rank ) }$ !> Error status of loading, zero on success integer , intent ( out ), optional :: iostat !> Associated error message in case of non-zero status code character ( len = :), allocatable , intent ( out ), optional :: iomsg character ( len =* ), parameter :: vtype = type_$ { t1 [ 0 ] }{ k1 }$ integer , parameter :: rank = ${ rank }$ integer :: io , stat character ( len = :), allocatable :: msg open ( newunit = io , file = filename , form = \"unformatted\" , access = \"stream\" , iostat = stat ) catch : block character ( len = :), allocatable :: this_type integer , allocatable :: vshape (:) call get_descriptor ( io , filename , this_type , vshape , stat , msg ) if ( stat /= 0 ) exit catch if ( this_type /= vtype ) then stat = 1 msg = \"File '\" // filename // \"' contains data of type '\" // this_type // \"', \" // & & \"but expected '\" // vtype // \"'\" exit catch end if if ( size ( vshape ) /= rank ) then stat = 1 msg = \"File '\" // filename // \"' contains data of rank \" // & & to_string ( size ( vshape )) // \", but expected \" // & & to_string ( rank ) exit catch end if call allocator ( array , vshape , stat ) if ( stat /= 0 ) then msg = \"Failed to allocate array of type '\" // vtype // \"' \" // & & \"with total size of \" // to_string ( product ( vshape )) exit catch end if read ( io , iostat = stat ) array end block catch close ( io ) if ( present ( iostat )) then iostat = stat else if ( stat /= 0 ) then if ( allocated ( msg )) then call error_stop ( \"Failed to read array from file '\" // filename // \"'\" // nl // & & msg ) else call error_stop ( \"Failed to read array from file '\" // filename // \"'\" ) end if end if if ( present ( iomsg ). and . allocated ( msg )) call move_alloc ( msg , iomsg ) contains !> Wrapped intrinsic allocate to create an allocation from a shape array subroutine allocator ( array , vshape , stat ) !> Instance of the array to be allocated ${ t1 }$ , allocatable , intent ( out ) :: array ${ ranksuffix ( rank ) }$ !> Dimensions to allocate for integer , intent ( in ) :: vshape (:) !> Status of allocate integer , intent ( out ) :: stat allocate ( array ( & # : for i in range ( rank - 1 ) & vshape ( ${ i + 1 }$ ), & # : endfor & vshape ( ${ rank }$ )), & & stat = stat ) end subroutine allocator end subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor #:endfor !> Read the npy header from a binary file and retrieve the descriptor string. subroutine get_descriptor ( io , filename , vtype , vshape , stat , msg ) !> Unformatted, stream accessed unit integer , intent ( in ) :: io !> Filename for error reporting character ( len =* ), intent ( in ) :: filename !> Type of data saved in npy file character ( len = :), allocatable , intent ( out ) :: vtype !> Shape descriptor of the integer , allocatable , intent ( out ) :: vshape (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg integer :: major , header_len , i character ( len = :), allocatable :: dict character ( len = 8 ) :: header character :: buf ( 4 ) logical :: fortran_order ! stat should be zero if no error occurred stat = 0 read ( io , iostat = stat ) header if ( stat /= 0 ) return call parse_header ( header , major , stat , msg ) if ( stat /= 0 ) return read ( io , iostat = stat ) buf ( 1 : merge ( 4 , 2 , major > 1 )) if ( stat /= 0 ) return if ( major > 1 ) then header_len = ichar ( buf ( 1 )) & & + ichar ( buf ( 2 )) * 256 ** 1 & & + ichar ( buf ( 3 )) * 256 ** 2 & & + ichar ( buf ( 4 )) * 256 ** 3 else header_len = ichar ( buf ( 1 )) & & + ichar ( buf ( 2 )) * 256 ** 1 end if allocate ( character ( header_len ) :: dict , stat = stat ) if ( stat /= 0 ) return read ( io , iostat = stat ) dict if ( stat /= 0 ) return if ( dict ( header_len : header_len ) /= nl ) then stat = 1 msg = \"Descriptor length does not match\" return end if if ( scan ( dict , achar ( 0 )) > 0 ) then stat = 1 msg = \"Nul byte not allowed in descriptor string\" return end if call parse_descriptor ( trim ( dict (: len ( dict ) - 1 )), filename , & & vtype , fortran_order , vshape , stat , msg ) if ( stat /= 0 ) return if (. not . fortran_order ) then vshape = [( vshape ( i ), i = size ( vshape ), 1 , - 1 )] end if end subroutine get_descriptor !> Parse the first eight bytes of the npy header to verify the data subroutine parse_header ( header , major , stat , msg ) !> Header of the binary file character ( len =* ), intent ( in ) :: header !> Major version of the npy format integer , intent ( out ) :: major !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg integer :: minor ! stat should be zero if no error occurred stat = 0 if ( header ( 1 : 1 ) /= magic_number ) then stat = 1 msg = \"Expected z'93' but got z'\" // to_string ( ichar ( header ( 1 : 1 ))) // \"' \" // & & \"as first byte\" return end if if ( header ( 2 : 6 ) /= magic_string ) then stat = 1 msg = \"Expected identifier '\" // magic_string // \"'\" return end if major = ichar ( header ( 7 : 7 )) if (. not . any ( major == [ 1 , 2 , 3 ])) then stat = 1 msg = \"Unsupported format major version number '\" // to_string ( major ) // \"'\" return end if minor = ichar ( header ( 8 : 8 )) if ( minor /= 0 ) then stat = 1 msg = \"Unsupported format version \" // & & \"'\" // to_string ( major ) // \".\" // to_string ( minor ) // \"'\" return end if end subroutine parse_header !> Parse the descriptor in the npy header. This routine implements a minimal !> non-recursive parser for serialized Python dictionaries. subroutine parse_descriptor ( input , filename , vtype , fortran_order , vshape , stat , msg ) !> Input string to parse as descriptor character ( len =* ), intent ( in ) :: input !> Filename for error reporting character ( len =* ), intent ( in ) :: filename !> Type of the data stored, retrieved from field `descr` character ( len = :), allocatable , intent ( out ) :: vtype !> Whether the data is in left layout, retrieved from field `fortran_order` logical , intent ( out ) :: fortran_order !> Shape of the stored data, retrieved from field `shape` integer , allocatable , intent ( out ) :: vshape (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg enum , bind ( c ) enumerator :: invalid , string , lbrace , rbrace , comma , colon , & lparen , rparen , bool , literal , space end enum type :: token_type integer :: first , last , kind end type token_type integer :: pos character ( len = :), allocatable :: key type ( token_type ) :: token , last logical :: has_descr , has_shape , has_fortran_order has_descr = . false . has_shape = . false . has_fortran_order = . false . pos = 0 call next_token ( input , pos , token , [ lbrace ], stat , msg ) if ( stat /= 0 ) return last = token_type ( pos , pos , comma ) do while ( pos < len ( input )) call get_token ( input , pos , token ) select case ( token % kind ) case ( space ) continue case ( comma ) if ( token % kind == last % kind ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Comma cannot appear at this point\" ) return end if last = token case ( rbrace ) exit case ( string ) if ( token % kind == last % kind ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"String cannot appear at this point\" ) return end if last = token key = input ( token % first + 1 : token % last - 1 ) call next_token ( input , pos , token , [ colon ], stat , msg ) if ( stat /= 0 ) return if ( key == \"descr\" . and . has_descr & & . or . key == \"fortran_order\" . and . has_fortran_order & & . or . key == \"shape\" . and . has_shape ) then stat = 1 msg = make_message ( filename , input , last % first , last % last , & & \"Duplicate entry for '\" // key // \"' found\" ) return end if select case ( key ) case ( \"descr\" ) call next_token ( input , pos , token , [ string ], stat , msg ) if ( stat /= 0 ) return vtype = input ( token % first + 1 : token % last - 1 ) has_descr = . true . case ( \"fortran_order\" ) call next_token ( input , pos , token , [ bool ], stat , msg ) if ( stat /= 0 ) return fortran_order = input ( token % first : token % last ) == \"True\" has_fortran_order = . true . case ( \"shape\" ) call parse_tuple ( input , pos , vshape , stat , msg ) has_shape = . true . case default stat = 1 msg = make_message ( filename , input , last % first , last % last , & & \"Invalid entry '\" // key // \"' in dictionary encountered\" ) return end select case default stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end select end do if (. not . has_descr ) then stat = 1 msg = make_message ( filename , input , 1 , pos , & & \"Dictionary does not contain required entry 'descr'\" ) end if if (. not . has_shape ) then stat = 1 msg = make_message ( filename , input , 1 , pos , & & \"Dictionary does not contain required entry 'shape'\" ) end if if (. not . has_fortran_order ) then stat = 1 msg = make_message ( filename , input , 1 , pos , & & \"Dictionary does not contain required entry 'fortran_order'\" ) end if contains function make_message ( filename , input , first , last , message ) result ( str ) !> Filename for context character ( len =* ), intent ( in ) :: filename !> Input string to parse character ( len =* ), intent ( in ) :: input !> Offset in the input integer , intent ( in ) :: first , last !> Error message character ( len =* ), intent ( in ) :: message !> Final output message character ( len = :), allocatable :: str character ( len =* ), parameter :: nl = new_line ( 'a' ) str = message // nl // & & \" --> \" // filename // \":1:\" // to_string ( first ) // \"-\" // to_string ( last ) // nl // & & \" |\" // nl // & & \"1 | \" // input // nl // & & \" |\" // repeat ( \" \" , first ) // repeat ( \"^\" , last - first + 1 ) // nl // & & \" |\" end function make_message !> Parse a tuple of integers into an array of integers subroutine parse_tuple ( input , pos , tuple , stat , msg ) !> Input string to parse character ( len =* ), intent ( in ) :: input !> Offset in the input, will be advanced after reading integer , intent ( inout ) :: pos !> Array representing tuple of integers integer , allocatable , intent ( out ) :: tuple (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg type ( token_type ) :: token integer :: last , itmp allocate ( tuple ( 0 ), stat = stat ) if ( stat /= 0 ) return call next_token ( input , pos , token , [ lparen ], stat , msg ) if ( stat /= 0 ) return last = comma do while ( pos < len ( input )) call get_token ( input , pos , token ) select case ( token % kind ) case ( space ) continue case ( literal ) if ( token % kind == last ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end if last = token % kind read ( input ( token % first : token % last ), * , iostat = stat ) itmp if ( stat /= 0 ) then return end if tuple = [ tuple , itmp ] case ( comma ) if ( token % kind == last ) then stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end if last = token % kind case ( rparen ) exit case default stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) return end select end do end subroutine parse_tuple !> Get the next allowed token subroutine next_token ( input , pos , token , allowed_token , stat , msg ) !> Input string to parse character ( len =* ), intent ( in ) :: input !> Current offset in the input string integer , intent ( inout ) :: pos !> Last token parsed type ( token_type ), intent ( out ) :: token !> Tokens allowed in the current context integer , intent ( in ) :: allowed_token (:) !> Status of operation integer , intent ( out ) :: stat !> Associated error message in case of non-zero status character ( len = :), allocatable , intent ( out ) :: msg stat = pos do while ( pos < len ( input )) call get_token ( input , pos , token ) if ( token % kind == space ) then continue else if ( any ( token % kind == allowed_token )) then stat = 0 exit else stat = 1 msg = make_message ( filename , input , token % first , token % last , & & \"Invalid token encountered\" ) exit end if end do end subroutine next_token !> Tokenize input string subroutine get_token ( input , pos , token ) !> Input strin to tokenize character ( len =* ), intent ( in ) :: input !> Offset in input string, will be advanced integer , intent ( inout ) :: pos !> Returned token from the next position type ( token_type ), intent ( out ) :: token character :: quote pos = pos + 1 select case ( input ( pos : pos )) case ( \"\"\"\" , \"'\" ) quote = input ( pos : pos ) token % first = pos pos = pos + 1 do while ( pos <= len ( input )) if ( input ( pos : pos ) == quote ) then token % last = pos exit else pos = pos + 1 end if end do token % kind = string case ( \"0\" , \"1\" , \"2\" , \"3\" , \"4\" , \"5\" , \"6\" , \"7\" , \"8\" , \"9\" ) token % first = pos do while ( pos <= len ( input )) if (. not . any ( input ( pos : pos ) == [ \"0\" , \"1\" , \"2\" , \"3\" , \"4\" , \"5\" , \"6\" , \"7\" , \"8\" , \"9\" ])) then pos = pos - 1 token % last = pos exit else pos = pos + 1 end if end do token % kind = literal case ( \"T\" ) if ( starts_with ( input ( pos :), \"True\" )) then token = token_type ( pos , pos + 3 , bool ) pos = pos + 3 else token = token_type ( pos , pos , invalid ) end if case ( \"F\" ) if ( starts_with ( input ( pos :), \"False\" )) then token = token_type ( pos , pos + 4 , bool ) pos = pos + 4 else token = token_type ( pos , pos , invalid ) end if case ( \"{\" ) token = token_type ( pos , pos , lbrace ) case ( \"}\" ) token = token_type ( pos , pos , rbrace ) case ( \",\" ) token = token_type ( pos , pos , comma ) case ( \":\" ) token = token_type ( pos , pos , colon ) case ( \"(\" ) token = token_type ( pos , pos , lparen ) case ( \")\" ) token = token_type ( pos , pos , rparen ) case ( \" \" , nl ) token = token_type ( pos , pos , space ) case default token = token_type ( pos , pos , invalid ) end select end subroutine get_token end subroutine parse_descriptor end submodule stdlib_io_npy_load","tags":"","loc":"sourcefile/stdlib_io_npy_load.fypp.html"},{"title":"stdlib_sorting_ord_sort.fypp – Fortran-lang/stdlib","text":"This file is subjec† both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The generic subroutine, ORD_SORT , is substantially a translation to\nFortran 2008 of the \"Rust\" sort sorting routines in slice.rs The rust sort implementation is distributed with the header: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\n file at the top-level directory of this distribution and at\n http://rust-lang.org/COPYRIGHT. Licensed under the Apache License, Version 2.0 or the MIT license , at your\n option. This file may not be copied, modified, or distributed\n except according to those terms. so the license for the original slice.rs code is compatible with the use\nof modified versions of the code in the Fortran Standard Library under\nthe MIT license. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=:)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME #:set SIGN_NAME = [\"increase\", \"decrease\"] #:set SIGN_TYPE = [\">\", \"<\"] #:set SIGN_OPP_TYPE = [\"<\", \">\"] #:set SIGN_NAME_TYPE = list(zip(SIGN_NAME, SIGN_TYPE, SIGN_OPP_TYPE)) !! Licensing: !! !! This file is subjec† both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! The generic subroutine, `ORD_SORT`, is substantially a translation to !! Fortran 2008 of the `\"Rust\" sort` sorting routines in !! [`slice.rs`](https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs) !! The `rust sort` implementation is distributed with the header: !! !! Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT !! file at the top-level directory of this distribution and at !! http://rust-lang.org/COPYRIGHT. !! !! Licensed under the Apache License, Version 2.0 or the MIT license !! , at your !! option. This file may not be copied, modified, or distributed !! except according to those terms. !! !! so the license for the original`slice.rs` code is compatible with the use !! of modified versions of the code in the Fortran Standard Library under !! the MIT license. submodule ( stdlib_sorting ) stdlib_sorting_ord_sort implicit none contains #:for t1, t2, t3, name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ ord_sort ( array , work , reverse ) ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ , intent ( out ), optional :: work ( 0 :) logical , intent ( in ), optional :: reverse if ( optval ( reverse , . false .)) then call ${ name1 }$_ decrease_ord_sort ( array , work ) else call ${ name1 }$_ increase_ord_sort ( array , work ) endif end subroutine ${ name1 }$_ ord_sort #:endfor #:for sname, signt, signoppt in SIGN_NAME_TYPE #:for t1, t2, t3, name1 in IRSCB_TYPES_ALT_NAME subroutine ${ name1 }$_${ sname }$_ ord_sort ( array , work ) ! 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 ! The Rust version in turn is a simplification of the Timsort algorithm ! described in ! https://svn.python.org/projects/python/trunk/Objects/listsort.txt, as ! it drops both the use of 'galloping' to identify bounds of regions to be ! sorted and the estimation of the optimal `run size`. However it remains ! a hybrid sorting algorithm combining an iterative Merge sort controlled ! by a stack of `RUNS` identified by regions of uniformly decreasing or ! non-decreasing sequences that may be expanded to a minimum run size and ! initially processed by an insertion sort. ! ! Note the Fortran implementation simplifies the logic as it only has to ! deal with Fortran arrays of intrinsic types and not the full generality ! of Rust's arrays and lists for arbitrary types. It also adds the ! estimation of the optimal `run size` as suggested in Tim Peters' ! original `listsort.txt`, and an optional `work` array to be used as ! scratch memory. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ , intent ( out ), optional :: work ( 0 :) ${ t2 }$ , allocatable :: buf (:) integer ( int_index ) :: array_size integer :: stat array_size = size ( array , kind = int_index ) if ( present ( work ) ) then if ( size ( work , kind = int_index ) < array_size / 2 ) then error stop \"${name1}$_${sname}$_ord_sort: work array is too small.\" endif ! Use the work array as scratch memory call merge_sort ( array , work ) else ! Allocate a buffer to use as scratch memory. # : if t1 [ 0 : 4 ] == \"char\" allocate ( ${ t3 }$ :: buf ( 0 : array_size / 2 - 1 ), & stat = stat ) # : else allocate ( buf ( 0 : array_size / 2 - 1 ), stat = stat ) # : endif if ( stat /= 0 ) error stop \"${name1}$_${sname}$_ord_sort: Allocation of buffer failed.\" call merge_sort ( array , buf ) end if contains pure function calc_min_run ( n ) result ( min_run ) !! Returns the minimum length of a run from 32-63 so that N/MIN_RUN is !! less than or equal to a power of two. See !! https://svn.python.org/projects/python/trunk/Objects/listsort.txt integer ( int_index ) :: min_run integer ( int_index ), intent ( in ) :: n integer ( int_index ) :: num , r num = n r = 0_int_index do while ( num >= 64 ) r = ior ( r , iand ( num , 1_int_index ) ) num = ishft ( num , - 1_int_index ) end do min_run = num + r end function calc_min_run pure subroutine insertion_sort ( array ) ! Sorts `ARRAY` using an insertion sort. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: i , j ${ t3 }$ :: key do j = 1 , size ( array , kind = int_index ) - 1 key = array ( j ) i = j - 1 do while ( i >= 0 ) if ( array ( i ) ${ signoppt }$ = key ) exit array ( i + 1 ) = array ( i ) i = i - 1 end do array ( i + 1 ) = key end do end subroutine insertion_sort pure function collapse ( runs ) result ( r ) ! Examine the stack of runs waiting to be merged, identifying adjacent runs ! to be merged until the stack invariants are restablished: ! ! 1. len(-3) > len(-2) + len(-1) ! 2. len(-2) > len(-1) integer ( int_index ) :: r type ( run_type_default ), intent ( in ), target :: runs ( 0 :) integer ( int_index ) :: n logical :: test n = size ( runs , kind = int_index ) test = . false . if ( n >= 2 ) then if ( runs ( n - 1 ) % base == 0 . or . & runs ( n - 2 ) % len <= runs ( n - 1 ) % len ) then test = . true . else if ( n >= 3 ) then ! X exists if ( runs ( n - 3 ) % len <= & runs ( n - 2 ) % len + runs ( n - 1 ) % len ) then test = . true . ! |X| <= |Y| + |Z| => will need to merge due to rho1 or rho2 else if ( n >= 4 ) then if ( runs ( n - 4 ) % len <= & runs ( n - 3 ) % len + runs ( n - 2 ) % len ) then test = . true . ! |W| <= |X| + |Y| => will need to merge due to rho1 or rho3 end if end if end if end if if ( test ) then ! By default merge Y & Z, rho2 or rho3 if ( n >= 3 ) then if ( runs ( n - 3 ) % len < runs ( n - 1 ) % len ) then r = n - 3 ! |X| < |Z| => merge X & Y, rho1 return end if end if r = n - 2 ! |Y| <= |Z| => merge Y & Z, rho4 return else r = - 1 end if end function collapse pure subroutine insert_head ( array ) ! Inserts `array(0)` into the pre-sorted sequence `array(1:)` so that the ! whole `array(0:)` becomes sorted, copying the first element into ! a temporary variable, iterating until the right place for it is found. ! copying every traversed element into the slot preceding it, and finally, ! copying data from the temporary variable into the resulting hole. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ :: tmp integer ( int_index ) :: i tmp = array ( 0 ) find_hole : do i = 1 , size ( array , kind = int_index ) - 1 if ( array ( i ) ${ signt }$ = tmp ) exit find_hole array ( i - 1 ) = array ( i ) end do find_hole array ( i - 1 ) = tmp end subroutine insert_head subroutine merge_sort ( array , buf ) ! The Rust merge sort borrows some (but not all) of the ideas from TimSort, ! which is described in detail at ! (http://svn.python.org/projects/python/trunk/Objects/listsort.txt). ! ! The algorithm identifies strictly descending and non-descending ! subsequences, which are called natural runs. Where these runs are less ! than a minimum run size they are padded by adding additional samples ! using an insertion sort. The merge process is driven by a stack of ! pending unmerged runs. Each newly found run is pushed onto the stack, ! and then pairs of adjacentd runs are merged until these two invariants ! are satisfied: ! ! 1. for every `i` in `1..size(runs)-1`: `runs(i - 1)%len > runs(i)%len` ! 2. for every `i` in `2..size(runs)-1`: `runs(i - 2)%len > ! runs(i - 1)%len + runs(i)%len` ! ! The invariants ensure that the total running time is `O(n log n)` ! worst-case. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t3 }$ , intent ( inout ) :: buf ( 0 :) integer ( int_index ) :: array_size , finish , min_run , r , r_count , & start type ( run_type_default ) :: runs ( 0 : max_merge_stack - 1 ), left , right array_size = size ( array , kind = int_index ) ! Very short runs are extended using insertion sort to span at least ! min_run elements. Slices of up to this length are sorted using insertion ! sort. min_run = calc_min_run ( array_size ) if ( array_size <= min_run ) then if ( array_size >= 2 ) call insertion_sort ( array ) return end if ! Following Rust sort, natural runs in `array` are identified by traversing ! it backwards. By traversing it backward, merges more often go in the ! opposite direction (forwards). According to developers of Rust sort, ! merging forwards is slightly faster than merging backwards. Therefore ! identifying runs by traversing backwards should improve performance. r_count = 0 finish = array_size - 1 do while ( finish >= 0 ) ! Find the next natural run, and reverse it if it's strictly descending. start = finish if ( start > 0 ) then start = start - 1 if ( array ( start + 1 ) ${ signoppt }$ array ( start ) ) then Descending : do while ( start > 0 ) if ( array ( start ) ${ signt }$ = array ( start - 1 ) ) & exit Descending start = start - 1 end do Descending call reverse_segment ( array ( start : finish ) ) else Ascending : do while ( start > 0 ) if ( array ( start ) ${ signoppt }$ array ( start - 1 ) ) exit Ascending start = start - 1 end do Ascending end if end if ! If the run is too short insert some more elements using an insertion sort. Insert : do while ( start > 0 ) if ( finish - start >= min_run - 1 ) exit Insert start = start - 1 call insert_head ( array ( start : finish ) ) end do Insert if ( start == 0 . and . finish == array_size - 1 ) return runs ( r_count ) = run_type_default ( base = start , & len = finish - start + 1 ) finish = start - 1 r_count = r_count + 1 ! Determine whether pairs of adjacent runs need to be merged to satisfy ! the invariants, and, if so, merge them. Merge_loop : do r = collapse ( runs ( 0 : r_count - 1 ) ) if ( r < 0 . or . r_count <= 1 ) exit Merge_loop left = runs ( r + 1 ) right = runs ( r ) call merge ( array ( left % base : & right % base + right % len - 1 ), & left % len , buf ) runs ( r ) = run_type_default ( base = left % base , & len = left % len + right % len ) if ( r == r_count - 3 ) runs ( r + 1 ) = runs ( r + 2 ) r_count = r_count - 1 end do Merge_loop end do if ( r_count /= 1 ) & error stop \"MERGE_SORT completed without RUN COUNT == 1.\" end subroutine merge_sort pure subroutine merge ( array , mid , buf ) ! Merges the two non-decreasing runs `ARRAY(0:MID-1)` and `ARRAY(MID:)` ! using `BUF` as temporary storage, and stores the merged runs into ! `ARRAY(0:)`. `MID` must be > 0, and < `SIZE(ARRAY)-1`. Buffer `BUF` ! must be long enough to hold the shorter of the two runs. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ), intent ( in ) :: mid ${ t3 }$ , intent ( inout ) :: buf ( 0 :) integer ( int_index ) :: array_len , i , j , k array_len = size ( array , kind = int_index ) ! Merge first copies the shorter run into `buf`. Then, depending on which ! run was shorter, it traces the copied run and the longer run forwards ! (or backwards), comparing their next unprocessed elements and then ! copying the lesser (or greater) one into `array`. if ( mid <= array_len - mid ) then ! The left run is shorter. buf ( 0 : mid - 1 ) = array ( 0 : mid - 1 ) i = 0 j = mid merge_lower : do k = 0 , array_len - 1 if ( buf ( i ) ${ signoppt }$ = array ( j ) ) then array ( k ) = buf ( i ) i = i + 1 if ( i >= mid ) exit merge_lower else array ( k ) = array ( j ) j = j + 1 if ( j >= array_len ) then array ( k + 1 :) = buf ( i : mid - 1 ) exit merge_lower end if end if end do merge_lower else ! The right run is shorter ! check that it is stable buf ( 0 : array_len - mid - 1 ) = array ( mid : array_len - 1 ) i = mid - 1 j = array_len - mid - 1 merge_upper : do k = array_len - 1 , 0 , - 1 if ( buf ( j ) ${ signt }$ = array ( i ) ) then array ( k ) = buf ( j ) j = j - 1 if ( j < 0 ) exit merge_upper else array ( k ) = array ( i ) i = i - 1 if ( i < 0 ) then array ( 0 : k - 1 ) = buf ( 0 : j ) exit merge_upper end if end if end do merge_upper end if end subroutine merge pure subroutine reverse_segment ( array ) ! Reverse a segment of an array in place ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: lo , hi ${ t3 }$ :: temp lo = 0 hi = size ( array , kind = int_index ) - 1 do while ( lo < hi ) temp = array ( lo ) array ( lo ) = array ( hi ) array ( hi ) = temp lo = lo + 1 hi = hi - 1 end do end subroutine reverse_segment end subroutine ${ name1 }$_${ sname }$_ ord_sort #:endfor #:endfor end submodule stdlib_sorting_ord_sort","tags":"","loc":"sourcefile/stdlib_sorting_ord_sort.fypp.html"},{"title":"stdlib_linalg_cross_product.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_cross_product implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES pure module function cross_product_$ { t1 [ 0 ] }{ k1 }$ ( a , b ) result ( res ) ${ t1 }$ , intent ( in ) :: a ( 3 ), b ( 3 ) ${ t1 }$ :: res ( 3 ) res ( 1 ) = a ( 2 ) * b ( 3 ) - a ( 3 ) * b ( 2 ) res ( 2 ) = a ( 3 ) * b ( 1 ) - a ( 1 ) * b ( 3 ) res ( 3 ) = a ( 1 ) * b ( 2 ) - a ( 2 ) * b ( 1 ) end function cross_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_linalg_cross_product.fypp.html"},{"title":"stdlib_linalg_blas_aux.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_aux use stdlib_linalg_constants implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_dcabs1 public :: stdlib_icamax public :: stdlib_idamax public :: stdlib_isamax public :: stdlib_izamax public :: stdlib_lsame public :: stdlib_scabs1 public :: stdlib_xerbla public :: stdlib_xerbla_array #:if WITH_QP public :: stdlib_qcabs1 #:endif #:if WITH_QP public :: stdlib_iqamax #:endif #:if WITH_QP public :: stdlib_iwamax #:endif contains pure real ( dp ) function stdlib_dcabs1 ( z ) !! DCABS1 computes |Re(.)| + |Im(.)| of a double complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , real , aimag stdlib_dcabs1 = abs ( real ( z , KIND = dp )) + abs ( aimag ( z )) return end function stdlib_dcabs1 pure integer ( ilp ) function stdlib_isamax ( n , sx , incx ) !! ISAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_isamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_isamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = abs ( sx ( 1 )) do i = 2 , n if ( abs ( sx ( i )) > smax ) then stdlib_isamax = i smax = abs ( sx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = abs ( sx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( sx ( ix )) > smax ) then stdlib_isamax = i smax = abs ( sx ( ix )) end if ix = ix + incx end do end if return end function stdlib_isamax pure integer ( ilp ) function stdlib_izamax ( n , zx , incx ) !! IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix stdlib_izamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_izamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = stdlib_dcabs1 ( zx ( 1 )) do i = 2 , n if ( stdlib_dcabs1 ( zx ( i )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = stdlib_dcabs1 ( zx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_dcabs1 ( zx ( ix )) > dmax ) then stdlib_izamax = i dmax = stdlib_dcabs1 ( zx ( ix )) end if ix = ix + incx end do end if return end function stdlib_izamax pure logical ( lk ) function stdlib_lsame ( ca , cb ) !! LSAME returns .TRUE. if CA is the same letter as CB regardless of !! case. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character , intent ( in ) :: ca , cb ! ===================================================================== ! Intrinsic Functions intrinsic :: ichar ! Local Scalars integer ( ilp ) :: inta , intb , zcode ! test if the characters are equal stdlib_lsame = ca == cb if ( stdlib_lsame ) return ! now test for equivalence if both characters are alphabetic. zcode = ichar ( 'Z' ) ! use 'z' rather than 'a' so that ascii can be detected on prime ! machines, on which ichar returns a value with bit 8 set. ! ichar('a') on prime machines returns 193 which is the same as ! ichar('a') on an ebcdic machine. inta = ichar ( ca ) intb = ichar ( cb ) if ( zcode == 90 . or . zcode == 122 ) then ! ascii is assumed - zcode is the ascii code of either lower or ! upper case 'z'. if ( inta >= 97 . and . inta <= 122 ) inta = inta - 32 if ( intb >= 97 . and . intb <= 122 ) intb = intb - 32 else if ( zcode == 233 . or . zcode == 169 ) then ! ebcdic is assumed - zcode is the ebcdic code of either lower or ! upper case 'z'. if ( inta >= 129 . and . inta <= 137 . or . inta >= 145 . and . inta <= 153 . or . inta >= 162 . and . & inta <= 169 ) inta = inta + 64 if ( intb >= 129 . and . intb <= 137 . or . intb >= 145 . and . intb <= 153 . or . intb >= 162 . and . & intb <= 169 ) intb = intb + 64 else if ( zcode == 218 . or . zcode == 250 ) then ! ascii is assumed, on prime machines - zcode is the ascii code ! plus 128 of either lower or upper case 'z'. if ( inta >= 225 . and . inta <= 250 ) inta = inta - 32 if ( intb >= 225 . and . intb <= 250 ) intb = intb - 32 end if stdlib_lsame = inta == intb ! return end function stdlib_lsame pure real ( sp ) function stdlib_scabs1 ( z ) !! SCABS1 computes |Re(.)| + |Im(.)| of a complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scabs1 = abs ( real ( z , KIND = sp )) + abs ( aimag ( z )) return end function stdlib_scabs1 pure subroutine stdlib_xerbla ( srname , info ) !! XERBLA is an error handler for the LAPACK routines. !! It is called by an LAPACK routine if an input parameter has an !! invalid value. A message is printed and execution stops. !! Installers may consider modifying the STOP statement in order to !! call system-specific exception-handling facilities. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments character ( len =* ), intent ( in ) :: srname integer ( ilp ), intent ( in ) :: info ! ===================================================================== ! Intrinsic Functions intrinsic :: len_trim ! Executable Statements 9999 format ( ' ** ON ENTRY TO ' , a , ' PARAMETER NUMBER ' , i2 , ' HAD ' , 'AN ILLEGAL VALUE' ) end subroutine stdlib_xerbla pure subroutine stdlib_xerbla_array ( srname_array , srname_len , info ) !! XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK !! and BLAS error handler. Rather than taking a Fortran string argument !! as the function's name, XERBLA_ARRAY takes an array of single !! characters along with the array's length. XERBLA_ARRAY then copies !! up to 32 characters of that array into a Fortran string and passes !! that to XERBLA. If called with a non-positive SRNAME_LEN, !! XERBLA_ARRAY will call XERBLA with a string of all blank characters. !! Say some macro or other device makes XERBLA_ARRAY available to C99 !! by a name lapack_xerbla and with a common Fortran calling convention. !! Then a C99 program could invoke XERBLA via: !! { !! int flen = strlen(__func__); !! lapack_xerbla(__func__, !! } !! Providing XERBLA_ARRAY is not necessary for intercepting LAPACK !! errors. XERBLA_ARRAY calls XERBLA. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: srname_len , info ! Array Arguments character ( 1 ), intent ( in ) :: srname_array ( srname_len ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i ! Local Arrays character * 32 srname ! Intrinsic Functions intrinsic :: min , len ! Executable Statements srname = '' do i = 1 , min ( srname_len , len ( srname ) ) srname ( i : i ) = srname_array ( i ) end do call stdlib_xerbla ( srname , info ) return end subroutine stdlib_xerbla_array #:if WITH_QP pure real ( qp ) function stdlib_qcabs1 ( z ) !! DCABS1: computes |Re(.)| + |Im(.)| of a double complex number ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: z ! ===================================================================== ! Intrinsic Functions intrinsic :: abs , real , aimag stdlib_qcabs1 = abs ( real ( z , KIND = qp )) + abs ( aimag ( z )) return end function stdlib_qcabs1 #:endif #:if WITH_QP pure integer ( ilp ) function stdlib_iqamax ( n , dx , incx ) !! IDAMAX: finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dmax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_iqamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_iqamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = abs ( dx ( 1 )) do i = 2 , n if ( abs ( dx ( i )) > dmax ) then stdlib_iqamax = i dmax = abs ( dx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = abs ( dx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( dx ( ix )) > dmax ) then stdlib_iqamax = i dmax = abs ( dx ( ix )) end if ix = ix + incx end do end if return end function stdlib_iqamax #:endif #:if WITH_QP pure integer ( ilp ) function stdlib_iwamax ( n , zx , incx ) !! IZAMAX: finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dmax integer ( ilp ) :: i , ix stdlib_iwamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_iwamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = stdlib_qcabs1 ( zx ( 1 )) do i = 2 , n if ( stdlib_qcabs1 ( zx ( i )) > dmax ) then stdlib_iwamax = i dmax = stdlib_qcabs1 ( zx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = stdlib_qcabs1 ( zx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_qcabs1 ( zx ( ix )) > dmax ) then stdlib_iwamax = i dmax = stdlib_qcabs1 ( zx ( ix )) end if ix = ix + incx end do end if return end function stdlib_iwamax #:endif pure integer ( ilp ) function stdlib_icamax ( n , cx , incx ) !! ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: smax integer ( ilp ) :: i , ix stdlib_icamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_icamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 smax = stdlib_scabs1 ( cx ( 1 )) do i = 2 , n if ( stdlib_scabs1 ( cx ( i )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 smax = stdlib_scabs1 ( cx ( 1 )) ix = ix + incx do i = 2 , n if ( stdlib_scabs1 ( cx ( ix )) > smax ) then stdlib_icamax = i smax = stdlib_scabs1 ( cx ( ix )) end if ix = ix + incx end do end if return end function stdlib_icamax pure integer ( ilp ) function stdlib_idamax ( n , dx , incx ) !! IDAMAX finds the index of the first element having maximum absolute value. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dmax integer ( ilp ) :: i , ix ! Intrinsic Functions intrinsic :: abs stdlib_idamax = 0 if ( n < 1 . or . incx <= 0 ) return stdlib_idamax = 1 if ( n == 1 ) return if ( incx == 1 ) then ! code for increment equal to 1 dmax = abs ( dx ( 1 )) do i = 2 , n if ( abs ( dx ( i )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( i )) end if end do else ! code for increment not equal to 1 ix = 1 dmax = abs ( dx ( 1 )) ix = ix + incx do i = 2 , n if ( abs ( dx ( ix )) > dmax ) then stdlib_idamax = i dmax = abs ( dx ( ix )) end if ix = ix + incx end do end if return end function stdlib_idamax end module stdlib_linalg_blas_aux","tags":"","loc":"sourcefile/stdlib_linalg_blas_aux.fypp.html"},{"title":"stdlib_math_is_close.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_math ) stdlib_math_is_close use , intrinsic :: ieee_arithmetic , only : ieee_is_nan implicit none # : for k1 in REAL_KINDS real ( ${ k1 }$ ), parameter :: sqrt_eps_$ { k1 }$ = sqrt ( epsilon ( 1.0 _${ k1 }$ )) # : endfor contains # ! Determines whether the values of `a` and `b` are close. # : for k1 , t1 in REAL_KINDS_TYPES elemental module logical function is_close_$ { t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a , b real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan logical :: equal_nan_ equal_nan_ = optval ( equal_nan , . false .) if ( ieee_is_nan ( a ) . or . ieee_is_nan ( b )) then close = merge (. true ., . false ., equal_nan_ . and . ieee_is_nan ( a ) . and . ieee_is_nan ( b )) else close = abs ( a - b ) <= max ( abs ( optval ( rel_tol , sqrt_eps_$ { k1 }$ ) * max ( abs ( a ), abs ( b ))), & abs ( optval ( abs_tol , 0.0 _${ k1 }$ )) ) end if end function is_close_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental module logical function is_close_$ { t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a , b real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan close = is_close_r$ { k1 }$ ( a % re , b % re , rel_tol , abs_tol , equal_nan ) . and . & is_close_r$ { k1 }$ ( a % im , b % im , rel_tol , abs_tol , equal_nan ) end function is_close_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule stdlib_math_is_close","tags":"","loc":"sourcefile/stdlib_math_is_close.fypp.html"},{"title":"stdlib_linalg_diag.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_diag implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$ ( v ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) ${ t1 }$ :: res ( size ( v ), size ( v )) integer :: i res = 0 do i = 1 , size ( v ) res ( i , i ) = v ( i ) end do end function diag_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ k ( v , k ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) integer , intent ( in ) :: k ${ t1 }$ :: res ( size ( v ) + abs ( k ), size ( v ) + abs ( k )) integer :: i , sz sz = size ( v ) res = 0 if ( k > 0 ) then do i = 1 , sz res ( i , k + i ) = v ( i ) end do else if ( k < 0 ) then do i = 1 , sz res ( i + abs ( k ), i ) = v ( i ) end do else do i = 1 , sz res ( i , i ) = v ( i ) end do end if end function diag_$ { t1 [ 0 ] }{ k1 }$_ k # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) ${ t1 }$ :: res ( minval ( shape ( A ))) integer :: i do i = 1 , minval ( shape ( A )) res ( i ) = A ( i , i ) end do end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k ( A , k ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) integer , intent ( in ) :: k ${ t1 }$ :: res ( minval ( shape ( A )) - abs ( k )) integer :: i , sz sz = minval ( shape ( A )) - abs ( k ) if ( k > 0 ) then do i = 1 , sz res ( i ) = A ( i , k + i ) end do else if ( k < 0 ) then do i = 1 , sz res ( i ) = A ( i + abs ( k ), i ) end do else do i = 1 , sz res ( i ) = A ( i , i ) end do end if end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_linalg_diag.fypp.html"},{"title":"stdlib_sorting_sort.fypp – Fortran-lang/stdlib","text":"This file is subjec† both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The generic subroutine, SORT , is substantially a\ntranslation to Fortran 2008, of the introsort of David Musser.\nDavid Musser has given permission to include a variant of introsort in the Fortran Standard Library under the MIT license provided\nwe cite: Musser, D.R., “Introspective Sorting and Selection Algorithms,”\n Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). as the official source of the algorithm. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME #:set SIGN_NAME = [\"increase\", \"decrease\"] #:set SIGN_TYPE = [\">\", \"<\"] #:set SIGN_OPP_TYPE = [\"<\", \">\"] #:set SIGN_NAME_TYPE = list(zip(SIGN_NAME, SIGN_TYPE, SIGN_OPP_TYPE)) !! Licensing: !! !! This file is subjec† both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! The generic subroutine, `SORT`, is substantially a !! translation to Fortran 2008, of the `introsort` of David Musser. !! David Musser has given permission to include a variant of `introsort` !! in the Fortran Standard Library under the MIT license provided !! we cite: !! !! Musser, D.R., “Introspective Sorting and Selection Algorithms,” !! Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). !! !! as the official source of the algorithm. submodule ( stdlib_sorting ) stdlib_sorting_sort !! This submodule implements the overloaded sorting subroutine `SORT` !! that can be used to sort four kinds of `INTEGER` arrays and three kinds !! of `REAL` arrays. Sorting is in order of increasing value, with the worst !! case run time performance of `O(N Ln(N))`. !! !! `SORT` uses the `INTROSORT` sorting algorithm of David Musser, !! http://www.cs.rpi.edu/~musser/gp/introsort.ps. `introsort` is a hybrid !! unstable comparison algorithm combining `quicksort`, `insertion sort`, and !! `heap sort`. While this algorithm is always O(N Ln(N)) it is relatively !! fast on randomly ordered data, but inconsistent in performance on partly !! sorted data, sometimes having `merge sort` performance, sometimes having !! better than `quicksort` performance. implicit none contains #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME pure module subroutine ${ name1 }$_ sort ( array , reverse ) ${ t1 }$ , intent ( inout ) :: array ( 0 :) logical , intent ( in ), optional :: reverse if ( optval ( reverse , . false .)) then call ${ name1 }$_ decrease_sort ( array ) else call ${ name1 }$_ increase_sort ( array ) endif end subroutine ${ name1 }$_ sort #:endfor #:for sname, signt, signoppt in SIGN_NAME_TYPE #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME pure subroutine ${ name1 }$_${ sname }$_ sort ( array ) ! `${name1}$_${sname}$_sort( array )` sorts the input `ARRAY` of type `${t1}$` ! using a hybrid sort based on the `introsort` of David Musser. As with ! `introsort`, `${name1}$_${sname}$_sort( array )` is an unstable hybrid comparison ! algorithm using `quicksort` for the main body of the sort tree, ! supplemented by `insertion sort` for the outer branches, but if ! `quicksort` is converging too slowly the algorithm resorts ! to `heapsort`. The algorithm is of order O(N Ln(N)) for all inputs. ! Because it relies on `quicksort`, the coefficient of the O(N Ln(N)) ! behavior is typically small compared to other sorting algorithms. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int32 ) :: depth_limit depth_limit = 2 * int ( floor ( log ( real ( size ( array , kind = int_index ), & kind = dp ) ) / log ( 2.0_dp ) ), & kind = int32 ) call introsort ( array , depth_limit ) contains pure recursive subroutine introsort ( array , depth_limit ) ! It devolves to `insertionsort` if the remaining number of elements ! is fewer than or equal to `INSERT_SIZE`, `heapsort` if the completion ! of the `quicksort` is too slow as estimated from `DEPTH_LIMIT`, ! otherwise sorting is done by a `quicksort`. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int32 ), intent ( in ) :: depth_limit integer ( int_index ), parameter :: insert_size = 16_int_index integer ( int_index ) :: index if ( size ( array , kind = int_index ) <= insert_size ) then ! May be best at the end of SORT processing the whole array ! See Musser, D.R., “Introspective Sorting and Selection ! Algorithms,” Software—Practice and Experience, Vol. 27(8), ! 983–993 (August 1997). call insertion_sort ( array ) else if ( depth_limit == 0 ) then call heap_sort ( array ) else call partition ( array , index ) call introsort ( array ( 0 : index - 1 ), depth_limit - 1 ) call introsort ( array ( index + 1 :), depth_limit - 1 ) end if end subroutine introsort pure subroutine partition ( array , index ) ! quicksort partition using median of three. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ), intent ( out ) :: index ${ t2 }$ :: u , v , w , x , y integer ( int_index ) :: i , j ! Determine median of three and exchange it with the end. u = array ( 0 ) v = array ( size ( array , kind = int_index ) / 2 - 1 ) w = array ( size ( array , kind = int_index ) - 1 ) if ( ( u ${ signt }$ v ) . neqv . ( u ${ signt }$ w ) ) then x = u y = array ( 0 ) array ( 0 ) = array ( size ( array , kind = int_index ) - 1 ) array ( size ( array , kind = int_index ) - 1 ) = y else if ( ( v ${ signoppt }$ u ) . neqv . ( v ${ signoppt }$ w ) ) then x = v y = array ( size ( array , kind = int_index ) / 2 - 1 ) array ( size ( array , kind = int_index ) / 2 - 1 ) = & array ( size ( array , kind = int_index ) - 1 ) array ( size ( array , kind = int_index ) - 1 ) = y else x = w end if ! Partition the array. i = - 1_int_index do j = 0_int_index , size ( array , kind = int_index ) - 2 if ( array ( j ) ${ signoppt }$ = x ) then i = i + 1 y = array ( i ) array ( i ) = array ( j ) array ( j ) = y end if end do y = array ( i + 1 ) array ( i + 1 ) = array ( size ( array , kind = int_index ) - 1 ) array ( size ( array , kind = int_index ) - 1 ) = y index = i + 1 end subroutine partition pure subroutine insertion_sort ( array ) ! Bog standard insertion sort. ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: i , j ${ t2 }$ :: key do j = 1_int_index , size ( array , kind = int_index ) - 1 key = array ( j ) i = j - 1 do while ( i >= 0 ) if ( array ( i ) ${ signoppt }$ = key ) exit array ( i + 1 ) = array ( i ) i = i - 1 end do array ( i + 1 ) = key end do end subroutine insertion_sort pure subroutine heap_sort ( array ) ! A bog standard heap sort ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ) :: i , heap_size ${ t2 }$ :: y heap_size = size ( array , kind = int_index ) ! Build the max heap do i = ( heap_size - 2 ) / 2_int_index , 0_int_index , - 1_int_index call max_heapify ( array , i , heap_size ) end do do i = heap_size - 1 , 1_int_index , - 1_int_index ! Swap the first element with the current final element y = array ( 0 ) array ( 0 ) = array ( i ) array ( i ) = y ! Sift down using max_heapify call max_heapify ( array , 0_int_index , i ) end do end subroutine heap_sort pure recursive subroutine max_heapify ( array , i , heap_size ) ! Transform the array into a max heap ${ t1 }$ , intent ( inout ) :: array ( 0 :) integer ( int_index ), intent ( in ) :: i , heap_size integer ( int_index ) :: l , r , largest ${ t2 }$ :: y largest = i l = 2_int_index * i + 1_int_index r = l + 1_int_index if ( l < heap_size ) then if ( array ( l ) ${ signt }$ array ( largest ) ) largest = l end if if ( r < heap_size ) then if ( array ( r ) ${ signt }$ array ( largest ) ) largest = r end if if ( largest /= i ) then y = array ( i ) array ( i ) = array ( largest ) array ( largest ) = y call max_heapify ( array , largest , heap_size ) end if end subroutine max_heapify end subroutine ${ name1 }$_${ sname }$_ sort #:endfor #:endfor end submodule stdlib_sorting_sort","tags":"","loc":"sourcefile/stdlib_sorting_sort.fypp.html"},{"title":"stdlib_stats.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set IR_KINDS_TYPES_OUTPUT = list(zip(INT_KINDS,INT_TYPES, ['dp']*len(INT_KINDS))) + list(zip(REAL_KINDS, REAL_TYPES, REAL_KINDS)) module stdlib_stats !! Provides support for various statistical methods. This includes currently !! descriptive statistics !! ([Specification](../page/specs/stdlib_stats.html)) use stdlib_kinds , only : sp , dp , xdp , qp , & int8 , int16 , int32 , int64 implicit none private ! Public API public :: corr , cov , mean , median , moment , var interface corr !! version: experimental !! !! Pearson correlation of array elements !! ([Specification](../page/specs/stdlib_stats.html#corr-pearson-correlation-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor end interface corr interface cov !! version: experimental !! !! Covariance of array elements !! ([Specification](../page/specs/stdlib_stats.html#cov-covariance-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) end function ${ RName }$ # : endfor end interface cov interface mean !! version: experimental !! !! Mean of array elements !! ([Specification](../page/specs/stdlib_stats.html#mean-mean-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor end interface mean interface median !! version: experimental !! !! Median of array elements !! ([Specification](../page/specs/stdlib_stats.html#median-median-of-array-elements)) # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median_all\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_all_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ name }$ # : endfor # : endfor end interface interface var !! version: experimental !! !! Variance of array elements !! ([Specification](../page/specs/stdlib_stats.html#var-variance-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor end interface var interface moment !! version: experimental !! !! Central moment of array elements !! ([Specification](../page/specs/stdlib_stats.html#moment-central-moments-of-array-elements)) # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ), optional :: mask real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ end function ${ RName }$ # : endfor # : endfor end interface moment end module stdlib_stats","tags":"","loc":"sourcefile/stdlib_stats.fypp.html"},{"title":"stdlib_linalg_kronecker.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_kronecker implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES pure module function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ ( A , B ) result ( C ) ${ t1 }$ , intent ( in ) :: A (:,:), B (:,:) ${ t1 }$ :: C ( size ( A , dim = 1 ) * size ( B , dim = 1 ), size ( A , dim = 2 ) * size ( B , dim = 2 )) integer :: m1 , n1 , maxM1 , maxN1 , maxM2 , maxN2 maxM1 = size ( A , dim = 1 ) maxN1 = size ( A , dim = 2 ) maxM2 = size ( B , dim = 1 ) maxN2 = size ( B , dim = 2 ) do n1 = 1 , maxN1 do m1 = 1 , maxM1 ! We use the Wikipedia convention for ordering of the matrix elements ! https://en.wikipedia.org/wiki/Kronecker_product C (( m1 - 1 ) * maxM2 + 1 : m1 * maxM2 , ( n1 - 1 ) * maxN2 + 1 : n1 * maxN2 ) = A ( m1 , n1 ) * B (:,:) end do end do end function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule stdlib_linalg_kronecker","tags":"","loc":"sourcefile/stdlib_linalg_kronecker.fypp.html"},{"title":"stdlib_stats_moment_mask.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment_mask use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ ${ t1 }$ , allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ n = real ( count ( mask , dim ), ${ k1 }$ ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + merge ( ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - & center ) ** order ,& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do else allocate ( mean_ , source = mean ( x , ${ fi }$ , mask )) do i = 1 , size ( x , ${ fi }$ ) res = res + merge ( ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean_ ) ** order ,& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ real ( dp ), allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ n = real ( count ( mask , dim ), dp ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + merge (( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - & center ) ** order ,& 0._dp , mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do else allocate ( mean_ , source = mean ( x , ${ fi }$ , mask )) do i = 1 , size ( x , ${ fi }$ ) res = res + merge (( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean_ )& ** order ,& 0._dp , mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment_mask.fypp.html"},{"title":"stdlib_sorting_radix_sort.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_sorting ) stdlib_sorting_radix_sort implicit none integer , parameter :: radix_bits = 8 integer , parameter :: radix_mask = 255 integer ( kind = int16 ), parameter :: radix_bits_i16 = 8_int16 integer ( kind = int16 ), parameter :: radix_mask_i16 = 255_int16 integer ( kind = int32 ), parameter :: radix_bits_i32 = 8_int32 integer ( kind = int32 ), parameter :: radix_mask_i32 = 255_int32 integer ( kind = int64 ), parameter :: radix_bits_i64 = 8_int64 integer ( kind = int64 ), parameter :: radix_mask_i64 = 255_int64 contains ! For int8, radix sort becomes counting sort, so buffer is not needed pure subroutine radix_sort_u8_helper ( N , arr ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int8 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int_index ) :: i integer :: bin_idx integer ( kind = int_index ), dimension ( - 128 : 127 ) :: counts counts (:) = 0 do i = 1 , N bin_idx = arr ( i ) counts ( bin_idx ) = counts ( bin_idx ) + 1 end do i = 1 do bin_idx = - 128 , 127 do while ( counts ( bin_idx ) > 0 ) arr ( i ) = int ( bin_idx , kind = int8 ) i = i + 1 counts ( bin_idx ) = counts ( bin_idx ) - 1 end do end do end subroutine pure subroutine radix_sort_u16_helper ( N , arr , buf ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int16 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int16 ), dimension ( N ), intent ( inout ) :: buf integer ( kind = int_index ) :: i integer :: b , b0 , b1 integer ( kind = int_index ), dimension ( 0 : radix_mask ) :: c0 , c1 c0 (:) = 0 c1 (:) = 0 do i = 1 , N b0 = iand ( arr ( i ), radix_mask_i16 ) b1 = ishft ( arr ( i ), - radix_bits_i16 ) c0 ( b0 ) = c0 ( b0 ) + 1 c1 ( b1 ) = c1 ( b1 ) + 1 end do do b = 1 , radix_mask c0 ( b ) = c0 ( b ) + c0 ( b - 1 ) c1 ( b ) = c1 ( b ) + c1 ( b - 1 ) end do do i = N , 1 , - 1 b0 = iand ( arr ( i ), radix_mask_i16 ) buf ( c0 ( b0 )) = arr ( i ) c0 ( b0 ) = c0 ( b0 ) - 1 end do do i = N , 1 , - 1 b1 = ishft ( buf ( i ), - radix_bits_i16 ) arr ( c1 ( b1 )) = buf ( i ) c1 ( b1 ) = c1 ( b1 ) - 1 end do end subroutine pure subroutine radix_sort_u32_helper ( N , arr , buf ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int32 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int32 ), dimension ( N ), intent ( inout ) :: buf integer ( kind = int_index ) :: i integer :: b , b0 , b1 , b2 , b3 integer ( kind = int_index ), dimension ( 0 : radix_mask ) :: c0 , c1 , c2 , c3 c0 (:) = 0 c1 (:) = 0 c2 (:) = 0 c3 (:) = 0 do i = 1 , N b0 = iand ( arr ( i ), radix_mask_i32 ) b1 = iand ( ishft ( arr ( i ), - radix_bits_i32 ), radix_mask_i32 ) b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i32 ), radix_mask_i32 ) b3 = ishft ( arr ( i ), - 3 * radix_bits_i32 ) c0 ( b0 ) = c0 ( b0 ) + 1 c1 ( b1 ) = c1 ( b1 ) + 1 c2 ( b2 ) = c2 ( b2 ) + 1 c3 ( b3 ) = c3 ( b3 ) + 1 end do do b = 1 , radix_mask c0 ( b ) = c0 ( b ) + c0 ( b - 1 ) c1 ( b ) = c1 ( b ) + c1 ( b - 1 ) c2 ( b ) = c2 ( b ) + c2 ( b - 1 ) c3 ( b ) = c3 ( b ) + c3 ( b - 1 ) end do do i = N , 1 , - 1 b0 = iand ( arr ( i ), radix_mask_i32 ) buf ( c0 ( b0 )) = arr ( i ) c0 ( b0 ) = c0 ( b0 ) - 1 end do do i = N , 1 , - 1 b1 = iand ( ishft ( buf ( i ), - radix_bits_i32 ), radix_mask_i32 ) arr ( c1 ( b1 )) = buf ( i ) c1 ( b1 ) = c1 ( b1 ) - 1 end do do i = N , 1 , - 1 b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i32 ), radix_mask_i32 ) buf ( c2 ( b2 )) = arr ( i ) c2 ( b2 ) = c2 ( b2 ) - 1 end do do i = N , 1 , - 1 b3 = ishft ( buf ( i ), - 3 * radix_bits_i32 ) arr ( c3 ( b3 )) = buf ( i ) c3 ( b3 ) = c3 ( b3 ) - 1 end do end subroutine radix_sort_u32_helper pure subroutine radix_sort_u64_helper ( N , arr , buffer ) integer ( kind = int_index ), intent ( in ) :: N integer ( kind = int64 ), dimension ( N ), intent ( inout ) :: arr integer ( kind = int64 ), dimension ( N ), intent ( inout ) :: buffer integer ( kind = int_index ) :: i integer ( kind = int64 ) :: b , b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7 integer ( kind = int_index ), dimension ( 0 : radix_mask ) :: c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 c0 (:) = 0 c1 (:) = 0 c2 (:) = 0 c3 (:) = 0 c4 (:) = 0 c5 (:) = 0 c6 (:) = 0 c7 (:) = 0 do i = 1 , N b0 = iand ( arr ( i ), radix_mask_i64 ) b1 = iand ( ishft ( arr ( i ), - radix_bits_i64 ), radix_mask_i64 ) b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i64 ), radix_mask_i64 ) b3 = iand ( ishft ( arr ( i ), - 3 * radix_bits_i64 ), radix_mask_i64 ) b4 = iand ( ishft ( arr ( i ), - 4 * radix_bits_i64 ), radix_mask_i64 ) b5 = iand ( ishft ( arr ( i ), - 5 * radix_bits_i64 ), radix_mask_i64 ) b6 = iand ( ishft ( arr ( i ), - 6 * radix_bits_i64 ), radix_mask_i64 ) b7 = ishft ( arr ( i ), - 7 * radix_bits_i64 ) c0 ( b0 ) = c0 ( b0 ) + 1 c1 ( b1 ) = c1 ( b1 ) + 1 c2 ( b2 ) = c2 ( b2 ) + 1 c3 ( b3 ) = c3 ( b3 ) + 1 c4 ( b4 ) = c4 ( b4 ) + 1 c5 ( b5 ) = c5 ( b5 ) + 1 c6 ( b6 ) = c6 ( b6 ) + 1 c7 ( b7 ) = c7 ( b7 ) + 1 end do do b = 1 , radix_mask c0 ( b ) = c0 ( b ) + c0 ( b - 1 ) c1 ( b ) = c1 ( b ) + c1 ( b - 1 ) c2 ( b ) = c2 ( b ) + c2 ( b - 1 ) c3 ( b ) = c3 ( b ) + c3 ( b - 1 ) c4 ( b ) = c4 ( b ) + c4 ( b - 1 ) c5 ( b ) = c5 ( b ) + c5 ( b - 1 ) c6 ( b ) = c6 ( b ) + c6 ( b - 1 ) c7 ( b ) = c7 ( b ) + c7 ( b - 1 ) end do do i = N , 1 , - 1 b0 = iand ( arr ( i ), radix_mask_i64 ) buffer ( c0 ( b0 )) = arr ( i ) c0 ( b0 ) = c0 ( b0 ) - 1 end do do i = N , 1 , - 1 b1 = iand ( ishft ( buffer ( i ), - radix_bits_i64 ), radix_mask_i64 ) arr ( c1 ( b1 )) = buffer ( i ) c1 ( b1 ) = c1 ( b1 ) - 1 end do do i = N , 1 , - 1 b2 = iand ( ishft ( arr ( i ), - 2 * radix_bits_i64 ), radix_mask_i64 ) buffer ( c2 ( b2 )) = arr ( i ) c2 ( b2 ) = c2 ( b2 ) - 1 end do do i = N , 1 , - 1 b3 = iand ( ishft ( buffer ( i ), - 3 * radix_bits_i64 ), radix_mask_i64 ) arr ( c3 ( b3 )) = buffer ( i ) c3 ( b3 ) = c3 ( b3 ) - 1 end do do i = N , 1 , - 1 b4 = iand ( ishft ( arr ( i ), - 4 * radix_bits_i64 ), radix_mask_i64 ) buffer ( c4 ( b4 )) = arr ( i ) c4 ( b4 ) = c4 ( b4 ) - 1 end do do i = N , 1 , - 1 b5 = iand ( ishft ( buffer ( i ), - 5 * radix_bits_i64 ), radix_mask_i64 ) arr ( c5 ( b5 )) = buffer ( i ) c5 ( b5 ) = c5 ( b5 ) - 1 end do do i = N , 1 , - 1 b6 = iand ( ishft ( arr ( i ), - 6 * radix_bits_i64 ), radix_mask_i64 ) buffer ( c6 ( b6 )) = arr ( i ) c6 ( b6 ) = c6 ( b6 ) - 1 end do do i = N , 1 , - 1 b7 = ishft ( buffer ( i ), - 7 * radix_bits_i64 ) arr ( c7 ( b7 )) = buffer ( i ) c7 ( b7 ) = c7 ( b7 ) - 1 end do end subroutine radix_sort_u64_helper pure module subroutine int8_radix_sort ( array , reverse ) integer ( kind = int8 ), dimension (:), intent ( inout ) :: array logical , intent ( in ), optional :: reverse integer ( kind = int8 ) :: item integer ( kind = int_index ) :: i , N N = size ( array , kind = int_index ) call radix_sort_u8_helper ( N , array ) if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if end subroutine int8_radix_sort pure module subroutine int16_radix_sort ( array , work , reverse ) integer ( kind = int16 ), dimension (:), intent ( inout ) :: array integer ( kind = int16 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , start , middle , end integer ( kind = int16 ), dimension (:), pointer :: buffer integer ( kind = int16 ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"int16_radix_sort: work array is too small.\" end if use_internal_buffer = . false . buffer => work else use_internal_buffer = . true . allocate ( buffer ( N )) end if call radix_sort_u16_helper ( N , array , buffer ) ! After calling `radix_sort_u_helper. The array is sorted as unsigned integers. ! In the view of signed array, the negative numbers are sorted but in the tail of the array. ! Use binary search to find the boundary, and move them to correct position. if ( array ( 1 ) >= 0 . and . array ( N ) < 0 ) then start = 1 end = N middle = ( 1 + N ) / 2 do while (. true .) if ( array ( middle ) >= 0 ) then start = middle + 1 else end = middle end if middle = ( start + end ) / 2 if ( start == end ) exit end do buffer ( 1 :( N - middle + 1 )) = array ( middle : N ) buffer ( N - middle + 2 : N ) = array ( 1 : middle - 1 ) array (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine int16_radix_sort pure module subroutine int32_radix_sort ( array , work , reverse ) integer ( kind = int32 ), dimension (:), intent ( inout ) :: array integer ( kind = int32 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , start , middle , end integer ( kind = int32 ), dimension (:), pointer :: buffer integer ( kind = int32 ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"int32_radix_sort: work array is too small.\" end if use_internal_buffer = . false . buffer => work else use_internal_buffer = . true . allocate ( buffer ( N )) end if call radix_sort_u32_helper ( N , array , buffer ) if ( array ( 1 ) >= 0 . and . array ( N ) < 0 ) then start = 1 end = N middle = ( 1 + N ) / 2 do while (. true .) if ( array ( middle ) >= 0 ) then start = middle + 1 else end = middle end if middle = ( start + end ) / 2 if ( start == end ) exit end do buffer ( 1 :( N - middle + 1 )) = array ( middle : N ) buffer ( N - middle + 2 : N ) = array ( 1 : middle - 1 ) array (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine int32_radix_sort module subroutine sp_radix_sort ( array , work , reverse ) use iso_c_binding real ( kind = sp ), dimension (:), intent ( inout ), target :: array real ( kind = sp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , pos , rev_pos integer ( kind = int32 ), dimension (:), pointer :: arri32 integer ( kind = int32 ), dimension (:), pointer :: buffer real ( kind = sp ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"sp_radix_sort: work array is too small.\" end if use_internal_buffer = . false . call c_f_pointer ( c_loc ( work ), buffer , [ N ]) else use_internal_buffer = . true . allocate ( buffer ( N )) end if call c_f_pointer ( c_loc ( array ), arri32 , [ N ]) call radix_sort_u32_helper ( N , arri32 , buffer ) ! After calling `radix_sort_u_helper. The array is sorted as unsigned integers. ! The positive real number is sorted, guaranteed by IEEE-754 standard. ! But the negative real number is sorted in a reversed order, and also in the tail of array. ! Remark that -0.0 is the minimum nagative integer, so using radix sort, -0.0 is naturally lesser than 0.0. ! In IEEE-754 standard, the bit representation of `Inf` is greater than all positive real numbers, ! and the `-Inf` is lesser than all negative real numbers. So the order of `Inf, -Inf` is ok. ! The bit representation of `NaN` may be positive or negative integers in different machine, ! thus if the array contains `NaN`, the result is undefined. if ( arri32 ( 1 ) >= 0 . and . arri32 ( N ) < 0 ) then pos = 1 rev_pos = N do while ( arri32 ( rev_pos ) < 0 ) buffer ( pos ) = arri32 ( rev_pos ) pos = pos + 1 rev_pos = rev_pos - 1 end do buffer ( pos : N ) = arri32 ( 1 : rev_pos ) arri32 (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine sp_radix_sort pure module subroutine int64_radix_sort ( array , work , reverse ) integer ( kind = int64 ), dimension (:), intent ( inout ) :: array integer ( kind = int64 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , start , middle , end integer ( kind = int64 ), dimension (:), pointer :: buffer integer ( kind = int64 ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"int64_radix_sort: work array is too small.\" end if use_internal_buffer = . false . buffer => work else use_internal_buffer = . true . allocate ( buffer ( N )) end if call radix_sort_u64_helper ( N , array , buffer ) if ( array ( 1 ) >= 0 . and . array ( N ) < 0 ) then start = 1 end = N middle = ( 1 + N ) / 2 do while (. true .) if ( array ( middle ) >= 0 ) then start = middle + 1 else end = middle end if middle = ( start + end ) / 2 if ( start == end ) exit end do buffer ( 1 :( N - middle + 1 )) = array ( middle : N ) buffer ( N - middle + 2 : N ) = array ( 1 : middle - 1 ) array (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine int64_radix_sort module subroutine dp_radix_sort ( array , work , reverse ) use iso_c_binding real ( kind = dp ), dimension (:), intent ( inout ), target :: array real ( kind = dp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse integer ( kind = int_index ) :: i , N , pos , rev_pos integer ( kind = int64 ), dimension (:), pointer :: arri64 integer ( kind = int64 ), dimension (:), pointer :: buffer real ( kind = dp ) :: item logical :: use_internal_buffer N = size ( array , kind = int_index ) if ( present ( work )) then if ( size ( work , kind = int_index ) < N ) then error stop \"sp_radix_sort: work array is too small.\" end if use_internal_buffer = . false . call c_f_pointer ( c_loc ( work ), buffer , [ N ]) else use_internal_buffer = . true . allocate ( buffer ( N )) end if call c_f_pointer ( c_loc ( array ), arri64 , [ N ]) call radix_sort_u64_helper ( N , arri64 , buffer ) if ( arri64 ( 1 ) >= 0 . and . arri64 ( N ) < 0 ) then pos = 1 rev_pos = N do while ( arri64 ( rev_pos ) < 0 ) buffer ( pos ) = arri64 ( rev_pos ) pos = pos + 1 rev_pos = rev_pos - 1 end do buffer ( pos : N ) = arri64 ( 1 : rev_pos ) arri64 (:) = buffer (:) end if if ( optval ( reverse , . false .)) then do i = 1 , N / 2 item = array ( i ) array ( i ) = array ( N - i + 1 ) array ( N - i + 1 ) = item end do end if if ( use_internal_buffer ) then deallocate ( buffer ) end if end subroutine dp_radix_sort end submodule stdlib_sorting_radix_sort","tags":"","loc":"sourcefile/stdlib_sorting_radix_sort.f90.html"},{"title":"stdlib_math.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_math use stdlib_kinds , only : int8 , int16 , int32 , int64 , sp , dp , xdp , qp use stdlib_optval , only : optval implicit none private public :: clip , gcd , linspace , logspace public :: EULERS_NUMBER_SP , EULERS_NUMBER_DP #:if WITH_QP public :: EULERS_NUMBER_QP #:endif public :: DEFAULT_LINSPACE_LENGTH , DEFAULT_LOGSPACE_BASE , DEFAULT_LOGSPACE_LENGTH public :: stdlib_meshgrid_ij , stdlib_meshgrid_xy public :: arange , arg , argd , argpi , is_close , all_close , diff , meshgrid integer , parameter :: DEFAULT_LINSPACE_LENGTH = 100 integer , parameter :: DEFAULT_LOGSPACE_LENGTH = 50 integer , parameter :: DEFAULT_LOGSPACE_BASE = 10 ! Useful constants for lnspace real ( sp ), parameter :: EULERS_NUMBER_SP = exp ( 1.0_sp ) real ( dp ), parameter :: EULERS_NUMBER_DP = exp ( 1.0_dp ) #:if WITH_QP real ( qp ), parameter :: EULERS_NUMBER_QP = exp ( 1.0_qp ) #:endif !> Useful constants `PI` for `argd/argpi` # : for k1 in REAL_KINDS real ( kind = ${ k1 }$ ), parameter :: PI_$ { k1 }$ = acos ( - 1.0 _${ k1 }$ ) # : endfor !> Values for optional argument `indexing` of `meshgrid` integer , parameter :: stdlib_meshgrid_xy = 0 , stdlib_meshgrid_ij = 1 interface clip # : for k1 , t1 in IR_KINDS_TYPES module procedure clip_$ { k1 }$ # : endfor end interface clip !> Returns the greatest common divisor of two integers !> ([Specification](../page/specs/stdlib_math.html#gcd)) !> !> Version: experimental interface gcd # : for k1 , t1 in INT_KINDS_TYPES module procedure gcd_$ { k1 }$ # : endfor end interface gcd interface linspace !! Version: Experimental !! !! Create rank 1 array of linearly spaced elements !! If the number of elements is not specified, create an array with size 100. If n is a negative value, !! return an array with size 0. If n = 1, return an array whose only element is end !!([Specification](../page/specs/stdlib_math.html#linspace-create-a-linearly-spaced-rank-one-array)) # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end ${ t1 }$ :: res ( DEFAULT_LINSPACE_LENGTH ) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor ! Add support for integer linspace !! !! When dealing with integers as the `start` and `end` parameters, the return type is always a `real(dp)`. # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) # ! The interface for INT_KINDS_TYPES cannot be combined with RC_KINDS_TYPES # ! because the output for integer types is always a real with dp. pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end real ( dp ) :: res ( DEFAULT_LINSPACE_LENGTH ) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n real ( dp ) :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor end interface interface logspace !! Version: Experimental !! !! Create rank 1 array of logarithmically spaced elements from base**start to base**end. !! If the number of elements is not specified, create an array with size 50. If n is a negative value, !! return an array with size 0. If n = 1, return an array whose only element is base**end. If no base !! is specified, logspace will default to using a base of 10 !! !!([Specification](../page/specs/stdlib_math.html#logspace-create-a-logarithmically-spaced-rank-one-array)) # !========================================================= # != logspace(start, end) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"default\" ) pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end ${ t1 }$ :: res ( DEFAULT_LOGSPACE_LENGTH ) end function ${ RName }$ # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"default\" ) pure module function ${ RName }$ ( start , end ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end real ( dp ) :: res ( DEFAULT_LOGSPACE_LENGTH ) end function ${ RName }$ # !========================================================= # != logspace(start, end, n) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n\" ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n\" ) pure module function ${ RName }$ ( start , end , n ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n real ( dp ) :: res ( n ) end function ${ RName }$ # !========================================================= # != logspace(start, end, n, base) = # !========================================================= # ! Need another function where base is not optional, # ! otherwise the compiler can not differentiate between # ! generic calls to logspace_n where a base is not present # ! ======================================================== # : for k1 , t1 in REAL_KINDS_TYPES ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! Different combinations of parameter types will lead to different result types. ! Those combinations are indicated in the body of each function. # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_rbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ , intent ( in ) :: base ! real(${k1}$) endpoints + real(${k1}$) base = real(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_cbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n complex ( ${ k1 }$ ), intent ( in ) :: base ! real(${k1}$) endpoints + complex(${k1}$) base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_ibase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n integer , intent ( in ) :: base ! real(${k1}$) endpoints + integer base = real(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # ! ======================================================== # ! ======================================================== # : for k1 , t1 in CMPLX_KINDS_TYPES ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! Different combinations of parameter types will lead to different result types. ! Those combinations are indicated in the body of each function. # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_rbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n real ( ${ k1 }$ ), intent ( in ) :: base ! complex(${k1}$) endpoints + real(${k1}$) base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_cbase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n complex ( ${ k1 }$ ), intent ( in ) :: base ! complex(${k1}$) endpoints + complex(${k1}$) base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_ibase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n integer , intent ( in ) :: base ! complex(${k1}$) endpoints + integer base = complex(${k1}$) result ${ t1 }$ :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # ! ======================================================== # ! ======================================================== # ! Provide support for Integer start/endpoints ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! Different combinations of parameter types will lead to different result types. ! Those combinations are indicated in the body of each function. # : for k1 in REAL_KINDS # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_r\" + str ( k1 ) + \"base\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n real ( ${ k1 }$ ), intent ( in ) :: base ! integer endpoints + real(${k1}$) base = real(${k1}$) result real ( ${ k1 }$ ) :: res ( max ( n , 0 )) end function ${ RName }$ # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_c\" + str ( k1 ) + \"base\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n complex ( ${ k1 }$ ), intent ( in ) :: base ! integer endpoints + complex(${k1}$) base = complex(${k1}$) result complex ( ${ k1 }$ ) :: res ( max ( n , 0 )) end function ${ RName }$ # : endfor # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_ibase\" ) pure module function ${ RName }$ ( start , end , n , base ) result ( res ) integer , intent ( in ) :: start integer , intent ( in ) :: end integer , intent ( in ) :: n integer , intent ( in ) :: base ! integer endpoints + integer base = integer result integer :: res ( max ( n , 0 )) end function ${ RName }$ end interface !> Version: experimental !> !> `arange` creates a one-dimensional `array` of the `integer/real` type !> with fixed-spaced values of given spacing, within a given interval. !> ([Specification](../page/specs/stdlib_math.html#arange-function)) interface arange # : set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES # : for k1 , t1 in RI_KINDS_TYPES pure module function arange_$ { t1 [ 0 ] }$_${ k1 }$ ( start , end , step ) result ( result ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ), optional :: end , step ${ t1 }$ , allocatable :: result (:) end function arange_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end interface arange !> Version: experimental !> !> `arg` computes the phase angle in the interval (-π,π]. !> ([Specification](../page/specs/stdlib_math.html#arg-function)) interface arg # : for k1 in CMPLX_KINDS procedure :: arg_$ { k1 }$ # : endfor end interface arg !> Version: experimental !> !> `argd` computes the phase angle of degree version in the interval (-180.0,180.0]. !> ([Specification](../page/specs/stdlib_math.html#argd-function)) interface argd # : for k1 in CMPLX_KINDS procedure :: argd_$ { k1 }$ # : endfor end interface argd !> Version: experimental !> !> `argpi` computes the phase angle of circular version in the interval (-1.0,1.0]. !> ([Specification](../page/specs/stdlib_math.html#argpi-function)) interface argpi # : for k1 in CMPLX_KINDS procedure :: argpi_$ { k1 }$ # : endfor end interface argpi !> Returns a boolean scalar/array where two scalar/arrays are element-wise equal within a tolerance. !> ([Specification](../page/specs/stdlib_math.html#is_close-function)) interface is_close # : set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES # : for k1 , t1 in RC_KINDS_TYPES elemental module logical function is_close_$ { t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a , b real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan end function is_close_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_close !> Version: experimental !> !> Returns a boolean scalar where two arrays are element-wise equal within a tolerance. !> ([Specification](../page/specs/stdlib_math.html#all_close-function)) interface all_close # : set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES # : set RANKS = range ( 1 , MAXRANK + 1 ) # : for k1 , t1 in RC_KINDS_TYPES # : for r1 in RANKS logical pure module function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a$ { ranksuffix ( r1 ) }$ , b$ { ranksuffix ( r1 ) }$ real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan end function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ # : endfor # : endfor end interface all_close !> Version: experimental !> !> Computes differences between adjacent elements of an array. !> ([Specification](../page/specs/stdlib_math.html#diff-function)) interface diff # : set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES # : for k1 , t1 in RI_KINDS_TYPES pure module function diff_1_$ { k1 }$ ( x , n , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ), optional :: n ${ t1 }$ , intent ( in ), optional :: prepend (:), append (:) ${ t1 }$ , allocatable :: y (:) end function diff_1_$ { k1 }$ pure module function diff_2_$ { k1 }$ ( X , n , dim , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ), optional :: n , dim ${ t1 }$ , intent ( in ), optional :: prepend (:, :), append (:, :) ${ t1 }$ , allocatable :: y (:, :) end function diff_2_$ { k1 }$ # : endfor end interface diff !> Version: experimental !> !> Computes a list of coordinate matrices from coordinate vectors. !> ([Specification](../page/specs/stdlib_math.html#meshgrid)) interface meshgrid # : set RANKS = range ( 1 , MAXRANK + 1 ) # : for k1 , t1 in IR_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"meshgrid\" , rank , t1 , k1 ) module subroutine ${ RName }$ (& ${ \"\" . join ( f \"x{i}, \" for i in range ( 1 , rank + 1 )) }$ & ${ \"\" . join ( f \"xm{i}, \" for i in range ( 1 , rank + 1 )) }$ & indexing & ) # : for i in range ( 1 , rank + 1 ) ${ t1 }$ , intent ( in ) :: x$ { i }$ (:) ${ t1 }$ , intent ( out ) :: xm$ { i }$ ${ ranksuffix ( rank ) }$ # : endfor integer , intent ( in ), optional :: indexing end subroutine ${ RName }$ # : endfor # : endfor end interface meshgrid contains # : for k1 , t1 in IR_KINDS_TYPES elemental function clip_$ { k1 }$ ( x , xmin , xmax ) result ( res ) ${ t1 }$ , intent ( in ) :: x ${ t1 }$ , intent ( in ) :: xmin ${ t1 }$ , intent ( in ) :: xmax ${ t1 }$ :: res res = max ( min ( x , xmax ), xmin ) end function clip_$ { k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function arg_$ { k1 }$ ( z ) result ( result ) ${ t1 }$ , intent ( in ) :: z real ( ${ k1 }$ ) :: result result = merge ( 0.0 _${ k1 }$ , atan2 ( z % im , z % re ), z == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) end function arg_$ { k1 }$ elemental function argd_$ { k1 }$ ( z ) result ( result ) ${ t1 }$ , intent ( in ) :: z real ( ${ k1 }$ ) :: result result = merge ( 0.0 _${ k1 }$ , atan2 ( z % im , z % re ) * 18 0.0 _${ k1 }$ / PI_$ { k1 }$ , & z == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) end function argd_$ { k1 }$ elemental function argpi_$ { k1 }$ ( z ) result ( result ) ${ t1 }$ , intent ( in ) :: z real ( ${ k1 }$ ) :: result result = merge ( 0.0 _${ k1 }$ , atan2 ( z % im , z % re ) / PI_$ { k1 }$ , & z == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) end function argpi_$ { k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES !> Returns the greatest common divisor of two integers of kind ${k1}$ !> using the Euclidean algorithm. elemental function gcd_$ { k1 }$ ( a , b ) result ( res ) ${ t1 }$ , intent ( in ) :: a ${ t1 }$ , intent ( in ) :: b ${ t1 }$ :: res ${ t1 }$ :: rem , tmp rem = min ( abs ( a ), abs ( b )) res = max ( abs ( a ), abs ( b )) do while ( rem /= 0 _${ k1 }$ ) tmp = rem rem = mod ( res , rem ) res = tmp end do end function gcd_$ { k1 }$ # : endfor end module stdlib_math","tags":"","loc":"sourcefile/stdlib_math.fypp.html"},{"title":"stdlib_random.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_random use stdlib_kinds , only : int8 , int16 , int32 , int64 use stdlib_optval , only : optval use stdlib_error , only : error_stop implicit none private integer , parameter :: MAX_INT_BIT_SIZE = bit_size ( 1_int64 ) integer ( int64 ) :: st ( 4 ) ! internal states for xoshiro256ss function integer ( int64 ) :: si = 614872703977525537_int64 ! default seed value logical :: seed_initialized = . false . public :: random_seed public :: dist_rand interface dist_rand !! Version experimental !! !! Generation of random integers with different kinds !! ([Specification](../page/specs/stdlib_random.html# !! dist_rand-get-a-random-integer-with-specified-kind)) # : for k1 , t1 in INT_KINDS_TYPES module procedure dist_rand_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface dist_rand interface random_seed !! Version experimental !! !! Set seed value for random number generator !! ([Specification](../page/specs/stdlib_random.html# !! random_seed-set-or-get-a-value-of-seed-to-the-probability-distribution-pseudorandom-number-generator)) !! # : for k1 , t1 in INT_KINDS_TYPES module procedure random_distribution_seed_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface random_seed contains # : for k1 , t1 in INT_KINDS_TYPES function dist_rand_$ { t1 [ 0 ] }{ k1 }$ ( n ) result ( res ) !! Random integer generation for various kinds !! result = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind !! Result will be operated by bitwise operators to generate desired integer !! and real pseudorandom numbers !! ${ t1 }$ , intent ( in ) :: n ${ t1 }$ :: res integer :: k k = MAX_INT_BIT_SIZE - bit_size ( n ) if ( k < 0 ) call error_stop ( \"Error(dist_rand): Integer bit size is\" & // \" greater than 64bit\" ) res = shiftr ( xoshiro256ss ( ), k ) end function dist_rand_$ { t1 [ 0 ] }{ k1 }$ # : endfor function xoshiro256ss ( ) result ( res ) ! Generate random 64-bit integers ! Written in 2018 by David Blackman and Sebastiano Vigna (vigna@acm.org) ! http://prng.di.unimi.it/xoshiro256starstar.c ! ! This is xoshiro256** 1.0, one of our all-purpose, rock-solid ! generators. It has excellent (sub-ns) speed, a state (256 bits) that is ! large enough for any parallel application, and it passes all tests we ! are aware of. ! ! The state must be seeded so that it is not everywhere zero. If you have ! a 64-bit seed, we suggest to seed a splitmix64 generator and use its ! output to fill st. ! ! Fortran 90 version translated from C by Jim-215-Fisher ! integer ( int64 ) :: res , t if (. not . seed_initialized ) call random_distribution_seed_iint64 ( si , t ) res = ishftc ( st ( 2 ) * 5 , 7 ) * 9 t = shiftl ( st ( 2 ), 17 ) st ( 3 ) = ieor ( st ( 3 ), st ( 1 )) st ( 4 ) = ieor ( st ( 4 ), st ( 2 )) st ( 2 ) = ieor ( st ( 2 ), st ( 3 )) st ( 1 ) = ieor ( st ( 1 ), st ( 4 )) st ( 3 ) = ieor ( st ( 3 ), t ) st ( 4 ) = ishftc ( st ( 4 ), 45 ) end function xoshiro256ss function splitmix64 ( s ) result ( res ) ! Written in 2015 by Sebastiano Vigna (vigna@acm.org) ! This is a fixed-increment version of Java 8's SplittableRandom ! generator. ! See http://dx.doi.org/10.1145/2714064.2660195 and ! http://docs.oracle.com/javase/8/docs/api/java/util/SplittableRandom.html ! ! It is a very fast generator passing BigCrush, and it can be useful if ! for some reason you absolutely want 64 bits of state. ! ! Fortran 90 translated from C by Jim-215-Fisher ! integer ( int64 ) :: res integer ( int64 ), intent ( in ), optional :: s integer ( int64 ) :: int01 = - 7046029254386353131_int64 , & int02 = - 4658895280553007687_int64 , & int03 = - 7723592293110705685_int64 ! Values are converted from C unsigned integer of 0x9e3779b97f4a7c15, ! 0xbf58476d1ce4e5b9, 0x94d049bb133111eb res = optval ( s , si ) si = res + int01 res = ieor ( res , shiftr ( res , 30 )) * int02 res = ieor ( res , shiftr ( res , 27 )) * int03 res = ieor ( res , shiftr ( res , 31 )) end function splitmix64 # : for k1 , t1 in INT_KINDS_TYPES subroutine random_distribution_seed_$ { t1 [ 0 ] }{ k1 }$ ( put , get ) !! Set seed value for random number generator !! ${ t1 }$ , intent ( in ) :: put ${ t1 }$ , intent ( out ) :: get integer ( int64 ) :: tmp integer :: i tmp = splitmix64 ( int ( put , kind = int64 )) do i = 1 , 10 tmp = splitmix64 ( ) end do do i = 1 , 4 tmp = splitmix64 ( ) st ( i ) = tmp end do get = int ( tmp , kind = ${ k1 }$ ) seed_initialized = . true . end subroutine random_distribution_seed_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_random","tags":"","loc":"sourcefile/stdlib_random.fypp.html"},{"title":"f08estop.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_error ) f08estop implicit none contains module procedure error_stop ! Aborts the program with nonzero exit code ! this is a fallback for Fortran 2008 error stop (e.g. Intel 19.1/2020 compiler) ! ! The \"stop \" statement generally has return code 0. ! To allow non-zero return code termination with character message, ! error_stop() uses the statement \"error stop\", which by default ! has exit code 1 and prints the message to stderr. ! An optional integer return code \"code\" may be specified. ! ! Example ! ------- ! ! call error_stop(\"Invalid argument\") write ( stderr , * ) msg if ( present ( code )) then select case ( code ) case ( 1 ) error stop 1 case ( 2 ) error stop 2 case ( 77 ) error stop 77 case default write ( stderr , * ) 'ERROR: code ' , code , ' was specified.' error stop end select else error stop endif end procedure end submodule f08estop","tags":"","loc":"sourcefile/f08estop.f90.html"},{"title":"stdlib_stats_distribution_exponential.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_stats_distribution_exponential use ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_kinds , only : sp , dp , xdp , qp , int32 use stdlib_random , only : dist_rand use stdlib_stats_distribution_uniform , only : uni => rvs_uniform implicit none private integer :: ke ( 0 : 255 ) real ( dp ) :: we ( 0 : 255 ), fe ( 0 : 255 ) logical :: zig_exp_initialized = . false . public :: rvs_exp public :: pdf_exp public :: cdf_exp interface rvs_exp !! Version experimental !! !! Exponential Distribution Random Variates !! ([Specification](../page/specs/stdlib_stats_distribution_exponential.html# !! rvs_exp-exponential-distribution-random-variates)) !! module procedure rvs_exp_0_rsp !0 dummy variable # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_exp_$ { t1 [ 0 ] }{ k1 }$ !1 dummy variable # : endfor # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ !2 dummy variables # : endfor end interface rvs_exp interface pdf_exp !! Version experimental !! !! Exponential Distribution Probability Density Function !! ([Specification](../page/specs/stdlib_stats_distribution_exponential.html# !! pdf_exp-exponential-distribution-probability-density-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure pdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface pdf_exp interface cdf_exp !! Version experimental !! !! Exponential Cumulative Distribution Function !! ([Specification](../page/specs/stdlib_stats_distribution_exponential.html# !! cdf_exp-exponential-distribution-cumulative-distribution-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure cdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cdf_exp contains impure subroutine zigset ! Marsaglia & Tsang generator for random normals & random exponentials. ! Translated from C by Alan Miller (amiller@bigpond.net.au) ! ! Marsaglia, G. & Tsang, W.W. (2000) 'The ziggurat method for generating ! random variables', J. Statist. Software, v5(8). ! ! This is an electronic journal which can be downloaded from: ! http://www.jstatsoft.org/v05/i08 ! ! Latest version - 1 January 2001 ! real ( dp ), parameter :: M2 = 214748364 8.0_dp , ve = 0.003949659822581572_dp real ( dp ), parameter :: ONE = 1.0_dp real ( dp ) :: de , te , q integer :: i de = 7.697117470131487_dp te = de ! tables for random exponentials q = ve * exp ( de ) ke ( 0 ) = int (( de / q ) * M2 , kind = int32 ) ke ( 1 ) = 0 we ( 0 ) = q / M2 we ( 255 ) = de / M2 fe ( 0 ) = ONE fe ( 255 ) = exp ( - de ) do i = 254 , 1 , - 1 de = - log ( ve / de + exp ( - de )) ke ( i + 1 ) = int ( M2 * ( de / te ), kind = int32 ) te = de fe ( i ) = exp ( - de ) we ( i ) = de / M2 end do zig_exp_initialized = . true . end subroutine zigset # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_exp_0_$ { t1 [ 0 ] }{ k1 }$ ( ) result ( res ) ! ! Standard exponential random variate (lambda=1) ! ${ t1 }$ :: res , x ${ t1 }$ , parameter :: r = 7.69711747013104972 _${ k1 }$ integer :: jz , iz if (. not . zig_exp_initialized ) call zigset iz = 0 jz = dist_rand ( 1_int32 ) ! 32bit random integer iz = iand ( jz , 255 ) ! random integer in [0, 255] if ( abs ( jz ) < ke ( iz ) ) then res = abs ( jz ) * we ( iz ) else L1 : do if ( iz == 0 ) then res = r - log ( uni ( 1.0 _${ k1 }$ ) ) exit L1 end if x = abs ( jz ) * we ( iz ) if ( fe ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fe ( iz - 1 ) - fe ( iz )) < exp ( - x )) then res = x exit L1 end if jz = dist_rand ( 1_int32 ) iz = iand ( jz , 255 ) if ( abs ( jz ) < ke ( iz ) ) then res = abs ( jz ) * we ( iz ) exit L1 end if end do L1 endif end function rvs_exp_0_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ ( lambda ) result ( res ) ! ! Exponential distributed random variate ! ${ t1 }$ , intent ( in ) :: lambda ${ t1 }$ :: res if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = rvs_exp_0_$ { t1 [ 0 ] }{ k1 }$ ( ) res = res / lambda end if end function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ ( lambda ) result ( res ) ${ t1 }$ , intent ( in ) :: lambda ${ t1 }$ :: res real ( ${ k1 }$ ) :: tr , ti tr = rvs_exp_r$ { k1 }$ ( lambda % re ) ti = rvs_exp_r$ { k1 }$ ( lambda % im ) res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ ( lambda , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: lambda integer , intent ( in ) :: array_size ${ t1 }$ :: res ( array_size ), x , re ${ t1 }$ , parameter :: r = 7.69711747013104972 _${ k1 }$ integer :: jz , iz , i if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if if (. not . zig_exp_initialized ) call zigset do i = 1 , array_size iz = 0 jz = dist_rand ( 1_int32 ) iz = iand ( jz , 255 ) if ( abs ( jz ) < ke ( iz ) ) then re = abs ( jz ) * we ( iz ) else L1 : do if ( iz == 0 ) then re = r - log ( uni ( 1.0 _${ k1 }$ ) ) exit L1 end if x = abs ( jz ) * we ( iz ) if ( fe ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fe ( iz - 1 ) - fe ( iz )) < exp ( - x )) then re = x exit L1 end if jz = dist_rand ( 1_int32 ) iz = iand ( jz , 255 ) if ( abs ( jz ) < ke ( iz ) ) then re = abs ( jz ) * we ( iz ) exit L1 end if end do L1 endif res ( i ) = re / lambda end do end function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ ( lambda , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: lambda integer , intent ( in ) :: array_size ${ t1 }$ :: res ( array_size ) integer :: i real ( ${ k1 }$ ) :: tr , ti do i = 1 , array_size tr = rvs_exp_r$ { k1 }$ ( lambda % re ) ti = rvs_exp_r$ { k1 }$ ( lambda % im ) res ( i ) = cmplx ( tr , ti , kind = ${ k1 }$ ) end do end function rvs_exp_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ! ! Exponential Distribution Probability Density Function ! ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else if ( x < 0. _${ k1 }$ ) then res = 0. _${ k1 }$ else res = exp ( - x * lambda ) * lambda end if end function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res res = pdf_exp_r$ { k1 }$ ( x % re , lambda % re ) res = res * pdf_exp_r$ { k1 }$ ( x % im , lambda % im ) end function pdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ! ! Exponential Distribution Cumulative Distribution Function ! ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res if ( lambda <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else if ( x < 0. _${ k1 }$ ) then res = 0. _${ k1 }$ else res = 1.0 _${ k1 }$ - exp ( - x * lambda ) end if end function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ ( x , lambda ) result ( res ) ${ t1 }$ , intent ( in ) :: x , lambda real ( ${ k1 }$ ) :: res res = cdf_exp_r$ { k1 }$ ( x % re , lambda % re ) res = res * cdf_exp_r$ { k1 }$ ( x % im , lambda % im ) end function cdf_exp_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_stats_distribution_exponential","tags":"","loc":"sourcefile/stdlib_stats_distribution_exponential.fypp.html"},{"title":"stdlib_math_meshgrid.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set IR_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES #:set RANKS = range(1, MAXRANK + 1) #:def meshgrid_loop(indices) # : for j in reversed ( indices ) do i$ { j }$ = 1 , size ( x$ { j }$ ) # : endfor # : for j in indices xm$ { j }$ ( ${ \"\" . join ( f \"i{j},\" for j in indices ). removesuffix ( \",\" ) }$ ) = & x$ { j }$ ( i$ { j }$ ) # : endfor # : for j in indices end do # : endfor #:enddef submodule ( stdlib_math ) stdlib_math_meshgrid use stdlib_error , only : error_stop contains # : for k1 , t1 in IR_KINDS_TYPES # : for rank in RANKS # : if rank == 1 # : set XY_INDICES = [ 1 ] # : set IJ_INDICES = [ 1 ] # : else # : set XY_INDICES = [ 2 , 1 ] + [ j for j in range ( 3 , rank + 1 )] # : set IJ_INDICES = [ 1 , 2 ] + [ j for j in range ( 3 , rank + 1 )] # : endif # : set RName = rname ( \"meshgrid\" , rank , t1 , k1 ) module procedure ${ RName }$ integer :: ${ \"\" . join ( f \"i{j},\" for j in range ( 1 , rank + 1 )). removesuffix ( \",\" ) }$ select case ( optval ( indexing , stdlib_meshgrid_xy )) case ( stdlib_meshgrid_xy ) $ : meshgrid_loop ( XY_INDICES ) case ( stdlib_meshgrid_ij ) $ : meshgrid_loop ( IJ_INDICES ) case default call error_stop ( \"ERROR (meshgrid): unexpected indexing.\" ) end select end procedure # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_math_meshgrid.fypp.html"},{"title":"stdlib_hashmaps.f90 – Fortran-lang/stdlib","text":"The module, STDLIB_HASH_MAPS, implements two hash maps:\nCHAINING_HASH_MAP_TYPE, a separate chaining hash map; and OPEN_HASH_MAP_TYPE,\nan open addressing hash map using linear addressing. The two hash maps are\nimplementations of the abstract type, HASH_MAP_TYPE. Source Code !! The module, STDLIB_HASH_MAPS, implements two hash maps: !! CHAINING_HASH_MAP_TYPE, a separate chaining hash map; and OPEN_HASH_MAP_TYPE, !! an open addressing hash map using linear addressing. The two hash maps are !! implementations of the abstract type, HASH_MAP_TYPE. module stdlib_hashmaps use , intrinsic :: iso_fortran_env , only : & character_storage_size , & error_unit use stdlib_kinds , only : & dp , & int8 , & int16 , & int32 , & int64 use stdlib_hashmap_wrappers , only : & copy_key , & copy_other , & fibonacci_hash , & fnv_1_hasher , & fnv_1a_hasher , & free_key , & free_other , & get , & hasher_fun , & operator ( == ), & seeded_nmhash32_hasher , & seeded_nmhash32x_hasher , & seeded_water_hasher , & set , & key_type , & other_type , & int_hash implicit none private !! Public data_types public :: & chaining_hashmap_type , & hashmap_type , & open_hashmap_type !! Values that parameterize David Chase's empirical SLOT expansion code integer , parameter :: & inmap_probe_factor = 10 , & map_probe_factor = 5 !! Values that parameterize the SLOTS table size integer , parameter , public :: & default_bits = 6 , & max_bits = 30 !! KIND values used to parameterixe the hash map and its procedures integer , parameter , public :: & int_calls = int64 , & int_depth = int64 , & int_index = int32 , & int_probes = int64 !! Error codes returned by the hash map procedures integer , parameter , public :: & success = 0 , & alloc_fault = 1 , & array_size_error = 2 ! The number of bits used by various types integer , parameter :: & ! Should be 8 int8_bits = bit_size ( 0_int8 ), & char_bits = character_storage_size !! The hash map load factor real , parameter , public :: & load_factor = 0.5625 !! The size of the pools of allocated map entries integer ( int32 ), parameter :: pool_size = 64 character ( * ), parameter , private :: module_name = 'STDLIB_HASHMAPS' type , abstract :: hashmap_type !! Version: Experimental !! !! Type implementing an abstract hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-hashmap_type-abstract-type)) private integer ( int_calls ) :: call_count = 0 !! Number of calls integer ( int_calls ) :: probe_count = 0 !! Number of probes since last expansion integer ( int_calls ) :: total_probes = 0 !! Cumulative number of probes integer ( int_index ) :: num_entries = 0 !! Number of entries integer ( int_index ) :: num_free = 0 !! Number of elements in the free_list integer ( int32 ) :: nbits = default_bits !! Number of bits used to address the slots procedure ( hasher_fun ), pointer , nopass :: hasher => fnv_1_hasher !! Hash function contains procedure , non_overridable , pass ( map ) :: calls procedure , non_overridable , pass ( map ) :: entries procedure , non_overridable , pass ( map ) :: map_probes procedure , non_overridable , pass ( map ) :: num_slots procedure , non_overridable , pass ( map ) :: slots_bits procedure ( get_all_keys ), deferred , pass ( map ) :: get_all_keys procedure ( init_map ), deferred , pass ( map ) :: init procedure ( loading ), deferred , pass ( map ) :: loading procedure ( rehash_map ), deferred , pass ( map ) :: rehash procedure ( total_depth ), deferred , pass ( map ) :: total_depth !! Key_test procedures. procedure ( key_key_test ), deferred , pass ( map ) :: key_key_test procedure , non_overridable , pass ( map ) :: int8_key_test procedure , non_overridable , pass ( map ) :: int32_key_test procedure , non_overridable , pass ( map ) :: char_key_test generic , public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test ! Map_entry procedures procedure ( key_map_entry ), deferred , pass ( map ) :: key_map_entry procedure , non_overridable , pass ( map ) :: int8_map_entry procedure , non_overridable , pass ( map ) :: int32_map_entry procedure , non_overridable , pass ( map ) :: char_map_entry generic , public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry ! Get_other_data procedures procedure ( key_get_other_data ), deferred , pass ( map ) :: key_get_other_data procedure , non_overridable , pass ( map ) :: int8_get_other_data procedure , non_overridable , pass ( map ) :: int32_get_other_data procedure , non_overridable , pass ( map ) :: char_get_other_data generic , public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data ! Key_remove_entry procedures procedure ( key_remove_entry ), deferred , pass ( map ) :: key_remove_entry procedure , non_overridable , pass ( map ) :: int8_remove_entry procedure , non_overridable , pass ( map ) :: int32_remove_entry procedure , non_overridable , pass ( map ) :: char_remove_entry generic , public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry ! Set_other_data procedures procedure ( key_set_other_data ), deferred , pass ( map ) :: key_set_other_data procedure , non_overridable , pass ( map ) :: int8_set_other_data procedure , non_overridable , pass ( map ) :: int32_set_other_data procedure , non_overridable , pass ( map ) :: char_set_other_data generic , public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data end type hashmap_type abstract interface subroutine get_all_keys ( map , all_keys ) !! Version: Experimental !! !! Returns the all keys contained in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#get_all_keys-returns-all-the-keys-contained-in-a-map)) !! !! Arguments: !! map - a hash map !! all_keys - all the keys contained in a hash map ! import hashmap_type , key_type class ( hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) end subroutine get_all_keys subroutine key_get_other_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - a hash map !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! import hashmap_type , key_type , other_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists end subroutine key_get_other_data subroutine init_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a !! maximum of 2**MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots), !! map % inverse elements. All fields are initialized. !! Arguments: !! map - the hash maap to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the number of bits initially used to map to the slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits or max_bits is less than !! default_bits or greater than strict_max_bits !! real_value_error - load_factor is less than 0.375 or greater than !! 0.875 ! import hashmap_type , hasher_fun , int32 class ( hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status end subroutine init_map subroutine key_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) !! !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a flag indicating whether key is present in the map ! import hashmap_type , key_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present end subroutine key_key_test pure function loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#loading-returns-the-ratio-of-entries-to-slots)) !! !! Arguments: !! map - a hash map import hashmap_type class ( hashmap_type ), intent ( in ) :: map real :: loading end function loading subroutine key_map_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) !! import hashmap_type , key_type , other_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict end subroutine key_map_entry subroutine rehash_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! import hashmap_type , hasher_fun class ( hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher end subroutine rehash_map subroutine key_remove_entry ( map , key , existed ) ! Chase's delent !! Version: Experimental !! !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! import hashmap_type , key_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed end subroutine key_remove_entry subroutine key_set_other_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map !! ! import hashmap_type , key_type , other_type class ( hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists end subroutine key_set_other_data function total_depth ( map ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entriesyy from !! their slot index for a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#total_depth-returns-the-total-depth-of-the-hash-map-entries)) !! Arguments: !! map - a hash map import hashmap_type , int64 class ( hashmap_type ), intent ( in ) :: map integer ( int64 ) :: total_depth end function total_depth end interface !! API for the chaining_hashmap_type type :: chaining_map_entry_type ! Hash entry !! Version: Experimental !! !! Chaining hash map entry type !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type-derived-type)) private integer ( int_hash ) :: hash_val !! Full hash value type ( key_type ) :: key !! The entry's key type ( other_type ) :: other !! Other entry data integer ( int_index ) :: inmap !! Index into inverse table type ( chaining_map_entry_type ), pointer :: next => null () !! Next bucket end type chaining_map_entry_type type chaining_map_entry_ptr !! Version: Experimental !! !! Wrapper for a pointer to a chaining map entry type object !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_type_ptr-derived-type)) type ( chaining_map_entry_type ), pointer :: target => null () end type chaining_map_entry_ptr type :: chaining_map_entry_pool !! Version: Experimental !! !! Type implementing a pool of allocated `chaining_map_entry_type` !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_map_entry_pool-derived-type)) private ! Index of next bucket integer ( int_index ) :: next = 0 type ( chaining_map_entry_type ), allocatable :: more_map_entries (:) type ( chaining_map_entry_pool ), pointer :: lastpool => null () end type chaining_map_entry_pool type , extends ( hashmap_type ) :: chaining_hashmap_type !! Version: Experimental !! !! Type implementing the `chaining_hashmap_type` types !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-chaining_hashmap_type-derived-type)) private type ( chaining_map_entry_pool ), pointer :: cache => null () !! Pool of allocated chaining_map_entry_type objects type ( chaining_map_entry_type ), pointer :: free_list => null () !! free list of map entries type ( chaining_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) type ( chaining_map_entry_ptr ), allocatable :: slots (:) !! Array of bucket lists Note # slots=size(slots) contains procedure :: get_all_keys => get_all_chaining_keys procedure :: key_get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: loading => chaining_loading procedure :: key_map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map procedure :: key_remove_entry => remove_chaining_entry procedure :: key_set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth procedure :: key_key_test => chaining_key_test final :: free_chaining_map end type chaining_hashmap_type interface module subroutine free_chaining_map ( map ) !! Version: Experimental !! !! Frees internal memory of an chaining map !! Arguments: !! map - the chaining hash map whose memory is to be freed ! type ( chaining_hashmap_type ), intent ( inout ) :: map end subroutine free_chaining_map module subroutine get_all_chaining_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hashmap !! Arguments: !! map - an chaining hash map !! all_keys - all the keys contained in a hash map ! class ( chaining_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) end subroutine get_all_chaining_keys module subroutine get_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - a chaining hash table !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists end subroutine get_other_chaining_data module subroutine init_chaining_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited !! to a maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the chaining hash map to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the bits of two used to initialize the number of slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bits or !! greater than max_bits ! class ( chaining_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status end subroutine init_chaining_map module subroutine chaining_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY is present in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a logical flag indicating whether key is present in map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present end subroutine chaining_key_test pure module function chaining_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - a chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map real :: chaining_loading end function chaining_loading module subroutine map_chain_entry ( map , key , other , conflict ) ! ! Inserts an entry innto the hash map ! Arguments: !! map - the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict end subroutine map_chain_entry module subroutine rehash_chaining_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( chaining_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher end subroutine rehash_chaining_map module subroutine remove_chaining_entry ( map , key , existed ) !! Version: Experimental !! !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed end subroutine remove_chaining_entry module subroutine set_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists end subroutine set_other_chaining_data module function total_chaining_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map integer ( int_depth ) :: total_depth end function total_chaining_depth end interface !! API for the open_hashmap_type type :: open_map_entry_type !! Version: Experimental !! !! Open hash map entry type !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_type-derived-type)) private integer ( int_hash ) :: hash_val !! Full hash value type ( key_type ) :: key !! Hash entry key type ( other_type ) :: other !! Other entry data integer ( int_index ) :: inmap !! Index into inverse table end type open_map_entry_type type :: open_map_entry_list !! Version: Experimental !! !! Open hash map entry type private type ( open_map_entry_type ), pointer :: target => null () type ( open_map_entry_list ), pointer :: next => null () end type open_map_entry_list type open_map_entry_ptr !! Version: Experimental !! !! Wrapper for a pointer to an open hash map entry type object !! ([Specifications](../page/specs/stdlib_hashmaps.html#the-open_map_entry_ptr-derived-type)) type ( open_map_entry_type ), pointer :: target => null () end type open_map_entry_ptr type :: open_map_entry_pool !! Version: Experimental !! !! Type implementing a pool of allocated `open_map_entry_type` private integer ( int_index ) :: next = 0 !! Index of next bucket type ( open_map_entry_type ), allocatable :: more_map_entries (:) type ( open_map_entry_pool ), pointer :: lastpool => null () end type open_map_entry_pool type , extends ( hashmap_type ) :: open_hashmap_type !! Version: Experimental !! !! Type implementing an \"open\" hash map private integer ( int_index ) :: index_mask = 2_int_index ** default_bits - 1 !! Mask used in linear addressing type ( open_map_entry_pool ), pointer :: cache => null () !! Pool of allocated open_map_entry_type objects type ( open_map_entry_list ), pointer :: free_list => null () !! free list of map entries type ( open_map_entry_ptr ), allocatable :: inverse (:) !! Array of bucket lists (inverses) Note max_elts=size(inverse) integer ( int_index ), allocatable :: slots (:) !! Array of indices to the inverse Note # slots=size(slots) contains procedure :: get_all_keys => get_all_open_keys procedure :: key_get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: loading => open_loading procedure :: key_map_entry => map_open_entry procedure :: rehash => rehash_open_map procedure :: key_remove_entry => remove_open_entry procedure :: key_set_other_data => set_other_open_data procedure :: total_depth => total_open_depth procedure :: key_key_test => open_key_test final :: free_open_map end type open_hashmap_type interface module subroutine free_open_map ( map ) !! Version: Experimental !! !! Frees internal memory of an open map !! Arguments: !! map - the open hash map whose memory is to be freed ! type ( open_hashmap_type ), intent ( inout ) :: map end subroutine free_open_map module subroutine get_all_open_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hashmap !! Arguments: !! map - an open hash map !! all_keys - all the keys contained in a hash map ! class ( open_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) end subroutine get_all_open_keys module subroutine get_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - an open hash table !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists end subroutine get_other_open_data module subroutine init_open_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a !! maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the open hash maap to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the number of bits used to map to the slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bitd or !! greater than max_bits class ( open_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status end subroutine init_open_map module subroutine open_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a logical flag indicating whether KEY exists in the hash map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present end subroutine open_key_test pure module function open_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map real :: open_loading end function open_loading module subroutine map_open_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! Arguments: !! map - the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict end subroutine map_open_entry module subroutine rehash_open_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( open_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher end subroutine rehash_open_map module subroutine remove_open_entry ( map , key , existed ) !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed end subroutine remove_open_entry module subroutine set_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists end subroutine set_other_open_data module function total_open_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map integer ( int64 ) :: total_depth end function total_open_depth end interface contains subroutine int8_get_other_data ( map , value , other , exists ) !! Version: Experimental !! !! Int8 key generic interface for get_other_data function class ( hashmap_type ), intent ( inout ) :: map integer ( int8 ), intent ( in ) :: value (:) type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists type ( key_type ) :: key call set ( key , value ) call map % key_get_other_data ( key , other , exists ) end subroutine int8_get_other_data subroutine int32_get_other_data ( map , value , other , exists ) !! Version: Experimental !! !! Int32 key generic interface for get_other_data function class ( hashmap_type ), intent ( inout ) :: map integer ( int32 ), intent ( in ) :: value (:) type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists type ( key_type ) :: key call set ( key , value ) call map % key_get_other_data ( key , other , exists ) end subroutine int32_get_other_data subroutine char_get_other_data ( map , value , other , exists ) !! Version: Experimental !! !! Character key generic interface for get_other_data function class ( hashmap_type ), intent ( inout ) :: map character ( * ), intent ( in ) :: value type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists type ( key_type ) :: key call set ( key , value ) call map % key_get_other_data ( key , other , exists ) end subroutine char_get_other_data subroutine int8_remove_entry ( map , value , existed ) ! Chase's delent !! Version: Experimental !! !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! value - the int8 array key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( hashmap_type ), intent ( inout ) :: map integer ( int8 ), intent ( in ) :: value (:) logical , intent ( out ), optional :: existed type ( key_type ) :: key call set ( key , value ) call map % key_remove_entry ( key , existed ) end subroutine int8_remove_entry subroutine int32_remove_entry ( map , value , existed ) ! Chase's delent !! Version: Experimental !! !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( hashmap_type ), intent ( inout ) :: map integer ( int32 ), intent ( in ) :: value (:) logical , intent ( out ), optional :: existed type ( key_type ) :: key call set ( key , value ) call map % key_remove_entry ( key , existed ) end subroutine int32_remove_entry subroutine char_remove_entry ( map , value , existed ) ! Chase's delent !! Version: Experimental !! !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( hashmap_type ), intent ( inout ) :: map character ( * ), intent ( in ) :: value logical , intent ( out ), optional :: existed type ( key_type ) :: key call set ( key , value ) call map % key_remove_entry ( key , existed ) end subroutine char_remove_entry subroutine int8_map_entry ( map , value , other , conflict ) !! Version: Experimental !! Int8 generic interface for map entry !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) !! class ( hashmap_type ), intent ( inout ) :: map integer ( int8 ), intent ( in ) :: value (:) type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict type ( key_type ) :: key call set ( key , value ) call map % key_map_entry ( key , other , conflict ) end subroutine int8_map_entry subroutine int32_map_entry ( map , value , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) !! class ( hashmap_type ), intent ( inout ) :: map integer ( int32 ), intent ( in ) :: value (:) type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict type ( key_type ) :: key call set ( key , value ) call map % key_map_entry ( key , other , conflict ) end subroutine int32_map_entry subroutine char_map_entry ( map , value , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_entry-inserts-an-entry-into-the-hash-map)) !! class ( hashmap_type ), intent ( inout ) :: map character ( len =* ), intent ( in ) :: value type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict type ( key_type ) :: key call set ( key , value ) call map % key_map_entry ( key , other , conflict ) end subroutine char_map_entry subroutine int8_key_test ( map , value , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) !! !! Arguments: !! map - the hash map of interest !! value - int8 array that is the key to lookup. !! present - a flag indicating whether key is present in the map ! class ( hashmap_type ), intent ( inout ) :: map integer ( int8 ), intent ( in ) :: value (:) logical , intent ( out ) :: present type ( key_type ) :: key ! Generate key from int8 array. call set ( key , value ) ! Call key test procedure. call map % key_key_test ( key , present ) end subroutine int8_key_test subroutine int32_key_test ( map , value , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) !! !! Arguments: !! map - the hash map of interest !! value - int32 array that is the key to lookup. !! present - a flag indicating whether key is present in the map ! class ( hashmap_type ), intent ( inout ) :: map integer ( int32 ), intent ( in ) :: value (:) logical , intent ( out ) :: present type ( key_type ) :: key call set ( key , value ) call map % key_key_test ( key , present ) end subroutine int32_key_test subroutine char_key_test ( map , value , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#key_test-indicates-whether-key-is-present)) !! !! Arguments: !! map - the hash map of interest !! value - char array that is the key to lookup. !! present - a flag indicating whether key is present in the map ! class ( hashmap_type ), intent ( inout ) :: map character ( * ), intent ( in ) :: value logical , intent ( out ) :: present type ( key_type ) :: key call set ( key , value ) call map % key_key_test ( key , present ) end subroutine char_key_test subroutine int8_set_other_data ( map , value , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! value - the int8 array key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map !! ! class ( hashmap_type ), intent ( inout ) :: map integer ( int8 ), intent ( in ) :: value (:) type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists type ( key_type ) :: key call set ( key , value ) call map % key_set_other_data ( key , other , exists ) end subroutine int8_set_other_data subroutine int32_set_other_data ( map , value , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! value - the int32 array key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map !! ! class ( hashmap_type ), intent ( inout ) :: map integer ( int32 ), intent ( in ) :: value (:) type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists type ( key_type ) :: key call set ( key , value ) call map % key_set_other_data ( key , other , exists ) end subroutine int32_set_other_data subroutine char_set_other_data ( map , value , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! value - the char value key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map !! ! class ( hashmap_type ), intent ( inout ) :: map character ( * ), intent ( in ) :: value type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists type ( key_type ) :: key call set ( key , value ) call map % key_set_other_data ( key , other , exists ) end subroutine char_set_other_data pure function calls ( map ) !! Version: Experimental !! !! Returns the number of subroutine calls on an open hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#calls-returns-the-number-of-calls-on-the-hash-map)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_calls ) :: calls calls = map % call_count end function calls pure function entries ( map ) !! Version: Experimental !! !! Returns the number of entries in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#entries-returns-the-number-of-entries-in-the-hash-map)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_index ) :: entries entries = map % num_entries end function entries pure function map_probes ( map ) !! Version: Experimental !! !! Returns the total number of table probes on a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#map_probes-returns-the-number-of-hash-map-probes)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_calls ) :: map_probes map_probes = map % total_probes + map % probe_count end function map_probes pure function num_slots ( map ) !! Version: Experimental !! !! Returns the number of allocated slots in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#num_slots-returns-the-number-of-hash-map-slots)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer ( int_index ) :: num_slots num_slots = 2 ** map % nbits end function num_slots pure function slots_bits ( map ) !! Version: Experimental !! !! Returns the number of bits used to specify the number of allocated !! slots in a hash map !! ([Specifications](../page/specs/stdlib_hashmaps.html#slots_bits-returns-the-number-of-bits-used-to-address-the-hash-map-slots)) !! !! Arguments: !! map - an open hash map class ( hashmap_type ), intent ( in ) :: map integer :: slots_bits slots_bits = map % nbits end function slots_bits end module stdlib_hashmaps","tags":"","loc":"sourcefile/stdlib_hashmaps.f90.html"},{"title":"stdlib_math_arange.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_math ) stdlib_math_arange contains # : for k1 , t1 in REAL_KINDS_TYPES !> `arange` creates a vector of the `${t1}$` type !> with evenly spaced values within a given interval. pure module function arange_$ { t1 [ 0 ] }$_${ k1 }$ ( start , end , step ) result ( result ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ), optional :: end , step ${ t1 }$ , allocatable :: result (:) ${ t1 }$ :: start_ , end_ , step_ integer :: i start_ = merge ( start , 1.0 _${ k1 }$ , present ( end )) end_ = optval ( end , start ) step_ = optval ( step , 1.0 _${ k1 }$ ) step_ = sign ( merge ( step_ , 1.0 _${ k1 }$ , step_ /= 0.0 _${ k1 }$ ), end_ - start_ ) allocate ( result ( floor (( end_ - start_ ) / step_ ) + 1 )) result = [( start_ + ( i - 1 ) * step_ , i = 1 , size ( result ), 1 )] end function arange_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES !> `arange` creates a vector of the `${t1}$` type !> with evenly spaced values within a given interval. pure module function arange_$ { t1 [ 0 ] }$_${ k1 }$ ( start , end , step ) result ( result ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ), optional :: end , step ${ t1 }$ , allocatable :: result (:) ${ t1 }$ :: start_ , end_ , step_ ${ t1 }$ :: i start_ = merge ( start , 1 _${ k1 }$ , present ( end )) end_ = optval ( end , start ) step_ = optval ( step , 1 _${ k1 }$ ) step_ = sign ( merge ( step_ , 1 _${ k1 }$ , step_ /= 0 _${ k1 }$ ), end_ - start_ ) allocate ( result (( end_ - start_ ) / step_ + 1 _${ k1 }$ )) result = [( i , i = start_ , end_ , step_ )] end function arange_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end submodule stdlib_math_arange","tags":"","loc":"sourcefile/stdlib_math_arange.fypp.html"},{"title":"stdlib_string_type.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" !> Implementation of a string type to hold an arbitrary sequence of characters. !> !> This module provides string type compatible with all Fortran instrinsic character !> procedures as well as overloaded operators for working with character variables. !> !> A string type can be easily constructed by creating a new instance from a !> character variable or literal by invoking its constructor or by assigning it !> to a string type. Generally, the string type behaves similar to a deferred !> length character in most regards but adds memory access safety. !> !> The specification of this module is available [here](../page/specs/stdlib_string_type.html). module stdlib_string_type use stdlib_ascii , only : to_lower_ => to_lower , to_upper_ => to_upper , & & to_title_ => to_title , to_sentence_ => to_sentence , reverse_ => reverse use stdlib_kinds , only : int8 , int16 , int32 , int64 , lk , c_bool use stdlib_optval , only : optval implicit none private public :: string_type public :: len , len_trim , trim , index , scan , verify , repeat , adjustr , adjustl public :: lgt , lge , llt , lle , char , ichar , iachar public :: to_lower , to_upper , to_title , to_sentence , reverse , move public :: assignment ( = ) public :: operator ( > ), operator ( >= ), operator ( < ), operator ( <= ) public :: operator ( == ), operator ( /= ), operator ( // ) public :: write ( formatted ), write ( unformatted ) public :: read ( formatted ), read ( unformatted ) integer , parameter :: long = selected_int_kind ( 18 ) !> String type holding an arbitrary sequence of characters. type :: string_type ! Use the sequence statement below as a hack to prevent extending this type. ! It is not used for storage association. sequence private character ( len = :), allocatable :: raw end type string_type !> Returns the length of the character sequence represented by the string. !> !> This method is elemental and returns a default integer scalar value. interface len module procedure :: len_string end interface len !> Constructor for new string instances interface string_type elemental module function new_string ( string ) result ( new ) character ( len =* ), intent ( in ), optional :: string type ( string_type ) :: new end function new_string # : for kind in INT_KINDS elemental module function new_string_from_integer_$ { kind }$ ( val ) result ( new ) integer ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new end function new_string_from_integer_$ { kind }$ # : endfor # : for kind in LOG_KINDS elemental module function new_string_from_logical_$ { kind }$ ( val ) result ( new ) logical ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new end function new_string_from_logical_$ { kind }$ # : endfor end interface string_type !> Returns the length of the character sequence without trailing spaces !> represented by the string. !> !> This method is elemental and returns a default integer scalar value. interface len_trim module procedure :: len_trim_string end interface len_trim !> Returns the character sequence hold by the string without trailing spaces. !> !> This method is elemental and returns a scalar character value. interface trim module procedure :: trim_string end interface trim !> Left-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. !> !> This method is elemental and returns a scalar character value. interface adjustl module procedure :: adjustl_string end interface adjustl !> Right-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. !> !> This method is elemental and returns a scalar character value. interface adjustr module procedure :: adjustr_string end interface adjustr !> Repeats the character sequence hold by the string by the number of !> specified copies. !> !> This method is elemental and returns a scalar character value. interface repeat module procedure :: repeat_string end interface repeat !> Returns the lowercase version of the character sequence hold by the input string !> !> This method is Elemental and returns a new string_type instance which holds this !> lowercase character sequence interface to_lower module procedure :: to_lower_string end interface to_lower !> Returns the uppercase version of the character sequence hold by the input string !> !> This method is Elemental and returns a new string_type instance which holds this !> uppercase character sequence interface to_upper module procedure :: to_upper_string end interface to_upper !> Returns the titlecase version of the character sequence hold by the input string !> !> This method is Elemental and returns a new string_type instance which holds this !> titlecase character sequence interface to_title module procedure :: to_title_string end interface to_title !> Returns the sentencecase version of the character sequence hold by the input string !> !> This method is elemental and returns a new string_type instance which holds this !> sentencecase character sequence interface to_sentence module procedure :: to_sentence_string end interface to_sentence !> Reverses the character sequence hold by the input string !> !> This method is elemental and returns a new string_type instance which holds this !> reverse character sequence interface reverse module procedure :: reverse_string end interface reverse !> Return the character sequence represented by the string. !> !> This method is elemental and returns a scalar character value. interface char module procedure :: char_string module procedure :: char_string_pos module procedure :: char_string_range end interface char !> Character-to-integer conversion function. !> !> This method is elemental and returns a default integer scalar value. interface ichar module procedure :: ichar_string end interface ichar !> Code in ASCII collating sequence. !> !> This method is elemental and returns a default integer scalar value. interface iachar module procedure :: iachar_string end interface iachar !> Position of a *substring* within a *string*. !> !> Returns the position of the start of the leftmost or rightmost occurrence !> of string *substring* in *string*, counting from one. If *substring* is not !> present in *string*, zero is returned. !> !> This method is elemental and returns a default integer scalar value. interface index module procedure :: index_string_string module procedure :: index_string_char module procedure :: index_char_string end interface index !> Scan a *string* for the presence of a *set* of characters. Scans a *string* for !> any of the characters in a *set* of characters. !> !> If *back* is either absent or *false*, this function returns the position !> of the leftmost character of *string* that is in *set*. If *back* is *true*, !> the rightmost position is returned. If no character of *set* is found in !> *string*, the result is zero. !> !> This method is elemental and returns a default integer scalar value. interface scan module procedure :: scan_string_string module procedure :: scan_string_char module procedure :: scan_char_string end interface scan !> 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. !> !> If *back* is either absent or *false*, this function returns the position !> of the leftmost character of *string* that is not in *set*. If *back* is *true*, !> the rightmost position is returned. If all characters of *string* are found !> in *set*, the result is zero. !> !> This method is elemental and returns a default integer scalar value. interface verify module procedure :: verify_string_string module procedure :: verify_string_char module procedure :: verify_char_string end interface verify !> Version: experimental !> !> Moves the allocated character scalar from 'from' to 'to' !> [Specifications](../page/specs/stdlib_string_type.html#move) interface move module procedure :: move_string_string module procedure :: move_string_char module procedure :: move_char_string module procedure :: move_char_char end interface move !> 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. !> !> This method is elemental and returns a default logical scalar value. interface lgt module procedure :: lgt_string_string module procedure :: lgt_string_char module procedure :: lgt_char_string end interface lgt !> 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. !> !> This method is elemental and returns a default logical scalar value. interface llt module procedure :: llt_string_string module procedure :: llt_string_char module procedure :: llt_char_string end interface llt !> 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. !> !> This method is elemental and returns a default logical scalar value. interface lge module procedure :: lge_string_string module procedure :: lge_string_char module procedure :: lge_char_string end interface lge !> 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. !> !> This method is elemental and returns a default logical scalar value. interface lle module procedure :: lle_string_string module procedure :: lle_string_char module procedure :: lle_char_string end interface lle !> Assign a character sequence to a string. interface assignment ( = ) module procedure :: assign_string_char end interface assignment ( = ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( > ) module procedure :: gt_string_string module procedure :: gt_string_char module procedure :: gt_char_string end interface operator ( > ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( < ) module procedure :: lt_string_string module procedure :: lt_string_char module procedure :: lt_char_string end interface operator ( < ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( >= ) module procedure :: ge_string_string module procedure :: ge_string_char module procedure :: ge_char_string end interface operator ( >= ) !> 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. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( <= ) module procedure :: le_string_string module procedure :: le_string_char module procedure :: le_char_string end interface operator ( <= ) !> Compare two character sequences for equality, the left-hand side, !> the right-hand side or both character sequences can be represented by !> a string. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( == ) module procedure :: eq_string_string module procedure :: eq_string_char module procedure :: eq_char_string end interface operator ( == ) !> Compare two character sequences for inequality, the left-hand side, !> the right-hand side or both character sequences can be represented by !> a string. !> !> This operator is elemental and returns a default logical scalar value. interface operator ( /= ) module procedure :: ne_string_string module procedure :: ne_string_char module procedure :: ne_char_string end interface operator ( /= ) !> Concatenate two character sequences, the left-hand side, the right-hand side !> or both character sequences can be represented by a string. !> !> This operator is elemental and returns a scalar character value. interface operator ( // ) module procedure :: concat_string_string module procedure :: concat_string_char module procedure :: concat_char_string end interface operator ( // ) !> Write the character sequence hold by the string to a connected formatted !> unit. interface write ( formatted ) module procedure :: write_formatted end interface !> Write the character sequence hold by the string to a connected unformatted !> unit. interface write ( unformatted ) module procedure :: write_unformatted end interface !> Read a character sequence from a connected unformatted unit into the string. interface read ( formatted ) module procedure :: read_formatted end interface !> Read a character sequence from a connected unformatted unit into the string. interface read ( unformatted ) module procedure :: read_unformatted end interface contains !> Assign a character sequence to a string. elemental subroutine assign_string_char ( lhs , rhs ) type ( string_type ), intent ( inout ) :: lhs character ( len =* ), intent ( in ) :: rhs lhs % raw = rhs end subroutine assign_string_char !> Returns the length of the character sequence represented by the string. elemental function len_string ( string ) result ( length ) type ( string_type ), intent ( in ) :: string integer :: length if ( allocated ( string % raw )) then length = len ( string % raw ) else length = 0 end if end function len_string !> Returns the length of the character sequence without trailing spaces !> represented by the string. elemental function len_trim_string ( string ) result ( length ) type ( string_type ), intent ( in ) :: string integer :: length length = merge ( len_trim ( string % raw ), 0 , allocated ( string % raw )) end function len_trim_string !> Character-to-integer conversion function. elemental function ichar_string ( string ) result ( ich ) type ( string_type ), intent ( in ) :: string integer :: ich if ( allocated ( string % raw ) . and . len ( string ) > 0 ) then ich = ichar ( string % raw ( 1 : 1 )) else ich = 0 end if end function ichar_string !> Code in ASCII collating sequence. elemental function iachar_string ( string ) result ( ich ) type ( string_type ), intent ( in ) :: string integer :: ich if ( allocated ( string % raw ) . and . len ( string ) > 0 ) then ich = iachar ( string % raw ( 1 : 1 )) else ich = 0 end if end function iachar_string !> Return the character sequence represented by the string. pure function char_string ( string ) result ( character_string ) type ( string_type ), intent ( in ) :: string character ( len = len ( string )) :: character_string character_string = maybe ( string ) end function char_string !> Return the character sequence represented by the string. elemental function char_string_pos ( string , pos ) result ( character_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: pos character ( len = 1 ) :: character_string character_string = merge ( string % raw ( pos : pos ), ' ' , allocated ( string % raw )) end function char_string_pos !> Return the character sequence represented by the string. pure function char_string_range ( string , start , last ) result ( character_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: start integer , intent ( in ) :: last character ( len = last - start + 1 ) :: character_string character_string = merge ( string % raw ( int ( start , long ): int ( last , long )), & repeat ( ' ' , int ( len ( character_string ), long )), allocated ( string % raw )) end function char_string_range !> Returns the character sequence hold by the string without trailing spaces. elemental function trim_string ( string ) result ( trimmed_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: trimmed_string trimmed_string = trim ( maybe ( string )) end function trim_string !> Left-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. elemental function adjustl_string ( string ) result ( adjusted_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: adjusted_string adjusted_string = adjustl ( maybe ( string )) end function adjustl_string !> Right-adjust the character sequence represented by the string. !> The length of the character sequence remains unchanged. elemental function adjustr_string ( string ) result ( adjusted_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: adjusted_string adjusted_string = adjustr ( maybe ( string )) end function adjustr_string !> Repeats the character sequence hold by the string by the number of !> specified copies. elemental function repeat_string ( string , ncopies ) result ( repeated_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: ncopies type ( string_type ) :: repeated_string repeated_string = repeat ( maybe ( string ), ncopies ) end function repeat_string !> Convert the character sequence hold by the input string to lower case elemental function to_lower_string ( string ) result ( lowercase_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: lowercase_string lowercase_string % raw = to_lower_ ( maybe ( string )) end function to_lower_string !> Convert the character sequence hold by the input string to upper case elemental function to_upper_string ( string ) result ( uppercase_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: uppercase_string uppercase_string % raw = to_upper_ ( maybe ( string )) end function to_upper_string !> Convert the character sequence hold by the input string to title case elemental function to_title_string ( string ) result ( titlecase_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: titlecase_string titlecase_string % raw = to_title_ ( maybe ( string )) end function to_title_string !> Convert the character sequence hold by the input string to sentence case elemental function to_sentence_string ( string ) result ( sentence_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: sentence_string sentence_string % raw = to_sentence_ ( maybe ( string )) end function to_sentence_string !> Reverse the character sequence hold by the input string elemental function reverse_string ( string ) result ( reversed_string ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: reversed_string reversed_string % raw = reverse_ ( maybe ( string )) end function reverse_string !> Position of a sequence of character within a character sequence. !> In this version both character sequences are represented by a string. elemental function index_string_string ( string , substring , back ) result ( pos ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical , intent ( in ), optional :: back integer :: pos pos = index ( maybe ( string ), maybe ( substring ), optval ( back , . false .)) end function index_string_string !> Position of a sequence of character within a character sequence. !> In this version the main character sequence is represented by a string. elemental function index_string_char ( string , substring , back ) result ( pos ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical , intent ( in ), optional :: back integer :: pos pos = index ( maybe ( string ), substring , optval ( back , . false .)) end function index_string_char !> Position of a sequence of character within a character sequence. !> In this version the sub character sequence is represented by a string. elemental function index_char_string ( string , substring , back ) result ( pos ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical , intent ( in ), optional :: back integer :: pos pos = index ( string , maybe ( substring ), optval ( back , . false .)) end function index_char_string !> 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. elemental function scan_string_string ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = scan ( maybe ( string ), maybe ( set ), optval ( back , . false .)) end function scan_string_string !> 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. elemental function scan_string_char ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = scan ( maybe ( string ), set , optval ( back , . false .)) end function scan_string_char !> 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. elemental function scan_char_string ( string , set , back ) result ( pos ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = scan ( string , maybe ( set ), optval ( back , . false .)) end function scan_char_string !> 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. elemental function verify_string_string ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = verify ( maybe ( string ), maybe ( set ), optval ( back , . false .)) end function verify_string_string !> 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. elemental function verify_string_char ( string , set , back ) result ( pos ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = verify ( maybe ( string ), set , optval ( back , . false .)) end function verify_string_char !> 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. elemental function verify_char_string ( string , set , back ) result ( pos ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: set logical , intent ( in ), optional :: back integer :: pos pos = verify ( string , maybe ( set ), optval ( back , . false .)) end function verify_char_string !> Moves the allocated character scalar from 'from' to 'to' !> No output elemental subroutine move_string_string ( from , to ) type ( string_type ), intent ( inout ), target :: from type ( string_type ), intent ( inout ), target :: to type ( string_type ), pointer :: fromp fromp => from if ( associated ( fromp , to )) return call move_alloc ( from % raw , to % raw ) end subroutine move_string_string !> Moves the allocated character scalar from 'from' to 'to' !> No output pure subroutine move_string_char ( from , to ) type ( string_type ), intent ( inout ) :: from character ( len = :), intent ( out ), allocatable :: to call move_alloc ( from % raw , to ) end subroutine move_string_char !> Moves the allocated character scalar from 'from' to 'to' !> No output pure subroutine move_char_string ( from , to ) character ( len = :), intent ( inout ), allocatable :: from type ( string_type ), intent ( out ) :: to call move_alloc ( from , to % raw ) end subroutine move_char_string !> Moves the allocated character scalar from 'from' to 'to' !> No output pure subroutine move_char_char ( from , to ) character ( len = :), intent ( inout ), allocatable :: from character ( len = :), intent ( out ), allocatable :: to call move_alloc ( from , to ) end subroutine move_char_char !> Compare two character sequences for being greater. !> In this version both character sequences are by a string. elemental function gt_string_string ( lhs , rhs ) result ( is_gt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_gt is_gt = maybe ( lhs ) > maybe ( rhs ) end function gt_string_string !> Compare two character sequences for being greater. !> In this version the left-hand side character sequences is by a string. elemental function gt_string_char ( lhs , rhs ) result ( is_gt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_gt is_gt = maybe ( lhs ) > rhs end function gt_string_char !> Compare two character sequences for being greater. !> In this version the right-hand side character sequences is by a string. elemental function gt_char_string ( lhs , rhs ) result ( is_gt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_gt is_gt = lhs > maybe ( rhs ) end function gt_char_string !> Compare two character sequences for being less. !> In this version both character sequences are by a string. elemental function lt_string_string ( lhs , rhs ) result ( is_lt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lt is_lt = rhs > lhs end function lt_string_string !> Compare two character sequences for being less. !> In this version the left-hand side character sequences is by a string. elemental function lt_string_char ( lhs , rhs ) result ( is_lt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lt is_lt = rhs > lhs end function lt_string_char !> Compare two character sequences for being less. !> In this version the right-hand side character sequences is by a string. elemental function lt_char_string ( lhs , rhs ) result ( is_lt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lt is_lt = rhs > lhs end function lt_char_string !> Compare two character sequences for being greater or equal. !> In this version both character sequences are by a string. elemental function ge_string_string ( lhs , rhs ) result ( is_ge ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ge is_ge = . not . ( rhs > lhs ) end function ge_string_string !> Compare two character sequences for being greater or equal. !> In this version the left-hand side character sequences is by a string. elemental function ge_string_char ( lhs , rhs ) result ( is_ge ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_ge is_ge = . not . ( rhs > lhs ) end function ge_string_char !> Compare two character sequences for being greater or equal !> In this version the right-hand side character sequences is by a string. elemental function ge_char_string ( lhs , rhs ) result ( is_ge ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ge is_ge = . not . ( rhs > lhs ) end function ge_char_string !> Compare two character sequences for being less or equal. !> In this version both character sequences are by a string. elemental function le_string_string ( lhs , rhs ) result ( is_le ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_le is_le = . not . ( lhs > rhs ) end function le_string_string !> Compare two character sequences for being less or equal. !> In this version the left-hand side character sequences is by a string. elemental function le_string_char ( lhs , rhs ) result ( is_le ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_le is_le = . not . ( lhs > rhs ) end function le_string_char !> Compare two character sequences for being less or equal !> In this version the right-hand side character sequences is by a string. elemental function le_char_string ( lhs , rhs ) result ( is_le ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_le is_le = . not . ( lhs > rhs ) end function le_char_string !> Compare two character sequences for equality. !> In this version both character sequences are by a string. elemental function eq_string_string ( lhs , rhs ) result ( is_eq ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_eq is_eq = . not .( lhs > rhs ) if ( is_eq ) then is_eq = . not .( rhs > lhs ) end if end function eq_string_string !> Compare two character sequences for equality. !> In this version the left-hand side character sequences is by a string. elemental function eq_string_char ( lhs , rhs ) result ( is_eq ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_eq is_eq = . not .( lhs > rhs ) if ( is_eq ) then is_eq = . not .( rhs > lhs ) end if end function eq_string_char !> Compare two character sequences for equality. !> In this version the right-hand side character sequences is by a string. elemental function eq_char_string ( lhs , rhs ) result ( is_eq ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_eq is_eq = . not .( lhs > rhs ) if ( is_eq ) then is_eq = . not .( rhs > lhs ) end if end function eq_char_string !> Compare two character sequences for inequality. !> In this version both character sequences are by a string. elemental function ne_string_string ( lhs , rhs ) result ( is_ne ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ne is_ne = lhs > rhs if (. not . is_ne ) then is_ne = rhs > lhs end if end function ne_string_string !> Compare two character sequences for inequality. !> In this version the left-hand side character sequences is by a string. elemental function ne_string_char ( lhs , rhs ) result ( is_ne ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_ne is_ne = lhs > rhs if (. not . is_ne ) then is_ne = rhs > lhs end if end function ne_string_char !> Compare two character sequences for inequality. !> In this version the right-hand side character sequences is by a string. elemental function ne_char_string ( lhs , rhs ) result ( is_ne ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_ne is_ne = lhs > rhs if (. not . is_ne ) then is_ne = rhs > lhs end if end function ne_char_string !> Lexically compare two character sequences for being greater. !> In this version both character sequences are by a string. elemental function lgt_string_string ( lhs , rhs ) result ( is_lgt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lgt is_lgt = lgt ( maybe ( lhs ), maybe ( rhs )) end function lgt_string_string !> Lexically compare two character sequences for being greater. !> In this version the left-hand side character sequences is by a string. elemental function lgt_string_char ( lhs , rhs ) result ( is_lgt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lgt is_lgt = lgt ( maybe ( lhs ), rhs ) end function lgt_string_char !> Lexically compare two character sequences for being greater. !> In this version the right-hand side character sequences is by a string. elemental function lgt_char_string ( lhs , rhs ) result ( is_lgt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lgt is_lgt = lgt ( lhs , maybe ( rhs )) end function lgt_char_string !> Lexically compare two character sequences for being less. !> In this version both character sequences are by a string. elemental function llt_string_string ( lhs , rhs ) result ( is_llt ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_llt is_llt = llt ( maybe ( lhs ), maybe ( rhs )) end function llt_string_string !> Lexically compare two character sequences for being less. !> In this version the left-hand side character sequences is by a string. elemental function llt_string_char ( lhs , rhs ) result ( is_llt ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_llt is_llt = llt ( maybe ( lhs ), rhs ) end function llt_string_char !> Lexically compare two character sequences for being less. !> In this version the right-hand side character sequences is by a string. elemental function llt_char_string ( lhs , rhs ) result ( is_llt ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_llt is_llt = llt ( lhs , maybe ( rhs )) end function llt_char_string !> Lexically compare two character sequences for being greater or equal. !> In this version both character sequences are by a string. elemental function lge_string_string ( lhs , rhs ) result ( is_lge ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lge is_lge = lge ( maybe ( lhs ), maybe ( rhs )) end function lge_string_string !> Lexically compare two character sequences for being greater or equal. !> In this version the left-hand side character sequences is by a string. elemental function lge_string_char ( lhs , rhs ) result ( is_lge ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lge is_lge = lge ( maybe ( lhs ), rhs ) end function lge_string_char !> Lexically compare two character sequences for being greater or equal !> In this version the right-hand side character sequences is by a string. elemental function lge_char_string ( lhs , rhs ) result ( is_lge ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lge is_lge = lge ( lhs , maybe ( rhs )) end function lge_char_string !> Lexically compare two character sequences for being less or equal. !> In this version both character sequences are by a string. elemental function lle_string_string ( lhs , rhs ) result ( is_lle ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lle is_lle = lle ( maybe ( lhs ), maybe ( rhs )) end function lle_string_string !> Lexically compare two character sequences for being less or equal. !> In this version the left-hand side character sequences is by a string. elemental function lle_string_char ( lhs , rhs ) result ( is_lle ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs logical :: is_lle is_lle = lle ( maybe ( lhs ), rhs ) end function lle_string_char !> Lexically compare two character sequences for being less or equal !> In this version the right-hand side character sequences is by a string. elemental function lle_char_string ( lhs , rhs ) result ( is_lle ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs logical :: is_lle is_lle = lle ( lhs , maybe ( rhs )) end function lle_char_string !> Concatenate two character sequences. !> In this version both character sequences are by a string. elemental function concat_string_string ( lhs , rhs ) result ( string ) type ( string_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs type ( string_type ) :: string string % raw = maybe ( lhs ) // maybe ( rhs ) end function concat_string_string !> Concatenate two character sequences. !> In this version the left-hand side character sequences is by a string. elemental function concat_string_char ( lhs , rhs ) result ( string ) type ( string_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs type ( string_type ) :: string string % raw = maybe ( lhs ) // rhs end function concat_string_char !> Concatenate two character sequences. !> In this version the right-hand side character sequences is by a string. elemental function concat_char_string ( lhs , rhs ) result ( string ) character ( len =* ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs type ( string_type ) :: string string % raw = lhs // maybe ( rhs ) end function concat_char_string !> Write the character sequence hold by the string to a connected unformatted !> unit. subroutine write_unformatted ( string , unit , iostat , iomsg ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: unit integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg write ( unit , iostat = iostat , iomsg = iomsg ) int ( len ( string ), long ) if ( iostat == 0 ) then write ( unit , iostat = iostat , iomsg = iomsg ) maybe ( string ) end if end subroutine write_unformatted !> Write the character sequence hold by the string to a connected formatted !> unit. subroutine write_formatted ( string , unit , iotype , v_list , iostat , iomsg ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: unit character ( len =* ), intent ( in ) :: iotype integer , intent ( in ) :: v_list (:) integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg select case ( iotype ) case ( \"LISTDIRECTED\" ) write ( unit , '(a)' , iostat = iostat , iomsg = iomsg ) maybe ( string ) case ( \"NAMELIST\" ) error stop \"[Fatal] This implementation does not support namelist output\" case default ! DT* select case ( size ( v_list )) case ( 0 ) ! DT write ( unit , '(a)' , iostat = iostat , iomsg = iomsg ) maybe ( string ) case default error stop \"[Fatal] This implementation does not support v_list formatters\" end select end select end subroutine write_formatted !> Read a character sequence from a connected unformatted unit into the string. subroutine read_unformatted ( string , unit , iostat , iomsg ) type ( string_type ), intent ( inout ) :: string integer , intent ( in ) :: unit integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg character ( len = :), allocatable :: buffer integer ( long ) :: chunk read ( unit , iostat = iostat , iomsg = iomsg ) chunk if ( iostat == 0 ) then allocate ( character ( len = chunk ) :: buffer ) read ( unit , iostat = iostat , iomsg = iomsg ) buffer string % raw = buffer end if end subroutine read_unformatted !> Read a character sequence from a connected formatted unit into the string. subroutine read_formatted ( string , unit , iotype , v_list , iostat , iomsg ) type ( string_type ), intent ( inout ) :: string integer , intent ( in ) :: unit character ( len =* ), intent ( in ) :: iotype integer , intent ( in ) :: v_list (:) integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg character ( len = :), allocatable :: line call unused_dummy_argument ( v_list ) select case ( iotype ) case ( \"LISTDIRECTED\" ) call read_line ( unit , line , iostat , iomsg ) case ( \"NAMELIST\" ) error stop \"[Fatal] This implementation does not support namelist input\" case default ! DT* error stop \"[Fatal] This implementation does not support dt formatters\" end select string % raw = line contains !> Internal routine to read a whole record from a formatted unit subroutine read_line ( unit , line , iostat , iomsg ) integer , intent ( in ) :: unit character ( len = :), allocatable , intent ( out ) :: line integer , intent ( out ) :: iostat character ( len =* ), intent ( inout ) :: iomsg integer , parameter :: buffer_size = 512 character ( len = buffer_size ) :: buffer integer :: chunk line = '' do read ( unit , '(a)' , iostat = iostat , iomsg = iomsg , size = chunk , advance = 'no' ) & buffer if ( iostat > 0 ) exit line = line // buffer (: chunk ) if ( iostat < 0 ) exit end do if ( is_iostat_eor ( iostat )) then iostat = 0 end if end subroutine read_line end subroutine read_formatted !> Do nothing but mark an unused dummy argument as such to acknowledge compile !> time warning like: !> !> Warning: Unused dummy argument ‘dummy’ at (1) [-Wunused-dummy-argument] !> !> We deeply trust in the compiler to inline and optimize this piece of code away. elemental subroutine unused_dummy_argument ( dummy ) class ( * ), intent ( in ) :: dummy associate ( dummy => dummy ); end associate end subroutine unused_dummy_argument !> Safely return the character sequences represented by the string pure function maybe ( string ) result ( maybe_string ) type ( string_type ), intent ( in ) :: string character ( len = len ( string )) :: maybe_string if ( allocated ( string % raw )) then maybe_string = string % raw else maybe_string = '' end if end function maybe end module stdlib_string_type","tags":"","loc":"sourcefile/stdlib_string_type.fypp.html"},{"title":"stdlib_hashmap_open.f90 – Fortran-lang/stdlib","text":"The module, STDLIB_HASHMAP_OPEN implements a simple open addressing hash\nmap using linear addressing. The implementation is loosely based on a\nC implementation by David Chase, http://chasewoerner.org/src/hasht/, for\nwhich he has given permission to use in the Fortran Standard Library. Source Code !! The module, STDLIB_HASHMAP_OPEN implements a simple open addressing hash !! map using linear addressing. The implementation is loosely based on a !! C implementation by David Chase, http://chasewoerner.org/src/hasht/, for !! which he has given permission to use in the Fortran Standard Library. ! Note an error in the code caused attempts to deallocate already deallocated ! entries. This did not cause stat to be non-zero, but did cause system errors, ! on my Mac. I therefore decided to remove all deallocation error reporting. submodule ( stdlib_hashmaps ) stdlib_hashmap_open use , intrinsic :: iso_fortran_env , only : & character_storage_size , & error_unit use stdlib_hashmap_wrappers implicit none ! Error messages character ( len =* ), parameter :: & alloc_inv_fault = \"OPEN_HASHMAP_TYPE % INVERSE allocation fault.\" , & alloc_key_fault = \"KEY allocation fault.\" , & alloc_slots_fault = \"OPEN_HASHMAP_TYPE % SLOTS allocation fault.\" , & conflicting_key = \"KEY already exists in MAP.\" , & expand_slots_fail = \"OPEN_HASHMAP_TYPE % SLOTS allocation > \" // & \"MAX_BITS.\" , & init_slots_pow_fail = \"SLOTS_BITS is not between DEFAULT_BITS \" // & \"and MAX_BITS.\" , & invalid_inmap = \"INMAP was not a valid INVERSE index.\" , & map_consist_fault = \"The hash map found an inconsistency.\" character ( * ), parameter :: submodule_name = 'STDLIB_HASHMAP_OPEN' interface expand_slots !! Version: Experimental !! !! Interface to internal procedure that expands an open map's slots. module procedure expand_open_slots end interface expand_slots interface extend_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that expands an open map entry pool. module procedure extend_open_map_entry_pool end interface extend_map_entry_pool interface free_map !! Version: Experimental !! !! Interface to procedure that finalizes an open hash map. module procedure free_open_map end interface free_map interface free_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that finalizes an open hash map !! entry pool. module procedure free_map_entry_pool end interface free_map_entry_pool interface get_other_data !! Version: Experimental !! !! Interface to procedure that gets an entry's other data. module procedure get_other_open_data end interface get_other_data interface init !! Version: Experimental !! !! Interface to initialization procedure for an open hash map. module procedure init_open_map end interface init interface rehash !! Version: Experimental !! !! Interface to a procedure that changes the hash function that !! is used to map the keys into an open hash map. module procedure rehash_open_map end interface rehash interface remove !! Version: Experimental !! !! Interface to a procedure that removees an entry from an open hash map. module procedure remove_open_entry end interface remove interface set_other_data !! Version: Experimental !! !! Interface to a procedure that changes the other data associated with a key module procedure set_other_open_data end interface set_other_data contains subroutine expand_open_slots ( map ) !! Version: Experimental !! !! Internal routine to make a duplicate map with more hash slots. !! Doubles the size of the map % slots array !! Arguments: !! map - the hash table whose hash slots are to be expanded ! type ( open_hashmap_type ), intent ( inout ) :: map integer ( int_hash ) :: base_slot integer ( int_index ), allocatable :: dummy_slots (:) integer ( int_index ) :: inv_index , & new_size , & offset , & old_size , & test_slot integer ( int32 ) :: bits , & stat character ( 256 ) :: errmsg character ( * ), parameter :: procedure = 'EXPAND_SLOTS' if ( map % nbits == max_bits ) then error stop submodule_name // ' % ' // procedure // ': ' // & expand_slots_fail end if old_size = size ( map % slots , kind = int_index ) new_size = 2 * old_size bits = map % nbits + 1 allocate ( dummy_slots ( 0 : new_size - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if map % nbits = bits dummy_slots (:) = 0 map % index_mask = new_size - 1 map % total_probes = map % total_probes + map % probe_count map % probe_count = 0 REMAP_SLOTS : do inv_index = 1_int_index , & map % num_entries + map % num_free associate ( inverse => map % inverse ( inv_index ) ) if ( associated ( inverse % target ) ) then base_slot = fibonacci_hash ( inverse % target % hash_val , & map % nbits ) offset = 0 FIND_EMPTY_SLOT : do test_slot = iand ( int ( base_slot + offset , int_hash ), & map % index_mask ) if ( dummy_slots ( test_slot ) == 0 ) then dummy_slots ( test_slot ) = inv_index exit FIND_EMPTY_SLOT end if offset = offset + 1 end do FIND_EMPTY_SLOT end if end associate end do REMAP_SLOTS call move_alloc ( dummy_slots , map % slots ) end subroutine expand_open_slots subroutine extend_open_map_entry_pool ( pool ) ! gent_pool_new !! Version: Experimental !! !! Add more map_entrys to the pool head !! Arguments: !! pool - an open map entry pool type ( open_map_entry_pool ), intent ( inout ), pointer :: pool type ( open_map_entry_pool ), pointer :: map_entry_pool_head allocate ( map_entry_pool_head ) allocate ( map_entry_pool_head % more_map_entries ( 0 : pool_size - 1 )) map_entry_pool_head % lastpool => pool pool => map_entry_pool_head pool % next = 0 end subroutine extend_open_map_entry_pool recursive subroutine free_map_entry_pool ( pool ) ! gent_pool_free !! Version: Experimental !! Note the freeing of allocated memory may be unnecessary !! !! Recursively descends map entry pool list freeing each element !! Arguments: !! pool The map entry pool whose elements are to be freed ! type ( open_map_entry_pool ), intent ( inout ), pointer :: pool type ( open_map_entry_pool ), pointer :: lastpool if ( associated ( pool ) ) then lastpool => pool % lastpool pool % lastpool => null () deallocate ( pool ) ! Trace component pointers/lists call free_map_entry_pool ( lastpool ) end if end subroutine free_map_entry_pool module subroutine free_open_map ( map ) !! Version: Experimental !! !! Frees internal memory of an open map !! Arguments: !! map - the open hash map whose memory is to be freed ! type ( open_hashmap_type ), intent ( inout ) :: map type ( open_map_entry_list ), pointer :: free_list integer ( int_index ) :: i if ( allocated ( map % slots ) ) then deallocate ( map % slots ) end if if ( allocated ( map % inverse ) ) then remove_links : do i = 1 , size ( map % inverse , kind = int_index ) map % inverse ( i ) % target => null () end do remove_links deallocate ( map % inverse ) end if free_free_list : do while ( map % num_free > 0 ) free_list => map % free_list map % free_list => map % free_list % next free_list % next => null () free_list % target => null () map % num_free = map % num_free - 1 end do free_free_list map % num_free = 0 if ( associated ( map % cache ) ) call free_map_entry_pool ( map % cache ) map % num_entries = 0 end subroutine free_open_map module subroutine get_all_open_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hash map !! Arguments: !! map - an open hash map !! all_keys - all the keys contained in a hash map ! class ( open_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) integer ( int32 ) :: num_keys integer ( int_index ) :: i , key_idx num_keys = map % entries () allocate ( all_keys ( num_keys ) ) if ( num_keys == 0 ) return if ( allocated ( map % inverse ) ) then key_idx = 1_int_index do i = 1_int_index , size ( map % inverse , kind = int_index ) if ( associated ( map % inverse ( i ) % target ) ) then all_keys ( key_idx ) = map % inverse ( i ) % target % key key_idx = key_idx + 1_int_index end if end do end if end subroutine get_all_open_keys module subroutine get_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - an open hash table !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'GET_OTHER_DATA' call in_open_map ( map , inmap , key ) if ( inmap <= 0 . or . & inmap > map % num_entries + map % num_free ) then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then if ( present ( exists ) ) exists = . true . call copy_other ( map % inverse ( inmap ) % target % other , other ) else if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault end if end if end subroutine get_other_open_data subroutine in_open_map ( map , inmap , key ) ! Chase's inmap !! Version: Experimental !! !! Returns the index into the INVERSE array associated with the KEY !! Arguments: !! map - the hash map of interest !! inmap - the returned index into the INVERSE array of entry pointers !! key - the key identifying the entry of interest ! class ( open_hashmap_type ), intent ( inout ) :: map integer ( int_index ), intent ( out ) :: inmap type ( key_type ), intent ( in ) :: key character ( * ), parameter :: procedure = 'IN_MAP' integer ( int_hash ) :: & base_slot , & hash_val , & test_slot integer ( int_index ) :: & offset hash_val = map % hasher ( key ) if ( map % probe_count > inmap_probe_factor * map % call_count . or . & map % num_entries >= load_factor * & size ( map % slots , kind = int_index ) ) then if ( map % nbits < max_bits ) & call expand_slots ( map ) end if map % call_count = map % call_count + 1 base_slot = fibonacci_hash ( hash_val , map % nbits ) offset = 0_int_index PROBE_SLOTS : do test_slot = iand ( base_slot + offset , map % index_mask ) map % probe_count = map % probe_count + 1 inmap = map % slots ( test_slot ) if ( inmap == 0 ) then return else if ( inmap < 0 . or . & inmap > map % num_entries + map % num_free ) then error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault else if ( . not . associated ( map % inverse ( inmap ) % target ) ) then error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault else associate ( inverse => map % inverse ( inmap ) ) if ( hash_val == inverse % target % hash_val ) then if ( key == inverse % target % key ) then return end if end if end associate end if offset = offset + 1_int_index end do PROBE_SLOTS end subroutine in_open_map module subroutine init_open_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a !! maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the open hash maap to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the number of bits used to map to the slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bitd or !! greater than max_bits class ( open_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status character ( 256 ) :: errmsg integer ( int_index ) :: i character ( * ), parameter :: procedure = 'INIT' integer ( int_index ) :: slots integer ( int32 ) :: stat type ( open_map_entry_pool ), pointer :: map_entry_pool_head map % call_count = 0 map % probe_count = 0 map % total_probes = 0 map % hasher => hasher if ( present ( slots_bits ) ) then if ( slots_bits < default_bits . OR . & slots_bits > max_bits ) then if ( present ( status ) ) then status = array_size_error return else error stop submodule_name // ' % ' // procedure // ': ' // & init_slots_pow_fail end if end if map % nbits = slots_bits else map % nbits = min ( default_bits , max_bits ) end if slots = 2_int32 ** map % nbits map % index_mask = slots - 1 allocate ( map % slots ( 0 : slots - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if end if do i = 0 , size ( map % slots , kind = int_index ) - 1 map % slots ( i ) = 0 ! May be redundant end do !! 5*s from Chase's g_new_map allocate ( map % inverse ( 1 : ceiling ( load_factor * slots , & kind = int_index )), & stat = stat , & errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if end if do i = 1 , size ( map % inverse , kind = int_index ) map % inverse ( i ) % target => null () end do do while ( associated ( map % cache )) map_entry_pool_head => map % cache map % cache => map_entry_pool_head % lastpool map_entry_pool_head % lastpool => null () deallocate ( map_entry_pool_head % more_map_entries ) deallocate ( map_entry_pool_head ) end do call extend_map_entry_pool ( map % cache ) if ( present ( status ) ) status = success end subroutine init_open_map pure module function open_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map real :: open_loading open_loading = real ( map % num_entries ) / & size ( map % slots , kind = int_index ) end function open_loading module subroutine map_open_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! Arguments: !! map the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict type ( open_map_entry_type ), pointer :: new_ent integer ( int_hash ) :: base_slot integer ( int_hash ) :: hash_val integer ( int_index ) :: inmap , offset , test_slot character ( * ), parameter :: procedure = 'MAP_ENTRY' hash_val = map % hasher ( key ) if ( map % probe_count > map_probe_factor * map % call_count . or . & map % num_entries >= load_factor * size ( map % slots , & kind = int_index ) ) then call expand_slots ( map ) end if map % call_count = map % call_count + 1 base_slot = fibonacci_hash ( hash_val , map % nbits ) offset = 0 PROBE_SUCCESSIVE_SLOTS : do map % probe_count = map % probe_count + 1 test_slot = iand ( base_slot + offset , map % index_mask ) inmap = map % slots ( test_slot ) if ( inmap == 0 ) then call allocate_open_map_entry ( map , new_ent ) new_ent % hash_val = hash_val call copy_key ( key , new_ent % key ) if ( present ( other ) ) & call copy_other ( other , new_ent % other ) inmap = new_ent % inmap map % inverse ( inmap ) % target => new_ent map % slots ( test_slot ) = inmap if ( present ( conflict ) ) conflict = . false . return else if ( inmap < 0 . or . & inmap > map % num_entries + map % num_free ) then error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap else if (. not . associated ( map % inverse ( inmap ) % target ) ) then error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap else associate ( target => map % inverse ( inmap ) % target ) if ( hash_val == target % hash_val ) then if ( key == target % key ) then ! entry already exists if ( present ( conflict ) ) then conflict = . true . else error stop submodule_name // ' % ' // procedure & // ': ' // conflicting_key end if return end if end if end associate end if offset = offset + 1 end do PROBE_SUCCESSIVE_SLOTS contains subroutine allocate_open_map_entry ( map , bucket ) ! allocates a hash bucket type ( open_hashmap_type ), intent ( inout ) :: map type ( open_map_entry_type ), pointer , intent ( out ) :: bucket type ( open_map_entry_list ), pointer :: free_list type ( open_map_entry_pool ), pointer :: pool character ( * ), parameter :: procedure_name = \"ALLOCATE_MAP_ENTRY\" pool => map % cache map % num_entries = map % num_entries + 1 if ( associated ( map % free_list ) ) then ! Get hash bucket from free_list free_list => map % free_list bucket => free_list % target map % free_list => free_list % next free_list % target => null () free_list % next => null () if ( bucket % inmap <= 0 ) & error stop submodule_name // \" % \" // procedure_name // & \": Failed consistency check: BUCKET % INMAP <= 0\" map % num_free = map % num_free - 1 else ! Get hash bucket from pool if ( pool % next == pool_size ) then ! Expand pool call extend_map_entry_pool ( map % cache ) pool => map % cache end if bucket => pool % more_map_entries ( pool % next ) pool % next = pool % next + 1 ! 0s based -> post-increment if ( map % num_entries > & size ( map % inverse , kind = int_index ) ) then call expand_inverse ( map ) end if if ( map % num_entries <= 0 ) & error stop submodule_name // \" % \" // procedure_name // & \": Failed consistency check: MAP % NUM_ENTRIES <= 0.\" bucket % inmap = map % num_entries end if end subroutine allocate_open_map_entry subroutine expand_inverse ( map ) !! Increase size of map % inverse type ( open_hashmap_type ), intent ( inout ) :: map type ( open_map_entry_ptr ), allocatable :: dummy_inverse (:) integer ( int32 ) :: stat character ( 256 ) :: errmsg allocate ( dummy_inverse ( 1 : 2 * size ( map % inverse , kind = int_index )), & stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if dummy_inverse ( 1 : size ( map % inverse , kind = int_index )) = & map % inverse (:) call move_alloc ( dummy_inverse , map % inverse ) end subroutine expand_inverse end subroutine map_open_entry module subroutine rehash_open_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( open_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher integer ( int_hash ) :: base_slot integer ( int_hash ) :: hash_val integer ( int_index ) :: i , test_slot , offset map % hasher => hasher map % slots = 0 do i = 1 , map % num_entries + map % num_free if ( . not . associated ( map % inverse ( i ) % target ) ) cycle hash_val = map % hasher ( map % inverse ( i ) % target % key ) map % inverse ( i ) % target % hash_val = hash_val base_slot = fibonaccI_hash ( hash_val , map % nbits ) offset = 0 FIND_EMPTY_SLOT : do test_slot = iand ( int ( base_slot + offset , int_hash ), & map % index_mask ) if ( map % slots ( test_slot ) == 0 ) then map % slots ( test_slot ) = i exit FIND_EMPTY_SLOT end if offset = offset + 1 end do FIND_EMPTY_SLOT end do end subroutine rehash_open_map module subroutine remove_open_entry ( map , key , existed ) !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed type ( open_map_entry_list ), pointer :: aentry type ( open_map_entry_type ), pointer :: bucket integer ( int_index ) :: base_slot integer ( int_index ) :: current_index integer ( int_index ) :: current_slot integer ( int_index ) :: empty_slot integer ( int_index ) :: inmap logical :: overlap integer ( int_index ) :: slot_index overlap = . false . call in_open_map ( map , inmap , key ) if ( inmap < 1 . or . inmap > size ( map % inverse ) ) then if ( present ( existed ) ) existed = . false . return end if bucket => map % inverse ( inmap ) % target if ( associated ( bucket ) ) then base_slot = fibonacci_hash ( bucket % hash_val , map % nbits ) if ( present ( existed ) ) existed = . true . else if ( present ( existed ) ) existed = . false . return end if ! Find slot associated with inmap and nullify the pointer current_slot = base_slot search_for_inmap : do slot_index = map % slots ( current_slot ) if ( slot_index == inmap ) then allocate ( aentry ) aentry % target => map % inverse ( inmap ) % target aentry % next => map % free_list map % free_list => aentry map % num_free = map % num_free + 1 map % slots ( current_slot ) = 0 map % inverse ( inmap ) % target => null () map % num_entries = map % num_entries - 1 empty_slot = current_slot current_slot = iand ( map % index_mask , current_slot + 1 ) if ( map % slots ( current_slot ) == 0 ) return if ( current_slot == 0 ) overlap = . true . exit search_for_inmap else if ( map % slots ( current_slot ) == 0 ) return current_slot = iand ( map % index_mask , current_slot + 1 ) if ( current_slot == 0 ) overlap = . true . cycle search_for_inmap end if end do search_for_inmap ! Have found slot and stored it in free_list, now may need to iteratively ! swap to fill holes. First search backwards to find start of run. find_run_start : do base_slot = iand ( map % index_mask , base_slot - 1 ) if ( base_slot == map % index_mask ) then if ( map % slots ( base_slot ) == 0 ) then base_slot = 0 exit find_run_start else overlap = . true . cycle find_run_start end if else if ( map % slots ( base_slot ) == 0 ) then base_slot = iand ( map % index_mask , base_slot + 1 ) exit find_run_start else cycle find_run_start end if end do find_run_start ! Search forward for entry to fill empty slot fill_empty_slots : do bucket => map % inverse ( map % slots ( current_slot ) ) % target current_index = fibonacci_hash ( bucket % hash_val , & map % nbits ) if ( overlap . and . empty_slot < base_slot ) then if ( ( current_index >= base_slot . and . & current_index <= map % index_mask ) . or . & ( current_index >= 0 . and . & current_index <= empty_slot ) ) then map % slots ( empty_slot ) = map % slots ( current_slot ) map % slots ( current_slot ) = 0 empty_slot = current_slot end if current_slot = iand ( map % index_mask , current_slot + 1 ) else if ( current_index >= base_slot . and . & current_index <= empty_slot ) then map % slots ( empty_slot ) = map % slots ( current_slot ) map % slots ( current_slot ) = 0 empty_slot = current_slot end if current_slot = iand ( map % index_mask , current_slot + 1 ) if ( current_slot == 0 ) overlap = . true . end if if ( map % slots ( current_slot ) == 0 ) exit fill_empty_slots end do fill_empty_slots end subroutine remove_open_entry module subroutine set_other_open_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'SET_OTHER_DATA' call in_open_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then associate ( target => map % inverse ( inmap ) % target ) call copy_other ( other , target % other ) if ( present ( exists ) ) exists = . true . return end associate else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if end subroutine set_other_open_data module function total_open_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an open hash map class ( open_hashmap_type ), intent ( in ) :: map integer ( int64 ) :: total_depth integer ( int_index ) :: inv_index , slot , slots integer ( int_hash ) :: index total_depth = 0_int64 slots = size ( map % slots , kind = int_index ) do slot = 0 , slots - 1 if ( map % slots ( slot ) == 0 ) cycle inv_index = map % slots ( slot ) if ( inv_index <= 0 ) cycle associate ( inverse => map % inverse ( inv_index )) index = fibonacci_hash ( inverse % target % hash_val , & map % nbits ) end associate total_depth = total_depth + & iand ( slot - index , map % index_mask ) + 1_int64 end do end function total_open_depth module subroutine open_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY exists in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest ! class ( open_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present integer ( int_index ) :: inmap call in_open_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then present = . false . else present = associated ( map % inverse ( inmap ) % target ) end if end subroutine open_key_test end submodule stdlib_hashmap_open","tags":"","loc":"sourcefile/stdlib_hashmap_open.f90.html"},{"title":"f18estop.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_error ) f18estop implicit none contains module procedure error_stop ! Aborts the program with nonzero exit code ! ! The \"stop \" statement generally has return code 0. ! To allow non-zero return code termination with character message, ! error_stop() uses the statement \"error stop\", which by default ! has exit code 1 and prints the message to stderr. ! An optional integer return code \"code\" may be specified. ! ! Example ! ------- ! ! call error_stop(\"Invalid argument\") if ( present ( code )) then write ( stderr , * ) msg error stop code else error stop msg endif end procedure end submodule f18estop","tags":"","loc":"sourcefile/f18estop.f90.html"},{"title":"stdlib_hash_64bit_spookyv2.fypp – Fortran-lang/stdlib","text":"SPOOKY_HASH is a translation to Fortran 2008 of the unsigned 64 bit SpookyHash V2 function of Bob Jenkins https://burtleburtle.net/bob/hash/spooky.html to signed 64 bit\n operations. Bob Jenkins has put his code in the public domain and has\n given permission to treat this code as public domain in the USA,\n provided the code can be used under other licenses and he is given\n appropriate credit.\n The code was designed for Little-Endian processors. The output is\n different on Big Endian processors, but still probably as good quality. Source Code !!------------------------------------------------------------------------------ !! `SPOOKY_HASH` is a translation to Fortran 2008 of the unsigned 64 bit !! `SpookyHash` V2 function of Bob Jenkins !! to signed 64 bit !! operations. Bob Jenkins has put his code in the public domain and has !! given permission to treat this code as public domain in the USA, !! provided the code can be used under other licenses and he is given !! appropriate credit. !! The code was designed for Little-Endian processors. The output is !! different on Big Endian processors, but still probably as good quality. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_64bit ) stdlib_hash_64bit_spookyv2 ! I have tried to make this portable while retaining efficiency. I assume ! processors with two's complement integers from 8, 16, 32, and 64 bits. ! The code is a transliteration of the 64 bit SpookyHash V2 of Bob Jenkins ! ! The code was designed for Little-Endian processors. The output is ! different on Big Endian processors, but still probably as good quality. implicit none contains module function int8_spooky_hash ( key , seed ) result ( hash_code ) integer ( int8 ), intent ( in ) :: key (:) integer ( int64 ), intent ( in ) :: seed ( 2 ) integer ( int64 ) :: hash_code ( 2 ) hash_code (:) = seed call spookyhash_128 ( key , hash_code ) end function int8_spooky_hash #:for k1 in INT_KINDS module function ${ k1 }$_ spooky_hash ( key , seed ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int64 ), intent ( in ) :: seed ( 2 ) integer ( int64 ) :: hash_code ( 2 ) integer ( int64 ) :: hash2 ( 2 ) hash2 (:) = seed call spookyhash_128 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), hash2 ) hash_code = hash2 end function ${ k1 }$_ spooky_hash #:endfor module function character_spooky_hash ( key , seed ) result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed ( 2 ) integer ( int64 ) :: hash_code ( 2 ) integer ( int64 ) :: hash2 ( 2 ) hash2 (:) = seed call spookyhash_128 ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), hash2 ) hash_code = hash2 end function character_spooky_hash ! ! short hash ... it could be used on any message, ! but it's used by Spooky just for short messages. ! subroutine spookyhash_short ( key , hash_inout ) integer ( int8 ), intent ( in ), target :: key ( 0 :) integer ( int64 ), intent ( inout ) :: hash_inout ( 2 ) integer ( int64 ) :: a , b , c , d integer ( int64 ) :: length , p8 , remainder p8 = 0 length = size ( key , kind = int64 ) ! The number of bytes after all the INT256s remainder = iand ( length , 31_int64 ) a = hash_inout ( 1 ) b = hash_inout ( 2 ) c = sc_const d = sc_const if ( length > 15 ) then block integer ( int64 ) :: bend , step integer ( int64 ) :: buf ( 0 : 2 * sc_numVars - 1 ) bend = ishft ( length , - 4 ) ! The number of complete INT128s buf ( 0 : 2 * bend - 1 ) = transfer ( key ( 0 : 16 * bend - 1 ), 0_int64 , 2 * bend ) ! Number of Int64's in number of complete INT256s bend = ishft ( ishft ( length , - 5 ), 2 ) ! handle all complete sets of 32 bytes do step = 0_int64 , bend - 1 , 4 c = c + buf ( step ) d = d + buf ( step + 1 ) call shortmix ( a , b , c , d ) a = a + buf ( step + 2 ) b = b + buf ( step + 3 ) end do ! Completed all INT64s in complete INT256s p8 = p8 + 8 * bend ! Number of INT8s in complete INT256s ! Handle the case of 16+ remaining bytes. if ( remainder >= 16 ) then c = c + buf ( step ) d = d + buf ( step + 1 ) call shortmix ( a , b , c , d ) p8 = p8 + 16 remainder = remainder - 16 end if end block end if ! Handle the last 0..15 bytes, and its length V2 d = d + shiftl ( length , 56_int64 ) select case ( remainder ) case ( 15 ) go to 115 case ( 14 ) go to 114 case ( 13 ) go to 113 case ( 12 ) go to 112 case ( 11 ) go to 111 case ( 10 ) go to 110 case ( 9 ) go to 109 case ( 8 ) go to 108 case ( 7 ) go to 107 case ( 6 ) go to 106 case ( 5 ) go to 105 case ( 4 ) go to 104 case ( 3 ) go to 103 case ( 2 ) go to 102 case ( 1 ) go to 101 case ( 0 ) go to 100 end select 115 d = d + shiftl ( map_to_64 ( key ( p8 + 14 ) ), 48_int64 ) 114 d = d + shiftl ( map_to_64 ( key ( p8 + 13 ) ), 40_int64 ) 113 d = d + shiftl ( map_to_64 ( key ( p8 + 12 ) ), 32_int64 ) 112 if ( little_endian ) then d = d + transfer ( [ transfer ( key ( p8 + 8 : p8 + 11 ), 0_int32 ), & 0_int32 ], 0_int64 ) else d = d + transfer ( [ 0_int32 , & transfer ( key ( p8 + 8 : p8 + 11 ), 0_int32 ) ], & 0_int64 ) end if c = c + transfer ( key ( p8 + 0 : p8 + 7 ), 0_int64 ) go to 888 111 d = d + shiftl ( map_to_64 ( key ( p8 + 10 ) ), 16_int32 ) 110 d = d + shiftl ( map_to_64 ( key ( p8 + 9 ) ), 8_int32 ) 109 d = d + map_to_64 ( key ( p8 + 8 ) ) 108 c = c + transfer ( key ( p8 + 0 : p8 + 7 ), 0_int64 ) go to 888 107 c = c + shiftl ( map_to_64 ( key ( p8 + 6 ) ), 48_int64 ) 106 c = c + shiftl ( map_to_64 ( key ( p8 + 5 ) ), 40_int64 ) 105 c = c + shiftl ( map_to_64 ( key ( p8 + 4 ) ), 32_int64 ) 104 if ( little_endian ) then c = c + transfer ( [ transfer ( key ( p8 + 0 : p8 + 3 ), 0_int32 ), & 0_int32 ], 0_int64 ) else c = c + transfer ( [ 0_int32 , & transfer ( key ( p8 + 0 : p8 + 3 ), 0_int32 ) ], 0_int64 ) end if go to 888 103 c = c + shiftl ( map_to_64 ( key ( p8 + 2 ) ), 16_int64 ) 102 c = c + shiftl ( map_to_64 ( key ( p8 + 1 ) ), 8_int64 ) 101 c = c + map_to_64 ( key ( p8 + 0 ) ) go to 888 100 c = c + sc_const d = d + sc_const 888 call short_end ( a , b , c , d ) hash_inout ( 1 ) = a hash_inout ( 2 ) = b close ( 40 ) contains pure function map_to_64 ( key ) integer ( int8 ), intent ( in ) :: key integer ( int64 ) :: map_to_64 if ( little_endian ) then map_to_64 = transfer ( [ key , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], & 0_int64 ) else map_to_64 = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , key ], & 0_int64 ) end if end function map_to_64 pure subroutine shortmix ( h0 , h1 , h2 , h3 ) ! ! The goal is for each bit of the input to expand into 128 bits of ! apparent entropy before it is fully overwritten. ! n trials both set and cleared at least m bits of h0 h1 h2 h3 ! n: 2 m: 29 ! n: 3 m: 46 ! n: 4 m: 57 ! n: 5 m: 107 ! n: 6 m: 146 ! n: 7 m: 152 ! when run forwards or backwards ! for all 1-bit and 2-bit diffs ! with diffs defined by either xor or subtraction ! with a base of all zeros plus a counter, or plus another bit, or random ! integer ( int64 ), intent ( inout ) :: h0 , h1 , h2 , h3 h2 = ishftc ( h2 , 50 ) h2 = h2 + h3 h0 = ieor ( h0 , h2 ) h3 = ishftc ( h3 , 52 ) h3 = h3 + h0 h1 = ieor ( h1 , h3 ) h0 = ishftc ( h0 , 30 ) h0 = h0 + h1 h2 = ieor ( h2 , h0 ) h1 = ishftc ( h1 , 41 ) h1 = h1 + h2 h3 = ieor ( h3 , h1 ) h2 = ishftc ( h2 , 54 ) h2 = h2 + h3 h0 = ieor ( h0 , h2 ) h3 = ishftc ( h3 , 48 ) h3 = h3 + h0 h1 = ieor ( h1 , h3 ) h0 = ishftc ( h0 , 38 ) h0 = h0 + h1 h2 = ieor ( h2 , h0 ) h1 = ishftc ( h1 , 37 ) h1 = h1 + h2 h3 = ieor ( h3 , h1 ) h2 = ishftc ( h2 , 62 ) h2 = h2 + h3 h0 = ieor ( h0 , h2 ) h3 = ishftc ( h3 , 34 ) h3 = h3 + h0 h1 = ieor ( h1 , h3 ) h0 = ishftc ( h0 , 5 ) h0 = h0 + h1 h2 = ieor ( h2 , h0 ) h1 = ishftc ( h1 , 36 ) h1 = h1 + h2 h3 = ieor ( h3 , h1 ) end subroutine shortmix pure subroutine short_end ( h0 , h1 , h2 , h3 ) ! ! Mix all 4 inputs together so that h0, h1 are a hash of them all. ! ! For two inputs differing in just the input bits ! Where \"differ\" means xor or subtraction ! And the base value is random, or a counting value starting at that bit ! The final result will have each bit of h0, h1 flip ! For every input bit, ! with probability 50 +- .3% (it is probably better than that) ! For every pair of input bits, ! with probability 50 +- .75% (the worst case is approximately that) ! integer ( int64 ), intent ( inout ) :: h0 , h1 , h2 , h3 h3 = ieor ( h3 , h2 ) h2 = ishftc ( h2 , 15 ) h3 = h3 + h2 h0 = ieor ( h0 , h3 ) h3 = ishftc ( h3 , 52 ) h0 = h0 + h3 h1 = ieor ( h1 , h0 ) h0 = ishftc ( h0 , 26 ) h1 = h1 + h0 h2 = ieor ( h2 , h1 ) h1 = ishftc ( h1 , 51 ) h2 = h2 + h1 h3 = ieor ( h3 , h2 ) h2 = ishftc ( h2 , 28 ) h3 = h3 + h2 h0 = ieor ( h0 , h3 ) h3 = ishftc ( h3 , 9 ) h0 = h0 + h3 h1 = ieor ( h1 , h0 ) h0 = ishftc ( h0 , 47 ) h1 = h1 + h0 h2 = ieor ( h2 , h1 ) h1 = ishftc ( h1 , 54 ) h2 = h2 + h1 h3 = ieor ( h3 , h2 ) h2 = ishftc ( h2 , 32 ) h3 = h3 + h2 h0 = ieor ( h0 , h3 ) h3 = ishftc ( h3 , 25 ) h0 = h0 + h3 h1 = ieor ( h1 , h0 ) h0 = ishftc ( h0 , 63 ) h1 = h1 + h0 end subroutine short_end end subroutine spookyhash_short ! do the whole hash in one call module subroutine spookyHash_128 ( key , hash_inout ) integer ( int8 ), intent ( in ), target :: key ( 0 :) integer ( int64 ), intent ( inout ) :: hash_inout ( 2 ) integer ( int64 ) :: buf ( sc_numvars ) integer ( int64 ) :: h ( 0 : 11 ) integer ( int64 ) :: bend , i , length , p8 , remain , remainder , tail integer ( int8 ) :: buf8 ( 8 ) length = size ( key , kind = int64 ) if ( length < sc_buffsize ) then call spookyhash_short ( key , hash_inout ) return end if h ( [ 0 , 3 , 6 , 9 ] ) = hash_inout ( 1 ) h ( [ 1 , 4 , 7 , 10 ] ) = hash_inout ( 2 ) h ( [ 2 , 5 , 8 , 11 ] ) = sc_const ! Number of bytes in number of complete internal states bend = ( length / sc_blocksize ) * sc_blocksize ! Handle all SC_BLOCKSIZE blocks of bytes do i = 0 , bend - 1 , sc_blocksize buf (:) = transfer ( key ( i : i + sc_blocksize - 1 ), 0_int64 , sc_numVars ) call spookyhash_mix ( buf , h ) end do ! all complete internal states processed ! handle the last partial block of sc_blocksize bytes remainder = ( length - bend ) ! 0 <= remainder < sc_blocksize == 96 remain = remainder / 8 ! Number of INT64's in partial block buf ( 1 : remain ) = transfer ( key ( bend : bend + remain * 8 - 1 ), 0_int64 , remain ) buf ( remain + 1 : sc_numvars ) = 0_int64 tail = remainder - 8 * remain ! Number of INT8s after INT64s p8 = bend + remain * 8 ! # of bytes until tail start buf8 ( 1 : tail ) = key ( p8 : p8 + tail - 1 ) buf8 ( tail + 1 : 8 ) = 0_int8 buf ( remain + 1 ) = transfer ( buf8 , 0_int64 ) buf8 ( 1 : 7 ) = 0_int8 buf8 ( 8 ) = int ( remainder , kind = int8 ) ! 0 <= remainder < 96 buf ( sc_numvars ) = ieor ( buf ( sc_numvars ), transfer ( buf8 , 0_int64 ) ) ! do some final mixing call spookyhash_end ( buf , h ) hash_inout ( 1 : 2 ) = h ( 0 : 1 ) end subroutine spookyHash_128 ! ! This is used if the input is 96 bytes long or longer. ! ! The internal state is fully overwritten every 96 bytes. ! Every input bit appears to cause at least 128 bits of entropy ! before 96 other bytes are combined, when run forward or backward ! For every input bit, ! Two inputs differing in just that input bit ! Where \"differ\" means xor or subtraction ! And the base value is random ! When run forward or backwards one Mix ! I tried 3 pairs of each; they all differed by at least 212 bits. ! pure subroutine spookyhash_mix ( data , s ) integer ( int64 ), intent ( in ) :: data ( 0 :) integer ( int64 ), intent ( inout ) :: s ( 0 : 11 ) s ( 0 ) = s ( 0 ) + data ( 0 ) s ( 2 ) = ieor ( s ( 2 ), s ( 10 ) ) s ( 11 ) = ieor ( s ( 11 ), s ( 0 ) ) s ( 0 ) = ishftc ( s ( 0 ), 11 ) s ( 11 ) = s ( 11 ) + s ( 1 ) s ( 1 ) = s ( 1 ) + data ( 1 ) s ( 3 ) = ieor ( s ( 3 ), s ( 11 ) ) s ( 0 ) = ieor ( s ( 0 ), s ( 1 ) ) s ( 1 ) = ishftc ( s ( 1 ), 32 ) s ( 0 ) = s ( 0 ) + s ( 2 ) s ( 2 ) = s ( 2 ) + data ( 2 ) s ( 4 ) = ieor ( s ( 4 ), s ( 0 ) ) s ( 1 ) = ieor ( s ( 1 ), s ( 2 ) ) s ( 2 ) = ishftc ( s ( 2 ), 43 ) s ( 1 ) = s ( 1 ) + s ( 3 ) s ( 3 ) = s ( 3 ) + data ( 3 ) s ( 5 ) = ieor ( s ( 5 ), s ( 1 ) ) s ( 2 ) = ieor ( s ( 2 ), s ( 3 ) ) s ( 3 ) = ishftc ( s ( 3 ), 31 ) s ( 2 ) = s ( 2 ) + s ( 4 ) s ( 4 ) = s ( 4 ) + data ( 4 ) s ( 6 ) = ieor ( s ( 6 ), s ( 2 ) ) s ( 3 ) = ieor ( s ( 3 ), s ( 4 ) ) s ( 4 ) = ishftc ( s ( 4 ), 17 ) s ( 3 ) = s ( 3 ) + s ( 5 ) s ( 5 ) = s ( 5 ) + data ( 5 ) s ( 7 ) = ieor ( s ( 7 ), s ( 3 ) ) s ( 4 ) = ieor ( s ( 4 ), s ( 5 ) ) s ( 5 ) = ishftc ( s ( 5 ), 28 ) s ( 4 ) = s ( 4 ) + s ( 6 ) s ( 6 ) = s ( 6 ) + data ( 6 ) s ( 8 ) = ieor ( s ( 8 ), s ( 4 ) ) s ( 5 ) = ieor ( s ( 5 ), s ( 6 ) ) s ( 6 ) = ishftc ( s ( 6 ), 39 ) s ( 5 ) = s ( 5 ) + s ( 7 ) s ( 7 ) = s ( 7 ) + data ( 7 ) s ( 9 ) = ieor ( s ( 9 ), s ( 5 ) ) s ( 6 ) = ieor ( s ( 6 ), s ( 7 ) ) s ( 7 ) = ishftc ( s ( 7 ), 57 ) s ( 6 ) = s ( 6 ) + s ( 8 ) s ( 8 ) = s ( 8 ) + data ( 8 ) s ( 10 ) = ieor ( s ( 10 ), s ( 6 ) ) s ( 7 ) = ieor ( s ( 7 ), s ( 8 ) ) s ( 8 ) = ishftc ( s ( 8 ), 55 ) s ( 7 ) = s ( 7 ) + s ( 9 ) s ( 9 ) = s ( 9 ) + data ( 9 ) s ( 11 ) = ieor ( s ( 11 ), s ( 7 ) ) s ( 8 ) = ieor ( s ( 8 ), s ( 9 ) ) s ( 9 ) = ishftc ( s ( 9 ), 54 ) s ( 8 ) = s ( 8 ) + s ( 10 ) s ( 10 ) = s ( 10 ) + data ( 10 ) s ( 0 ) = ieor ( s ( 0 ), s ( 8 ) ) s ( 9 ) = ieor ( s ( 9 ), s ( 10 ) ) s ( 10 ) = ishftc ( s ( 10 ), 22 ) s ( 9 ) = s ( 9 ) + s ( 11 ) s ( 11 ) = s ( 11 ) + data ( 11 ) s ( 1 ) = ieor ( s ( 1 ), s ( 9 ) ) s ( 10 ) = ieor ( s ( 10 ), s ( 11 ) ) s ( 11 ) = ishftc ( s ( 11 ), 46 ) s ( 10 ) = s ( 10 ) + s ( 0 ) end subroutine spookyhash_mix pure subroutine spookyhash_end ( data , h ) integer ( int64 ), intent ( in ) :: data ( 0 :) integer ( int64 ), intent ( inout ) :: h ( 0 : 11 ) h = h + data ( 0 : 11 ) call endpartial ( h ) call endpartial ( h ) call endpartial ( h ) contains ! ! Mix all 12 inputs together so that h0, h1 are a hash of them all. ! ! For two inputs differing in just the input bits ! Where \"differ\" means xor or subtraction ! And the base value is random, or a counting value starting at that bit ! The final result will have each bit of h0, h1 flip ! For every input bit, ! with probability 50 +- .3% ! For every pair of input bits, ! with probability 50 +- 3% ! ! This does not rely on the last Mix() call having already mixed some. ! Two iterations was almost good enough for a 64-bit result, but a ! 128-bit result is reported, so End() does three iterations. ! pure subroutine endpartial ( h ) integer ( int64 ), intent ( inout ) :: h ( 0 : 11 ) h ( 11 ) = h ( 11 ) + h ( 1 ) h ( 2 ) = ieor ( h ( 2 ), h ( 11 ) ) h ( 1 ) = ishftc ( h ( 1 ), 44 ) h ( 0 ) = h ( 0 ) + h ( 2 ) h ( 3 ) = ieor ( h ( 3 ), h ( 0 ) ) h ( 2 ) = ishftc ( h ( 2 ), 15 ) h ( 1 ) = h ( 1 ) + h ( 3 ) h ( 4 ) = ieor ( h ( 4 ), h ( 1 ) ) h ( 3 ) = ishftc ( h ( 3 ), 34 ) h ( 2 ) = h ( 2 ) + h ( 4 ) h ( 5 ) = ieor ( h ( 5 ), h ( 2 ) ) h ( 4 ) = ishftc ( h ( 4 ), 21 ) h ( 3 ) = h ( 3 ) + h ( 5 ) h ( 6 ) = ieor ( h ( 6 ), h ( 3 ) ) h ( 5 ) = ishftc ( h ( 5 ), 38 ) h ( 4 ) = h ( 4 ) + h ( 6 ) h ( 7 ) = ieor ( h ( 7 ), h ( 4 ) ) h ( 6 ) = ishftc ( h ( 6 ), 33 ) h ( 5 ) = h ( 5 ) + h ( 7 ) h ( 8 ) = ieor ( h ( 8 ), h ( 5 ) ) h ( 7 ) = ishftc ( h ( 7 ), 10 ) h ( 6 ) = h ( 6 ) + h ( 8 ) h ( 9 ) = ieor ( h ( 9 ), h ( 6 ) ) h ( 8 ) = ishftc ( h ( 8 ), 13 ) h ( 7 ) = h ( 7 ) + h ( 9 ) h ( 10 ) = ieor ( h ( 10 ), h ( 7 ) ) h ( 9 ) = ishftc ( h ( 9 ), 38 ) h ( 8 ) = h ( 8 ) + h ( 10 ) h ( 11 ) = ieor ( h ( 11 ), h ( 8 ) ) h ( 10 ) = ishftc ( h ( 10 ), 53 ) h ( 9 ) = h ( 9 ) + h ( 11 ) h ( 0 ) = ieor ( h ( 0 ), h ( 9 ) ) h ( 11 ) = ishftc ( h ( 11 ), 42 ) h ( 10 ) = h ( 10 ) + h ( 0 ) h ( 1 ) = ieor ( h ( 1 ), h ( 10 ) ) h ( 0 ) = ishftc ( h ( 0 ), 54 ) end subroutine endpartial end subroutine spookyhash_end pure module subroutine spookysubhash_init ( self , seed ) type ( spooky_subhash ), intent ( out ) :: self integer ( int64 ), intent ( in ) :: seed ( 2 ) self % state ( 0 : 1 ) = seed self % length = 0 self % remainder = 0_int8 end subroutine spookysubhash_init ! add a message fragment to the state module subroutine spookyhash_update ( spooky , key ) type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int8 ) :: dummy ( 0 : 7 ) integer ( int64 ) :: h ( 0 : 11 ) integer ( int64 ) :: bend , & length , & new_length , & p8 , & remainder length = size ( key , kind = int64 ) new_length = length + spooky % remainder ! Is this message fragment too short? If it is, stuff it away. if ( new_Length < sc_buffsize ) then remainder = spooky % remainder spooky % data ( remainder : remainder + length - 1 ) = key spooky % length = length + spooky % length dummy = transfer ( new_length , 0_int8 , 8 ) if ( little_endian ) then spooky % remainder = transfer ( [ dummy ( 0 ), 0_int8 ], 0_int16 ) else spooky % remainder = transfer ( [ 0_int8 , dummy ( 7 ) ], 0_int16 ) end if return end if ! init the variables if ( spooky % length < sc_buffsize ) then h ( [ 0 , 3 , 6 , 9 ] ) = spooky % state ( 0 ) h ( [ 1 , 4 , 7 , 10 ] ) = spooky % state ( 1 ) h ( [ 2 , 5 , 8 , 11 ] ) = sc_const else h ( 0 : 11 ) = spooky % state ( 0 : 11 ) end if spooky % length = length + spooky % length ! if we've got anything stuffed away, use it now if ( spooky % remainder /= 0_int16 ) then block integer ( int16 ) :: prefix prefix = sc_buffsize - spooky % remainder remainder = spooky % remainder spooky % data ( remainder : remainder + prefix - 1 ) = key ( 0 : prefix - 1 ) call spookyhash_mix ( transfer ( spooky % data ( 0 : sc_blocksize - 1 ), & 0_int64 , sc_numvars ), h ) call spookyhash_mix ( & transfer ( spooky % data ( sc_blocksize : 2 * sc_blocksize - 1 ), & 0_int64 , sc_numvars ), h ) p8 = prefix length = length - prefix end block else p8 = 0 end if ! handle all whole blocks of sc_blocksize bytes requiring aligned bytes bend = p8 + 8 * ( length / sc_blocksize ) * sc_numVars remainder = length - ( bend - p8 ) do while ( p8 < bend ) spooky % data ( 0 : sc_blocksize - 1 ) = key ( p8 : p8 + sc_blocksize - 1 ) call spookyhash_mix ( transfer ( spooky % data ( 0 : sc_blocksize - 1 ), & 0_int64 , sc_numvars ), h ) p8 = p8 + sc_blocksize end do ! stuff away the last few bytes spooky % remainder = remainder if ( remainder > 0 ) then spooky % data ( 0 : remainder - 1 ) = & key ( bend : bend + remainder - 1 ) end if ! stuff away the variables spooky % state ( 0 : 11 ) = h ( 0 : 11 ) end subroutine spookyhash_update ! report the hash for the concatenation of all message fragments so far module subroutine spookyhash_final ( spooky , hash_code ) type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int64 ), intent ( inout ) :: hash_code ( 2 ) integer ( int64 ) :: h ( 0 : 11 ) integer ( int64 ) :: index , remainder integer ( int8 ) :: dummy ( 2 ) ! init the variables if ( spooky % length < sc_buffsize ) then hash_code = spooky % state ( 0 : 1 ) call spookyhash_short ( spooky % data ( 0 : spooky % length - 1 ), & hash_code ) return end if remainder = spooky % remainder h ( 0 : 11 ) = spooky % state ( 0 : 11 ) if ( remainder >= sc_blocksize ) then ! m_data can contain two blocks; handle any whole first block call spookyhash_mix ( transfer ( spooky % data , 0_int64 , & 2 * sc_numvars ), h ) index = sc_blocksize remainder = remainder - sc_blocksize else index = 0 end if ! mix in the last partial block, and the length mod sc_blocksize spooky % data ( sc_blocksize + remainder :) = 0_int8 dummy = transfer ( remainder , 0_int8 , 2 ) if ( little_endian ) then spooky % data ( sc_blocksize - 1 ) = dummy ( 1 ) else spooky % data ( sc_blocksize - 1 ) = dummy ( 2 ) end if ! do some final mixing call spookyhash_end ( transfer ( spooky % data , 0_int64 , 2 * sc_numvars ), h ) hash_code ( 1 : 2 ) = h ( 0 : 1 ) end subroutine spookyhash_final pure function rot_64_32 ( a , k ) integer ( int64 ) :: rot_64_32 integer ( int64 ), intent ( in ) :: a integer , intent ( in ) :: k rot_64_32 = iand ( ior ( shiftl ( a , k ), shiftr ( a , 32 - k ) ), two_32 - 1 ) end function rot_64_32 module subroutine new_spooky_hash_seed ( seed ) ! Random SEED generator for integer ( int64 ), intent ( inout ) :: seed ( 2 ) integer ( int64 ) :: old_seed ( 2 ) real ( dp ) :: sample ( 4 ) integer ( int32 ) :: part ( 4 ) old_seed = seed find_seed : do call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) seed = transfer ( part , seed , 2 ) if ( seed ( 1 ) /= old_seed ( 1 ) . or . seed ( 2 ) /= old_seed ( 2 ) ) return end do find_seed end subroutine new_spooky_hash_seed end submodule stdlib_hash_64bit_spookyv2","tags":"","loc":"sourcefile/stdlib_hash_64bit_spookyv2.fypp.html"},{"title":"stdlib_stats_corr.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_corr use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_linalg , only : diag use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ k1 }$ ) :: res if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( ${ k1 }$ ) :: res if ( count ( mask ) < 2 ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) real ( dp ) :: res if ( count ( mask ) < 2 ) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = 1 end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j ${ t1 }$ :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) ${ t1 }$ :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = x ( i , :) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( transpose ( center ), center ) # : else res = matmul ( transpose ( conjg ( center )), center ) # : endif case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = x (:, i ) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( center , transpose ( center )) # : else res = matmul ( center , transpose ( conjg ( center ))) # : endif case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select mean_ = 1 / sqrt ( diag ( res )) do i = 1 , size ( res , 1 ) do j = 1 , size ( res , 2 ) res ( j , i ) = res ( j , i ) * mean_ ( i ) * mean_ ( j ) end do end do end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j real ( dp ) :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) real ( dp ) :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .) . or . size ( x ) < 2 ) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = real ( x ( i , :), dp ) - mean_ end do res = matmul ( transpose ( center ), center ) case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = real ( x (:, i ), dp ) - mean_ end do res = matmul ( center , transpose ( center )) case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select mean_ = 1 / sqrt ( diag ( res )) do i = 1 , size ( res , 1 ) do j = 1 , size ( res , 2 ) res ( j , i ) = res ( j , i ) * mean_ ( i ) * mean_ ( j ) end do end do end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j ${ t1 }$ :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) ${ t1 }$ :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"corr_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j real ( dp ) :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) real ( dp ) :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& 0._dp , mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& 0._dp , mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / sqrt ( dot_product ( centeri_ , centeri_ ) * & dot_product ( centerj_ , centerj_ )) end do end do case default call error_stop ( \"ERROR (corr): wrong dimension\" ) end select end function ${ RName }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_corr.fypp.html"},{"title":"stdlib_math_logspace.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_math ) stdlib_math_logspace implicit none contains # !========================================================= # != logspace(start, end) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"default\" ) module procedure ${ RName }$ res = logspace ( start , end , DEFAULT_LOGSPACE_LENGTH , real ( DEFAULT_LOGSPACE_BASE , ${ k1 }$ )) end procedure # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"default\" ) module procedure ${ RName }$ res = logspace ( start , end , DEFAULT_LOGSPACE_LENGTH , DEFAULT_LOGSPACE_BASE ) end procedure # !========================================================= # != logspace(start, end, n) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n\" ) module procedure ${ RName }$ res = logspace ( start , end , n , real ( DEFAULT_LOGSPACE_BASE , ${ k1 }$ )) end procedure # : endfor # ! Integer support # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n\" ) module procedure ${ RName }$ res = logspace ( start , end , n , DEFAULT_LOGSPACE_BASE ) end procedure # !========================================================= # != logspace(start, end, n, base) = # !========================================================= # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_rbase\" ) module procedure ${ RName }$ ${ t1 }$ :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_cbase\" ) module procedure ${ RName }$ ${ t1 }$ :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : set RName = rname ( \"logspace\" , 1 , t1 , k1 , \"n_ibase\" ) module procedure ${ RName }$ ${ t1 }$ :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : endfor # ! Integer support: ! Generate logarithmically spaced sequence from ${k1}$ base to the powers ! of ${k1}$ start and end. [base^start, ... , base^end] ! RName = ${RName}$ # : for k1 in REAL_KINDS # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_r\" + str ( k1 ) + \"base\" ) module procedure ${ RName }$ integer :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_c\" + str ( k1 ) + \"base\" ) module procedure ${ RName }$ integer :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure # : endfor # : set RName = rname ( \"logspace\" , 1 , \"integer(int32)\" , \"int32\" , \"n_ibase\" ) module procedure ${ RName }$ integer :: exponents ( max ( n , 0 )) exponents = linspace ( start , end , n ) res = base ** exponents end procedure end submodule","tags":"","loc":"sourcefile/stdlib_math_logspace.fypp.html"},{"title":"stdlib_stats_mean.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_mean use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = sum ( x ) / real ( size ( x , kind = int64 ), ${ k1 }$ ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = sum ( real ( x , dp )) / real ( size ( x , kind = int64 ), dp ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( x , dim ) / real ( size ( x , dim ), ${ k1 }$ ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"mean\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( real ( x , dp ), dim ) / real ( size ( x , dim ), dp ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res res = sum ( x , mask ) / real ( count ( mask , kind = int64 ), ${ k1 }$ ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask_all' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res res = sum ( real ( x , dp ), mask ) / real ( count ( mask , kind = int64 ), dp ) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( x , dim , mask ) / real ( count ( mask , dim ), ${ k1 }$ ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( 'mean_mask' , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( real ( x , dp ), dim , mask ) / real ( count ( mask , dim ), dp ) else call error_stop ( \"ERROR (mean): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_mean.fypp.html"},{"title":"stdlib_constants.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS = REAL_KINDS module stdlib_constants !! Constants !! ([Specification](../page/specs/stdlib_constants.html)) use stdlib_kinds , only : #{ for k in KINDS [: - 1 ] }#${ k }$ , #{ endfor }#${ KINDS [ - 1 ] }$ use stdlib_codata , only : SPEED_OF_LIGHT_IN_VACUUM , & VACUUM_ELECTRIC_PERMITTIVITY , & VACUUM_MAG_PERMEABILITY , & PLANCK_CONSTANT , & NEWTONIAN_CONSTANT_OF_GRAVITATION , & STANDARD_ACCELERATION_OF_GRAVITY , & ELEMENTARY_CHARGE , & MOLAR_GAS_CONSTANT , & FINE_STRUCTURE_CONSTANT , & AVOGADRO_CONSTANT , & BOLTZMANN_CONSTANT , & STEFAN_BOLTZMANN_CONSTANT , & WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT , & RYDBERG_CONSTANT , & ELECTRON_MASS , & PROTON_MASS , & NEUTRON_MASS , & ATOMIC_MASS_CONSTANT private ! mathematical constants # : for k in KINDS real ( ${ k }$ ), parameter , public :: PI_$ { k }$ = acos ( - 1.0 _${ k }$ ) !! PI # : endfor ! Physical constants real ( dp ), parameter , public :: c = SPEED_OF_LIGHT_IN_VACUUM % value !! Speed of light in vacuum real ( dp ), parameter , public :: speed_of_light = SPEED_OF_LIGHT_IN_VACUUM % value !! Speed of light in vacuum real ( dp ), parameter , public :: mu_0 = VACUUM_MAG_PERMEABILITY % value !! vacuum mag. permeability real ( dp ), parameter , public :: epsilon_0 = VACUUM_ELECTRIC_PERMITTIVITY % value !! vacuum mag. permeability real ( dp ), parameter , public :: h = PLANCK_CONSTANT % value !! Planck constant real ( dp ), parameter , public :: Planck = PLANCK_CONSTANT % value !! Planck constant real ( dp ), parameter , public :: hbar = PLANCK_CONSTANT % value / PI_dp !! Reduced Planck constant real ( dp ), parameter , public :: G = NEWTONIAN_CONSTANT_OF_GRAVITATION % value !! Newtonian constant of gravitation real ( dp ), parameter , public :: gravitation_constant = NEWTONIAN_CONSTANT_OF_GRAVITATION % value !! Newtonian constant of gravitation real ( dp ), parameter , public :: g2 = STANDARD_ACCELERATION_OF_GRAVITY % value !! Standard acceleration of gravity real ( dp ), parameter , public :: e = ELEMENTARY_CHARGE % value !! Elementary charge real ( dp ), parameter , public :: R = MOLAR_GAS_CONSTANT % value !! Molar gas constant real ( dp ), parameter , public :: gas_constant = MOLAR_GAS_CONSTANT % value !! Molar gas constant real ( dp ), parameter , public :: alpha = FINE_STRUCTURE_CONSTANT % value !! Fine structure constant real ( dp ), parameter , public :: fine_structure = FINE_STRUCTURE_CONSTANT % value !! Fine structure constant real ( dp ), parameter , public :: N_A = AVOGADRO_CONSTANT % value !! Avogadro constant real ( dp ), parameter , public :: Avogadro = AVOGADRO_CONSTANT % value !! Avogadro constant real ( dp ), parameter , public :: k = BOLTZMANN_CONSTANT % value !! Boltzmann constant real ( dp ), parameter , public :: Boltzmann = BOLTZMANN_CONSTANT % value !! Boltzmann constant real ( dp ), parameter , public :: sigma = STEFAN_BOLTZMANN_CONSTANT % value !! Stefan-Boltzmann constant real ( dp ), parameter , public :: Stefan_Boltzmann = STEFAN_BOLTZMANN_CONSTANT % value !! Stefan-Boltzmann constant real ( dp ), parameter , public :: Wien = WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT % value !! Wien wavelength displacement law constant real ( dp ), parameter , public :: Rydberg = RYDBERG_CONSTANT % value !! Rydberg constant real ( dp ), parameter , public :: m_e = ELECTRON_MASS % value !! Electron mass real ( dp ), parameter , public :: m_p = PROTON_MASS % value !! Proton mass real ( dp ), parameter , public :: m_n = NEUTRON_MASS % value !! Neutron mass real ( dp ), parameter , public :: m_u = ATOMIC_MASS_CONSTANT % value !! Atomic mass constant real ( dp ), parameter , public :: u = ATOMIC_MASS_CONSTANT % value !! Atomic mass constant ! Additional constants if needed end module stdlib_constants","tags":"","loc":"sourcefile/stdlib_constants.fypp.html"},{"title":"stdlib_stringlist_type.f90 – Fortran-lang/stdlib","text":"Source Code ! stdlib_stringlist_type.f90 -- ! Module for storing and manipulating list of strings ! The strings may have arbitrary lengths, not necessarily the same ! ! insert AT: Inserts an element BEFORE the element present currently at the asked index ! for forward indexes ! Inserts an element AFTER the element present currently at the asked index ! for backward indexes ! In other words, after insertion the element will be present at the asked index ! for both forward and backward indexes ! insert BEFORE: Inserts an element BEFORE the element present currently at the asked index ! insert AFTER: Inserts an element AFTER the element present currently at the asked index ! ! Note the distinction between AT and BEFORE in the module. Care has been taken to keep it consistent ! throughout the PR ! module stdlib_stringlist_type use stdlib_string_type , only : string_type , operator ( /= ) use stdlib_math , only : clip implicit none private public :: stringlist_type , operator ( // ), operator ( == ), operator ( /= ) public :: list_head , list_tail , fidx , bidx , stringlist_index_type type stringlist_index_type private logical :: forward integer :: offset end type stringlist_index_type type ( stringlist_index_type ), parameter :: list_head = stringlist_index_type ( . true . , 1 ) ! fidx(1) type ( stringlist_index_type ), parameter :: list_tail = stringlist_index_type ( . false ., 1 ) ! bidx(1) !> Version: experimental !> !> Returns an instance of type 'stringlist_index_type' representing forward index !> [Specifications](../page/specs/stdlib_stringlist_type.html#fidx) interface fidx module procedure forward_index end interface !> Version: experimental !> !> Returns an instance of type 'stringlist_index_type' representing backward index !> [Specifications](../page/specs/stdlib_stringlist_type.html#bidx) interface bidx module procedure backward_index end interface type stringlist_type private type ( string_type ), dimension (:), allocatable :: stringarray contains private procedure , public :: clear => clear_list procedure , public :: len => length_list procedure :: to_future_at_idxn => convert_to_future_at_idxn procedure :: to_current_idxn => convert_to_current_idxn procedure :: insert_at_char_idx => insert_at_char_idx_wrap procedure :: insert_at_string_idx => insert_at_string_idx_wrap procedure :: insert_at_stringlist_idx => insert_at_stringlist_idx_wrap procedure :: insert_at_chararray_idx => insert_at_chararray_idx_wrap procedure :: insert_at_stringarray_idx => insert_at_stringarray_idx_wrap generic , public :: insert_at => insert_at_char_idx , & insert_at_string_idx , & insert_at_stringlist_idx , & insert_at_chararray_idx , & insert_at_stringarray_idx procedure :: insert_before_string_int => insert_before_string_int_impl procedure :: insert_before_stringlist_int => insert_before_stringlist_int_impl procedure :: insert_before_chararray_int => insert_before_chararray_int_impl procedure :: insert_before_stringarray_int => insert_before_stringarray_int_impl generic :: insert_before => insert_before_string_int , & insert_before_stringlist_int , & insert_before_chararray_int , & insert_before_stringarray_int procedure :: get_string_idx => get_string_idx_wrap generic , public :: get => get_string_idx end type stringlist_type !> Version: experimental !> !> Constructor for stringlist !> Returns an instance of type stringlist_type !> [Specifications](../page/specs/stdlib_stringlist_type.html#stringlist_type) interface stringlist_type module procedure new_stringlist module procedure new_stringlist_carray module procedure new_stringlist_sarray end interface !> Version: experimental !> !> Concatenates stringlist with the input entity !> Returns a new stringlist !> [Specifications](../page/specs/stdlib_stringlist_type.html#append-operator) interface operator ( // ) module procedure append_char module procedure append_string module procedure prepend_char module procedure prepend_string module procedure append_stringlist module procedure append_carray module procedure append_sarray module procedure prepend_carray module procedure prepend_sarray end interface !> Version: experimental !> !> Compares stringlist for equality with the input entity !> Returns a logical !> [Specifications](../page/specs/stdlib_stringlist_type.html#equality-operator) interface operator ( == ) module procedure eq_stringlist module procedure eq_stringlist_carray module procedure eq_stringlist_sarray module procedure eq_carray_stringlist module procedure eq_sarray_stringlist end interface !> Version: experimental !> !> Compares stringlist for inequality with the input entity !> Returns a logical !> [Specifications](../page/specs/stdlib_stringlist_type.html#inequality-operator) interface operator ( /= ) module procedure ineq_stringlist module procedure ineq_stringlist_carray module procedure ineq_stringlist_sarray module procedure ineq_carray_stringlist module procedure ineq_sarray_stringlist end interface contains ! constructor for stringlist_type: !> Constructor with no argument !> Returns a new instance of type stringlist pure function new_stringlist () type ( stringlist_type ) :: new_stringlist end function new_stringlist !> Constructor to convert chararray to stringlist !> Returns a new instance of type stringlist pure function new_stringlist_carray ( array ) character ( len =* ), dimension (:), intent ( in ) :: array type ( stringlist_type ) :: new_stringlist_carray type ( string_type ), dimension ( size ( array ) ) :: sarray integer :: i do i = 1 , size ( array ) sarray ( i ) = string_type ( array ( i ) ) end do new_stringlist_carray = stringlist_type ( sarray ) end function new_stringlist_carray !> Constructor to convert stringarray to stringlist !> Returns a new instance of type stringlist pure function new_stringlist_sarray ( array ) type ( string_type ), dimension (:), intent ( in ) :: array type ( stringlist_type ) :: new_stringlist_sarray new_stringlist_sarray = stringlist_type () new_stringlist_sarray % stringarray = array end function new_stringlist_sarray ! constructor for stringlist_index_type: !> Returns an instance of type 'stringlist_index_type' representing forward index 'idx' pure function forward_index ( idx ) integer , intent ( in ) :: idx type ( stringlist_index_type ) :: forward_index forward_index = stringlist_index_type ( . true ., idx ) end function forward_index !> Returns an instance of type 'stringlist_index_type' representing backward index 'idx' pure function backward_index ( idx ) integer , intent ( in ) :: idx type ( stringlist_index_type ) :: backward_index backward_index = stringlist_index_type ( . false ., idx ) end function backward_index ! concatenation operator: !> Appends character scalar 'rhs' to the stringlist 'list' !> Returns a new stringlist function append_char ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), intent ( in ) :: rhs type ( stringlist_type ) :: append_char append_char = lhs // string_type ( rhs ) end function append_char !> Appends string 'rhs' to the stringlist 'list' !> Returns a new stringlist function append_string ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), intent ( in ) :: rhs type ( stringlist_type ) :: append_string append_string = lhs ! Intent: creating a full, deep copy call append_string % insert_at ( list_tail , rhs ) end function append_string !> Prepends character scalar 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_char ( lhs , rhs ) character ( len =* ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_char prepend_char = string_type ( lhs ) // rhs end function prepend_char !> Prepends string 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_string ( lhs , rhs ) type ( string_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_string prepend_string = rhs ! Intent: creating a full, deep copy call prepend_string % insert_at ( list_head , lhs ) end function prepend_string !> Appends stringlist 'rhs' to the stringlist 'lhs' !> Returns a new stringlist function append_stringlist ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: append_stringlist append_stringlist = lhs ! Intent: creating a full, deep copy call append_stringlist % insert_at ( list_tail , rhs ) end function append_stringlist !> Appends chararray 'rhs' to the stringlist 'lhs' !> Returns a new stringlist function append_carray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), dimension (:), intent ( in ) :: rhs type ( stringlist_type ) :: append_carray append_carray = lhs ! Intent: creating a full, deep copy call append_carray % insert_at ( list_tail , rhs ) end function append_carray !> Appends stringarray 'rhs' to the stringlist 'lhs' !> Returns a new stringlist function append_sarray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), dimension (:), intent ( in ) :: rhs type ( stringlist_type ) :: append_sarray append_sarray = lhs ! Intent: creating a full, deep copy call append_sarray % insert_at ( list_tail , rhs ) end function append_sarray !> Prepends chararray 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_carray ( lhs , rhs ) character ( len =* ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_carray prepend_carray = rhs ! Intent: creating a full, deep copy call prepend_carray % insert_at ( list_head , lhs ) end function prepend_carray !> Prepends stringarray 'lhs' to the stringlist 'rhs' !> Returns a new stringlist function prepend_sarray ( lhs , rhs ) type ( string_type ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs type ( stringlist_type ) :: prepend_sarray prepend_sarray = rhs ! Intent: creating a full, deep copy call prepend_sarray % insert_at ( list_head , lhs ) end function prepend_sarray ! equality operator: !> Compares stringlist 'lhs' for equality with stringlist 'rhs' !> Returns a logical pure logical function eq_stringlist ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs integer :: i eq_stringlist = . false . if ( lhs % len () == rhs % len () ) then eq_stringlist = . true . do i = 1 , lhs % len () if ( lhs % stringarray ( i ) /= rhs % stringarray ( i ) ) then eq_stringlist = . false . exit end if end do end if end function eq_stringlist !> Compares stringlist 'lhs' for equality with chararray 'rhs' !> Returns a logical pure logical function eq_stringlist_carray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), dimension (:), intent ( in ) :: rhs integer :: i eq_stringlist_carray = . false . if ( lhs % len () == size ( rhs ) ) then eq_stringlist_carray = . true . do i = 1 , lhs % len () if ( lhs % stringarray ( i ) /= rhs ( i ) ) then eq_stringlist_carray = . false . exit end if end do end if end function eq_stringlist_carray !> Compares stringlist 'lhs' for equality with stringarray 'rhs' !> Returns a logical pure logical function eq_stringlist_sarray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), dimension (:), intent ( in ) :: rhs integer :: i eq_stringlist_sarray = . false . if ( lhs % len () == size ( rhs ) ) then eq_stringlist_sarray = . true . do i = 1 , lhs % len () if ( lhs % stringarray ( i ) /= rhs ( i ) ) then eq_stringlist_sarray = . false . exit end if end do end if end function eq_stringlist_sarray !> Compares chararray 'lhs' for equality with stringlist 'rhs' !> Returns a logical pure logical function eq_carray_stringlist ( lhs , rhs ) character ( len =* ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs eq_carray_stringlist = ( rhs == lhs ) end function eq_carray_stringlist !> Compares stringarray 'lhs' for equality with stringlist 'rhs' !> Returns a logical pure logical function eq_sarray_stringlist ( lhs , rhs ) type ( string_type ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs eq_sarray_stringlist = ( rhs == lhs ) end function eq_sarray_stringlist ! inequality operator: !> Compares stringlist 'lhs' for inequality with stringlist 'rhs' !> Returns a logical pure logical function ineq_stringlist ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs ineq_stringlist = . not .( lhs == rhs ) end function ineq_stringlist !> Compares stringlist 'lhs' for inequality with chararray 'rhs' !> Returns a logical pure logical function ineq_stringlist_carray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs character ( len =* ), dimension (:), intent ( in ) :: rhs ineq_stringlist_carray = . not .( lhs == rhs ) end function ineq_stringlist_carray !> Compares stringlist 'lhs' for inequality with stringarray 'rhs' !> Returns a logical pure logical function ineq_stringlist_sarray ( lhs , rhs ) type ( stringlist_type ), intent ( in ) :: lhs type ( string_type ), dimension (:), intent ( in ) :: rhs ineq_stringlist_sarray = . not .( lhs == rhs ) end function ineq_stringlist_sarray !> Compares chararray 'lhs' for inequality with stringlist 'rhs' !> Returns a logical pure logical function ineq_carray_stringlist ( lhs , rhs ) character ( len =* ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs ineq_carray_stringlist = . not .( lhs == rhs ) end function ineq_carray_stringlist !> Compares stringarray 'lhs' for inequality with stringlist 'rhs' !> Returns a logical pure logical function ineq_sarray_stringlist ( lhs , rhs ) type ( string_type ), dimension (:), intent ( in ) :: lhs type ( stringlist_type ), intent ( in ) :: rhs ineq_sarray_stringlist = . not .( lhs == rhs ) end function ineq_sarray_stringlist ! clear: !> Version: experimental !> !> Resets stringlist 'list' to an empy stringlist of len 0 !> Modifies the input stringlist 'list' subroutine clear_list ( list ) class ( stringlist_type ), intent ( inout ) :: list if ( allocated ( list % stringarray ) ) then deallocate ( list % stringarray ) end if end subroutine clear_list ! len: !> Version: experimental !> !> Returns the len (length) of the list !> Returns an integer pure integer function length_list ( list ) class ( stringlist_type ), intent ( in ) :: list length_list = 0 if ( allocated ( list % stringarray ) ) then length_list = size ( list % stringarray ) end if end function length_list ! to_future_at_idxn: !> Version: experimental !> !> Converts a forward index OR a backward index to an integer index at !> which the new element will be present post insertion (i.e. in future) !> Returns an integer pure integer function convert_to_future_at_idxn ( list , idx ) !> Not a part of public API class ( stringlist_type ), intent ( in ) :: list type ( stringlist_index_type ), intent ( in ) :: idx ! Formula: merge( fidx( x ) - ( list_head - 1 ), len - bidx( x ) + ( list_tail - 1 ) + 2, ... ) convert_to_future_at_idxn = merge ( idx % offset , list % len () - idx % offset + 2 , idx % forward ) end function convert_to_future_at_idxn ! to_current_idxn: !> Version: experimental !> !> Converts a forward index OR backward index to its equivalent integer index idxn !> Returns an integer pure integer function convert_to_current_idxn ( list , idx ) !> Not a part of public API class ( stringlist_type ), intent ( in ) :: list type ( stringlist_index_type ), intent ( in ) :: idx ! Formula: merge( fidx( x ) - ( list_head - 1 ), len + 1 - bidx( x ) + ( list_tail - 1 ), ... ) convert_to_current_idxn = merge ( idx % offset , list % len () - idx % offset + 1 , idx % forward ) end function convert_to_current_idxn ! insert_at: !> Version: experimental !> !> Inserts character scalar 'string' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_char_idx_wrap ( list , idx , string ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx character ( len =* ), intent ( in ) :: string call list % insert_at ( idx , string_type ( string ) ) end subroutine insert_at_char_idx_wrap !> Version: experimental !> !> Inserts string 'string' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_string_idx_wrap ( list , idx , string ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( string_type ), intent ( in ) :: string call list % insert_before ( list % to_future_at_idxn ( idx ), string ) end subroutine insert_at_string_idx_wrap !> Version: experimental !> !> Inserts stringlist 'slist' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_stringlist_idx_wrap ( list , idx , slist ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( stringlist_type ), intent ( in ) :: slist call list % insert_before ( list % to_future_at_idxn ( idx ), slist ) end subroutine insert_at_stringlist_idx_wrap !> Version: experimental !> !> Inserts chararray 'carray' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_chararray_idx_wrap ( list , idx , carray ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx character ( len =* ), dimension (:), intent ( in ) :: carray call list % insert_before ( list % to_future_at_idxn ( idx ), carray ) end subroutine insert_at_chararray_idx_wrap !> Version: experimental !> !> Inserts stringarray 'sarray' AT stringlist_index 'idx' in stringlist 'list' !> Modifies the input stringlist 'list' subroutine insert_at_stringarray_idx_wrap ( list , idx , sarray ) class ( stringlist_type ), intent ( inout ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( string_type ), dimension (:), intent ( in ) :: sarray call list % insert_before ( list % to_future_at_idxn ( idx ), sarray ) end subroutine insert_at_stringarray_idx_wrap !> Version: experimental !> !> Inserts 'positions' number of empty positions BEFORE integer index 'idxn' !> Modifies the input stringlist 'list' subroutine insert_before_empty_positions ( list , idxn , positions ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( inout ) :: idxn integer , intent ( in ) :: positions integer :: i , inew integer :: new_len , old_len type ( string_type ), dimension (:), allocatable :: new_stringarray if ( positions > 0 ) then idxn = clip ( idxn , 1 , list % len () + 1 ) old_len = list % len () new_len = old_len + positions allocate ( new_stringarray ( new_len ) ) do i = 1 , idxn - 1 ! TODO: can be improved by move new_stringarray ( i ) = list % stringarray ( i ) end do do i = idxn , old_len inew = i + positions ! TODO: can be improved by move new_stringarray ( inew ) = list % stringarray ( i ) end do call move_alloc ( new_stringarray , list % stringarray ) end if end subroutine insert_before_empty_positions !> Version: experimental !> !> Inserts string 'string' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_string_int_impl ( list , idxn , string ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn type ( string_type ), intent ( in ) :: string integer :: work_idxn work_idxn = idxn call insert_before_empty_positions ( list , work_idxn , 1 ) list % stringarray ( work_idxn ) = string end subroutine insert_before_string_int_impl !> Version: experimental !> !> Inserts stringlist 'slist' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_stringlist_int_impl ( list , idxn , slist ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn type ( stringlist_type ), intent ( in ) :: slist integer :: i integer :: work_idxn , idxnew integer :: pre_length , post_length work_idxn = idxn pre_length = slist % len () call insert_before_empty_positions ( list , work_idxn , pre_length ) post_length = slist % len () do i = 1 , min ( work_idxn - 1 , pre_length ) idxnew = work_idxn + i - 1 list % stringarray ( idxnew ) = slist % stringarray ( i ) end do do i = work_idxn + post_length - pre_length , post_length idxnew = work_idxn + i - post_length + pre_length - 1 list % stringarray ( idxnew ) = slist % stringarray ( i ) end do end subroutine insert_before_stringlist_int_impl !> Version: experimental !> !> Inserts chararray 'carray' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_chararray_int_impl ( list , idxn , carray ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn character ( len =* ), dimension (:), intent ( in ) :: carray integer :: i integer :: work_idxn , idxnew work_idxn = idxn call insert_before_empty_positions ( list , work_idxn , size ( carray ) ) do i = 1 , size ( carray ) idxnew = work_idxn + i - 1 list % stringarray ( idxnew ) = string_type ( carray ( i ) ) end do end subroutine insert_before_chararray_int_impl !> Version: experimental !> !> Inserts stringarray 'sarray' BEFORE integer index 'idxn' in the underlying stringarray !> Modifies the input stringlist 'list' subroutine insert_before_stringarray_int_impl ( list , idxn , sarray ) !> Not a part of public API class ( stringlist_type ), intent ( inout ) :: list integer , intent ( in ) :: idxn type ( string_type ), dimension (:), intent ( in ) :: sarray integer :: i integer :: work_idxn , idxnew work_idxn = idxn call insert_before_empty_positions ( list , work_idxn , size ( sarray ) ) do i = 1 , size ( sarray ) idxnew = work_idxn + i - 1 list % stringarray ( idxnew ) = sarray ( i ) end do end subroutine insert_before_stringarray_int_impl ! get: !> Version: experimental !> !> Returns the string present at stringlist_index 'idx' in stringlist 'list' !> Returns string_type instance pure function get_string_idx_wrap ( list , idx ) class ( stringlist_type ), intent ( in ) :: list type ( stringlist_index_type ), intent ( in ) :: idx type ( string_type ) :: get_string_idx_wrap integer :: idxn idxn = list % to_current_idxn ( idx ) ! if the index is out of bounds, return a string_type equivalent to empty string if ( 1 <= idxn . and . idxn <= list % len () ) then get_string_idx_wrap = list % stringarray ( idxn ) end if end function get_string_idx_wrap end module stdlib_stringlist_type","tags":"","loc":"sourcefile/stdlib_stringlist_type.f90.html"},{"title":"stdlib_stats_moment_all.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment_all use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: center_ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), ${ k1 }$ ) if ( present ( center )) then center_ = center else center_ = mean ( x ) end if res = sum (( x - center_ ) ** order ) / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ), optional :: mask real ( dp ) :: res real ( dp ) :: n real ( dp ) :: center_ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), dp ) if ( present ( center )) then center_ = center else center_ = mean ( x ) end if res = sum (( real ( x , dp ) - center_ ) ** order ) / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order ${ t1 }$ , intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: center_ n = real ( count ( mask , kind = int64 ), ${ k1 }$ ) if ( present ( center )) then center_ = center else center_ = mean ( x , mask ) end if res = sum (( x - center_ ) ** order , mask ) / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order real ( dp ), intent ( in ), optional :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res real ( dp ) :: n real ( dp ) :: center_ n = real ( count ( mask , kind = int64 ), dp ) if ( present ( center )) then center_ = center else center_ = mean ( x , mask ) end if res = sum (( real ( x , dp ) - center_ ) ** order , mask ) / n end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment_all.fypp.html"},{"title":"stdlib_linalg_blas.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_d #:if WITH_QP use stdlib_linalg_blas_q #:endif use stdlib_linalg_blas_c use stdlib_linalg_blas_z #:if WITH_QP use stdlib_linalg_blas_w #:endif implicit none ( type , external ) public interface axpy !! AXPY constant times a vector plus a vector. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine caxpy ( n , ca , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: ca , cx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( inout ) :: cy ( * ) end subroutine caxpy #else module procedure stdlib_caxpy #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine daxpy ( n , da , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: da , dx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( inout ) :: dy ( * ) end subroutine daxpy #else module procedure stdlib_daxpy #endif #:if WITH_QP module procedure stdlib_qaxpy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine saxpy ( n , sa , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: sa , sx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( inout ) :: sy ( * ) end subroutine saxpy #else module procedure stdlib_saxpy #endif #:if WITH_QP module procedure stdlib_waxpy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zaxpy ( n , za , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: za , zx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( inout ) :: zy ( * ) end subroutine zaxpy #else module procedure stdlib_zaxpy #endif end interface axpy interface copy !! COPY copies a vector x to a vector y. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ccopy ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( out ) :: cy ( * ) end subroutine ccopy #else module procedure stdlib_ccopy #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dcopy ( n , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( out ) :: dy ( * ) end subroutine dcopy #else module procedure stdlib_dcopy #endif #:if WITH_QP module procedure stdlib_qcopy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine scopy ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( out ) :: sy ( * ) end subroutine scopy #else module procedure stdlib_scopy #endif #:if WITH_QP module procedure stdlib_wcopy #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zcopy ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( out ) :: zy ( * ) end subroutine zcopy #else module procedure stdlib_zcopy #endif end interface copy interface dot !! DOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. #ifdef STDLIB_EXTERNAL_BLAS pure real ( dp ) function ddot ( n , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: dx ( * ), dy ( * ) end function ddot #else module procedure stdlib_ddot #endif #:if WITH_QP module procedure stdlib_qdot #:endif #ifdef STDLIB_EXTERNAL_BLAS pure real ( sp ) function sdot ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) end function sdot #else module procedure stdlib_sdot #endif end interface dot interface dotc !! DOTC forms the dot product of two complex vectors !! DOTC = X^H * Y #ifdef STDLIB_EXTERNAL_BLAS pure complex ( sp ) function cdotc ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) end function cdotc #else module procedure stdlib_cdotc #endif #:if WITH_QP module procedure stdlib_wdotc #:endif #ifdef STDLIB_EXTERNAL_BLAS pure complex ( dp ) function zdotc ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) end function zdotc #else module procedure stdlib_zdotc #endif end interface dotc interface dotu !! DOTU forms the dot product of two complex vectors !! DOTU = X^T * Y #ifdef STDLIB_EXTERNAL_BLAS pure complex ( sp ) function cdotu ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) end function cdotu #else module procedure stdlib_cdotu #endif #:if WITH_QP module procedure stdlib_wdotu #:endif #ifdef STDLIB_EXTERNAL_BLAS pure complex ( dp ) function zdotu ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) end function zdotu #else module procedure stdlib_zdotu #endif end interface dotu interface gbmv !! GBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans complex ( sp ), intent ( inout ) :: y ( * ) end subroutine cgbmv #else module procedure stdlib_cgbmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans real ( dp ), intent ( inout ) :: y ( * ) end subroutine dgbmv #else module procedure stdlib_dgbmv #endif #:if WITH_QP module procedure stdlib_qgbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans real ( sp ), intent ( inout ) :: y ( * ) end subroutine sgbmv #else module procedure stdlib_sgbmv #endif #:if WITH_QP module procedure stdlib_wgbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zgbmv #else module procedure stdlib_zgbmv #endif end interface gbmv interface gemm !! GEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine cgemm #else module procedure stdlib_cgemm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dgemm #else module procedure stdlib_dgemm #endif #:if WITH_QP module procedure stdlib_qgemm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine sgemm #else module procedure stdlib_sgemm #endif #:if WITH_QP module procedure stdlib_wgemm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zgemm #else module procedure stdlib_zgemm #endif end interface gemm interface gemv !! GEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans complex ( sp ), intent ( inout ) :: y ( * ) end subroutine cgemv #else module procedure stdlib_cgemv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans real ( dp ), intent ( inout ) :: y ( * ) end subroutine dgemv #else module procedure stdlib_dgemv #endif #:if WITH_QP module procedure stdlib_qgemv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans real ( sp ), intent ( inout ) :: y ( * ) end subroutine sgemv #else module procedure stdlib_sgemv #endif #:if WITH_QP module procedure stdlib_wgemv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zgemv #else module procedure stdlib_zgemv #endif end interface gemv interface ger !! GER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dger ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n real ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine dger #else module procedure stdlib_dger #endif #:if WITH_QP module procedure stdlib_qger #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sger ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n real ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine sger #else module procedure stdlib_sger #endif end interface ger interface gerc !! GERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgerc ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine cgerc #else module procedure stdlib_cgerc #endif #:if WITH_QP module procedure stdlib_wgerc #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgerc ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine zgerc #else module procedure stdlib_zgerc #endif end interface gerc interface geru !! GERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cgeru ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine cgeru #else module procedure stdlib_cgeru #endif #:if WITH_QP module procedure stdlib_wgeru #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zgeru ( m , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n complex ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine zgeru #else module procedure stdlib_zgeru #endif end interface geru interface hbmv !! HBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: y ( * ) end subroutine chbmv #else module procedure stdlib_chbmv #endif #:if WITH_QP module procedure stdlib_whbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zhbmv #else module procedure stdlib_zhbmv #endif end interface hbmv interface hemm !! HEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine chemm #else module procedure stdlib_chemm #endif #:if WITH_QP module procedure stdlib_whemm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zhemm #else module procedure stdlib_zhemm #endif end interface hemm interface hemv !! HEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: y ( * ) end subroutine chemv #else module procedure stdlib_chemv #endif #:if WITH_QP module procedure stdlib_whemv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zhemv #else module procedure stdlib_zhemv #endif end interface hemv interface her !! HER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cher ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ) end subroutine cher #else module procedure stdlib_cher #endif #:if WITH_QP module procedure stdlib_wher #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zher ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ) end subroutine zher #else module procedure stdlib_zher #endif end interface her interface her2 !! HER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine cher2 #else module procedure stdlib_cher2 #endif #:if WITH_QP module procedure stdlib_wher2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine zher2 #else module procedure stdlib_zher2 #endif end interface her2 interface her2k !! HER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine cher2k #else module procedure stdlib_cher2k #endif #:if WITH_QP module procedure stdlib_wher2k #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zher2k #else module procedure stdlib_zher2k #endif end interface her2k interface herk !! HERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine cherk #else module procedure stdlib_cherk #endif #:if WITH_QP module procedure stdlib_wherk #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zherk #else module procedure stdlib_zherk #endif end interface herk interface hpmv !! HPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: y ( * ) end subroutine chpmv #else module procedure stdlib_chpmv #endif #:if WITH_QP module procedure stdlib_whpmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: y ( * ) end subroutine zhpmv #else module procedure stdlib_zhpmv #endif end interface hpmv interface hpr !! HPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chpr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ) end subroutine chpr #else module procedure stdlib_chpr #endif #:if WITH_QP module procedure stdlib_whpr #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhpr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ) end subroutine zhpr #else module procedure stdlib_zhpr #endif end interface hpr interface hpr2 !! HPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine chpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( sp ), intent ( inout ) :: ap ( * ) end subroutine chpr2 #else module procedure stdlib_chpr2 #endif #:if WITH_QP module procedure stdlib_whpr2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zhpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo complex ( dp ), intent ( inout ) :: ap ( * ) end subroutine zhpr2 #else module procedure stdlib_zhpr2 #endif end interface hpr2 interface nrm2 !! NRM2 returns the euclidean norm of a vector via the function !! name, so that !! NRM2 := sqrt( x'*x ) #ifdef STDLIB_EXTERNAL_BLAS pure real ( dp ) function dnrm2 ( n , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n real ( dp ), intent ( in ) :: x ( * ) end function dnrm2 #else module procedure stdlib_dnrm2 #endif #:if WITH_QP module procedure stdlib_qnrm2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure real ( sp ) function snrm2 ( n , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n real ( sp ), intent ( in ) :: x ( * ) end function snrm2 #else module procedure stdlib_snrm2 #endif end interface nrm2 interface rot !! ROT applies a plane rotation. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drot ( n , dx , incx , dy , incy , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) end subroutine drot #else module procedure stdlib_drot #endif #:if WITH_QP module procedure stdlib_qrot #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srot ( n , sx , incx , sy , incy , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) end subroutine srot #else module procedure stdlib_srot #endif end interface rot interface rotg !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in SROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by SROTG !! if the signs of a and b are not the same. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine crotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( out ) :: c complex ( sp ), intent ( inout ) :: a complex ( sp ), intent ( in ) :: b complex ( sp ), intent ( out ) :: s end subroutine crotg #else module procedure stdlib_crotg #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( inout ) :: a , b real ( dp ), intent ( out ) :: c , s end subroutine drotg #else module procedure stdlib_drotg #endif #:if WITH_QP module procedure stdlib_qrotg #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( inout ) :: a , b real ( sp ), intent ( out ) :: c , s end subroutine srotg #else module procedure stdlib_srotg #endif #:if WITH_QP module procedure stdlib_wrotg #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zrotg ( a , b , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( out ) :: c complex ( dp ), intent ( inout ) :: a complex ( dp ), intent ( in ) :: b complex ( dp ), intent ( out ) :: s end subroutine zrotg #else module procedure stdlib_zrotg #endif end interface rotg interface rotm !! ROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See ROTMG for a description of data storage in DPARAM. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drotm ( n , dx , incx , dy , incy , dparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: dparam ( 5 ) real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) end subroutine drotm #else module procedure stdlib_drotm #endif #:if WITH_QP module procedure stdlib_qrotm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srotm ( n , sx , incx , sy , incy , sparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sparam ( 5 ) real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) end subroutine srotm #else module procedure stdlib_srotm #endif end interface rotm interface rotmg !! ROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine drotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( dp ), intent ( in ) :: dy1 real ( dp ), intent ( out ) :: dparam ( 5 ) end subroutine drotmg #else module procedure stdlib_drotmg #endif #:if WITH_QP module procedure stdlib_qrotmg #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine srotmg ( sd1 , sd2 , sx1 , sy1 , sparam ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( inout ) :: sd1 , sd2 , sx1 real ( sp ), intent ( in ) :: sy1 real ( sp ), intent ( out ) :: sparam ( 5 ) end subroutine srotmg #else module procedure stdlib_srotmg #endif end interface rotmg interface sbmv !! SBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: y ( * ) end subroutine dsbmv #else module procedure stdlib_dsbmv #endif #:if WITH_QP module procedure stdlib_qsbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: y ( * ) end subroutine ssbmv #else module procedure stdlib_ssbmv #endif end interface sbmv interface scal !! SCAL scales a vector by a constant. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cscal ( n , ca , cx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , n complex ( sp ), intent ( inout ) :: cx ( * ) end subroutine cscal #else module procedure stdlib_cscal #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dscal ( n , da , dx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n real ( dp ), intent ( inout ) :: dx ( * ) end subroutine dscal #else module procedure stdlib_dscal #endif #:if WITH_QP module procedure stdlib_qscal #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sscal ( n , sa , sx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n real ( sp ), intent ( inout ) :: sx ( * ) end subroutine sscal #else module procedure stdlib_sscal #endif #:if WITH_QP module procedure stdlib_wscal #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zscal ( n , za , zx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n complex ( dp ), intent ( inout ) :: zx ( * ) end subroutine zscal #else module procedure stdlib_zscal #endif end interface scal interface sdot !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! SDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. #ifdef STDLIB_EXTERNAL_BLAS pure real ( dp ) function dsdot ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) end function dsdot #else module procedure stdlib_dsdot #endif #:if WITH_QP module procedure stdlib_qsdot #:endif end interface sdot interface spmv !! SPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: y ( * ) end subroutine dspmv #else module procedure stdlib_dspmv #endif #:if WITH_QP module procedure stdlib_qspmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , ap ( * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: y ( * ) end subroutine sspmv #else module procedure stdlib_sspmv #endif end interface spmv interface spr !! SPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dspr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: ap ( * ) end subroutine dspr #else module procedure stdlib_dspr #endif #:if WITH_QP module procedure stdlib_qspr #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sspr ( uplo , n , alpha , x , incx , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: ap ( * ) end subroutine sspr #else module procedure stdlib_sspr #endif end interface spr interface spr2 !! SPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: ap ( * ) end subroutine dspr2 #else module procedure stdlib_dspr2 #endif #:if WITH_QP module procedure stdlib_qspr2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: ap ( * ) end subroutine sspr2 #else module procedure stdlib_sspr2 #endif end interface spr2 interface srot !! SROT applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csrot ( n , cx , incx , cy , incy , c , s ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: c , s complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) end subroutine csrot #else module procedure stdlib_csrot #endif end interface srot interface sscal !! SSCAL scales a complex vector by a real constant. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csscal ( n , sa , cx , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n complex ( sp ), intent ( inout ) :: cx ( * ) end subroutine csscal #else module procedure stdlib_csscal #endif end interface sscal interface swap !! SWAP interchanges two vectors. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine cswap ( n , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) end subroutine cswap #else module procedure stdlib_cswap #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dswap ( n , dx , incx , dy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) end subroutine dswap #else module procedure stdlib_dswap #endif #:if WITH_QP module procedure stdlib_qswap #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine sswap ( n , sx , incx , sy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) end subroutine sswap #else module procedure stdlib_sswap #endif #:if WITH_QP module procedure stdlib_wswap #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zswap ( n , zx , incx , zy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) end subroutine zswap #else module procedure stdlib_zswap #endif end interface swap interface symm !! SYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine csymm #else module procedure stdlib_csymm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dsymm #else module procedure stdlib_dsymm #endif #:if WITH_QP module procedure stdlib_qsymm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine ssymm #else module procedure stdlib_ssymm #endif #:if WITH_QP module procedure stdlib_wsymm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zsymm #else module procedure stdlib_zsymm #endif end interface symm interface symv !! SYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: y ( * ) end subroutine dsymv #else module procedure stdlib_dsymv #endif #:if WITH_QP module procedure stdlib_qsymv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), x ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: y ( * ) end subroutine ssymv #else module procedure stdlib_ssymv #endif end interface symv interface syr !! SYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyr ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine dsyr #else module procedure stdlib_dsyr #endif #:if WITH_QP module procedure stdlib_qsyr #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyr ( uplo , n , alpha , x , incx , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine ssyr #else module procedure stdlib_ssyr #endif end interface syr interface syr2 !! SYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( dp ), intent ( inout ) :: a ( lda , * ) end subroutine dsyr2 #else module procedure stdlib_dsyr2 #endif #:if WITH_QP module procedure stdlib_qsyr2 #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , x ( * ), y ( * ) integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo real ( sp ), intent ( inout ) :: a ( lda , * ) end subroutine ssyr2 #else module procedure stdlib_ssyr2 #endif end interface syr2 interface syr2k !! SYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine csyr2k #else module procedure stdlib_csyr2k #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dsyr2k #else module procedure stdlib_dsyr2k #endif #:if WITH_QP module procedure stdlib_qsyr2k #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine ssyr2k #else module procedure stdlib_ssyr2k #endif #:if WITH_QP module procedure stdlib_wsyr2k #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ), b ( ldb , * ) integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zsyr2k #else module procedure stdlib_zsyr2k #endif end interface syr2k interface syrk !! SYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine csyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine csyrk #else module procedure stdlib_csyrk #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo real ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine dsyrk #else module procedure stdlib_dsyrk #endif #:if WITH_QP module procedure stdlib_qsyrk #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ssyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo real ( sp ), intent ( inout ) :: c ( ldc , * ) end subroutine ssyrk #else module procedure stdlib_ssyrk #endif #:if WITH_QP module procedure stdlib_wsyrk #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine zsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , beta , a ( lda , * ) integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo complex ( dp ), intent ( inout ) :: c ( ldc , * ) end subroutine zsyrk #else module procedure stdlib_zsyrk #endif end interface syrk interface tbmv !! TBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctbmv #else module procedure stdlib_ctbmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtbmv #else module procedure stdlib_dtbmv #endif #:if WITH_QP module procedure stdlib_qtbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stbmv #else module procedure stdlib_stbmv #endif #:if WITH_QP module procedure stdlib_wtbmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztbmv #else module procedure stdlib_ztbmv #endif end interface tbmv interface tbsv !! TBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctbsv #else module procedure stdlib_ctbsv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtbsv #else module procedure stdlib_dtbsv #endif #:if WITH_QP module procedure stdlib_qtbsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stbsv #else module procedure stdlib_stbsv #endif #:if WITH_QP module procedure stdlib_wtbsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztbsv #else module procedure stdlib_ztbsv #endif end interface tbsv interface tpmv !! TPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctpmv #else module procedure stdlib_ctpmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtpmv #else module procedure stdlib_dtpmv #endif #:if WITH_QP module procedure stdlib_qtpmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stpmv #else module procedure stdlib_stpmv #endif #:if WITH_QP module procedure stdlib_wtpmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztpmv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztpmv #else module procedure stdlib_ztpmv #endif end interface tpmv interface tpsv !! TPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctpsv #else module procedure stdlib_ctpsv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtpsv #else module procedure stdlib_dtpsv #endif #:if WITH_QP module procedure stdlib_qtpsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine stpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine stpsv #else module procedure stdlib_stpsv #endif #:if WITH_QP module procedure stdlib_wtpsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztpsv ( uplo , trans , diag , n , ap , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztpsv #else module procedure stdlib_ztpsv #endif end interface tpsv interface trmm !! TRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine ctrmm #else module procedure stdlib_ctrmm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine dtrmm #else module procedure stdlib_dtrmm #endif #:if WITH_QP module procedure stdlib_qtrmm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine strmm #else module procedure stdlib_strmm #endif #:if WITH_QP module procedure stdlib_wtrmm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine ztrmm #else module procedure stdlib_ztrmm #endif end interface trmm interface trmv !! TRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctrmv #else module procedure stdlib_ctrmv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtrmv #else module procedure stdlib_dtrmv #endif #:if WITH_QP module procedure stdlib_qtrmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine strmv #else module procedure stdlib_strmv #endif #:if WITH_QP module procedure stdlib_wtrmv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrmv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztrmv #else module procedure stdlib_ztrmv #endif end interface trmv interface trsm !! TRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine ctrsm #else module procedure stdlib_ctrsm #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine dtrsm #else module procedure stdlib_dtrsm #endif #:if WITH_QP module procedure stdlib_qtrsm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) real ( sp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo real ( sp ), intent ( inout ) :: b ( ldb , * ) end subroutine strsm #else module procedure stdlib_strsm #endif #:if WITH_QP module procedure stdlib_wtrsm #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( dp ), intent ( in ) :: alpha , a ( lda , * ) integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo complex ( dp ), intent ( inout ) :: b ( ldb , * ) end subroutine ztrsm #else module procedure stdlib_ztrsm #endif end interface trsm interface trsv !! TRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ctrsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) end subroutine ctrsv #else module procedure stdlib_ctrsv #endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine dtrsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) end subroutine dtrsv #else module procedure stdlib_dtrsv #endif #:if WITH_QP module procedure stdlib_qtrsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine strsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) end subroutine strsv #else module procedure stdlib_strsv #endif #:if WITH_QP module procedure stdlib_wtrsv #:endif #ifdef STDLIB_EXTERNAL_BLAS pure subroutine ztrsv ( uplo , trans , diag , n , a , lda , x , incx ) import sp , dp , qp , ilp , lk implicit none ( type , external ) integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) end subroutine ztrsv #else module procedure stdlib_ztrsv #endif end interface trsv end module stdlib_linalg_blas","tags":"","loc":"sourcefile/stdlib_linalg_blas.fypp.html"},{"title":"stdlib_quadrature_simps.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_quadrature ) stdlib_quadrature_simps use stdlib_error , only : check implicit none ! internal use only interface simps38 # : for k1 , t1 in REAL_KINDS_TYPES module procedure simps38_dx_$ { k1 }$ module procedure simps38_x_$ { k1 }$ # : endfor end interface simps38 ! internal use only interface simps38_weights # : for k1 , t1 in REAL_KINDS_TYPES module procedure simps38_weights_$ { k1 }$ # : endfor end interface simps38_weights contains #:for k1, t1 in REAL_KINDS_TYPES pure recursive module function simps_dx_$ { k1 }$ ( y , dx , even ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , intent ( in ) :: dx integer , intent ( in ), optional :: even ${ t1 }$ :: integral integer :: n n = size ( y ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ k1 }$ case ( 2 ) integral = 0.5 _${ k1 }$ * dx * ( y ( 1 ) + y ( 2 )) case ( 3 ) integral = dx / 3.0 _${ k1 }$ * ( y ( 1 ) + 4 * y ( 2 ) + y ( 3 )) case ( 4 ) integral = simps38 ( y , dx ) ! case (5) not needed; handled by default case ( 6 ) ! needs special handling because of averaged 3/8's rule case if ( present ( even )) then if ( even < 0 ) then ! 3/8 rule on left integral = simps38 ( y ( 1 : 4 ), dx ) + simps ( y ( 4 : 6 ), dx ) return else if ( even > 0 ) then ! 3/8 rule on right integral = simps ( y ( 1 : 3 ), dx ) + simps38 ( y ( 3 : 6 ), dx ) return else ! fall through end if end if ! either `even` not present or is zero ! equivalent to averaging left and right integral = dx / 4 8.0 _${ k1 }$ * ( 17 * ( y ( 1 ) + y ( 6 )) + 59 * ( y ( 2 ) + y ( 5 )) + 44 * ( y ( 3 ) + y ( 4 ))) case default if ( mod ( n , 2 ) == 1 ) then integral = dx / 3.0 _${ k1 }$ * ( y ( 1 ) + 4 * sum ( y ( 2 : n - 1 : 2 )) + 2 * sum ( y ( 3 : n - 2 : 2 )) + y ( n )) else if ( present ( even )) then if ( even < 0 ) then ! 3/8th rule on left integral = simps38 ( y ( 1 : 4 ), dx ) + simps ( y ( 4 : n ), dx ) return else if ( even > 0 ) then ! 3/8 rule on right integral = simps ( y ( 1 : n - 3 ), dx ) + simps38 ( y ( n - 3 : n ), dx ) return else ! fall through end if end if ! either `even` not present or is zero ! equivalent to averaging left and right integral = dx / 4 8.0 _${ k1 }$ * ( 17 * ( y ( 1 ) + y ( n )) + 59 * ( y ( 2 ) + y ( n - 1 )) & + 43 * ( y ( 3 ) + y ( n - 2 )) + 49 * ( y ( 4 ) + y ( n - 3 )) + 48 * sum ( y ( 5 : n - 4 ))) end if end select end function simps_dx_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES recursive module function simps_x_$ { k1 }$ ( y , x , even ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , dimension (:), intent ( in ) :: x integer , intent ( in ), optional :: even ${ t1 }$ :: integral integer :: i integer :: n ${ t1 }$ :: h1 , h2 ${ t1 }$ :: a , b , c n = size ( y ) call check ( size ( x ) == n , \"simps: Arguments `x` and `y` must be the same size.\" ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ k1 }$ case ( 2 ) integral = 0.5 _${ k1 }$ * ( x ( 2 ) - x ( 1 )) * ( y ( 1 ) + y ( 2 )) case ( 3 ) h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) a = ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) b = ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) c = ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) integral = a * y ( 1 ) + b * y ( 2 ) + c * y ( 3 ) case ( 4 ) integral = simps38 ( y , x ) ! case (6) unneeded; handled by default case default if ( mod ( n , 2 ) == 1 ) then integral = 0.0 _${ k1 }$ do i = 1 , n - 2 , 2 h1 = x ( i + 1 ) - x ( i ) h2 = x ( i + 2 ) - x ( i + 1 ) a = ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) b = ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) c = ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) integral = integral + a * y ( i ) + b * y ( i + 1 ) + c * y ( i + 2 ) end do else if ( present ( even )) then if ( even < 0 ) then ! 3/8 rule on left integral = simps38 ( y ( 1 : 4 ), x ( 1 : 4 )) + simps ( y ( 4 : n ), x ( 4 : n )) return else if ( even > 0 ) then ! 3/8 rule on right integral = simps ( y ( 1 : n - 3 ), x ( 1 : n - 3 )) + simps38 ( y ( n - 3 : n ), x ( n - 3 : n )) return else ! fall through end if end if ! either `even` not present or is zero integral = 0.5 _${ k1 }$ * ( simps38 ( y ( 1 : 4 ), x ( 1 : 4 )) + simps ( y ( 4 : n ), x ( 4 : n )) & + simps ( y ( 1 : n - 3 ), x ( 1 : n - 3 )) + simps38 ( y ( n - 3 : n ), x ( n - 3 : n )) ) end if end select end function simps_x_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES pure recursive module function simps_weights_$ { k1 }$ ( x , even ) result ( w ) ${ t1 }$ , dimension (:), intent ( in ) :: x integer , intent ( in ), optional :: even ${ t1 }$ , dimension ( size ( x )) :: w integer :: i , n ${ t1 }$ :: h1 , h2 n = size ( x ) select case ( n ) case ( 0 ) ! no action needed case ( 1 ) w ( 1 ) = 0.0 _${ k1 }$ case ( 2 ) w = 0.5 _${ k1 }$ * ( x ( 2 ) - x ( 1 )) case ( 3 ) h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) w ( 1 ) = ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) w ( 2 ) = ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) w ( 3 ) = ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) case ( 4 ) w = simps38_weights ( x ) case default if ( mod ( n , 2 ) == 1 ) then w = 0.0 _${ k1 }$ do i = 1 , n - 2 , 2 h1 = x ( i + 1 ) - x ( i ) h2 = x ( i + 2 ) - x ( i + 1 ) w ( i ) = w ( i ) + ( 2 * h1 ** 2 + h1 * h2 - h2 ** 2 ) / ( 6 * h1 ) w ( i + 1 ) = w ( i + 1 ) + ( h1 + h2 ) ** 3 / ( 6 * h1 * h2 ) w ( i + 2 ) = w ( i + 2 ) + ( 2 * h2 ** 2 + h1 * h2 - h1 ** 2 ) / ( 6 * h2 ) end do else if ( present ( even )) then if ( even < 0 ) then ! 3/8 rule on left w = 0.0 _${ k1 }$ w ( 1 : 4 ) = simps38_weights ( x ( 1 : 4 )) w ( 4 : n ) = w ( 4 : n ) + simps_weights ( x ( 4 : n )) ! position 4 needs both rules return else if ( even > 0 ) then ! 3/8 rule on right w = 0.0 _${ k1 }$ w ( 1 : n - 3 ) = simps_weights ( x ( 1 : n - 3 )) w ( n - 3 : n ) = w ( n - 3 : n ) + simps38_weights ( x ( n - 3 : n )) ! position n-3 needs both rules return else ! fall through end if end if ! either `even` not present or is zero w = 0.0 _${ k1 }$ ! 3/8 rule on left w ( 1 : 4 ) = simps38_weights ( x ( 1 : 4 )) w ( 4 : n ) = w ( 4 : n ) + simps_weights ( x ( 4 : n )) ! 3/8 rule on right w ( 1 : n - 3 ) = w ( 1 : n - 3 ) + simps_weights ( x ( 1 : n - 3 )) w ( n - 3 : n ) = w ( n - 3 : n ) + simps38_weights ( x ( n - 3 : n )) ! average w = 0.5 _${ k1 }$ * w end if end select end function simps_weights_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES pure function simps38_dx_$ { k1 }$ ( y , dx ) result ( integral ) ${ t1 }$ , dimension ( 4 ), intent ( in ) :: y ${ t1 }$ , intent ( in ) :: dx ${ t1 }$ :: integral integral = 3.0 _${ k1 }$ * dx / 8.0 _${ k1 }$ * ( y ( 1 ) + y ( 4 ) + 3 * ( y ( 2 ) + y ( 3 ))) end function simps38_dx_$ { k1 }$ #:endfor #: for k1, t1 in REAL_KINDS_TYPES pure function simps38_x_$ { k1 }$ ( y , x ) result ( integral ) ${ t1 }$ , dimension ( 4 ), intent ( in ) :: y ${ t1 }$ , dimension ( 4 ), intent ( in ) :: x ${ t1 }$ :: integral ${ t1 }$ :: h1 , h2 , h3 ${ t1 }$ :: a , b , c , d h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) h3 = x ( 4 ) - x ( 3 ) a = ( h1 + h2 + h3 ) * ( 3 * h1 ** 2 + 2 * h1 * h2 - 2 * h1 * h3 - h2 ** 2 + h3 ** 2 ) / ( 12 * h1 * ( h1 + h2 )) b = ( h1 + h2 - h3 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h1 * h2 * ( h2 + h3 )) c = ( h2 + h3 - h1 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h2 * h3 * ( h1 + h2 )) d = ( h1 + h2 + h3 ) * ( 3 * h3 ** 2 + 2 * h2 * h3 - 2 * h1 * h3 - h2 ** 2 + h1 ** 2 ) / ( 12 * h3 * ( h2 + h3 )) integral = a * y ( 1 ) + b * y ( 2 ) + c * y ( 3 ) + d * y ( 4 ) end function simps38_x_$ { k1 }$ #:endfor #:for k1, t1 in REAL_KINDS_TYPES pure function simps38_weights_$ { k1 }$ ( x ) result ( w ) ${ t1 }$ , intent ( in ) :: x ( 4 ) ${ t1 }$ :: w ( size ( x )) ${ t1 }$ :: h1 , h2 , h3 h1 = x ( 2 ) - x ( 1 ) h2 = x ( 3 ) - x ( 2 ) h3 = x ( 4 ) - x ( 3 ) w ( 1 ) = ( h1 + h2 + h3 ) * ( 3 * h1 ** 2 + 2 * h1 * h2 - 2 * h1 * h3 - h2 ** 2 + h3 ** 2 ) / ( 12 * h1 * ( h1 + h2 )) w ( 2 ) = ( h1 + h2 - h3 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h1 * h2 * ( h2 + h3 )) w ( 3 ) = ( h2 + h3 - h1 ) * ( h1 + h2 + h3 ) ** 3 / ( 12 * h2 * h3 * ( h1 + h2 )) w ( 4 ) = ( h1 + h2 + h3 ) * ( 3 * h3 ** 2 + 2 * h2 * h3 - 2 * h1 * h3 - h2 ** 2 + h1 ** 2 ) / ( 12 * h3 * ( h2 + h3 )) end function simps38_weights_$ { k1 }$ #:endfor end submodule stdlib_quadrature_simps","tags":"","loc":"sourcefile/stdlib_quadrature_simps.fypp.html"},{"title":"stdlib_hash_64bit_pengy.fypp – Fortran-lang/stdlib","text":"PENGY_HASH is a translation to Fortran 2008 and signed two's complement\n arithmetic of the pengyhash algorithm of Alberto Fajardo, copyright 2020.\n Alberto Fajardo's original C code, pengyhash.c , is available at the URL:\n https://github.com/tinypeng/pengyhash/blob/master/pengyhash.c\n under the BSD 2-Clause License:\n https://github.com/tinypeng/pengyhash/blob/master/LICENSE The BSD 2-Clause license is as follows: BSD 2-Clause License pengyhash\n Copyright (c) 2020 Alberto Fajardo\n All rights reserved. Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n POSSIBILITY OF SUCH DAMAGE. Source Code !!------------------------------------------------------------------------------ !! `PENGY_HASH` is a translation to Fortran 2008 and signed two's complement !! arithmetic of the `pengyhash` algorithm of Alberto Fajardo, copyright 2020. !! Alberto Fajardo's original C code, `pengyhash.c`, is available at the URL: !! https://github.com/tinypeng/pengyhash/blob/master/pengyhash.c !! under the BSD 2-Clause License: !! https://github.com/tinypeng/pengyhash/blob/master/LICENSE !! !! The BSD 2-Clause license is as follows: !! !! BSD 2-Clause License !! !! pengyhash !! Copyright (c) 2020 Alberto Fajardo !! All rights reserved. !! !! Redistribution and use in source and binary forms, with or without !! modification, are permitted provided that the following conditions are met: !! !! 1. Redistributions of source code must retain the above copyright notice, !! this list of conditions and the following disclaimer. !! !! 2. Redistributions in binary form must reproduce the above copyright notice, !! this list of conditions and the following disclaimer in the documentation !! and/or other materials provided with the distribution. !! !! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" !! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE !! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE !! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE !! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR !! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF !! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS !! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN !! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) !! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE !! POSSIBILITY OF SUCH DAMAGE. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_64bit ) stdlib_hash_64bit_pengy implicit none contains pure module function int8_pengy_hash ( key , seed ) result ( hash_code ) integer ( int64 ) :: hash_code integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: b ( 0 : 3 ) integer ( int64 ) :: i integer ( int64 ) :: index integer ( int64 ) :: len integer ( int64 ) :: s ( 0 : 3 ) integer ( int64 ) :: seed2 integer ( int8 ) :: dummy ( 0 : 31 ) b ( 0 : 3 ) = 0_int64 len = size ( key , kind = int64 ) s ( 0 : 3 ) = [ 0_int64 , 0_int64 , 0_int64 , len ] index = 0_int64 do while ( len >= 32 ) b ( 0 : 3 ) = transfer ( key ( index : index + 31 ), 0_int64 , 4 ) s ( 0 ) = s ( 0 ) + s ( 1 ) + b ( 3 ) s ( 1 ) = s ( 0 ) + ishftc ( s ( 1 ), 14 ) s ( 2 ) = s ( 2 ) + s ( 3 ) + b ( 2 ) s ( 3 ) = s ( 2 ) + ishftc ( s ( 3 ), 23 ) s ( 0 ) = s ( 0 ) + s ( 3 ) + b ( 1 ) s ( 3 ) = ieor ( s ( 0 ), ishftc ( s ( 3 ), 16 ) ) s ( 2 ) = s ( 2 ) + s ( 1 ) + b ( 0 ) s ( 1 ) = ieor ( s ( 2 ), ishftc ( s ( 1 ), 40 ) ) len = len - 32 index = index + 32 end do dummy ( 0 : 31 ) = transfer ( b , 0_int8 , 32 ) dummy ( 0 : len - 1 ) = key ( index : index + len - 1 ) b ( 0 : 3 ) = transfer ( dummy , 0_int64 , 4 ) if ( little_endian ) then seed2 = transfer ( [ seed , 0_int32 ], 0_int64 ) else seed2 = transfer ( [ 0_int32 , seed ], 0_int64 ) end if do i = 0 , 5 s ( 0 ) = s ( 0 ) + s ( 1 ) + b ( 3 ) s ( 1 ) = s ( 0 ) + ishftc ( s ( 1 ), 14 ) + seed2 s ( 2 ) = s ( 2 ) + s ( 3 ) + b ( 2 ) s ( 3 ) = s ( 2 ) + ishftc ( s ( 3 ), 23 ) s ( 0 ) = s ( 0 ) + s ( 3 ) + b ( 1 ) s ( 3 ) = ieor ( s ( 0 ), ishftc ( s ( 3 ), 16 ) ) s ( 2 ) = s ( 2 ) + s ( 1 ) + b ( 0 ) s ( 1 ) = ieor ( s ( 2 ), ishftc ( s ( 1 ), 40 ) ) end do hash_code = s ( 0 ) + s ( 1 ) + s ( 2 ) + s ( 3 ) end function int8_pengy_hash #:for k1 in INT_KINDS pure module function ${ k1 }$_ pengy_hash ( key , seed ) result ( hash_code ) !! PENGY_HASH hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code hash_code = int8_pengy_hash ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ pengy_hash #:endfor elemental module function character_pengy_hash ( key , seed ) & result ( hash_code ) !! PENGY_HASH hash function for default character keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code hash_code = int8_pengy_hash ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_pengy_hash module subroutine new_pengy_hash_seed ( seed ) ! Random SEED generator for PENGY_HASH integer ( int32 ), intent ( inout ) :: seed real ( dp ) :: sample integer ( int32 ) :: old_seed old_seed = seed find_seed : do call random_number ( sample ) seed = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) if ( seed /= old_seed ) return end do find_seed end subroutine new_pengy_hash_seed end submodule stdlib_hash_64bit_pengy","tags":"","loc":"sourcefile/stdlib_hash_64bit_pengy.fypp.html"},{"title":"stdlib_selection.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" ! Specify kinds/types for the input array in select and arg_select #:set ARRAY_KINDS_TYPES = INT_KINDS_TYPES + REAL_KINDS_TYPES ! The index arrays are of all INT_KINDS_TYPES module stdlib_selection !! Quickly find the k-th smallest value of an array, or the index of the k-th smallest value. !! ([Specification](../page/specs/stdlib_selection.html)) ! ! This code was modified from the \"Coretran\" implementation \"quickSelect\" by ! Leon Foks, https://github.com/leonfoks/coretran/tree/HEAD/src/sorting ! ! Leon Foks gave permission to release this code under stdlib's MIT license. ! (https://github.com/fortran-lang/stdlib/pull/500#commitcomment-57418593) ! use stdlib_kinds implicit none private public :: select , arg_select interface select !! version: experimental !! ([Specification](..//page/specs/stdlib_selection.html#select-find-the-k-th-smallest-value-in-an-input-array)) # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"select\" , 1 , arraytype , arraykind , intkind ) module procedure ${ name }$ # : endfor # : endfor end interface interface arg_select !! version: experimental !! ([Specification](..//page/specs/stdlib_selection.html#arg_select-find-the-index-of-the-k-th-smallest-value-in-an-input-array)) # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"arg_select\" , 1 , arraytype , arraykind , intkind ) module procedure ${ name }$ # : endfor # : endfor end interface contains # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"select\" , 1 , arraytype , arraykind , intkind ) subroutine ${ name }$ ( a , k , kth_smallest , left , right ) !! select - select the k-th smallest entry in a(:). !! !! Partly derived from the \"Coretran\" implementation of !! quickSelect by Leon Foks, https://github.com/leonfoks/coretran !! ${ arraytype }$ , intent ( inout ) :: a (:) !! Array in which we seek the k-th smallest entry. !! On output it will be partially sorted such that !! `all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a)))` !! is true. ${ inttype }$ , intent ( in ) :: k !! We want the k-th smallest entry. E.G. `k=1` leads to !! `kth_smallest=min(a)`, and `k=size(a)` leads to !! `kth_smallest=max(a)` ${ arraytype }$ , intent ( out ) :: kth_smallest !! On output contains the k-th smallest value of `a(:)` ${ inttype }$ , intent ( in ), optional :: left , right !! If we know that: !! the k-th smallest entry of `a` is in `a(left:right)` !! and also that: !! `maxval(a(1:(left-1))) <= minval(a(left:right))` !! and: !! `maxval(a(left:right))) <= minval(a((right+1):size(a)))` !! then one or both bounds can be specified to narrow the search. !! The constraints are available if we have previously called the !! subroutine with different `k` (because of how `a(:)` becomes !! partially sorted, see documentation for `a(:)`). ${ inttype }$ :: l , r , mid , iPivot integer , parameter :: ip = ${ intkind }$ l = 1_ip if ( present ( left )) l = left r = size ( a , kind = ip ) if ( present ( right )) r = right if ( l > r . or . l < 1_ip . or . r > size ( a , kind = ip ) & . or . k < l . or . k > r & !i.e. if k is not in the interval [l; r] ) then error stop \"select must have 1 <= left <= k <= right <= size(a)\" ; end if searchk : do mid = l + (( r - l ) / 2_ip ) ! Avoid (l+r)/2 which can cause overflow call medianOf3 ( a , l , mid , r ) call swap ( a ( l ), a ( mid )) call partition ( a , l , r , iPivot ) if ( iPivot < k ) then l = iPivot + 1_ip elseif ( iPivot > k ) then r = iPivot - 1_ip elseif ( iPivot == k ) then kth_smallest = a ( k ) return end if end do searchk contains pure subroutine swap ( a , b ) ${ arraytype }$ , intent ( inout ) :: a , b ${ arraytype }$ :: tmp tmp = a ; a = b ; b = tmp end subroutine pure subroutine medianOf3 ( a , left , mid , right ) ${ arraytype }$ , intent ( inout ) :: a (:) ${ inttype }$ , intent ( in ) :: left , mid , right if ( a ( right ) < a ( left )) call swap ( a ( right ), a ( left )) if ( a ( mid ) < a ( left )) call swap ( a ( mid ) , a ( left )) if ( a ( right ) < a ( mid ) ) call swap ( a ( mid ) , a ( right )) end subroutine pure subroutine partition ( array , left , right , iPivot ) ${ arraytype }$ , intent ( inout ) :: array (:) ${ inttype }$ , intent ( in ) :: left , right ${ inttype }$ , intent ( out ) :: iPivot ${ inttype }$ :: lo , hi ${ arraytype }$ :: pivot pivot = array ( left ) lo = left hi = right do while ( lo <= hi ) do while ( array ( hi ) > pivot ) hi = hi - 1_ip end do inner_lohi : do while ( lo <= hi ) if ( array ( lo ) > pivot ) exit inner_lohi lo = lo + 1_ip end do inner_lohi if ( lo <= hi ) then call swap ( array ( lo ), array ( hi )) lo = lo + 1_ip hi = hi - 1_ip end if end do call swap ( array ( left ), array ( hi )) iPivot = hi end subroutine end subroutine # : endfor # : endfor # : for arraykind , arraytype in ARRAY_KINDS_TYPES # : for intkind , inttype in INT_KINDS_TYPES # : set name = rname ( \"arg_select\" , 1 , arraytype , arraykind , intkind ) subroutine ${ name }$ ( a , indx , k , kth_smallest , left , right ) !! arg_select - find the index of the k-th smallest entry in `a(:)` !! !! Partly derived from the \"Coretran\" implementation of !! quickSelect by Leon Foks, https://github.com/leonfoks/coretran !! ${ arraytype }$ , intent ( in ) :: a (:) !! Array in which we seek the k-th smallest entry. ${ inttype }$ , intent ( inout ) :: indx (:) !! Array of indices into `a(:)`. Must contain each integer !! from `1:size(a)` exactly once. On output it will be partially !! sorted such that !! `all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND. !! all( a(indx(k)) <= a(indx( (k+1):size(a) )) )`. ${ inttype }$ , intent ( in ) :: k !! We want index of the k-th smallest entry. E.G. `k=1` leads to !! `a(kth_smallest) = min(a)`, and `k=size(a)` leads to !! `a(kth_smallest) = max(a)` ${ inttype }$ , intent ( out ) :: kth_smallest !! On output contains the index with the k-th smallest value of `a(:)` ${ inttype }$ , intent ( in ), optional :: left , right !! If we know that: !! the k-th smallest entry of `a` is in `a(indx(left:right))` !! and also that: !! `maxval(a(indx(1:(left-1)))) <= minval(a(indx(left:right)))` !! and: !! `maxval(a(indx(left:right))) <= minval(a(indx((right+1):size(a))))` !! then one or both bounds can be specified to reduce the search !! time. These constraints are available if we have previously !! called the subroutine with a different `k` (due to the way that !! `indx(:)` becomes partially sorted, see documentation for `indx(:)`). ${ inttype }$ :: l , r , mid , iPivot integer , parameter :: ip = ${ intkind }$ l = 1_ip if ( present ( left )) l = left r = size ( a , kind = ip ) if ( present ( right )) r = right if ( size ( a ) /= size ( indx )) then error stop \"arg_select must have size(a) == size(indx)\" end if if ( l > r . or . l < 1_ip . or . r > size ( a , kind = ip ) & . or . k < l . or . k > r & !i.e. if k is not in the interval [l; r] ) then error stop \"arg_select must have 1 <= left <= k <= right <= size(a)\" ; end if searchk : do mid = l + (( r - l ) / 2_ip ) ! Avoid (l+r)/2 which can cause overflow call arg_medianOf3 ( a , indx , l , mid , r ) call swap ( indx ( l ), indx ( mid )) call arg_partition ( a , indx , l , r , iPivot ) if ( iPivot < k ) then l = iPivot + 1_ip elseif ( iPivot > k ) then r = iPivot - 1_ip elseif ( iPivot == k ) then kth_smallest = indx ( k ) return end if end do searchk contains pure subroutine swap ( a , b ) ${ inttype }$ , intent ( inout ) :: a , b ${ inttype }$ :: tmp tmp = a ; a = b ; b = tmp end subroutine pure subroutine arg_medianOf3 ( a , indx , left , mid , right ) ${ arraytype }$ , intent ( in ) :: a (:) ${ inttype }$ , intent ( inout ) :: indx (:) ${ inttype }$ , intent ( in ) :: left , mid , right if ( a ( indx ( right )) < a ( indx ( left ))) call swap ( indx ( right ), indx ( left )) if ( a ( indx ( mid )) < a ( indx ( left ))) call swap ( indx ( mid ) , indx ( left )) if ( a ( indx ( right )) < a ( indx ( mid )) ) call swap ( indx ( mid ) , indx ( right )) end subroutine pure subroutine arg_partition ( array , indx , left , right , iPivot ) ${ arraytype }$ , intent ( in ) :: array (:) ${ inttype }$ , intent ( inout ) :: indx (:) ${ inttype }$ , intent ( in ) :: left , right ${ inttype }$ , intent ( out ) :: iPivot ${ inttype }$ :: lo , hi ${ arraytype }$ :: pivot pivot = array ( indx ( left )) lo = left hi = right do while ( lo <= hi ) do while ( array ( indx ( hi )) > pivot ) hi = hi - 1_ip end do inner_lohi : do while ( lo <= hi ) if ( array ( indx ( lo )) > pivot ) exit inner_lohi lo = lo + 1_ip end do inner_lohi if ( lo <= hi ) then call swap ( indx ( lo ), indx ( hi )) lo = lo + 1_ip hi = hi - 1_ip end if end do call swap ( indx ( left ), indx ( hi )) iPivot = hi end subroutine end subroutine # : endfor # : endfor end module","tags":"","loc":"sourcefile/stdlib_selection.fypp.html"},{"title":"stdlib_io_npy_save.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifer: MIT #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES !> Implementation of saving multidimensional arrays to npy files submodule ( stdlib_io_npy ) stdlib_io_npy_save use stdlib_error , only : error_stop use stdlib_strings , only : to_string implicit none contains !> Generate magic header string for npy format pure function magic_header ( major , minor ) result ( str ) !> Major version of npy format integer , intent ( in ) :: major !> Minor version of npy format integer , intent ( in ) :: minor !> Magic string for npy format character ( len = 8 ) :: str str = magic_number // magic_string // achar ( major ) // achar ( minor ) end function magic_header !> Generate header for npy format pure function npy_header ( vtype , vshape ) result ( str ) !> Type of variable character ( len =* ), intent ( in ) :: vtype !> Shape of variable integer , intent ( in ) :: vshape (:) !> Header string for npy format character ( len = :), allocatable :: str integer , parameter :: len_v10 = 8 + 2 , len_v20 = 8 + 4 , block_size = 64 str = & \"{'descr': '\" // vtype // & \"', 'fortran_order': True, 'shape': \" // & shape_str ( vshape ) // \", }\" if ( len ( str ) + len_v10 >= 65535 ) then str = str // & & repeat ( \" \" , block_size - mod ( len ( str ) + len_v20 + 1 , block_size )) // nl str = magic_header ( 2 , 0 ) // to_bytes_i4 ( int ( len ( str ))) // str else str = str // & & repeat ( \" \" , block_size - mod ( len ( str ) + len_v10 + 1 , block_size )) // nl str = magic_header ( 1 , 0 ) // to_bytes_i2 ( int ( len ( str ))) // str end if end function npy_header !> Write integer as byte string in little endian encoding pure function to_bytes_i4 ( val ) result ( str ) !> Integer value to convert to bytes integer , intent ( in ) :: val !> String of bytes character ( len = 4 ) :: str str = achar ( mod ( val , 256 ** 1 )) // & & achar ( mod ( val , 256 ** 2 ) / 256 ** 1 ) // & & achar ( mod ( val , 256 ** 3 ) / 256 ** 2 ) // & & achar ( val / 256 ** 3 ) end function to_bytes_i4 !> Write integer as byte string in little endian encoding, 2-byte truncated version pure function to_bytes_i2 ( val ) result ( str ) !> Integer value to convert to bytes integer , intent ( in ) :: val !> String of bytes character ( len = 2 ) :: str str = achar ( mod ( val , 2 ** 8 )) // & & achar ( mod ( val , 2 ** 16 ) / 2 ** 8 ) end function to_bytes_i2 !> Print array shape as tuple of int pure function shape_str ( vshape ) result ( str ) !> Shape of variable integer , intent ( in ) :: vshape (:) !> Shape string for npy format character ( len = :), allocatable :: str integer :: i str = \"(\" do i = 1 , size ( vshape ) str = str // to_string ( vshape ( i )) // \", \" enddo str = str // \")\" end function shape_str #:for k1, t1 in KINDS_TYPES # : for rank in RANKS !> Save ${rank}$-dimensional array in npy format module subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) !> Name of the npy file to load from character ( len =* ), intent ( in ) :: filename !> Array to be loaded from the npy file ${ t1 }$ , intent ( in ) :: array ${ ranksuffix ( rank ) }$ !> Error status of loading, zero on success integer , intent ( out ), optional :: iostat !> Associated error message in case of non-zero status code character ( len = :), allocatable , intent ( out ), optional :: iomsg character ( len =* ), parameter :: vtype = type_$ { t1 [ 0 ] }{ k1 }$ integer :: io , stat open ( newunit = io , file = filename , form = \"unformatted\" , access = \"stream\" , iostat = stat ) if ( stat == 0 ) then write ( io , iostat = stat ) npy_header ( vtype , shape ( array )) end if if ( stat == 0 ) then write ( io , iostat = stat ) array end if close ( io , iostat = stat ) if ( present ( iostat )) then iostat = stat else if ( stat /= 0 ) then call error_stop ( \"Failed to write array to file '\" // filename // \"'\" ) end if if ( present ( iomsg )) then if ( stat /= 0 ) then iomsg = \"Failed to write array to file '\" // filename // \"'\" end if end if end subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor #:endfor end submodule stdlib_io_npy_save","tags":"","loc":"sourcefile/stdlib_io_npy_save.fypp.html"},{"title":"stdlib_linalg_solve.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set RHS_SUFFIX = [\"one\",\"many\"] #:set RHS_SYMBOL = [ranksuffix(r) for r in [1,2]] #:set RHS_EMPTY = [emptyranksuffix(r) for r in [1,2]] #:set ALL_RHS = list(zip(RHS_SYMBOL,RHS_SUFFIX,RHS_EMPTY)) submodule ( stdlib_linalg ) stdlib_linalg_solve !! Solve linear system Ax=b use stdlib_linalg_constants use stdlib_linalg_lapack , only : gesv use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR implicit none ( type , external ) character ( * ), parameter :: this = 'solve' contains elemental subroutine handle_gesv_info ( info , lda , n , nrhs , err ) integer ( ilp ), intent ( in ) :: info , lda , n , nrhs type ( linalg_state_type ), intent ( out ) :: err ! Process output select case ( info ) case ( 0 ) ! Success case ( - 1 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid problem size n=' , n ) case ( - 2 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid rhs size n=' , nrhs ) case ( - 4 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix size a=' ,[ lda , n ]) case ( - 7 ) err = linalg_state_type ( this , LINALG_ERROR , 'invalid matrix size a=' ,[ lda , n ]) case ( 1 :) err = linalg_state_type ( this , LINALG_ERROR , 'singular matrix' ) case default err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select end subroutine handle_gesv_info # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" ! Compute the solution to a real system of linear equations A * X = B module function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ ( a , b , overwrite_a , err ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ ! Initialize solution shape from the rhs array allocate ( x , mold = b ) call stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( a , b , x , overwrite_a = overwrite_a , err = err ) end function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ !> Compute the solution to a real system of linear equations A * X = B (pure interface) pure module function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ ( a , b ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ ! Local variables ${ rt }$ , allocatable :: amat (:,:) ! Copy `a` so it can be intent(in) allocate ( amat , source = a ) ! Initialize solution shape from the rhs array allocate ( x , mold = b ) call stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( amat , b , x , overwrite_a = . true .) end function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ !> Compute the solution to a real system of linear equations A * X = B (pure interface) pure module subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( a , b , x , pivot , overwrite_a , err ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] Storage array for the diagonal pivot indices integer ( ilp ), optional , intent ( inout ), target :: pivot (:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err ! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: lda , n , ldb , ldx , nrhsx , nrhs , info , npiv integer ( ilp ), pointer :: ipiv (:) logical ( lk ) :: copy_a ${ rt }$ , pointer :: xmat (:,:), amat (:,:) ! Problem sizes lda = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) ldb = size ( b , 1 , kind = ilp ) nrhs = size ( b , kind = ilp ) / ldb ldx = size ( x , 1 , kind = ilp ) nrhsx = size ( x , kind = ilp ) / ldx ! Has a pre-allocated pivots storage array been provided? if ( present ( pivot )) then ipiv => pivot else allocate ( ipiv ( n )) endif npiv = size ( ipiv , kind = ilp ) ! Can A be overwritten? By default, do not overwrite if ( present ( overwrite_a )) then copy_a = . not . overwrite_a else copy_a = . true . _ lk endif if ( any ([ lda , n , ldb ] < 1 ) . or . any ([ lda , ldb , ldx ] /= n ) . or . nrhsx /= nrhs . or . npiv /= n ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid sizes: a=' ,[ lda , n ], & 'b=' ,[ ldb , nrhs ], ' x=' ,[ ldx , nrhsx ], & 'pivot=' , n ) call linalg_error_handling ( err0 , err ) return end if ! Initialize a matrix temporary if ( copy_a ) then allocate ( amat ( lda , n ), source = a ) else amat => a endif ! Initialize solution with the rhs x = b xmat ( 1 : n , 1 : nrhs ) => x ! Solve system call gesv ( n , nrhs , amat , lda , ipiv , xmat , ldb , info ) ! Process output call handle_gesv_info ( info , lda , n , nrhs , err0 ) if ( copy_a ) deallocate ( amat ) if (. not . present ( pivot )) deallocate ( ipiv ) ! Process output and return call linalg_error_handling ( err0 , err ) end subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ # : endif # : endfor # : endfor end submodule stdlib_linalg_solve","tags":"","loc":"sourcefile/stdlib_linalg_solve.fypp.html"},{"title":"stdlib_linalg_blas_w.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:if WITH_QP module stdlib_linalg_blas_w use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c use stdlib_linalg_blas_d use stdlib_linalg_blas_z use stdlib_linalg_blas_q implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_waxpy public :: stdlib_wcopy public :: stdlib_wdotc public :: stdlib_wdotu public :: stdlib_wdrot public :: stdlib_wdscal public :: stdlib_wgbmv public :: stdlib_wgemm public :: stdlib_wgemv public :: stdlib_wgerc public :: stdlib_wgeru public :: stdlib_whbmv public :: stdlib_whemm public :: stdlib_whemv public :: stdlib_wher public :: stdlib_wher2 public :: stdlib_wher2k public :: stdlib_wherk public :: stdlib_whpmv public :: stdlib_whpr public :: stdlib_whpr2 public :: stdlib_wrotg public :: stdlib_wscal public :: stdlib_wswap public :: stdlib_wsymm public :: stdlib_wsyr2k public :: stdlib_wsyrk public :: stdlib_wtbmv public :: stdlib_wtbsv public :: stdlib_wtpmv public :: stdlib_wtpsv public :: stdlib_wtrmm public :: stdlib_wtrmv public :: stdlib_wtrsm public :: stdlib_wtrsv ! 128-bit real constants real ( qp ), parameter , private :: negone = - 1.00_qp real ( qp ), parameter , private :: zero = 0.00_qp real ( qp ), parameter , private :: half = 0.50_qp real ( qp ), parameter , private :: one = 1.00_qp real ( qp ), parameter , private :: two = 2.00_qp real ( qp ), parameter , private :: three = 3.00_qp real ( qp ), parameter , private :: four = 4.00_qp real ( qp ), parameter , private :: eight = 8.00_qp real ( qp ), parameter , private :: ten = 1 0.00_qp ! 128-bit complex constants complex ( qp ), parameter , private :: czero = ( 0.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: chalf = ( 0.5_qp , 0.0_qp ) complex ( qp ), parameter , private :: cone = ( 1.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: cnegone = ( - 1.0_qp , 0.0_qp ) ! 128-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( qp ), parameter , private :: rradix = real ( radix ( zero ), qp ) real ( qp ), parameter , private :: ulp = epsilon ( zero ) real ( qp ), parameter , private :: eps = ulp * half real ( qp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( qp ), parameter , private :: safmax = one / safmin real ( qp ), parameter , private :: smlnum = safmin / ulp real ( qp ), parameter , private :: bignum = safmax * ulp real ( qp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( qp ), parameter , private :: rtmax = sqrt ( bignum ) ! 128-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( qp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( qp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( qp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( qp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure subroutine stdlib_waxpy ( n , za , zx , incx , zy , incy ) !! ZAXPY: constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) complex ( qp ), intent ( inout ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_qcabs1 ( za ) == 0.0_qp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zy ( i ) + za * zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zy ( iy ) + za * zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_waxpy pure subroutine stdlib_wcopy ( n , zx , incx , zy , incy ) !! ZCOPY: copies a vector, x, to a vector, y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) complex ( qp ), intent ( out ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_wcopy pure complex ( qp ) function stdlib_wdotc ( n , zx , incx , zy , incy ) !! ZDOTC: forms the dot product of two complex vectors !! ZDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: ztemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ztemp = ( 0.0_qp , 0.0_qp ) stdlib_wdotc = ( 0.0_qp , 0.0_qp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( i )) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( ix )) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_wdotc = ztemp return end function stdlib_wdotc pure complex ( qp ) function stdlib_wdotu ( n , zx , incx , zy , incy ) !! ZDOTU: forms the dot product of two complex vectors !! ZDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: ztemp integer ( ilp ) :: i , ix , iy ztemp = ( 0.0_qp , 0.0_qp ) stdlib_wdotu = ( 0.0_qp , 0.0_qp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + zx ( i ) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + zx ( ix ) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_wdotu = ztemp return end function stdlib_wdotu pure subroutine stdlib_wdrot ( n , zx , incx , zy , incy , c , s ) !! Applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( qp ), intent ( in ) :: c , s ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( qp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * zx ( i ) + s * zy ( i ) zy ( i ) = c * zy ( i ) - s * zx ( i ) zx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * zx ( ix ) + s * zy ( iy ) zy ( iy ) = c * zy ( iy ) - s * zx ( ix ) zx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_wdrot pure subroutine stdlib_wdscal ( n , da , zx , incx ) !! ZDSCAL: scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: cmplx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = cmplx ( da , 0.0_qp , KIND = qp ) * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = cmplx ( da , 0.0_qp , KIND = qp ) * zx ( i ) end do end if return end subroutine stdlib_wdscal pure subroutine stdlib_wgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! ZGBMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_wgbmv pure subroutine stdlib_wgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZGEMM: performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_wgemm pure subroutine stdlib_wgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZGEMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_wgemv pure subroutine stdlib_wgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERC: performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_wgerc pure subroutine stdlib_wgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERU: performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_wgeru pure subroutine stdlib_whbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! ZHBMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: real , conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = qp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = qp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = qp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = qp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_whbmv pure subroutine stdlib_whemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHEMM: performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = qp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = qp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = qp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = qp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = qp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_whemm pure subroutine stdlib_whemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZHEMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = qp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = qp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = qp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = qp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_whemv pure subroutine stdlib_wher ( uplo , n , alpha , x , incx , a , lda ) !! ZHER: performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = qp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( j ) * temp , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( jx ) * temp , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( temp * x ( j ), KIND = qp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( temp * x ( jx ), KIND = qp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_wher pure subroutine stdlib_wher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! ZHER2: performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: a ( lda , * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = qp ) else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = qp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = qp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = qp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_wher2 pure subroutine stdlib_wher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHER2K: performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha real ( qp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = qp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) end do end if else if ( beta == real ( czero , KIND = qp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = qp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = qp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = qp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = qp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = qp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = qp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = qp ) end if else if ( beta == real ( czero , KIND = qp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = qp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = qp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = qp ) end if else if ( beta == real ( czero , KIND = qp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_wher2k pure subroutine stdlib_wherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZHERK: performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , cmplx , conjg , max ! Local Scalars complex ( qp ) :: temp real ( qp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = qp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( temp * a ( i , l ), KIND = qp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = qp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = qp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = qp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = qp ) + real ( temp * a ( j , l ), KIND = qp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = qp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = qp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_wherk pure subroutine stdlib_whpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! ZHPMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( in ) :: ap ( * ), x ( * ) complex ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = qp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = qp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = qp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = qp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_whpmv pure subroutine stdlib_whpr ( uplo , n , alpha , x , incx , ap ) !! ZHPR: performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: ap ( * ) complex ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = qp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( j ) * temp , KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( jx ) * temp , KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( temp * x ( j ), KIND = qp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( temp * x ( jx ), KIND = qp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_whpr pure subroutine stdlib_whpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! ZHPR2: performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( qp ), intent ( inout ) :: ap ( * ) complex ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = qp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = qp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = qp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = qp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = qp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = qp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_whpr2 pure subroutine stdlib_wrotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in DROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by DROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._qp ) ! Scaling Constants ! Scalar Arguments real ( qp ), intent ( out ) :: c complex ( qp ), intent ( inout ) :: a complex ( qp ), intent ( in ) :: b complex ( qp ), intent ( out ) :: s ! Local Scalars real ( qp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( qp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( qp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = qp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = qp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = qp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = qp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_wrotg pure subroutine stdlib_wscal ( n , za , zx , incx ) !! ZSCAL: scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = za * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = za * zx ( i ) end do end if return end subroutine stdlib_wscal pure subroutine stdlib_wswap ( n , zx , incx , zy , incy ) !! ZSWAP: interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( qp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: ztemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = zx ( i ) zx ( i ) = zy ( i ) zy ( i ) = ztemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = zx ( ix ) zx ( ix ) = zy ( iy ) zy ( iy ) = ztemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_wswap pure subroutine stdlib_wsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYMM: performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_wsymm pure subroutine stdlib_wsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYR2K: performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_wsyr2k pure subroutine stdlib_wsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZSYRK: performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_wsyrk pure subroutine stdlib_wtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_wtbmv pure subroutine stdlib_wtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_wtbsv pure subroutine stdlib_wtpmv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: ap ( * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_wtpmv pure subroutine stdlib_wtpsv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: ap ( * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_wtpsv pure subroutine stdlib_wtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRMM: performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_wtrmm pure subroutine stdlib_wtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_wtrmv pure subroutine stdlib_wtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRSM: solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_wtrsm pure subroutine stdlib_wtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( qp ), intent ( in ) :: a ( lda , * ) complex ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_wtrsv end module stdlib_linalg_blas_w #:endif","tags":"","loc":"sourcefile/stdlib_linalg_blas_w.fypp.html"},{"title":"stdlib_kinds.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" !> Version: experimental !> !> The specification of this module is available [here](../page/specs/stdlib_kinds.html). module stdlib_kinds use iso_fortran_env , only : int8 , int16 , int32 , int64 use iso_c_binding , only : c_bool implicit none private public :: sp , dp , xdp , qp , int8 , int16 , int32 , int64 , lk , c_bool !> Single precision real numbers integer , parameter :: sp = selected_real_kind ( 6 ) !> Double precision real numbers integer , parameter :: dp = selected_real_kind ( 15 ) !> Extended double precision real numbers integer , parameter :: xdp = #{ if WITH_XDP }# selected_real_kind ( 18 ) #{ else }# - 1 #{ endif }# !> Quadruple precision real numbers integer , parameter :: qp = #{ if WITH_QP }# selected_real_kind ( 33 ) #{ else }# - 1 #{ endif }# !> Default logical kind parameter integer , parameter :: lk = kind (. true .) end module stdlib_kinds","tags":"","loc":"sourcefile/stdlib_kinds.fypp.html"},{"title":"stdlib_stats_moment_scalar.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment_scalar use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum (( x - center ) ** order , dim ) / size ( x , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum ( ( real ( x , dp ) - center ) ** order , dim ) / size ( x , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum (( x - center ) ** order , dim , mask ) / count ( mask , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in REDRANKS # : set RName = rname ( \"moment_mask_scalar\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ) :: center logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if ( dim >= 1 . and . dim <= ${ rank }$ ) then res = sum (( real ( x , dp ) - center ) ** order , dim , mask ) / count ( mask , dim ) else call error_stop ( \"ERROR (moment): wrong dimension\" ) end if end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment_scalar.fypp.html"},{"title":"stdlib_specialfunctions_legendre.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_specialfunctions ) stdlib_specialfunctions_legendre implicit none contains ! derivatives of legegendre polynomials ! unspecified behaviour if n is negative pure elemental module function dlegendre_fp64 ( n , x ) result ( dleg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: dleg select case ( n ) case ( 0 ) dleg = 0 case ( 1 ) dleg = 1 case default block real ( dp ) :: leg_down1 , leg_down2 , leg real ( dp ) :: dleg_down1 , dleg_down2 integer :: i leg_down1 = x dleg_down1 = 1 leg_down2 = 1 dleg_down2 = 0 do i = 2 , n leg = ( 2 * i - 1 ) * x * leg_down1 / i - ( i - 1 ) * leg_down2 / i dleg = dleg_down2 + ( 2 * i - 1 ) * leg_down1 leg_down2 = leg_down1 leg_down1 = leg dleg_down2 = dleg_down1 dleg_down1 = dleg end do end block end select end function ! legegendre polynomials ! unspecified behaviour if n is negative pure elemental module function legendre_fp64 ( n , x ) result ( leg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: leg select case ( n ) case ( 0 ) leg = 1 case ( 1 ) leg = x case default block real ( dp ) :: leg_down1 , leg_down2 integer :: i leg_down1 = x leg_down2 = 1 do i = 2 , n leg = ( 2 * i - 1 ) * x * leg_down1 / i - ( i - 1 ) * leg_down2 / i leg_down2 = leg_down1 leg_down1 = leg end do end block end select end function end submodule","tags":"","loc":"sourcefile/stdlib_specialfunctions_legendre.f90.html"},{"title":"stdlib_hash_32bit_water.fypp – Fortran-lang/stdlib","text":"WATER_HASH is a translation to Fortran 2008 of the waterhash algorithm\n of Tommy Ettinger. Tommy Ettinger's original C++ code, waterhash.h , is\n available at the URL: https://github.com/tommyettinger/waterhash under the unlicense , https://github.com/tommyettinger/waterhash/blob/master/LICENSE.\n \" waterhash is a variant on Wang Yi's wyhash , with 32 bit output,\n using at most 64 bit arithmetic. wyhash is available at the URL: https://github.com/wangyi-fudan/wyhash also under the unlicense: https://github.com/wangyi-fudan/wyhash/blob/master/LICENSE .\n Original Author: Wang Yi godspeed_china@yeah.net Waterhash Variant Author: Tommy Ettinger tommy.ettinger@gmail.com The unlicense reads as follows:\n This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or\n distribute this software, either in source code form or as a compiled\n binary, for any purpose, commercial or non-commercial, and by any\n means. In jurisdictions that recognize copyright laws, the author or authors\n of this software dedicate any and all copyright interest in the\n software to the public domain. We make this dedication for the benefit\n of the public at large and to the detriment of our heirs and\n successors. We intend this dedication to be an overt act of\n relinquishment in perpetuity of all present and future rights to this\n software under copyright law. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to http://unlicense.org WATER_HASH is distributed as part of the stdlib_32_bit_hash_functions.f90 module and its stdlib_hash_32bit_water.f90 submodule with the Fortran\n Standard Library at URL: https://github.com/fortran-lang/stdlib.\n The Fortran Standard Library, including this code, is distributed under the\n MIT License as described in the LICENSE file distributed with the library. WATER_HASH differs from waterhash.h not only in its use of Fortran,\n but also in its use of signed two's complement arithmetic in contrast to\n the unsigned arithmetic of Ettinger and Wang Yi, and in making some of the\n uses of TRANSFER endian dependent, in an attempt to make the quality of\n the hash endian independent. To be useful this code must be processed by a processor that implements two\n Fortran 2008 extensions to Fortran 2003: submodules, and 64 bit ( INT64 )\n integers. The processor must also use two's complement integers\n (all Fortran 95+ processors use two's complement arithmetic) with\n wrap around overflow at runtime and for BOZ constants. The latest releases\n of the following processors are known to implement the required Fortran\n 2008 extensions and default to runtime wrap around overflow: FLANG,\n gfortran, ifort, and NAG Fortran. Older versions of gfortran will require\n the compiler flag, -fno-range-check , to ensure wrap around semantics\n for BOZ constants, and only versions of the NAG compiler starting with\n version 17, have implemented submodules. The latest releases of Cray\n Fortran and IBM Fortran are known to implement the Fortran 2008 extensions,\n but whether they also implement wrap around overflow is unknown. This implementation has only been tested on little endian processors. It\n will generate different hashes on big endian processors, but they are\n believed to be of comparable quality to those generated for little endian\n processors. No version of this hash is suitable as a cryptographic hash. Source Code !!------------------------------------------------------------------------------ !! `WATER_HASH` is a translation to Fortran 2008 of the `waterhash` algorithm !! of Tommy Ettinger. Tommy Ettinger's original C++ code, `waterhash.h`, is !! available at the URL: https://github.com/tommyettinger/waterhash under the !! `unlicense`, https://github.com/tommyettinger/waterhash/blob/master/LICENSE. !! \"`waterhash` is a variant on Wang Yi's `wyhash`, with 32 bit output, !! using at most 64 bit arithmetic. `wyhash` is available at the URL: !! `https://github.com/wangyi-fudan/wyhash` also under the unlicense: !! `https://github.com/wangyi-fudan/wyhash/blob/master/LICENSE`. !! Original Author: Wang Yi !! Waterhash Variant Author: Tommy Ettinger !! !! The `unlicense` reads as follows: !! This is free and unencumbered software released into the public domain. !! !! Anyone is free to copy, modify, publish, use, compile, sell, or !! distribute this software, either in source code form or as a compiled !! binary, for any purpose, commercial or non-commercial, and by any !! means. !! !! In jurisdictions that recognize copyright laws, the author or authors !! of this software dedicate any and all copyright interest in the !! software to the public domain. We make this dedication for the benefit !! of the public at large and to the detriment of our heirs and !! successors. We intend this dedication to be an overt act of !! relinquishment in perpetuity of all present and future rights to this !! software under copyright law. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, !! EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR !! OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, !! ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR !! OTHER DEALINGS IN THE SOFTWARE. !! !! For more information, please refer to !! !! `WATER_HASH` is distributed as part of the `stdlib_32_bit_hash_functions.f90` !! module and its `stdlib_hash_32bit_water.f90` submodule with the Fortran !! Standard Library at URL: https://github.com/fortran-lang/stdlib. !! The Fortran Standard Library, including this code, is distributed under the !! MIT License as described in the `LICENSE` file distributed with the library. !! `WATER_HASH` differs from `waterhash.h` not only in its use of Fortran, !! but also in its use of signed two's complement arithmetic in contrast to !! the unsigned arithmetic of Ettinger and Wang Yi, and in making some of the !! uses of `TRANSFER` endian dependent, in an attempt to make the quality of !! the hash endian independent. !! !! To be useful this code must be processed by a processor that implements two !! Fortran 2008 extensions to Fortran 2003: submodules, and 64 bit (`INT64`) !! integers. The processor must also use two's complement integers !! (all Fortran 95+ processors use two's complement arithmetic) with !! wrap around overflow at runtime and for BOZ constants. The latest releases !! of the following processors are known to implement the required Fortran !! 2008 extensions and default to runtime wrap around overflow: FLANG, !! gfortran, ifort, and NAG Fortran. Older versions of gfortran will require !! the compiler flag, `-fno-range-check`, to ensure wrap around semantics !! for BOZ constants, and only versions of the NAG compiler starting with !! version 17, have implemented submodules. The latest releases of Cray !! Fortran and IBM Fortran are known to implement the Fortran 2008 extensions, !! but whether they also implement wrap around overflow is unknown. !! !! This implementation has only been tested on little endian processors. It !! will generate different hashes on big endian processors, but they are !! believed to be of comparable quality to those generated for little endian !! processors. !! !! No version of this hash is suitable as a cryptographic hash. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_32bit ) stdlib_hash_32bit_water implicit none contains pure module function int8_water_hash ( key , seed ) result ( hash_code ) integer ( int32 ) :: hash_code integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int64 ), intent ( in ) :: seed integer ( int32 ) :: dummy ( 2 ) integer ( int64 ) :: h integer ( int64 ) :: i integer ( int64 ) :: len integer ( int64 ), parameter :: & waterp0 = int ( z 'a0761d65' , kind = int64 ), & waterp1 = int ( z 'e7037ed1' , kind = int64 ), & waterp2 = int ( z '8ebc6af1' , kind = int64 ), & waterp3 = int ( z '589965cd' , kind = int64 ), & waterp4 = int ( z '1d8e4e27' , kind = int64 ), & waterp5 = int ( z 'eb44accb' , kind = int64 ) len = size ( key , kind = int64 ) h = seed do i = 0_int64 , len - 16 , 16 h = watermum ( watermum ( ieor ( waterr32 ( key ( i :)), waterp1 ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )) + h , & watermum ( ieor ( waterr32 ( key ( i + 8 :)), waterp3 ), & ieor ( waterr32 ( key ( i + 12 :)), waterp4 ))) end do h = h + waterp5 select case ( iand ( len , 15_int64 ) ) case ( 1 ) h = watermum ( ieor ( waterp2 , h ), & ieor ( waterr08 ( key ( i :)), waterp1 )) case ( 2 ) h = watermum ( ieor ( waterp3 , h ), & ieor ( waterr16 ( key ( i :)), waterp4 )) case ( 3 ) h = watermum ( ieor ( waterr16 ( key ( i :)), h ), & ieor ( waterr08 ( key ( i + 2 :)), waterp2 )) case ( 4 ) h = watermum ( ieor ( waterr16 ( key ( i :)), h ), & ieor ( waterr16 ( key ( i + 2 :)), waterp3 )) case ( 5 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr08 ( key ( i + 4 :)), waterp1 )) case ( 6 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr16 ( key ( i + 4 :)), waterp1 )) case ( 7 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( ior ( ishft ( waterr16 ( key ( i + 4 :)), 8 ), & waterr08 ( key ( i + 6 :))), waterp1 )) case ( 8 ) h = watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp0 )) case ( 9 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterp4 ), & ieor ( waterr08 ( key ( i + 8 :)), waterp3 ))) case ( 10 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( h , ieor ( waterr16 ( key ( i + 8 :)), waterp3 ))) case ( 11 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( h , & ieor ( ior ( ishft ( waterr16 ( key ( i + 8 :)), 8 ), & waterr08 ( key ( i + 10 :))), & waterp3 ))) case ( 12 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & waterp4 )) case ( 13 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & ieor ( waterr08 ( key ( i + 12 :)), waterp4 ))) case ( 14 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & ieor ( waterr16 ( key ( i + 12 :)), waterp4 ))) case ( 15 ) h = ieor ( watermum ( ieor ( waterr32 ( key ( i :)), h ), & ieor ( waterr32 ( key ( i + 4 :)), waterp2 )), & watermum ( ieor ( h , waterr32 ( key ( i + 8 :))), & ieor ( ior ( ishft ( waterr16 ( key ( i + 12 :)), 8 ), & waterr08 ( key ( i + 14 :))), & waterp4 ))) end select h = ieor ( h , ishft ( h , 16 ) ) * ieor ( len , waterp0 ) h = h - ishft ( h , - 32 ) dummy ( 1 : 2 ) = transfer ( h , dummy , 2 ) if ( little_endian ) then hash_code = dummy ( 1 ) else hash_code = dummy ( 2 ) end if contains pure function watermum ( a , b ) result ( r ) integer ( int64 ) :: r integer ( int64 ), intent ( in ) :: a , b r = a * b r = r - ishft ( r , - 32 ) end function watermum pure function waterr08 ( p ) result ( v ) integer ( int64 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( [ p ( 1 ), 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], v ) else v = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , p ( 1 ) ], v ) end if end function waterr08 pure function waterr16 ( p ) result ( v ) integer ( int64 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( [ p ( 1 ), p ( 2 ), 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], v ) else v = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , p ( 2 ), p ( 1 ) ], v ) end if end function waterr16 pure function waterr32 ( p ) result ( v ) integer ( int64 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( [ p ( 1 ), p ( 2 ), p ( 3 ), p ( 4 ), & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], v ) else v = transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & p ( 4 ), p ( 3 ), p ( 2 ), p ( 1 ) ], v ) end if end function waterr32 end function int8_water_hash #:for k1 in INT_KINDS pure module function ${ k1 }$_ water_hash ( key , seed ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int64 ), intent ( in ) :: seed integer ( int_hash ) :: hash_code hash_code = int8_water_hash ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ water_hash #:endfor elemental module function character_water_hash ( key , seed ) & result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed integer ( int_hash ) :: hash_code hash_code = int8_water_hash ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_water_hash module subroutine new_water_hash_seed ( seed ) integer ( int64 ), intent ( inout ) :: seed integer ( int64 ) :: old_seed real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) old_seed = seed find_seed : do call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) seed = transfer ( part , seed ) if ( seed /= old_seed ) return end do find_seed end subroutine new_water_hash_seed end submodule stdlib_hash_32bit_water","tags":"","loc":"sourcefile/stdlib_hash_32bit_water.fypp.html"},{"title":"stdlib_math_all_close.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_math ) stdlib_math_all_close implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for r1 in RANKS logical pure module function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ ( a , b , rel_tol , abs_tol , equal_nan ) result ( close ) ${ t1 }$ , intent ( in ) :: a$ { ranksuffix ( r1 ) }$ , b$ { ranksuffix ( r1 ) }$ real ( ${ k1 }$ ), intent ( in ), optional :: rel_tol , abs_tol logical , intent ( in ), optional :: equal_nan close = all ( is_close ( a , b , rel_tol , abs_tol , equal_nan )) end function all_close_$ { r1 }$_${ t1 [ 0 ] }{ k1 }$ # : endfor # : endfor end submodule stdlib_math_all_close","tags":"","loc":"sourcefile/stdlib_math_all_close.fypp.html"},{"title":"stdlib_linalg_blas_s.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_s use stdlib_linalg_constants use stdlib_linalg_blas_aux implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_sasum public :: stdlib_saxpy public :: stdlib_scasum public :: stdlib_scnrm2 public :: stdlib_scopy public :: stdlib_sdot public :: stdlib_sdsdot public :: stdlib_sgbmv public :: stdlib_sgemm public :: stdlib_sgemv public :: stdlib_sger public :: stdlib_snrm2 public :: stdlib_srot public :: stdlib_srotg public :: stdlib_srotm public :: stdlib_srotmg public :: stdlib_ssbmv public :: stdlib_sscal public :: stdlib_sspmv public :: stdlib_sspr public :: stdlib_sspr2 public :: stdlib_sswap public :: stdlib_ssymm public :: stdlib_ssymv public :: stdlib_ssyr public :: stdlib_ssyr2 public :: stdlib_ssyr2k public :: stdlib_ssyrk public :: stdlib_stbmv public :: stdlib_stbsv public :: stdlib_stpmv public :: stdlib_stpsv public :: stdlib_strmm public :: stdlib_strmv public :: stdlib_strsm public :: stdlib_strsv ! 32-bit real constants real ( sp ), parameter , private :: negone = - 1.00_sp real ( sp ), parameter , private :: zero = 0.00_sp real ( sp ), parameter , private :: half = 0.50_sp real ( sp ), parameter , private :: one = 1.00_sp real ( sp ), parameter , private :: two = 2.00_sp real ( sp ), parameter , private :: three = 3.00_sp real ( sp ), parameter , private :: four = 4.00_sp real ( sp ), parameter , private :: eight = 8.00_sp real ( sp ), parameter , private :: ten = 1 0.00_sp ! 32-bit complex constants complex ( sp ), parameter , private :: czero = ( 0.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: chalf = ( 0.5_sp , 0.0_sp ) complex ( sp ), parameter , private :: cone = ( 1.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: cnegone = ( - 1.0_sp , 0.0_sp ) ! 32-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( sp ), parameter , private :: rradix = real ( radix ( zero ), sp ) real ( sp ), parameter , private :: ulp = epsilon ( zero ) real ( sp ), parameter , private :: eps = ulp * half real ( sp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( sp ), parameter , private :: safmax = one / safmin real ( sp ), parameter , private :: smlnum = safmin / ulp real ( sp ), parameter , private :: bignum = safmax * ulp real ( sp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( sp ), parameter , private :: rtmax = sqrt ( bignum ) ! 32-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( sp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( sp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( sp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( sp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure real ( sp ) function stdlib_sasum ( n , sx , incx ) !! SASUM takes the sum of the absolute values. !! uses unrolled loops for increment equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_sasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + abs ( sx ( i )) end do if ( n < 6 ) then stdlib_sasum = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 stemp = stemp + abs ( sx ( i )) + abs ( sx ( i + 1 )) + abs ( sx ( i + 2 )) + abs ( sx ( i + 3 )) + abs ( sx ( i + & 4 )) + abs ( sx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( sx ( i )) end do end if stdlib_sasum = stemp return end function stdlib_sasum pure subroutine stdlib_saxpy ( n , sa , sx , incx , sy , incy ) !! SAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( inout ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( sa == 0.0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sy ( i ) + sa * sx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 sy ( i ) = sy ( i ) + sa * sx ( i ) sy ( i + 1 ) = sy ( i + 1 ) + sa * sx ( i + 1 ) sy ( i + 2 ) = sy ( i + 2 ) + sa * sx ( i + 2 ) sy ( i + 3 ) = sy ( i + 3 ) + sa * sx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sy ( iy ) + sa * sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_saxpy pure real ( sp ) function stdlib_scasum ( n , cx , incx ) !! SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a single precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: abs , aimag , real stdlib_scasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + abs ( real ( cx ( i ), KIND = sp )) + abs ( aimag ( cx ( i ))) end do end if stdlib_scasum = stemp return end function stdlib_scasum pure function stdlib_scnrm2 ( n , x , incx ) !! SCNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SCNRM2 := sqrt( x**H*x ) real ( sp ) :: stdlib_scnrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_scnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = sp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_scnrm2 = scl * sqrt ( sumsq ) return end function stdlib_scnrm2 pure subroutine stdlib_scopy ( n , sx , incx , sy , incy ) !! SCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ) real ( sp ), intent ( out ) :: sy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m sy ( i ) = sx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 sy ( i ) = sx ( i ) sy ( i + 1 ) = sx ( i + 1 ) sy ( i + 2 ) = sx ( i + 2 ) sy ( i + 3 ) = sx ( i + 3 ) sy ( i + 4 ) = sx ( i + 4 ) sy ( i + 5 ) = sx ( i + 5 ) sy ( i + 6 ) = sx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n sy ( iy ) = sx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_scopy pure real ( sp ) function stdlib_sdot ( n , sx , incx , sy , incy ) !! SDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stemp = zero stdlib_sdot = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m stemp = stemp + sx ( i ) * sy ( i ) end do if ( n < 5 ) then stdlib_sdot = stemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 stemp = stemp + sx ( i ) * sy ( i ) + sx ( i + 1 ) * sy ( i + 1 ) + sx ( i + 2 ) * sy ( i + 2 ) + sx ( i + 3 ) * sy ( i + 3 ) + & sx ( i + 4 ) * sy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = stemp + sx ( ix ) * sy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_sdot = stemp return end function stdlib_sdot pure real ( sp ) function stdlib_sdsdot ( n , sb , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation. !! Returns S.P. result with dot product accumulated in D.P. !! SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sb integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! Local Scalars real ( dp ) :: dsdot integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real dsdot = sb if ( n <= 0 ) then stdlib_sdsdot = dsdot return end if if ( incx == incy . and . incx > 0 ) then ! code for equal and positive increments. ns = n * incx do i = 1 , ns , incx dsdot = dsdot + real ( sx ( i ), KIND = sp ) * real ( sy ( i ), KIND = sp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n dsdot = dsdot + real ( sx ( kx ), KIND = sp ) * real ( sy ( ky ), KIND = sp ) kx = kx + incx ky = ky + incy end do end if stdlib_sdsdot = dsdot return end function stdlib_sdsdot pure subroutine stdlib_sgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! SGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_sgbmv pure subroutine stdlib_sgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_sgemm pure subroutine stdlib_sgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! SGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_sgemv pure subroutine stdlib_sger ( m , n , alpha , x , incx , y , incy , a , lda ) !! SGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_sger pure function stdlib_snrm2 ( n , x , incx ) !! SNRM2 returns the euclidean norm of a vector via the function !! name, so that !! SNRM2 := sqrt( x'*x ). real ( sp ) :: stdlib_snrm2 ! -- reference blas level1 routine (version 3.9.1_sp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._sp ) real ( sp ), parameter :: maxn = huge ( 0.0_sp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( sp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_snrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_snrm2 = scl * sqrt ( sumsq ) return end function stdlib_snrm2 pure subroutine stdlib_srot ( n , sx , incx , sy , incy , c , s ) !! applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n stemp = c * sx ( i ) + s * sy ( i ) sy ( i ) = c * sy ( i ) - s * sx ( i ) sx ( i ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = c * sx ( ix ) + s * sy ( iy ) sy ( iy ) = c * sy ( iy ) - s * sx ( ix ) sx ( ix ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_srot pure subroutine stdlib_srotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( inout ) :: a , b real ( sp ), intent ( out ) :: c , s ! Local Scalars real ( sp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_srotg pure subroutine stdlib_srotm ( n , sx , incx , sy , incy , sparam ) !! SROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}SX^T\\\\SY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of SX are in !! SX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for SY using LY and INCY. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SH_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=-2}. !! See SROTMG for a description of data storage in SPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sparam ( 5 ) real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: sflag , sh11 , sh12 , sh21 , sh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_sp two = 2.0_sp sflag = sparam ( 1 ) if ( n <= 0 . or . ( sflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z * sh12 sy ( i ) = w * sh21 + z * sh22 end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w + z * sh12 sy ( i ) = w * sh21 + z end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , nsteps , incx w = sx ( i ) z = sy ( i ) sx ( i ) = w * sh11 + z sy ( i ) = - w + sh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( sflag < zero ) then sh11 = sparam ( 2 ) sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z * sh12 sy ( ky ) = w * sh21 + z * sh22 kx = kx + incx ky = ky + incy end do else if ( sflag == zero ) then sh12 = sparam ( 4 ) sh21 = sparam ( 3 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w + z * sh12 sy ( ky ) = w * sh21 + z kx = kx + incx ky = ky + incy end do else sh11 = sparam ( 2 ) sh22 = sparam ( 5 ) do i = 1 , n w = sx ( kx ) z = sy ( ky ) sx ( kx ) = w * sh11 + z sy ( ky ) = - w + sh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_srotm pure subroutine stdlib_srotmg ( sd1 , sd2 , sx1 , sy1 , sparam ) !! SROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{SD_1}\\cdot SX_1,\\sqrt{SD_2}\\cdot SY_2} \\right]^T. !! With SPARAM(1)=SFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}SH_{11} & SD_{12}\\\\SH_{21} & SH_{22}\\end{bmatrix}}_{SFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & SH_{12}\\\\SH_{21} & 1\\end{bmatrix}}_{SFLAG=0}, !! \\underbrace{\\begin{bmatrix}SH_{11} & 1\\\\-1 & SH_{22}\\end{bmatrix}}_{SFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{SFLAG=2}. !! Locations 2-4 of SPARAM contain SH11, SH21, SH12 and SH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of SPARAM(1) are not stored in SPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( inout ) :: sd1 , sd2 , sx1 real ( sp ), intent ( in ) :: sy1 ! Array Arguments real ( sp ), intent ( out ) :: sparam ( 5 ) ! ===================================================================== ! Local Scalars real ( sp ) :: gam , gamsq , one , rgamsq , sflag , sh11 , sh12 , sh21 , sh22 , sp1 , sp2 , sq1 , sq2 ,& stemp , su , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_sp one = 1.0_sp two = 2.0_sp gam = 409 6.0_sp gamsq = 1.67772e7_sp rgamsq = 5.96046e-8_sp if ( sd1 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else ! case-sd1-nonnegative sp2 = sd2 * sy1 if ( sp2 == zero ) then sflag = - two sparam ( 1 ) = sflag return end if ! regular-case.. sp1 = sd1 * sx1 sq2 = sp2 * sy1 sq1 = sp1 * sx1 if ( abs ( sq1 ) > abs ( sq2 )) then sh21 = - sy1 / sx1 sh12 = sp2 / sp1 su = one - sh12 * sh21 if ( su > zero ) then sflag = zero sd1 = sd1 / su sd2 = sd2 / su sx1 = sx1 * su else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero end if else if ( sq2 < zero ) then ! go zero-h-d-and-sx1.. sflag = - one sh11 = zero sh12 = zero sh21 = zero sh22 = zero sd1 = zero sd2 = zero sx1 = zero else sflag = one sh11 = sp1 / sp2 sh22 = sx1 / sy1 su = one + sh11 * sh22 stemp = sd2 / su sd2 = sd1 / su sd1 = stemp sx1 = sy1 * su end if end if ! procedure..scale-check if ( sd1 /= zero ) then do while (( sd1 <= rgamsq ) . or . ( sd1 >= gamsq )) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( sd1 <= rgamsq ) then sd1 = sd1 * gam ** 2 sx1 = sx1 / gam sh11 = sh11 / gam sh12 = sh12 / gam else sd1 = sd1 / gam ** 2 sx1 = sx1 * gam sh11 = sh11 * gam sh12 = sh12 * gam end if enddo end if if ( sd2 /= zero ) then do while ( ( abs ( sd2 ) <= rgamsq ) . or . ( abs ( sd2 ) >= gamsq ) ) if ( sflag == zero ) then sh11 = one sh22 = one sflag = - one else sh21 = - one sh12 = one sflag = - one end if if ( abs ( sd2 ) <= rgamsq ) then sd2 = sd2 * gam ** 2 sh21 = sh21 / gam sh22 = sh22 / gam else sd2 = sd2 / gam ** 2 sh21 = sh21 * gam sh22 = sh22 * gam end if end do end if end if if ( sflag < zero ) then sparam ( 2 ) = sh11 sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 sparam ( 5 ) = sh22 else if ( sflag == zero ) then sparam ( 3 ) = sh21 sparam ( 4 ) = sh12 else sparam ( 2 ) = sh11 sparam ( 5 ) = sh22 end if sparam ( 1 ) = sflag return end subroutine stdlib_srotmg pure subroutine stdlib_ssbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! SSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssbmv pure subroutine stdlib_sscal ( n , sa , sx , incx ) !! SSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m sx ( i ) = sa * sx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 sx ( i ) = sa * sx ( i ) sx ( i + 1 ) = sa * sx ( i + 1 ) sx ( i + 2 ) = sa * sx ( i + 2 ) sx ( i + 3 ) = sa * sx ( i + 3 ) sx ( i + 4 ) = sa * sx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx sx ( i ) = sa * sx ( i ) end do end if return end subroutine stdlib_sscal pure subroutine stdlib_sspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! SSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_sspmv pure subroutine stdlib_sspr ( uplo , n , alpha , x , incx , ap ) !! SSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr pure subroutine stdlib_sspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! SSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: ap ( * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_sspr2 pure subroutine stdlib_sswap ( n , sx , incx , sy , incy ) !! SSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( inout ) :: sx ( * ), sy ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: stemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 stemp = sx ( i ) sx ( i ) = sy ( i ) sy ( i ) = stemp stemp = sx ( i + 1 ) sx ( i + 1 ) = sy ( i + 1 ) sy ( i + 1 ) = stemp stemp = sx ( i + 2 ) sx ( i + 2 ) = sy ( i + 2 ) sy ( i + 2 ) = stemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n stemp = sx ( ix ) sx ( ix ) = sy ( iy ) sy ( iy ) = stemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_sswap pure subroutine stdlib_ssymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_ssymm pure subroutine stdlib_ssymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! SSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssymv pure subroutine stdlib_ssyr ( uplo , n , alpha , x , incx , a , lda ) !! SSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_ssyr pure subroutine stdlib_ssyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! SSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( sp ), intent ( inout ) :: a ( lda , * ) real ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_ssyr2 pure subroutine stdlib_ssyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! SSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_ssyr2k pure subroutine stdlib_ssyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! SSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'SSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_ssyrk pure subroutine stdlib_stbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_stbmv pure subroutine stdlib_stbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! STBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_stbsv pure subroutine stdlib_stpmv ( uplo , trans , diag , n , ap , x , incx ) !! STPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpmv pure subroutine stdlib_stpsv ( uplo , trans , diag , n , ap , x , incx ) !! STPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: ap ( * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_stpsv pure subroutine stdlib_strmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strmm pure subroutine stdlib_strmv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_strmv pure subroutine stdlib_strsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! STRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_strsm pure subroutine stdlib_strsv ( uplo , trans , diag , n , a , lda , x , incx ) !! STRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( sp ), intent ( in ) :: a ( lda , * ) real ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'STRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_strsv end module stdlib_linalg_blas_s","tags":"","loc":"sourcefile/stdlib_linalg_blas_s.fypp.html"},{"title":"stdlib_linalg_determinant.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_determinant !! Determinant of a rectangular matrix use stdlib_linalg_constants use stdlib_linalg_lapack , only : getrf use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR implicit none ( type , external ) ! Function interface character ( * ), parameter :: this = 'determinant' contains ! BLAS/LAPACK backends do not currently support xdp # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" pure module function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant ( a ) result ( det ) !!### Summary !! Compute determinant of a real square matrix (pure interface). !! !!### Description !! !! This function computes the determinant of a real square matrix. !! !! param: a Input matrix of size [m,n]. !! return: det Matrix determinant. !! !!### Example !! !!```fortran !! !! ${rt}$ :: matrix(3,3) !! ${rt}$ :: determinant !! matrix = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! determinant = det(matrix) !! !!``` !> Input matrix a[m,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Matrix determinant ${ rt }$ :: det !! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , info , perm , k integer ( ilp ), allocatable :: ipiv (:) ${ rt }$ , allocatable :: amat (:,:) ! Matrix determinant size m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) if ( m /= n . or . . not . min ( m , n ) >= 0 ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid or non-square matrix: a=[' , m , ',' , n , ']' ) det = 0.0 _${ rk }$ ! Process output and return call linalg_error_handling ( err0 ) return end if select case ( m ) case ( 0 ) ! Empty array has determinant 1 because math det = 1.0 _${ rk }$ case ( 1 ) ! Scalar input det = a ( 1 , 1 ) case default ! Find determinant from LU decomposition ! Initialize a matrix temporary allocate ( amat ( m , n ), source = a ) ! Pivot indices allocate ( ipiv ( n )) ! Compute determinant from LU factorization, then calculate the ! product of all diagonal entries of the U factor. call getrf ( m , n , amat , m , ipiv , info ) select case ( info ) case ( 0 ) ! Success: compute determinant ! Start with real 1.0 det = 1.0 _${ rk }$ perm = 0 do k = 1 , n if ( ipiv ( k ) /= k ) perm = perm + 1 det = det * amat ( k , k ) end do if ( mod ( perm , 2 ) /= 0 ) det = - det case (: - 1 ) err0 = linalg_state_type ( this , LINALG_ERROR , 'invalid matrix size a=[' , m , ',' , n , ']' ) case ( 1 :) err0 = linalg_state_type ( this , LINALG_ERROR , 'singular matrix' ) case default err0 = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select deallocate ( amat ) end select ! Process output and return call linalg_error_handling ( err0 ) end function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant module function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant ( a , overwrite_a , err ) result ( det ) !!### Summary !! Compute determinant of a square matrix (with error control). !! !!### Description !! !! This function computes the determinant of a square matrix with error control. !! !! param: a Input matrix of size [m,n]. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: err State return flag. !! return: det Matrix determinant. !! !!### Example !! !!```fortran !! !! ${rt}$ :: matrix(3,3) !! ${rt}$ :: determinant !! matrix = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! determinant = det(matrix, err=err) !! !!``` ! !> Input matrix a[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> State return flag. type ( linalg_state_type ), intent ( out ) :: err !> Matrix determinant ${ rt }$ :: det !! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , info , perm , k integer ( ilp ), allocatable :: ipiv (:) logical ( lk ) :: copy_a ${ rt }$ , pointer :: amat (:,:) ! Matrix determinant size m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) if ( m /= n . or . . not . min ( m , n ) >= 0 ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid or non-square matrix: a=[' , m , ',' , n , ']' ) det = 0.0 _${ rk }$ ! Process output and return call linalg_error_handling ( err0 , err ) return end if ! Can A be overwritten? By default, do not overwrite if ( present ( overwrite_a )) then copy_a = . not . overwrite_a else copy_a = . true . _ lk endif select case ( m ) case ( 0 ) ! Empty array has determinant 1 because math det = 1.0 _${ rk }$ case ( 1 ) ! Scalar input det = a ( 1 , 1 ) case default ! Find determinant from LU decomposition ! Initialize a matrix temporary if ( copy_a ) then allocate ( amat , source = a ) else amat => a endif ! Pivot indices allocate ( ipiv ( n )) ! Compute determinant from LU factorization, then calculate the ! product of all diagonal entries of the U factor. call getrf ( m , n , amat , m , ipiv , info ) select case ( info ) case ( 0 ) ! Success: compute determinant ! Start with real 1.0 det = 1.0 _${ rk }$ perm = 0 do k = 1 , n if ( ipiv ( k ) /= k ) perm = perm + 1 det = det * amat ( k , k ) end do if ( mod ( perm , 2 ) /= 0 ) det = - det case (: - 1 ) err0 = linalg_state_type ( this , LINALG_ERROR , 'invalid matrix size a=[' , m , ',' , n , ']' ) case ( 1 :) err0 = linalg_state_type ( this , LINALG_ERROR , 'singular matrix' ) case default err0 = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select if ( copy_a ) deallocate ( amat ) end select ! Process output and return call linalg_error_handling ( err0 , err ) end function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end submodule stdlib_linalg_determinant","tags":"","loc":"sourcefile/stdlib_linalg_determinant.fypp.html"},{"title":"stdlib_bitsets.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_bitsets !! Implements zero based bitsets of size up to `huge(0_int32)`. !! The current code uses 64 bit integers to store the bits and uses all 64 bits. !! The code assumes two's complement integers, and treats negative integers as !! having the sign bit set. !!([Specification](../page/specs/stdlib_bitsets.html)) use :: stdlib_kinds , only : & bits_kind => int32 , & ! If changed change also max_digits, and block_kind => int64 , & ! overflow_bits int8 , & int16 , & int32 , & int64 use stdlib_optval , only : optval use , intrinsic :: & iso_fortran_env , only : & error_unit implicit none private integer ( bits_kind ), parameter :: & block_size = bit_size ( 0_block_kind ) public :: max_digits , overflow_bits integer , parameter :: & max_digits = 10 ! bits_kind == int32 ! max_digits = 19 ! bits_kind == int64 integer ( bits_kind ), parameter :: & overflow_bits = 2_bits_kind ** 30 / 5 ! bits_kind == int32 ! overflow_bits = 2_bits_kind**62/5 ! bits_kind == int64 integer ( block_kind ), parameter :: all_zeros = 0_block_kind integer ( block_kind ), parameter :: all_ones = not ( all_zeros ) character ( * ), parameter :: module_name = \"STDLIB_BITSETS\" integer , parameter :: & ia0 = iachar ( '0' ), & ia9 = iachar ( '9' ) integer , parameter , public :: success = 0 !! Error flag indicating no errors integer , parameter , public :: alloc_fault = 1 !! Error flag indicating a memory allocation failure integer , parameter , public :: array_size_invalid_error = 2 !! Error flag indicating an invalid bits value integer , parameter , public :: char_string_invalid_error = 3 !! Error flag indicating an invalid character string integer , parameter , public :: char_string_too_large_error = 4 !! Error flag indicating a too large character string integer , parameter , public :: char_string_too_small_error = 5 !! Error flag indicating a too small character string integer , parameter , public :: eof_failure = 6 !! Error flag indicating unexpected End-of-File on a READ integer , parameter , public :: index_invalid_error = 7 !! Error flag indicating an invalid index integer , parameter , public :: integer_overflow_error = 8 !! Error flag indicating integer overflow integer , parameter , public :: read_failure = 9 !! Error flag indicating failure of a READ statement integer , parameter , public :: write_failure = 10 !! Error flag indicating a failure on a WRITE statement public :: bits_kind ! Public constant public :: & bitset_type , & bitset_large , & bitset_64 ! Public types public :: & assignment ( = ), & and , & and_not , & bits , & extract , & operator ( == ), & operator ( /= ), & operator ( > ), & operator ( >= ), & operator ( < ), & operator ( <= ), & or , & xor !! Public procedures public :: error_handler type , abstract :: bitset_type !! version: experimental !! !! Parent type for bitset_64 and bitset_large ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( bits_kind ) :: num_bits = 0_bits_kind contains procedure ( all_abstract ), deferred , pass ( self ) :: all procedure ( any_abstract ), deferred , pass ( self ) :: any procedure ( bit_count_abstract ), deferred , pass ( self ) :: bit_count procedure , pass ( self ) :: bits procedure ( clear_bit_abstract ), deferred , pass ( self ) :: clear_bit procedure ( clear_range_abstract ), deferred , pass ( self ) :: clear_range generic :: clear => clear_bit , clear_range procedure ( flip_bit_abstract ), deferred , pass ( self ) :: flip_bit procedure ( flip_range_abstract ), deferred , pass ( self ) :: flip_range generic :: flip => flip_bit , flip_range procedure ( from_string_abstract ), deferred , pass ( self ) :: from_string procedure ( init_zero_abstract ), deferred , pass ( self ) :: init_zero generic :: init => init_zero procedure ( input_abstract ), deferred , pass ( self ) :: input procedure ( none_abstract ), deferred , pass ( self ) :: none procedure ( not_abstract ), deferred , pass ( self ) :: not procedure ( output_abstract ), deferred , pass ( self ) :: output procedure ( read_bitset_string_abstract ), deferred , pass ( self ) :: & read_bitset_string procedure ( read_bitset_unit_abstract ), deferred , pass ( self ) :: & read_bitset_unit generic :: read_bitset => read_bitset_string , read_bitset_unit procedure ( set_bit_abstract ), deferred , pass ( self ) :: set_bit procedure ( set_range_abstract ), deferred , pass ( self ) :: set_range generic :: set => set_bit , set_range procedure ( test_abstract ), deferred , pass ( self ) :: test procedure ( to_string_abstract ), deferred , pass ( self ) :: to_string procedure ( value_abstract ), deferred , pass ( self ) :: value procedure ( write_bitset_string_abstract ), deferred , pass ( self ) :: & write_bitset_string procedure ( write_bitset_unit_abstract ), deferred , pass ( self ) :: & write_bitset_unit generic :: write_bitset => write_bitset_string , write_bitset_unit end type bitset_type abstract interface elemental function all_abstract ( self ) result ( all ) !! Version: experimental !! !! Returns `.true.` if all bits in `self` are 1, `.false.` otherwise. !! !!#### Example !! !!```fortran !! program example_all !! use stdlib_bitsets !! character(*), parameter :: & !! bits_all = '111111111111111111111111111111111' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_all ) !! if ( bits(set0) /= 33 ) then !! error stop \"FROM_STRING failed to interpret \" // & !! 'BITS_ALL's size properly.\" !! else if ( .not. set0 % all() ) then !! error stop \"FROM_STRING failed to interpret\" // & !! \"BITS_ALL's value properly.\" !! else !! write(*,*) \"FROM_STRING transferred BITS_ALL properly\" // & !! \" into set0.\" !! end if !! end program example_all !!``` import :: bitset_type logical :: all class ( bitset_type ), intent ( in ) :: self end function all_abstract elemental function any_abstract ( self ) result ( any ) !! Version: experimental !! !! Returns `.true.` if any bit in `self` is 1, `.false.` otherwise. !! !!#### Example !! !!```fortran !! program example_any !! use stdlib_bitsets !! character(*), parameter :: & !! bits_0 = '0000000000000000000' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_0 ) !! if ( .not. set0 % any() ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % set(5) !! if ( set0 % any() ) then !! write(*,*) \"ANY interpreted SET0's value properly.\" !! end if !! end program example_any !!``` import :: bitset_type logical :: any class ( bitset_type ), intent ( in ) :: self end function any_abstract elemental function bit_count_abstract ( self ) result ( bit_count ) !! Version: experimental !! !! Returns the number of non-zero bits in `self`. !! !!#### Example !! !!```fortran !! program example_bit_count !! use stdlib_bitsets !! character(*), parameter :: & !! bits_0 = '0000000000000000000' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_0 ) !! if ( set0 % bit_count() == 0 ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % set(5) !! if ( set0 % bit_count() == 1 ) then !! write(*,*) \"BIT_COUNT interpreted SET0's value properly.\" !! end if !! end program example_bit_count !!``` import :: bitset_type , bits_kind integer ( bits_kind ) :: bit_count class ( bitset_type ), intent ( in ) :: self end function bit_count_abstract elemental subroutine clear_bit_abstract ( self , pos ) !! Version: experimental !! !! Sets to zero the `pos` position in `self`. If `pos` is less than zero or !! greater than `bits(self)-1` it is ignored. !! !!#### Example !! !!```fortran !! program example_clear !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! call set0 % not() !! if ( set0 % all() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % clear(165) !! if ( .not. set0 % test(165) ) write(*,*) 'Bit 165 is cleared.' !! call set0 % clear(0,164) !! if ( set0 % none() ) write(*,*) 'All bits are cleared.' !! end program example_clear !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine clear_bit_abstract pure subroutine clear_range_abstract ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets to zero all bits from the `start_pos` to `stop_pos` positions in `set`. !! If `stop_pos < start_pos` then no bits are modified. Positions outside !! the range 0 to `bits(self)-1` are ignored. import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine clear_range_abstract elemental subroutine flip_bit_abstract ( self , pos ) !! Version: experimental !! !! Flips the value at the `pos` position in `self`, provided the position is !! valid. If `pos` is less than 0 or greater than `bits(self)-1`, no value is !! changed. !! !!#### Example !! !!```fortran !! program example_flip !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! if ( set0 % none() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % flip(165) !! if ( set0 % test(165) ) write(*,*) 'Bit 165 is flipped.' !! call set0 % flip(0,164) !! if ( set0 % all() ) write(*,*) 'All bits are flipped.' !! end program example_flip !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine flip_bit_abstract pure subroutine flip_range_abstract ( self , start_pos , stop_pos ) !! Version: experimental !! !! Flips all valid bits from the `start_pos` to the `stop_pos` positions in !! `self`. If `stop_pos < start_pos` no bits are flipped. Positions less than !! 0 or greater than `bits(self)-1` are ignored. import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine flip_range_abstract subroutine from_string_abstract ( self , string , status ) !! Version: experimental !! !! Initializes the bitset `self` treating `string` as a binary literal !! `status` may have the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if allocation of the bitset failed !! * `char_string_too_large_error` - if `string` was too large, or !! * `char_string_invalid_error` - if string had an invalid character. !! !!#### Example !! !!```fortran !! program example_from_string !! use stdlib_bitsets !! character(*), parameter :: & !! bits_all = '111111111111111111111111111111111' !! type(bitset_64) :: set0 !! call set0 % from_string( bits_all ) !! if ( bits(set0) /= 33 ) then !! error stop \"FROM_STRING failed to interpret \" // & !! 'BITS_ALL's size properly.\" !! else if ( .not. set0 % all() ) then !! error stop \"FROM_STRING failed to interpret\" // & !! \"BITS_ALL's value properly.\" !! else !! write(*,*) \"FROM_STRING transferred BITS_ALL properly\" // & !! \" into set0.\" !! end if !! end program example_from_string !!``` import :: bitset_type class ( bitset_type ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine from_string_abstract subroutine init_zero_abstract ( self , bits , status ) !! Creates the bitset, `self`, of size `bits`, with all bits initialized to !! zero. `bits` must be non-negative. If an error occurs and `status` is !! absent then processing stops with an informative stop code. `status` !! will have one of the values; !! * `success` - if no problems were found, !! * `alloc_fault` - if memory allocation failed !! * `array_size_invalid_error` - if `bits` is either negative or larger !! than 64 with `self` of class `bitset_64`, or !! !!#### Example !! !!```fortran !! program example_init !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! if ( set0 % bits() == 166 ) & !! write(*,*) `SET0 has the proper size.' !! if ( set0 % none() ) write(*,*) 'SET0 is properly initialized.' !! end program example_init !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status end subroutine init_zero_abstract subroutine input_abstract ( self , unit , status ) !! Version: experimental !! !! Reads the components of the bitset, `self`, from the unformatted I/O !! unit, `unit`, assuming that the components were written using `output`. !! If an error occurs and `status` is absent then processing stops with !! an informative stop code. `status` has one of the values: !! * `success` - if no problem was found !! * `alloc_fault` - if it failed allocating memory for `self`, or !! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative !! or greater than 64 for a `bitset_64` input. !! * `read_failure` - if it failed during the reads from `unit` !! !!#### Example !! !!```fortran !! program example_input !! character(*), parameter :: & !! bits_0 = '000000000000000000000000000000000', & !! bits_1 = '000000000000000000000000000000001', & !! bits_33 = '100000000000000000000000000000000' !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % from_string( bits_0 ) !! call set1 % from_string( bits_1 ) !! call set2 % from_string( bits_33 ) !! open( newunit=unit, file='test.bin', status='replace', & !! form='unformatted', action='write' ) !! call set2 % output(unit) !! call set1 % output(unit) !! call set0 % output(unit) !! close( unit ) !! open( newunit=unit, file='test.bin', status='old', & !! form='unformatted', action='read' ) !! call set5 % input(unit) !! call set4 % input(unit) !! call set3 % input(unit) !! close( unit ) !! if ( set3 /= set0 .or. set4 /= set1 .or. set5 /= set2 ) then !! error stop 'Transfer to and from units using ' // & !! ' output and input failed.' !! else !! write(*,*) 'Transfer to and from units using ' // & !! 'output and input succeeded.' !! end if !! end program example_input !!``` import :: bitset_type class ( bitset_type ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine input_abstract elemental function none_abstract ( self ) result ( none ) !! Version: experimental !! !! Returns `.true.` if none of the bits in `self` have the value 1. !! !!#### Example !! !!```fortran !! program example_none !! use stdlib_bitsets !! character(*), parameter :: & !! bits_0 = '0000000000000000000' !! type(bitset_large) :: set0 !! call set0 % from_string( bits_0 ) !! if ( set0 % none() ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % set(5) !! if ( .not. set0 % none() ) then !! write(*,*) \"NONE interpreted SET0's value properly.\" !! end if !! end program example_none !!``` import :: bitset_type logical :: none class ( bitset_type ), intent ( in ) :: self end function none_abstract elemental subroutine not_abstract ( self ) !! Version: experimental !! !! Sets the bits in `self` to their logical complement !! !!#### Example !! !!```fortran !! program example_not !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init( 155 ) !! if ( set0 % none() ) then !! write(*,*) \"FROM_STRING interpreted \" // & !! \"BITS_0's value properly.\" !! end if !! call set0 % not() !! if ( set0 % all() ) then !! write(*,*) \"ALL interpreted SET0's value properly.\" !! end if !! end program example_not !!``` import :: bitset_type class ( bitset_type ), intent ( inout ) :: self end subroutine not_abstract subroutine output_abstract ( self , unit , status ) !! Version: experimental !! !! Writes the components of the bitset, `self`, to the unformatted I/O !! unit, `unit`, in a unformatted sequence compatible with `input`. If !! `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `write_failure` if the write failed. !! !!#### Example !! !!```fortran !! program example_output !! character(*), parameter :: & !! bits_0 = '000000000000000000000000000000000', & !! bits_1 = '000000000000000000000000000000001', & !! bits_33 = '100000000000000000000000000000000' !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % from_string( bits_0 ) !! call set1 % from_string( bits_1 ) !! call set2 % from_string( bits_33 ) !! open( newunit=unit, file='test.bin', status='replace', & !! form='unformatted', action='write' ) !! call set2 % output(unit) !! call set1 % output(unit) !! call set0 % output(unit) !! close( unit ) !! open( newunit=unit, file='test.bin', status='old', & !! form='unformatted', action='read' ) !! call set5 % input(unit) !! call set4 % input(unit) !! call set3 % input(unit) !! close( unit ) !! if ( set3 /= set0 .or. set4 /= set1 .or. set5 /= set2 ) then !! error stop 'Transfer to and from units using ' // & !! ' output and input failed.' !! else !! write(*,*) 'Transfer to and from units using ' // & !! 'output and input succeeded.' !! end if !! end program example_output !!``` import :: bitset_type class ( bitset_type ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine output_abstract subroutine read_bitset_string_abstract ( self , string , status ) !! Version: experimental !! !! Uses the bitset literal in the default character `string`, to define !! the bitset, `self`. The literal may be preceded by an an arbitrary !! sequence of blank characters. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` !! is present it has one of the values !! * `success` - if no problems occurred, !! * `alloc_fault` - if allocation of memory for SELF failed, !! * `array_size_invalid_error - if `bits(self)` in `string` is greater !! than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the bitset literal has an invalid !! character, !! * `char_string_too_small_error - if the string ends before all the bits !! are read. !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! !!#### Example !! !!```fortran !! program example_read_bitset !! character(*), parameter :: & !! bits_0 = 'S33B000000000000000000000000000000000', & !! bits_1 = 'S33B000000000000000000000000000000001', & !! bits_33 = 'S33B100000000000000000000000000000000' !! character(:), allocatable :: test_0, test_1, test_2 !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % read_bitset( bits_0, status ) !! call set1 % read_bitset( bits_1, status ) !! call set2 % read_bitset( bits_2, status ) !! call set0 % write_bitset( test_0, status ) !! call set1 % write_bitset( test_1, status ) !! call set2 % write_bitset( test_2, status ) !! if ( bits_0 == test_0 .and. bits_1 == test_1 .and. & !! bits_2 == test_2 ) then !! write(*,*) 'READ_BITSET to WRITE_BITSET strings worked.' !! end if !! open( newunit=unit, file='test.txt', status='replace', & !! form='formatted', action='write' ) !! call set2 % write_bitset(unit, advance='no') !! call set1 % write_bitset(unit, advance='no') !! call set0 % write_bitset(unit) !! close( unit ) !! open( newunit=unit, file='test.txt', status='old', & !! form='formatted', action='read' ) !! call set3 % read_bitset(unit, advance='no') !! call set4 % read_bitset(unit, advance='no') !! call set5 % read_bitset(unit) !! if ( set3 == set0 .and. set4 == set1 .and. set5 == set2 ) then !! write(*,*) WRITE_BITSET to READ_BITSET through unit worked.' !! end if !! end program example_read_bitset !!``` import :: bitset_type class ( bitset_type ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine read_bitset_string_abstract subroutine read_bitset_unit_abstract ( self , unit , advance , status ) !! Version: experimental !! !! Uses the bitset literal at the current position in the formatted !! file with I/O unit, `unit`, to define the bitset, `self`. The literal !! may be preceded by an an arbitrary sequence of blank characters. !! If `advance` is present it must be either 'YES' or 'NO'. If absent !! it has the default value of 'YES' to determine whether advancing !! I/O occurs. If `status` is absent an error results in an error stop !! with an informative stop code. If `status` is present it has one of !! the values: !! * `success` - if no problem occurred, !! * `alloc_fault` - if allocation of `self` failed, !! * `array_size_invalid_error` - if `bits(self)` in the bitset literal !! is greater than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the read of the bitset literal found !! an invalid character, !! * `eof_failure` - if a `read` statement reached an end-of-file before !! completing the read of the bitset literal, !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! * `read_failure` - if a `read` statement fails, ! import :: bitset_type class ( bitset_type ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine read_bitset_unit_abstract elemental subroutine set_bit_abstract ( self , pos ) !! Version: experimental !! !! Sets the value at the `pos` position in `self`, provided the position is !! valid. If the position is less than 0 or greater than `bits(self)-1` !! then `self` is unchanged. !! !!#### Example !! !!```fortran !! program example_set !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! if ( set0 % none() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % set(165) !! if ( set0 % test(165) ) write(*,*) 'Bit 165 is set.' !! call set0 % set(0,164) !! if ( set0 % all() ) write(*,*) 'All bits are set.' !! end program example_set !!``` import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine set_bit_abstract pure subroutine set_range_abstract ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets all valid bits to 1 from the `start_pos` to the `stop_pos` positions !! in `self`. If `stop_pos < start_pos` no bits are changed. Positions outside !! the range 0 to `bits(self)-1` are ignored. import :: bitset_type , bits_kind class ( bitset_type ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine set_range_abstract elemental function test_abstract ( self , pos ) result ( test ) !! Version: experimental !! !! Returns `.true.` if the `pos` position is set, `.false.` otherwise. If `pos` !! is negative or greater than `bits(self) - 1` the result is `.false.`. !! !!#### Example !! !!```fortran !! program example_test !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! call set0 % not() !! if ( set0 % all() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % clear(165) !! if ( .not. set0 % test(165) ) write(*,*) 'Bit 165 is cleared.' !! call set0 % set(165) !! if ( set0 % test(165) ) write(*,*) 'Bit 165 is set.' !! end program example_test !!``` import :: bitset_type , bits_kind logical :: test class ( bitset_type ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function test_abstract subroutine to_string_abstract ( self , string , status ) !! Version: experimental !! !! Represents the value of `self` as a binary literal in `string` !! Status may have the values `success` or `alloc_fault`. !! !!#### Example !! !!```fortran !! program example_to_string !! use stdlib_bitsets !! character(*), parameter :: & !! bits_all = '111111111111111111111111111111111' !! type(bitset_64) :: set0 !! character(:), allocatable :: new_string !! call set0 % init(33) !! call set0 % not() !! call set0 % to_string( new_string ) !! if ( new_string == bits_all ) then !! write(*,*) \"TO_STRING transferred BITS0 properly\" // & !! \" into NEW_STRING.\" !! end if !! end program example_to_string !!``` import :: bitset_type class ( bitset_type ), intent ( in ) :: self character (:), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine to_string_abstract elemental function value_abstract ( self , pos ) result ( value ) !! Version: experimental !! !! Returns 1 if the `pos` position is set, 0 otherwise. If `pos` is negative !! or greater than `bits(set) - 1` the result is 0. !! !!#### Example !! !!```fortran !! program example_value !! use stdlib_bitsets !! type(bitset_large) :: set0 !! call set0 % init(166) !! call set0 % not() !! if ( set0 % all() ) write(*,*) 'SET0 is properly initialized.' !! call set0 % clear(165) !! if ( set0 % value(165) == 0 ) write(*,*) 'Bit 165 is cleared.' !! call set0 % set(165) !! if ( set0 % value(165) == 1 ) write(*,*) 'Bit 165 is set.' !! end program example_value !!``` import :: bitset_type , bits_kind integer :: value class ( bitset_type ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function value_abstract subroutine write_bitset_string_abstract ( self , string , status ) !! Version: experimental !! !! Writes a bitset literal to the allocatable default character `string`, !! representing the individual bit values in the `bitset_type`, `self`. !! If `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `alloc_fault` if allocation of !! the output string failed. !! !!#### Example !! !!```fortran !! program example_write_bitset !! character(*), parameter :: & !! bits_0 = 'S33B000000000000000000000000000000000', & !! bits_1 = 'S33B000000000000000000000000000000001', & !! bits_33 = 'S33B100000000000000000000000000000000' !! character(:), allocatable :: test_0, test_1, test_2 !! integer :: unit !! type(bitset_64) :: set0, set1, set2, set3, set4, set5 !! call set0 % read_bitset( bits_0, status ) !! call set1 % read_bitset( bits_1, status ) !! call set2 % read_bitset( bits_2, status ) !! call set0 % write_bitset( test_0, status ) !! call set1 % write_bitset( test_1, status ) !! call set2 % write_bitset( test_2, status ) !! if ( bits_0 == test_0 .and. bits_1 == test_1 .and. & !! bits_2 == test_2 ) then !! write(*,*) 'READ_BITSET to WRITE_BITSET strings worked.' !! end if !! open( newunit=unit, file='test.txt', status='replace', & !! form='formatted', action='write' ) !! call set2 % write_bitset(unit, advance='no') !! call set1 % write_bitset(unit, advance='no') !! call set0 % write_bitset(unit) !! close( unit ) !! open( newunit=unit, file='test.txt', status='old', & !! form='formatted', action='read' ) !! call set3 % read_bitset(unit, advance='no') !! call set4 % read_bitset(unit, advance='no') !! call set5 % read_bitset(unit) !! if ( set3 == set0 .and. set4 == set1 .and. set5 == set2 ) then !! write(*,*) WRITE_BITSET to READ_BITSET through unit worked.' !! end if !! end program example_write_bitset !!``` import :: bitset_type class ( bitset_type ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine write_bitset_string_abstract subroutine write_bitset_unit_abstract ( self , unit , advance , & status ) !! Version: experimental !! !! Writes a bitset literal to the I/O unit, `unit`, representing the !! individual bit values in the `bitset_t`, `self`. If an error occurs then !! processing stops with a message to `error_unit`. By default or if !! `advance` is present with the value 'YES', advancing output is used. !! If `advance` is present with the value 'NO', then the current record !! is not advanced by the write. If `status` is absent, an error results !! in an error stop with an informative stop code. If `status` is !! present it has the default value of `success`, the value !! `alloc_fault` if allocation of the output string failed, !! `write_failure` if the `write` statement outputting the literal failed. import :: bitset_type class ( bitset_type ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine write_bitset_unit_abstract end interface type , extends ( bitset_type ) :: bitset_large !! Version: experimental !! !! Type for bitsets with more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private , allocatable :: blocks (:) contains procedure , pass ( self ) :: all => all_large procedure , pass ( self ) :: any => any_large procedure , pass ( self ) :: bit_count => bit_count_large procedure , pass ( self ) :: clear_bit => clear_bit_large procedure , pass ( self ) :: clear_range => clear_range_large procedure , pass ( self ) :: flip_bit => flip_bit_large procedure , pass ( self ) :: flip_range => flip_range_large procedure , pass ( self ) :: from_string => from_string_large procedure , pass ( self ) :: init_zero => init_zero_large procedure , pass ( self ) :: input => input_large procedure , pass ( self ) :: none => none_large procedure , pass ( self ) :: not => not_large procedure , pass ( self ) :: output => output_large procedure , pass ( self ) :: & read_bitset_string => read_bitset_string_large procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_large procedure , pass ( self ) :: set_bit => set_bit_large procedure , pass ( self ) :: set_range => set_range_large procedure , pass ( self ) :: test => test_large procedure , pass ( self ) :: to_string => to_string_large procedure , pass ( self ) :: value => value_large procedure , pass ( self ) :: & write_bitset_string => write_bitset_string_large procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_large end type bitset_large interface elemental module function all_large ( self ) result ( all ) !! Version: experimental !! !! Returns `.true.` if all bits in `self` are 1, `.false.` otherwise. logical :: all class ( bitset_large ), intent ( in ) :: self end function all_large elemental module function any_large ( self ) result ( any ) !! Version: experimental !! !! Returns `.true.` if any bit in `self` is 1, `.false.` otherwise. logical :: any class ( bitset_large ), intent ( in ) :: self end function any_large elemental module function bit_count_large ( self ) result ( bit_count ) !! Version: experimental !! !! Returns the number of non-zero bits in `self`. integer ( bits_kind ) :: bit_count class ( bitset_large ), intent ( in ) :: self end function bit_count_large elemental module subroutine clear_bit_large ( self , pos ) !! Version: experimental !! !! Sets to zero the bit at `pos` position in `self`. If `pos` is less than !! zero or greater than `bits(self)-1` it is ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine clear_bit_large pure module subroutine clear_range_large ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets to zero all bits from the `start_pos` to `stop_pos` positions in `self`. !! If `stop_pos < start_pos` then no bits are modified. Positions outside !! the range 0 to `bits(set)-1` are ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine clear_range_large elemental module subroutine flip_bit_large ( self , pos ) !! Version: experimental !! !! Flips the bit value at the `pos` position in `self`, provided the position is !! valid. If `pos` is less than 0 or greater than `bits(self)-1`, no value is !! changed. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine flip_bit_large pure module subroutine flip_range_large ( self , start_pos , stop_pos ) !! Version: experimental !! !! Flips all valid bits from the `start_pos` to the `stop_pos` positions in !! `self`. If `stop_pos < start_pos` no bits are flipped. Positions less than !! 0 or greater than `bits(self)-1` are ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine flip_range_large module subroutine from_string_large ( self , string , status ) !! Version: experimental !! !! Initializes the bitset `self` treating `string` as a binary literal !! `status` may have the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if allocation of the bitset failed !! * `char_string_too_large_error` - if `string` was too large, or !! * `char_string_invalid_error` - if string had an invalid character. class ( bitset_large ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine from_string_large module subroutine init_zero_large ( self , bits , status ) !! Version: experimental !! !! Creates the bitset, `self`, of size `bits`, with all bits initialized to !! zero. `bits` must be non-negative. If an error occurs and `status` is !! absent then processing stops with an informative stop code. `status` !! will have one of the values; !! * `success` - if no problems were found, !! * `alloc_fault` - if memory allocation failed !! * `array_size_invalid_error` - if `bits` is either negative or larger !! than 64 with `self` of class `bitset_64`, or class ( bitset_large ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status end subroutine init_zero_large module subroutine input_large ( self , unit , status ) !! Version: experimental !! !! Reads the components of the bitset, `self`, from the unformatted I/O !! unit, `unit`, assuming that the components were written using `output`. !! If an error occurs and `status` is absent then processing stops with !! an informative stop code. `status` has one of the values: !! * `success` - if no problem was found !! * `alloc_fault` - if it failed allocating memory for `self`, or !! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative !! or greater than 64 for a `bitset_64` input. !! * `read_failure` - if it failed during the reads from `unit` class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine input_large elemental module function none_large ( self ) result ( none ) !! Version: experimental !! !! Returns `.true.` if none of the bits in `self` have the value 1. logical :: none class ( bitset_large ), intent ( in ) :: self end function none_large elemental module subroutine not_large ( self ) !! Version: experimental !! !! Sets the bits in `self` to their logical complement class ( bitset_large ), intent ( inout ) :: self end subroutine not_large module subroutine output_large ( self , unit , status ) !! Version: experimental !! !! Writes the components of the bitset, `self`, to the unformatted I/O !! unit, `unit`, in a unformatted sequence compatible with `input`. If !! `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `write_failure` if the write failed. class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine output_large module subroutine read_bitset_string_large ( self , string , status ) !! Version: experimental !! !! Uses the bitset literal in the default character `string`, to define !! the bitset, `self`. The literal may be preceded by an an arbitrary !! sequence of blank characters. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` !! is present it has one of the values !! * `success` - if no problems occurred, !! * `alloc_fault` - if allocation of memory for SELF failed, !! * `array_size_invalid_error - if `bits(self)` in `string` is greater !! than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the bitset literal has an invalid !! character, !! * `char_string_too_small_error - if the string ends before all the bits !! are read. !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, class ( bitset_large ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine read_bitset_string_large module subroutine read_bitset_unit_large ( self , unit , advance , status ) !! Version: experimental !! !! Uses the bitset literal at the current position in the formatted !! file with I/O unit, `unit`, to define the bitset, `self`. The literal !! may be preceded by an an arbitrary sequence of blank characters. !! If `advance` is present it must be either 'YES' or 'NO'. If absent !! it has the default value of 'YES' to determine whether advancing !! I/O occurs. If `status` is absent an error results in an error stop !! with an informative stop code. If `status` is present it has one of !! the values: !! * `success` - if no problem occurred, !! * `alloc_fault` - if allocation of `self` failed, !! * `array_size_invalid_error` - if `bits(self)` in the bitset literal !! is greater than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the read of the bitset literal found !! an invalid character, !! * `eof_failure` - if a `read` statement reached an end-of-file before !! completing the read of the bitset literal, !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! * `read_failure` - if a `read` statement fails, class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine read_bitset_unit_large elemental module subroutine set_bit_large ( self , pos ) !! Version: experimental !! !! Sets the value at the `pos` position in `self`, provided the position is !! valid. If the position is less than 0 or greater than `bits(self)-1` !! then `self` is unchanged. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine set_bit_large pure module subroutine set_range_large ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets all valid bits to 1 from the `start_pos` to the `stop_pos` positions !! in `self`. If `stop_pos < start_pos` no bits are changed. Positions outside !! the range 0 to `bits(self)-1` are ignored. class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine set_range_large elemental module function test_large ( self , pos ) result ( test ) !! Version: experimental !! !! Returns `.true.` if the `pos` position is set, `.false.` otherwise. If `pos` !! is negative or greater than `bits(self) - 1` the result is `.false.`. logical :: test class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function test_large module subroutine to_string_large ( self , string , status ) !! Version: experimental !! !! Represents the value of `self` as a binary literal in `string` !! Status may have the values `success` or `alloc_fault`. class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine to_string_large elemental module function value_large ( self , pos ) result ( value ) !! Version: experimental !! !! Returns 1 if the `pos` position is set, 0 otherwise. If `pos` is negative !! or greater than `bits(set) - 1` the result is 0. integer :: value class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function value_large module subroutine write_bitset_string_large ( self , string , status ) !! Version: experimental !! !! Writes a bitset literal to the allocatable default character `string`, !! representing the individual bit values in the bitset_large, `self`. !! If `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success, or the value `alloc_fault` if allocation of !! the output string failed. class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine write_bitset_string_large module subroutine write_bitset_unit_large ( self , unit , advance , status ) !! Version: experimental !! !! Writes a bitset literal to the I/O unit, `unit`, representing the !! individual bit values in the bitset, `self`. By default or if !! `advance` is present with the value 'YES', advancing output is used. !! If `advance` is present with the value 'NO', then the current record !! is not advanced by the write. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` is !! present it has the default value of `success`, the value !! `alloc_fault` if allocation of the output string failed, or !! `write_failure` if the `write` statement outputting the literal failed. class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine write_bitset_unit_large end interface interface assignment ( = ) !! Version: experimental !! !! Used to define assignment for `bitset_large`. !! ([Specification](../page/specs/stdlib_bitsets.html#-compare-two-bitsets-to-determine-whether-the-bits-have-the-same-value)) !! !!#### Example !! !!```fortran !! program example_assignment !! use stdlib_bitsets !! logical(int8) :: logical1(64) = .true. !! logical(int32), allocatable :: logical2(:) !! type(bitset_64) :: set0, set1 !! set0 = logical1 !! if ( set0 % bits() /= 64 ) then !! error stop procedure // & !! ' initialization with logical(int8) failed to set' // & !! ' the right size.' !! else if ( .not. set0 % all() ) then !! error stop procedure // ' initialization with' // & !! ' logical(int8) failed to set the right values.' !! else !! write(*,*) 'Initialization with logical(int8) succeeded.' !! end if !! set1 = set0 !! if ( set1 == set0 ) & !! write(*,*) 'Initialization by assignment succeeded' !! logical2 = set1 !! if ( all( logical2 ) ) then !! write(*,*) 'Initialization of logical(int32) succeeded.' !! end if !! end program example_assignment !!``` # : for k1 in INT_KINDS pure module subroutine assign_log$ { k1 }$_ large ( self , logical_vector ) !! Version: experimental !! !! Used to define assignment from an array of type `logical(${k1}$)` to a !! `bitset_large`. type ( bitset_large ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) end subroutine assign_log$ { k1 }$_ large pure module subroutine log ${ k1 }$_ assign_large ( logical_vector , set ) !! Version: experimental !! !! Used to define assignment to an array of type `logical(${k1}$)` from a !! `bitset_large`. logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_large ), intent ( in ) :: set end subroutine log ${ k1 }$_ assign_large # : endfor end interface assignment ( = ) type , extends ( bitset_type ) :: bitset_64 !! Version: experimental !! !! Type for bitsets with no more than 64 bits ([Specification](../page/specs/stdlib_bitsets.html#the-stdlib_bitsets-derived-types)) private integer ( block_kind ), private :: block = 0 contains procedure , pass ( self ) :: all => all_64 procedure , pass ( self ) :: any => any_64 procedure , pass ( self ) :: bit_count => bit_count_64 procedure , pass ( self ) :: clear_bit => clear_bit_64 procedure , pass ( self ) :: clear_range => clear_range_64 procedure , pass ( self ) :: flip_bit => flip_bit_64 procedure , pass ( self ) :: flip_range => flip_range_64 procedure , pass ( self ) :: from_string => from_string_64 procedure , pass ( self ) :: init_zero => init_zero_64 procedure , pass ( self ) :: input => input_64 procedure , pass ( self ) :: none => none_64 procedure , pass ( self ) :: not => not_64 procedure , pass ( self ) :: output => output_64 procedure , pass ( self ) :: read_bitset_string => read_bitset_string_64 procedure , pass ( self ) :: read_bitset_unit => read_bitset_unit_64 procedure , pass ( self ) :: set_bit => set_bit_64 procedure , pass ( self ) :: set_range => set_range_64 procedure , pass ( self ) :: test => test_64 procedure , pass ( self ) :: to_string => to_string_64 procedure , pass ( self ) :: value => value_64 procedure , pass ( self ) :: write_bitset_string => write_bitset_string_64 procedure , pass ( self ) :: write_bitset_unit => write_bitset_unit_64 end type bitset_64 interface elemental module function all_64 ( self ) result ( all ) !! Version: experimental !! !! Returns `.true.` if all bits in `self` are 1, `.false.` otherwise. logical :: all class ( bitset_64 ), intent ( in ) :: self end function all_64 elemental module function any_64 ( self ) result ( any ) !! Version: experimental !! !! Returns `.true.` if any bit in `self` is 1, `.false.` otherwise. logical :: any class ( bitset_64 ), intent ( in ) :: self end function any_64 elemental module function bit_count_64 ( self ) result ( bit_count ) !! Version: experimental !! !! Returns the number of non-zero bits in `self`. integer ( bits_kind ) :: bit_count class ( bitset_64 ), intent ( in ) :: self end function bit_count_64 elemental module subroutine clear_bit_64 ( self , pos ) !! Version: experimental !! !! Sets to zero the bit at `pos` position in `self`. If `pos` is less than !! zero or greater than `bits(self)-1` it is ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine clear_bit_64 pure module subroutine clear_range_64 ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets to zero all bits from the `start_pos` to `stop_pos` positions in `self`. !! If `stop_pos < start_pos` then no bits are modified. Positions outside !! the range 0 to `bits(set)-1` are ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine clear_range_64 elemental module subroutine flip_bit_64 ( self , pos ) !! Version: experimental !! !! Flips the bit value at the `pos` position in `self`, provided the position is !! valid. If `pos` is less than 0 or greater than `bits(self)-1`, no value is !! changed. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine flip_bit_64 pure module subroutine flip_range_64 ( self , start_pos , stop_pos ) !! Version: experimental !! !! Flips all valid bits from the `start_pos` to the `stop_pos` positions in !! `self`. If `stop_pos < start_pos` no bits are flipped. Positions less than !! 0 or greater than `bits(self)-1` are ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine flip_range_64 module subroutine from_string_64 ( self , string , status ) !! Version: experimental !! !! Initializes the bitset `self` treating `string` as a binary literal !! `status` may have the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if allocation of the bitset failed !! * `char_string_too_large_error` - if `string` was too large, or !! * `char_string_invalid_error` - if string had an invalid character. class ( bitset_64 ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine from_string_64 module subroutine init_zero_64 ( self , bits , status ) !! Version: experimental !! !! Creates the bitset, `self`, of size `bits`, with all bits initialized to !! zero. `bits` must be non-negative. If an error occurs and `status` is !! absent then processing stops with an informative stop code. `status` !! will have one of the values: !! * `success` - if no problems were found, !! * `alloc_fault` - if memory allocation failed !! * `array_size_invalid_error` - if `bits` is either negative or larger !! than 64 with `self` of class `bitset_64`. class ( bitset_64 ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status end subroutine init_zero_64 module subroutine input_64 ( self , unit , status ) !! Version: experimental !! !! Reads the components of the bitset, `self`, from the unformatted I/O !! unit, `unit`, assuming that the components were written using `output`. !! If an error occurs and `status` is absent then processing stops with !! an informative stop code. `status` has one of the values: !! * `success` - if no problem was found !! * `alloc_fault` - if it failed allocating memory for `self`, or !! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative !! or greater than 64 for a `bitset_64` input. !! * `read_failure` - if it failed during the reads from `unit` class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine input_64 elemental module function none_64 ( self ) result ( none ) !! Version: experimental !! !! Returns `.true.` if none of the bits in `self` have the value 1. logical :: none class ( bitset_64 ), intent ( in ) :: self end function none_64 elemental module subroutine not_64 ( self ) !! Version: experimental !! !! Sets the bits in `self` to their logical complement. class ( bitset_64 ), intent ( inout ) :: self end subroutine not_64 module subroutine output_64 ( self , unit , status ) !! Version: experimental !! !! Writes the components of the bitset, `self`, to the unformatted I/O !! unit, `unit`, in a unformatted sequence compatible with `input`. If !! `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `write_failure` if the write failed. class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status end subroutine output_64 module subroutine read_bitset_string_64 ( self , string , status ) !! Version: experimental !! !! Uses the bitset literal in the default character `string`, to define !! the bitset, `self`. The literal may be preceded by an an arbitrary !! sequence of blank characters. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` !! is present it has one of the values: !! * `success` - if no problems occurred, !! * `alloc_fault` - if allocation of memory for SELF failed, !! * `array_size_invalid_error - if `bits(self)` in `string` is greater !! than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the bitset literal has an invalid !! character, !! * `char_string_too_small_error - if the string ends before all the bits !! are read. !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, class ( bitset_64 ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status end subroutine read_bitset_string_64 module subroutine read_bitset_unit_64 ( self , unit , advance , status ) !! Version: experimental !! !! Uses the bitset literal at the current position in the formatted !! file with I/O unit, `unit`, to define the bitset, `self`. The literal !! may be preceded by an an arbitrary sequence of blank characters. !! If `advance` is present it must be either 'YES' or 'NO'. If absent !! it has the default value of 'YES' to determine whether advancing !! I/O occurs. If `status` is absent an error results in an error stop !! with an informative stop code. If `status` is present it has one of !! the values: !! * `success` - if no problem occurred, !! * `alloc_fault` - if allocation of `self` failed, !! * `array_size_invalid_error` - if `bits(self)` in the bitset literal !! is greater than 64 for a `bitset_64`, !! * `char_string_invalid_error` - if the read of the bitset literal found !! an invalid character, !! * `eof_failure` - if a `read` statement reached an end-of-file before !! completing the read of the bitset literal, !! * `integer_overflow_error` - if the bitset literal has a `bits(self)` !! value too large to be represented, !! * `read_failure` - if a `read` statement fails, class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine read_bitset_unit_64 elemental module subroutine set_bit_64 ( self , pos ) !! Version: experimental !! !! Sets the value at the `pos` position in `self`, provided the position is !! valid. If the position is less than 0 or greater than `bits(self)-1` !! then `self` is unchanged. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos end subroutine set_bit_64 pure module subroutine set_range_64 ( self , start_pos , stop_pos ) !! Version: experimental !! !! Sets all valid bits to 1 from the `start_pos` to the `stop_pos` positions !! in `self`. If `stop_pos < start_pos` no bits are changed. Positions outside !! the range 0 to `bits(self)-1` are ignored. class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos end subroutine set_range_64 elemental module function test_64 ( self , pos ) result ( test ) !! Version: experimental !! !! Returns `.true.` if the `pos` position is set, `.false.` otherwise. If `pos` !! is negative or greater than `bits(self)-1` the result is `.false.`. logical :: test class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function test_64 module subroutine to_string_64 ( self , string , status ) !! Version: experimental !! !! Represents the value of `self` as a binary literal in `string`. !! Status may have the values `success` or `alloc_fault` class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine to_string_64 elemental module function value_64 ( self , pos ) result ( value ) !! Version: experimental !! !! Returns 1 if the `pos` position is set, 0 otherwise. If `pos` is negative !! or greater than `bits(set)-1` the result is 0. integer :: value class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos end function value_64 module subroutine write_bitset_string_64 ( self , string , status ) !! Version: experimental !! !! Writes a bitset literal to the allocatable default character `string`, !! representing the individual bit values in the `bitset_64`, `self`. !! If `status` is absent an error results in an error stop with an !! informative stop code. If `status` is present it has the default !! value of `success`, or the value `alloc_fault` if allocation of !! the output string failed. class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status end subroutine write_bitset_string_64 module subroutine write_bitset_unit_64 ( self , unit , advance , status ) !! Version: experimental !! !! Writes a bitset literal to the I/O unit, `unit`, representing the !! individual bit values in the bitset, `self`. By default or if !! `advance` is present with the value 'YES', advancing output is used. !! If `advance` is present with the value 'NO', then the current record !! is not advanced by the write. If `status` is absent an error results !! in an error stop with an informative stop code. If `status` is !! present it has the default value of `success`, the value !! `alloc_fault` if allocation of the output string failed, or !! `write_failure` if the `write` statement outputting the literal failed. class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status end subroutine write_bitset_unit_64 end interface interface assignment ( = ) # : for k1 in INT_KINDS module subroutine assign_log$ { k1 }$_ 64 ( self , logical_vector ) !! Version: experimental !! !! Used to define assignment from an array of type `logical(${k1}$)` to a !! `bitset_64`. type ( bitset_64 ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) end subroutine assign_log$ { k1 }$_ 64 pure module subroutine log ${ k1 }$_ assign_64 ( logical_vector , set ) !! Version: experimental !! !! Used to define assignment to an array of type `logical(${k1}$)` from a !! `bitset_64`. logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_64 ), intent ( in ) :: set end subroutine log ${ k1 }$_ assign_64 # : endfor end interface assignment ( = ) interface and !! Version: experimental !! !! Sets the bits in `set1` to the bitwise `and` of the original bits in `set1` !! and `set2`. The sets must have the same number of bits !! otherwise the result is undefined. !! ([Specification](../page/specs/stdlib_bitsets.html#and-bitwise-and-of-the-bits-of-two-bitsets)) !! !!#### Example !! !!```fortran !! program example_and !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call and( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of AND worked.' !! call set0 % not() !! call and( set0, set1 ) ! all none !! if ( none(set0) ) write(*,*) 'Second test of AND worked.' !! call set1 % not() !! call and( set0, set1 ) ! none all !! if ( none(set0) ) write(*,*) 'Third test of AND worked.' !! call set0 % not() !! call and( set0, set1 ) ! all all !! if ( all(set0) ) write(*,*) 'Fourth test of AND worked.' !! end program example_and !!``` elemental module subroutine and_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine and_large elemental module subroutine and_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine and_64 end interface and interface and_not !! Version: experimental !! !! Sets the bits in `set1` to the bitwise and of the original bits in `set1` !! with the bitwise negation of `set2`. The sets must have the same !! number of bits otherwise the result is undefined. !! !! ([Specification](../page/specs/stdlib_bitsets.html#and_not-bitwise-and-of-one-bitset-with-the-negation-of-another)) !! !!#### Example !! !!```fortran !! program example_and_not !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call and_not( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of AND_NOT worked.' !! call set0 % not() !! call and_not( set0, set1 ) ! all none !! if ( all(set0) ) write(*,*) 'Second test of AND_NOT worked.' !! call set0 % not() !! call set1 % not() !! call and_not( set0, set1 ) ! none all !! if ( none(set0) ) write(*,*) 'Third test of AND_NOT worked.' !! call set0 % not() !! call and_not( set0, set1 ) ! all all !! if ( none(set0) ) write(*,*) 'Fourth test of AND_NOT worked.' !! end program example_and_not !!``` elemental module subroutine and_not_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine and_not_large elemental module subroutine and_not_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine and_not_64 end interface and_not interface extract !! Version: experimental !! !! Creates a new bitset, `new`, from a range, `start_pos` to `stop_pos`, in !! bitset `old`. If `start_pos` is greater than `stop_pos` the new bitset is !! empty. If `start_pos` is less than zero or `stop_pos` is greater than !! `bits(old)-1` then if `status` is present it has the value !! `index_invalid_error` and `new` is undefined, otherwise processing stops !! with an informative message. !! ([Specification](../page/specs/stdlib_bitsets.html#extract-create-a-new-bitset-from-a-range-in-an-old-bitset)) !! !!#### Example !! !!```fortran !! program example_extract !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set0 % set(100,150) !! call extract( set1, set0, 100, 150) !! if ( set1 % bits() == 51 ) & !! write(*,*) 'SET1 has the proper size.' !! if ( set1 % all() ) write(*,*) 'SET1 has the proper values.' !! end program example_extract !!``` module subroutine extract_large ( new , old , start_pos , stop_pos , status ) type ( bitset_large ), intent ( out ) :: new type ( bitset_large ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status end subroutine extract_large module subroutine extract_64 ( new , old , start_pos , stop_pos , status ) type ( bitset_64 ), intent ( out ) :: new type ( bitset_64 ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status end subroutine extract_64 end interface extract interface or !! Version: experimental !! !! Sets the bits in `set1` to the bitwise `or` of the original bits in `set1` !! and `set2`. The sets must have the same number of bits otherwise !! the result is undefined. !! ([Specification](../page/specs/stdlib_bitsets.html#or-bitwise-or-of-the-bits-of-two-bitsets)) !! !!#### Example !! !!```fortran !! program example_or !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call or( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of OR worked.' !! call set0 % not() !! call or( set0, set1 ) ! all none !! if ( all(set0) ) write(*,*) 'Second test of OR worked.' !! call set0 % not() !! call set1 % not() !! call or( set0, set1 ) ! none all !! if ( all(set0) ) write(*,*) 'Third test of OR worked.' !! call set0 % not() !! call or( set0, set1 ) ! all all !! if ( all(set0) ) write(*,*) 'Fourth test of OR worked.' !! end program example_or !!``` elemental module subroutine or_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine or_large elemental module subroutine or_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine or_64 end interface or interface xor !! Version: experimental !! !! Sets the bits in `set1` to the bitwise `xor` of the original bits in `set1` !! and `set2`. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#xor-bitwise-exclusive-or)) !! !!#### Example !! !!```fortran !! program example_xor !! use stdlib_bitsets !! type(bitset_large) :: set0, set1 !! call set0 % init(166) !! call set1 % init(166) !! call xor( set0, set1 ) ! none none !! if ( none(set0) ) write(*,*) 'First test of XOR worked.' !! call set0 % not() !! call xor( set0, set1 ) ! all none !! if ( all(set0) ) write(*,*) 'Second test of XOR worked.' !! call set0 % not() !! call set1 % not() !! call xor( set0, set1 ) ! none all !! if ( all(set0) ) write(*,*) 'Third test of XOR worked.' !! call set0 % not() !! call xor( set0, set1 ) ! all all !! if ( none(set0) ) write(*,*) 'Fourth test of XOR worked.' !! end program example_xor !!``` elemental module subroutine xor_large ( set1 , set2 ) type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 end subroutine xor_large elemental module subroutine xor_64 ( set1 , set2 ) type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 end subroutine xor_64 end interface xor interface operator ( == ) !! Version: experimental !! !! Returns `.true.` if all bits in `set1` and `set2` have the same value, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#-compare-two-bitsets-to-determine-whether-the-bits-have-the-same-value)) !! !!#### Example !! !!```fortran !! program example_equality !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 == set0 .and. set1 == set1 .and. set2 == set2 .and. & !! .not. set0 == set1 .and. .not. set0 == set2 .and. .not. & !! set1 == set2 ) then !! write(*,*) 'Passed 64 bit equality tests.' !! else !! error stop 'Failed 64 bit equality tests.' !! end if !! end program example_equality !!``` elemental module function eqv_large ( set1 , set2 ) result ( eqv ) logical :: eqv type ( bitset_large ), intent ( in ) :: set1 , set2 end function eqv_large elemental module function eqv_64 ( set1 , set2 ) result ( eqv ) logical :: eqv type ( bitset_64 ), intent ( in ) :: set1 , set2 end function eqv_64 end interface operator ( == ) interface operator ( /= ) !! Version: experimental !! !! Returns `.true.` if not all bits in `set1` and `set2` have the same value, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#-compare-two-bitsets-to-determine-whether-any-bits-differ-in-value)) !! !!#### Example !! !!```fortran !! program example_inequality !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 /= set1 .and. set0 /= set2 .and. set1 /= set2 .and. & !! .not. set0 /= set0 .and. .not. set1 /= set1 .and. .not. & !! set2 /= set2 ) then !! write(*,*) 'Passed 64 bit inequality tests.' !! else !! error stop 'Failed 64 bit inequality tests.' !! end if !! end program example_inequality !!``` elemental module function neqv_large ( set1 , set2 ) result ( neqv ) logical :: neqv type ( bitset_large ), intent ( in ) :: set1 , set2 end function neqv_large elemental module function neqv_64 ( set1 , set2 ) result ( neqv ) logical :: neqv type ( bitset_64 ), intent ( in ) :: set1 , set2 end function neqv_64 end interface operator ( /= ) interface operator ( > ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` differ and the !! highest order different bit is set to 1 in `set1` and to 0 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#gt-compare-two-bitsets-to-determine-whether-the-first-is-greater-than-the-other)) !! !!#### Example !! !!```fortran !! program example_gt !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set1 > set0 .and. set2 > set1 .and. set2 > set0 .and. & !! .not. set0 > set0 .and. .not. set0 > set1 .and. .not. & !! set1 > set2 ) then !! write(*,*) 'Passed 64 bit greater than tests.' !! else !! error stop 'Failed 64 bit greater than tests.' !! end if !! end program example_gt !!``` elemental module function gt_large ( set1 , set2 ) result ( gt ) logical :: gt type ( bitset_large ), intent ( in ) :: set1 , set2 end function gt_large elemental module function gt_64 ( set1 , set2 ) result ( gt ) logical :: gt type ( bitset_64 ), intent ( in ) :: set1 , set2 end function gt_64 end interface operator ( > ) interface operator ( >= ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` are the same or the !! highest order different bit is set to 1 in `set1` and to 0 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !! ([Specification](../page/specs/stdlib_bitsets.html#gt-compare-two-bitsets-to-determine-whether-the-first-is-greater-than-or-equal-to-the-second)) !! !!#### Example !! !!```fortran !! program example_ge !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set1 >= set0 .and. set2 >= set1 .and. set2 >= set0 .and. & !! set0 >= set0 .and. set1 >= set1 .and. set2 >= set2 .and. & !! .not. set0 >= set1 .and. .not. set0 >= set2 .and. .not. & !! set1 >= set2 ) then !! write(*,*) 'Passed 64 bit greater than or equals tests.' !! else !! error stop 'Failed 64 bit greater than or equals tests.' !! end if !! end program example_ge !!``` elemental module function ge_large ( set1 , set2 ) result ( ge ) logical :: ge type ( bitset_large ), intent ( in ) :: set1 , set2 end function ge_large elemental module function ge_64 ( set1 , set2 ) result ( ge ) logical :: ge type ( bitset_64 ), intent ( in ) :: set1 , set2 end function ge_64 end interface operator ( >= ) interface operator ( < ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` differ and the !! highest order different bit is set to 0 in `set1` and to 1 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#lt-compare-two-bitsets-to-determine-whether-the-first-is-less-than-the-other)) !! !!#### Example !! !!```fortran !! program example_lt !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 < set1 .and. set1 < set2 .and. set0 < set2 .and. & !! .not. set0 < set0 .and. .not. set2 < set0 .and. .not. & !! set2 < set1 ) then !! write(*,*) 'Passed 64 bit less than tests.' !! else !! error stop 'Failed 64 bit less than tests.' !! end if !! end program example_lt !!``` elemental module function lt_large ( set1 , set2 ) result ( lt ) logical :: lt type ( bitset_large ), intent ( in ) :: set1 , set2 end function lt_large elemental module function lt_64 ( set1 , set2 ) result ( lt ) logical :: lt type ( bitset_64 ), intent ( in ) :: set1 , set2 end function lt_64 end interface operator ( < ) interface operator ( <= ) !! Version: experimental !! !! Returns `.true.` if the bits in `set1` and `set2` are the same or the !! highest order different bit is set to 0 in `set1` and to 1 in `set2`, !! `.false.` otherwise. The sets must have the same number of bits !! otherwise the result is undefined. !!([Specification](../page/specs/stdlib_bitsets.html#lt-compare-two-bitsets-to-determine-whether-the-first-is-less-than-or-equal-to-the-other)) !! !!#### Example !! !!```fortran !! program example_le !! use stdlib_bitsets !! type(bitset_64) :: set0, set1, set2 !! call set0 % init( 33 ) !! call set1 % init( 33 ) !! call set2 % init( 33 ) !! call set1 % set( 0 ) !! call set2 % set( 32 ) !! if ( set0 <= set1 .and. set1 <= set2 .and. set0 <= set2 .and. & !! set0 <= set0 .and. set1 <= set1 .and. set2 <= set2 .and. & !! .not. set1 <= set0 .and. .not. set2 <= set0 .and. .not. & !! set2 <= set1 ) then !! write(*,*) 'Passed 64 bit less than or equal tests.' !! else !! error stop 'Failed 64 bit less than or equal tests.' !! end if !! end program example_le !!``` elemental module function le_large ( set1 , set2 ) result ( le ) logical :: le type ( bitset_large ), intent ( in ) :: set1 , set2 end function le_large elemental module function le_64 ( set1 , set2 ) result ( le ) logical :: le type ( bitset_64 ), intent ( in ) :: set1 , set2 end function le_64 end interface operator ( <= ) interface error_handler module subroutine error_handler ( message , error , status , & module , procedure ) character ( * ), intent ( in ) :: message integer , intent ( in ) :: error integer , intent ( out ), optional :: status character ( * ), intent ( in ), optional :: module character ( * ), intent ( in ), optional :: procedure end subroutine error_handler end interface error_handler contains elemental function bits ( self ) !! Version: experimental !! !! Returns the number of bit positions in `self`. integer ( bits_kind ) :: bits class ( bitset_type ), intent ( in ) :: self bits = self % num_bits return end function bits module subroutine error_handler ( message , error , status , module , procedure ) character ( * ), intent ( in ) :: message integer , intent ( in ) :: error integer , intent ( out ), optional :: status character ( * ), intent ( in ), optional :: module character ( * ), intent ( in ), optional :: procedure if ( present ( status ) ) then status = error else if ( present ( module ) ) then if ( present ( procedure ) ) then write ( error_unit , '(a)' ) trim ( module ) // ' % ' // & trim ( procedure ) // ': ' // trim ( message ) else write ( error_unit , '(a)' ) trim ( module ) // ' % N/A: ' // & trim ( message ) end if else if ( present ( procedure ) ) then write ( error_unit , '(a)' ) trim ( procedure ) // ': ' // & trim ( message ) else write ( error_unit , '(a)' ) trim ( message ) end if select case ( error ) case ( alloc_fault ) error stop 'A memory allocation failed.' case ( array_size_invalid_error ) error stop \"An array size was invalid.\" case ( char_string_invalid_error ) error stop \"A character string had an invalid character.\" case ( char_string_too_large_error ) error stop \"A character string was too large.\" case ( char_string_too_small_error ) error stop \"A character string was too small.\" case ( eof_failure ) error stop \"An End-Of-File failure occurred on a READ \" // & \"statement.\" case ( index_invalid_error ) error stop \"An index was invalid.\" case ( integer_overflow_error ) error stop \"An integer overflow error occurred.\" case ( read_failure ) error stop \"A failure occurred in a READ statement.\" case ( write_failure ) error stop \"A failure occurred on a WRITE statement.\" end select end if end subroutine error_handler end module stdlib_bitsets","tags":"","loc":"sourcefile/stdlib_bitsets.fypp.html"},{"title":"stdlib_hashmap_chaining.f90 – Fortran-lang/stdlib","text":"The module STDLIB_HASHMAP_CHAINING implements a simple separate\nchaining hash map. The implementation is loosely based on a C\nimplementation by David Chase, http://chasewoerner.org/src/hasht/, for\nwhich he has given permission to use in the Fortran Standard Library. Source Code !! The module STDLIB_HASHMAP_CHAINING implements a simple separate !! chaining hash map. The implementation is loosely based on a C !! implementation by David Chase, http://chasewoerner.org/src/hasht/, for !! which he has given permission to use in the Fortran Standard Library. ! Note an error in the code caused attempts to deallocate already deallocated ! entries. This did not cause stat to be non-zero, but did cause system errors, ! on my Mac. I therefore decided to remove all deallocation error reporting. submodule ( stdlib_hashmaps ) stdlib_hashmap_chaining !! Version: Experimental !! !! Implements a simple separate chaining hash map. implicit none ! Error messages character ( len =* ), parameter :: & alloc_inv_fault = \"CHAINING_HASHMAP_TYPE % INVERSE allocation \" // & \"fault.\" , & alloc_slots_fault = \"CHAINING_HASHMAP_TYPE % SLOTS allocation \" // & \"fault.\" , & conflicting_key = \"KEY already exists in MAP.\" , & expand_slots_fail = \"CHAINING_HASHMAP_TYPE % SLOTS allocation > \" // & \"max bits.\" , & init_slots_pow_fail = \"SLOT_BITS is not between DEFAULT_BITS \" // & \"and MAX_BITS.\" , & invalid_inmap = \"INMAP was not a valid INVERSE index.\" , & map_consist_fault = \"The hash map found a inconsistency.\" character ( len =* ), parameter :: submodule_name = \"STDLIB_HASHMAP_CHAINING\" interface expand_slots !! Version: Experimental !! !! Interface to internal procedure that expands the number of map slots. module procedure expand_chaining_slots end interface expand_slots interface extend_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that expands a chaining map entry pool. module procedure extend_chaining_map_entry_pool end interface extend_map_entry_pool interface free_map !! Version: Experimental !! !! Interface to procedure that finalizes a chaining hash map. module procedure free_chaining_map end interface free_map interface free_map_entry_pool !! Version: Experimental !! !! Interface to internal procedure that finalizes a chaining hash map !! entry pool. module procedure free_map_entry_pool end interface free_map_entry_pool interface get_other_data !! Version: Experimental !! !! Interface to procedure that gets an entry's other data. module procedure get_other_chaining_data end interface get_other_data interface init !! Version: Experimental !! !! Interface to initialization procedure for a chaining hash map. module procedure init_chaining_map end interface init interface rehash !! Version: Experimental !! !! Interface to a procedure that changes the hash function that !! is used to map the keys into a chaining hash map. module procedure rehash_chaining_map end interface rehash interface remove !! Version: Experimental !! !! Interface to a procedure that removes the entry associated with a key module procedure remove_chaining_entry ! Chase's delent end interface remove interface set_other_data !! Version: Experimental !! !! Interface to a procedure that changes the other data associated with a key module procedure set_other_chaining_data end interface set_other_data contains ! Internal routine to make a duplicate map with more hash slots. ! Note David Chase had pointer returning functions, but the logic did not ! depend on the result value subroutine expand_chaining_slots ( map ) !! Version: Experimental !! !! Internal routine to make a duplicate map with more hash slots. !! Doubles the size of the map % slots array !! Arguments: !! map - the hash map whose hash slots are to be expanded ! type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_type ), pointer :: current_entry type ( chaining_map_entry_ptr ), allocatable :: dummy_slots (:) integer ( int_index ) :: min_size , new_size integer ( int_index ) :: old_size , & slot_index integer ( int32 ) :: bits , & stat character ( 256 ) :: errmsg character ( * ), parameter :: procedure = 'EXPAND_SLOTS' if ( map % nbits == max_bits ) then error stop submodule_name // ' % ' // procedure // ': ' // & expand_slots_fail end if old_size = size ( map % slots , kind = int_index ) determine_new_size : if ( map % num_entries <= old_size ) then ! Expand by factor of two to improve efficiency new_size = 2 * old_size bits = map % nbits + 1 else ! Expand so the number of slots is no more than 2**max_bits but otherwise ! at least the number of entries min_size = map % num_entries new_size = old_size bits = map % nbits do bits = bits + 1 new_size = new_size * 2 if ( bits >= max_bits . OR . new_size >= min_size ) exit end do end if determine_new_size allocate ( dummy_slots ( 0 : new_size - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if map % nbits = bits do slot_index = 0 , new_size - 1 dummy_slots ( slot_index ) % target => null () ! May be redundant end do map % total_probes = map % total_probes + map % probe_count map % probe_count = 0 ! This maps old slots entries to new slots, but we could also map inverse ! entries to new_slots do slot_index = 0 , old_size - 1 do while ( associated ( map % slots ( slot_index ) % target ) ) current_entry => map % slots ( slot_index ) % target map % slots ( slot_index ) % target => current_entry % next call remap ( dummy_slots , current_entry , map % nbits ) end do end do call move_alloc ( dummy_slots , map % slots ) contains subroutine remap ( slots , gentry , bits ) type ( chaining_map_entry_ptr ), intent ( inout ) :: slots ( 0 :) type ( chaining_map_entry_type ), intent ( inout ), target :: gentry integer ( int_hash ), intent ( in ) :: bits integer ( int_index ) :: hash_index type ( chaining_map_entry_type ), pointer :: where_loc hash_index = fibonacci_hash ( gentry % hash_val , bits ) where_loc => slots ( hash_index ) % target gentry % next => null () ! May be redundant if ( associated ( where_loc ) ) then do while ( associated ( where_loc % next ) ) where_loc => where_loc % next end do where_loc % next => gentry else slots ( hash_index ) % target => gentry end if end subroutine remap end subroutine expand_chaining_slots subroutine extend_chaining_map_entry_pool ( map ) ! gent_pool_new !! Version: Experimental !! !! Add more map_entrys to the pool head !! Arguments: !! pool - a chaining map entry pool type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_pool ), pointer :: pool allocate ( pool ) allocate ( pool % more_map_entries ( 0 : pool_size - 1 )) pool % next = 0 ! may be redundant pool % lastpool => map % cache map % cache => pool end subroutine extend_chaining_map_entry_pool ! Internal final routine to free a map and its memory module subroutine free_chaining_map ( map ) !! Version: Experimental !! !! Frees internal memory of an chaining map !! Arguments: !! map - the chaining hash map whose memory is to be freed ! type ( chaining_hashmap_type ), intent ( inout ) :: map integer ( int_index ) :: i type ( chaining_map_entry_type ), pointer :: next if ( allocated ( map % slots ) ) then remove_slot_links : do i = 0 , size ( map % slots ) - 1 if ( associated ( map % slots ( i ) % target ) ) then map % slots ( i ) % target => null () end if end do remove_slot_links deallocate ( map % slots ) end if if ( allocated ( map % inverse ) ) then remove_links : do i = 1 , size ( map % inverse , kind = int_index ) if ( associated ( map % inverse ( i ) % target ) ) then map % inverse ( i ) % target % next => null () end if map % inverse ( i ) % target => null () end do remove_links deallocate ( map % inverse ) end if free_free_list : do if ( associated ( map % free_list ) ) then next => map % free_list % next map % free_list => next cycle free_free_list else map % num_free = 0 exit free_free_list end if end do free_free_list if ( associated ( map % cache ) ) call free_map_entry_pool ( map % cache ) map % num_entries = 0 end subroutine free_chaining_map recursive subroutine free_map_entry_pool ( pool ) ! gent_pool_free !! Version: Experimental !! !! Recursively descends map entry pool list freeing each element !! Arguments: !! pool The map entry pool whose elements are to be freed ! type ( chaining_map_entry_pool ), intent ( inout ), pointer :: pool if ( . not . associated ( pool ) ) return call free_map_entry_pool ( pool % lastpool ) deallocate ( pool ) end subroutine free_map_entry_pool module subroutine get_all_chaining_keys ( map , all_keys ) !! Version: Experimental !! !! Returns all the keys contained in a hash map !! Arguments: !! map - a chaining hash map !! all_keys - all the keys contained in a hash map ! class ( chaining_hashmap_type ), intent ( in ) :: map type ( key_type ), allocatable , intent ( out ) :: all_keys (:) integer ( int32 ) :: num_keys integer ( int_index ) :: i , key_idx num_keys = map % entries () allocate ( all_keys ( num_keys ) ) if ( num_keys == 0 ) return if ( allocated ( map % inverse ) ) then key_idx = 1_int_index do i = 1_int_index , size ( map % inverse , kind = int_index ) if ( associated ( map % inverse ( i ) % target ) ) then all_keys ( key_idx ) = map % inverse ( i ) % target % key key_idx = key_idx + 1_int_index end if end do end if end subroutine get_all_chaining_keys module subroutine get_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Returns the other data associated with the inverse table index !! Arguments: !! map - a chaining hash map !! key - the key associated with a map entry !! other - the other data associated with the key !! exists - a logical flag indicating whether an entry with that key exists ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( out ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'GET_OTHER_DATA' call in_chain_map ( map , inmap , key ) if ( inmap <= 0 . or . & inmap > size ( map % inverse , kind = int_index ) ) then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then if ( present ( exists ) ) exists = . true . call copy_other ( map % inverse ( inmap ) % target % other , other ) else if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & map_consist_fault end if end if end subroutine get_other_chaining_data subroutine in_chain_map ( map , inmap , key ) !! Version: Experimental !! !! Returns the index into the INVERSE array associated with the KEY !! Arguments: !! map - the hash map of interest !! inmap - the returned index into the INVERSE array of entry pointers. !! A value of zero indicates that an entry with that key was not !! found. !! key - the key identifying the entry of interest ! class ( chaining_hashmap_type ), intent ( inout ) :: map integer ( int_index ), intent ( out ) :: inmap type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: hash_val , hash_index type ( chaining_map_entry_type ), pointer :: gentry , pentry , sentry if ( map % probe_count > inmap_probe_factor * map % call_count ) then if ( map % nbits < max_bits . AND . & map % num_entries > size ( map % slots , kind = int_index ) ) then call expand_slots ( map ) end if end if map % call_count = map % call_count + 1 hash_val = map % hasher ( key ) hash_index = fibonacci_hash ( hash_val , map % nbits ) pentry => map % slots ( hash_index ) % target sentry => pentry climb_chain : do gentry => pentry map % probe_count = map % probe_count + 1 if (. not . associated ( gentry ) ) then inmap = 0 return else if ( hash_val == gentry % hash_val ) then if ( key == gentry % key ) then ! The swap to front seems to confuse gfortran's pointers ! if ( .not. associated( pentry, sentry ) ) then ! ! swap to front ! pentry => gentry % next ! gentry % next => sentry ! sentry => gentry ! end if inmap = gentry % inmap return end if end if pentry => gentry % next end do climb_chain end subroutine in_chain_map module subroutine init_chaining_map ( map , & hasher , & slots_bits , & status ) !! Version: Experimental !! !! Routine to allocate an empty map with HASHER as the hash function, !! 2**SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited !! to a maximum of 2**MAX_BITS. All fields are initialized. !! Arguments: !! map - the chaining hash map to be initialized !! hasher - the hash function to be used to map keys to slots !! slots_bits - the bits of two used to initialize the number of slots !! status - an integer error status flag with the allowed values: !! success - no problems were found !! alloc_fault - map % slots or map % inverse could not be allocated !! array_size_error - slots_bits is less than default_bits or !! greater than max_bits ! class ( chaining_hashmap_type ), intent ( out ) :: map procedure ( hasher_fun ) :: hasher integer , intent ( in ), optional :: slots_bits integer ( int32 ), intent ( out ), optional :: status character ( 256 ) :: errmsg integer ( int_index ) :: index character ( * ), parameter :: procedure = 'INIT' integer ( int_index ) :: slots integer ( int32 ) :: stat map % call_count = 0 map % probe_count = 0 map % total_probes = 0 map % hasher => hasher call free_chaining_map ( map ) if ( present ( slots_bits ) ) then if ( slots_bits < 6 . OR . slots_bits > max_bits ) then if ( present ( status ) ) then status = array_size_error return else error stop submodule_name // ' % ' // procedure // ': ' // & init_slots_pow_fail end if end if map % nbits = slots_bits else map % nbits = min ( default_bits , max_bits ) end if slots = 2_int_index ** map % nbits allocate ( map % slots ( 0 : slots - 1 ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_slots_fault end if end if do index = 0 , size ( map % slots , kind = int_index ) - 1 map % slots ( index ) % target => null () ! May be redundant end do ! 5*s from Chase's g_new_map allocate ( map % inverse ( 1 : slots ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then if ( present ( status ) ) then status = alloc_fault return else write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if end if do index = 1 , size ( map % inverse , kind = int_index ) map % inverse ( index ) % target => null () end do call extend_map_entry_pool ( map ) if ( present ( status ) ) status = success end subroutine init_chaining_map pure module function chaining_loading ( map ) !! Version: Experimental !! !! Returns the number of entries relative to slots in a hash map !! Arguments: !! map - a chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map real :: chaining_loading chaining_loading = real ( map % num_entries ) / & real ( size ( map % slots , kind = int_index ) ) end function chaining_loading module subroutine map_chain_entry ( map , key , other , conflict ) !! Version: Experimental !! !! Inserts an entry into the hash table !! Arguments: !! map - the hash table of interest !! key - the key identifying the entry !! other - other data associated with the key !! conflict - logical flag indicating whether the entry key conflicts !! with an existing key ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ), optional :: other logical , intent ( out ), optional :: conflict integer ( int_hash ) :: hash_index integer ( int_hash ) :: hash_val integer ( int_index ) :: inmap type ( chaining_map_entry_type ), pointer :: new_ent type ( chaining_map_entry_type ), pointer :: gentry , pentry , sentry character ( * ), parameter :: procedure = 'MAP_ENTRY' hash_val = map % hasher ( key ) if ( map % probe_count > map_probe_factor * map % call_count ) then call expand_slots ( map ) end if map % call_count = map % call_count + 1 hash_index = fibonacci_hash ( hash_val , map % nbits ) pentry => map % slots ( hash_index ) % target sentry => pentry do gentry => pentry map % probe_count = map % probe_count + 1 if ( . not . associated ( gentry ) ) then call allocate_chaining_map_entry ( map , new_ent ) new_ent % hash_val = hash_val ! Adding to tail of chain doesn't work on gfortran ! new_ent % next => sentry ! sentry => new_ent ! Adding to head of chain works on gfortran new_ent % next => map % slots ( hash_index ) % target map % slots ( hash_index ) % target => new_ent call copy_key ( key , new_ent % key ) if ( present ( other ) ) call copy_other ( other , new_ent % other ) if ( new_ent % inmap == 0 ) then map % num_entries = map % num_entries + 1 inmap = map % num_entries else inmap = new_ent % inmap end if if ( inmap == size ( map % inverse , kind = int_index ) ) then call expand_inverse ( map ) end if new_ent % inmap = inmap map % inverse ( inmap ) % target => new_ent if ( present ( conflict ) ) conflict = . false . return else if ( hash_val == gentry % hash_val ) then if ( key == gentry % key ) then inmap = gentry % inmap if ( . not . associated ( pentry , sentry ) ) then ! Swap to front pentry => gentry % next gentry % next => sentry sentry => gentry end if if ( present ( conflict ) ) then conflict = . true . else error stop submodule_name // ' % ' // procedure & // ': ' // conflicting_key end if return end if end if pentry => gentry % next end do contains subroutine allocate_chaining_map_entry ( map , bucket ) ! Chases gent_malloc ! allocates a hash bucket type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_type ), pointer , intent ( out ) :: bucket type ( chaining_map_entry_pool ), pointer :: pool pool => map % cache map % num_entries = map % num_entries + 1 if ( associated ( map % free_list ) ) then ! Get hash bucket from free_list bucket => map % free_list map % free_list => bucket % next map % num_free = map % num_free - 1 else ! Get hash bucket from pool if ( pool % next == pool_size ) then ! Expand pool call extend_map_entry_pool ( map ) pool => map % cache end if bucket => pool % more_map_entries ( pool % next ) pool % next = pool % next + 1 ! 0s based if ( map % num_entries > & size ( map % inverse , kind = int_index ) ) & then call expand_inverse ( map ) end if bucket % inmap = map % num_entries end if end subroutine allocate_chaining_map_entry subroutine expand_inverse ( map ) ! Increase size of map % inverse type ( chaining_hashmap_type ), intent ( inout ) :: map type ( chaining_map_entry_ptr ), allocatable :: dummy_inverse (:) integer ( int32 ) :: stat character ( 256 ) :: errmsg character ( * ), parameter :: procedure = 'MAP_ENTRY' allocate ( dummy_inverse ( 1 : 2 * size ( map % inverse , & kind = int_index ) ), & stat = stat , & errmsg = errmsg ) if ( stat /= 0 ) then write ( error_unit , '(a)' ) 'Allocation ERRMSG: ' // trim ( errmsg ) error stop submodule_name // ' % ' // procedure // ': ' // & alloc_inv_fault end if dummy_inverse ( 1 : size ( map % inverse , kind = int_index )) = & map % inverse (:) call move_alloc ( dummy_inverse , map % inverse ) end subroutine expand_inverse end subroutine map_chain_entry module subroutine rehash_chaining_map ( map , hasher ) !! Version: Experimental !! !! Changes the hashing method of the table entries to that of HASHER. !! Arguments: !! map the table to be rehashed !! hasher the hasher function to be used for the table ! class ( chaining_hashmap_type ), intent ( inout ) :: map procedure ( hasher_fun ) :: hasher integer ( int_hash ) :: hash_val integer ( int_index ) :: i integer ( int_index ) :: index map % hasher => hasher do i = 0 , size ( map % slots , kind = int_index ) - 1 map % slots ( i ) % target => null () end do do i = 1 , map % num_entries + map % num_free if ( . not . associated ( map % inverse ( i ) % target ) ) cycle hash_val = map % hasher ( map % inverse ( i ) % target % key ) map % inverse ( i ) % target % hash_val = hash_val index = fibonacci_hash ( hash_val , map % nbits ) map % inverse ( i ) % target % inmap = i if ( associated ( map % slots ( index ) % target ) ) then map % inverse ( i ) % target % next => map % slots ( index ) % target map % slots ( index ) % target => map % inverse ( i ) % target else map % slots ( index ) % target => map % inverse ( i ) % target map % slots ( index ) % target % next => null () end if end do end subroutine rehash_chaining_map module subroutine remove_chaining_entry ( map , key , existed ) !! Remove the entry, if any, that has the key !! Arguments: !! map - the table from which the entry is to be removed !! key - the key to an entry !! existed - a logical flag indicating whether an entry with the key !! was present in the original map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ), optional :: existed type ( chaining_map_entry_type ), pointer :: bucket , aentry , bentry , centry integer ( int_hash ) :: hash_val integer ( int_index ) :: inmap , k , level call in_chain_map ( map , inmap , key ) if ( inmap < 1 . or . inmap > size ( map % inverse ) ) then if ( present ( existed ) ) existed = . false . return end if bucket => map % inverse ( inmap ) % target if ( . not . associated ( bucket ) ) then if ( present ( existed ) ) existed = . false . return end if if ( present ( existed ) ) existed = . true . hash_val = bucket % hash_val k = fibonacci_hash ( hash_val , map % nbits ) allocate ( aentry ) aentry => map % slots ( k ) % target if ( associated ( aentry ) ) then if ( aentry % inmap == inmap ) then bentry => aentry % next map % slots ( k ) % target => bentry aentry % next => map % free_list map % free_list => aentry map % inverse ( inmap ) % target => null () map % num_free = map % num_free + 1 map % num_entries = map % num_entries - 1 return end if else return end if level = 1 centry => map % slots ( k ) % target aentry => aentry % next FIND_SLOTS_ENTRY : do if ( . not . associated ( aentry ) ) return if ( aentry % inmap == inmap ) exit centry => aentry aentry => aentry % next level = level + 1 end do FIND_SLOTS_ENTRY bentry => aentry % next aentry % next => map % free_list map % free_list => aentry centry % next => bentry map % inverse ( inmap ) % target => null () map % num_free = map % num_free + 1 map % num_entries = map % num_entries - 1 end subroutine remove_chaining_entry module subroutine set_other_chaining_data ( map , key , other , exists ) !! Version: Experimental !! !! Change the other data associated with the key !! Arguments: !! map - the map with the entry of interest !! key - the key to the entry inthe map !! other - the new data to be associated with the key !! exists - a logical flag indicating whether the key is already entered !! in the map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key type ( other_type ), intent ( in ) :: other logical , intent ( out ), optional :: exists integer ( int_index ) :: inmap character ( * ), parameter :: procedure = 'SET_OTHER_DATA' call in_chain_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then if ( present ( exists ) ) then exists = . false . return else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if else if ( associated ( map % inverse ( inmap ) % target ) ) then associate ( target => map % inverse ( inmap ) % target ) call copy_other ( other , target % other ) if ( present ( exists ) ) exists = . true . return end associate else error stop submodule_name // ' % ' // procedure // ': ' // & invalid_inmap end if end subroutine set_other_chaining_data module function total_chaining_depth ( map ) result ( total_depth ) !! Version: Experimental !! !! Returns the total number of ones based offsets of slot entries from !! their slot index for a hash map !! Arguments: !! map - an chaining hash map class ( chaining_hashmap_type ), intent ( in ) :: map integer ( int_depth ) :: total_depth type ( chaining_map_entry_type ), pointer :: current_key integer ( int_index ) :: slot , slots integer ( int_depth ) :: index total_depth = 0_int_depth slots = size ( map % slots , kind = int_index ) do slot = 0 , slots - 1 current_key => map % slots ( slot ) % target index = 0_int_depth do while ( associated ( current_key ) ) index = index + 1_int_depth total_depth = total_depth + index current_key => current_key % next end do end do end function total_chaining_depth module subroutine chaining_key_test ( map , key , present ) !! Version: Experimental !! !! Returns a logical flag indicating whether KEY is present in the hash map !! Arguments: !! map - the hash map of interest !! key - the key of interest !! present - a logical flag indicating whether key is present in map ! class ( chaining_hashmap_type ), intent ( inout ) :: map type ( key_type ), intent ( in ) :: key logical , intent ( out ) :: present integer ( int_index ) :: inmap call in_chain_map ( map , inmap , key ) if ( inmap <= 0 . or . inmap > size ( map % inverse , kind = int_index ) ) & then present = . false . else present = associated ( map % inverse ( inmap ) % target ) end if end subroutine chaining_key_test end submodule stdlib_hashmap_chaining","tags":"","loc":"sourcefile/stdlib_hashmap_chaining.f90.html"},{"title":"stdlib_str2num.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" !> The `stdlib_str2num` module provides procedures and interfaces for conversion !> of characters to numerical types. Currently supported: `integer` and `real`. !> ([Specification](../page/specs/stdlib_str2num.html)) !> !> This code was modified from https://github.com/jalvesz/Fortran-String-to-Num by Alves Jose !> And was possible thanks to all the discussions in this thread https://fortran-lang.discourse.group/t/faster-string-to-double/ !> !> Known precisions limits of current proposal : !> Conversion to double precision is exact up to epsilon(0.0_dp) !> example: !> !> input : 123456.78901234567890123456789012345678901234567890+2 !> !> formatted read : 12345678.90123457 !> !> to_num : 12345678.90123457 !> !> difference abs : 0.1862645149230957E-08 !> !> difference rel : 0.1508742584455759E-13% !> !> Conversion to quadruple precision can deviate at about 200*epsilon(0.0_qp) !> example: !> !> input : 0.140129846432481707092372958328991613128026194187651577175706828388979108268586060148663818836212158203125E-443 !> !> formatted read : 0.140129846432481707092372958328991608E-443 !> !> to_num : 0.140129846432481707092372958328996233E-443 !> !> difference abs : 0.4625E-475 !> !> difference rel : 0.3300E-029% module stdlib_str2num use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_positive_inf , ieee_quiet_nan implicit none private public :: to_num , to_num_from_stream integer ( int8 ), parameter :: digit_0 = ichar ( '0' , int8 ) integer ( int8 ), parameter :: period = ichar ( '.' , int8 ) - digit_0 integer ( int8 ), parameter :: comma = ichar ( ',' , int8 ) - digit_0 integer ( int8 ), parameter :: minus_sign = ichar ( '-' , int8 ) - digit_0 integer ( int8 ), parameter :: plus_sign = ichar ( '+' , int8 ) - digit_0 integer ( int8 ), parameter :: Inf = ichar ( 'I' , int8 ) integer ( int8 ), parameter :: NaN = ichar ( 'N' , int8 ) integer ( int8 ), parameter :: le = ichar ( 'e' , int8 ) - digit_0 integer ( int8 ), parameter :: BE = ichar ( 'E' , int8 ) - digit_0 integer ( int8 ), parameter :: ld = ichar ( 'd' , int8 ) - digit_0 integer ( int8 ), parameter :: BD = ichar ( 'D' , int8 ) - digit_0 integer ( int8 ), parameter :: LF = 10 , CR = 13 , WS = 32 interface to_num !! version: experimental !! !! Conversion of strings to numbers !! ([Specification](../page/specs/stdlib_str2num.html#to-num-conversion-of-strings-to-numbers)) # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) module procedure to_$ { k1 }$ # : endfor end interface interface to_num_from_stream !! version: experimental !! !! Conversion of a stream of values in a string to numbers !! ([Specification](../page/specs/stdlib_str2num.html#to-num-p-conversion-of-a-stream-of-values-in-a-strings-to-numbers)) # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) module procedure to_$ { k1 }$_ from_stream # : endfor end interface interface to_num_base # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) module procedure to_$ { k1 }$_ base # : endfor end interface contains !--------------------------------------------- ! String To Number interfaces !--------------------------------------------- # : for k1 , t1 in ( INT_KINDS_TYPES + REAL_KINDS_TYPES ) elemental function to_$ { k1 }$ ( s , mold ) result ( v ) ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string ${ t1 }$ , intent ( in ) :: mold !! dummy argument to disambiguate at compile time the generic interface ${ t1 }$ :: v !! Output ${t1}$ value ! -- Internal Variables integer ( int8 ) :: p !! position within the number integer ( int8 ) :: stat !! error status !---------------------------------------------- call to_num_base ( s , v , p , stat ) end function function to_$ { k1 }$_ from_stream ( s , mold , stat ) result ( v ) ! -- In/out Variables character ( len = :), pointer :: s !! input string ${ t1 }$ , intent ( in ) :: mold !! dummy argument to disambiguate at compile time the generic interface ${ t1 }$ :: v !! Output ${t1}$ value integer ( int8 ), intent ( inout ), optional :: stat ! -- Internal Variables integer ( int8 ) :: p !! position within the number integer ( int8 ) :: err !---------------------------------------------- call to_num_base ( s , v , p , err ) p = min ( p , len ( s , kind = int8 ) ) s => s ( p :) if ( present ( stat )) stat = err end function # : endfor !--------------------------------------------- ! String To Number Implementations !--------------------------------------------- # : for k1 , t1 in INT_KINDS_TYPES elemental subroutine to_$ { k1 }$_ base ( s , v , p , stat ) !! Return an ${k1}$ integer ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string ${ t1 }$ , intent ( out ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! position within the number integer ( int8 ), intent ( out ) :: stat !! status upon succes or failure to read ! -- Internal Variables integer ( int8 ) :: val !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- v = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then v = v * 10 + val p = p + 1 else exit end if end do stat = 0 end subroutine # : endfor elemental subroutine to_sp_base ( s , v , p , stat ) integer , parameter :: wp = sp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 39 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 37 !! number of fractional number factors integer :: e ! Notice: We use dp here to obtain exact precision for sp. ! Otherwise errors may appear in comparison to formatted read. ! See https://github.com/fortran-lang/stdlib/pull/743#issuecomment-1791953430 for more details real ( dp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._dp ** ( nwnb - e ), e = 1 , nwnb )] real ( dp ), parameter :: fractional_base ( nfnb ) = [( 1 0._dp ** ( - e ), e = 1 , nfnb )] real ( dp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 11 !! Maximum depth to read values on int_wp integer ( dp ) :: int_wp !! long integer to capture fractional part integer :: i_exp !! integer to capture whole number part integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number in a single integer pP = 127 int_wp = 0 do i = p , min ( maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then int_wp = int_wp * 10 + val else if ( val == period ) then pP = i else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then v = sign * int_wp * expbase ( exp_aux ) else v = sign * int_wp * 1 0._dp ** ( sige * i_exp - resp + 1 ) end if stat = 0 end subroutine elemental subroutine to_dp_base ( s , v , p , stat ) integer , parameter :: wp = dp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 40 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 64 !! number of fractional number factors integer :: e real ( wp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._wp ** ( nwnb - e ), e = 1 , nwnb )] real ( wp ), parameter :: fractional_base ( nfnb ) = [( 1 0._wp ** ( - e ), e = 1 , nfnb )] real ( wp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 19 !! Maximum depth to read values on int_wp integer ( wp ) :: int_wp !! long integer to capture fractional part integer :: i_exp !! integer to capture whole number part integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number in a single integer pP = 127 int_wp = 0 do i = p , min ( maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then int_wp = int_wp * 10 + val else if ( val == period ) then pP = i else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then v = sign * int_wp * expbase ( exp_aux ) else v = sign * int_wp * 1 0._wp ** ( sige * i_exp - resp + 1 ) end if stat = 0 end subroutine #:if WITH_XDP elemental subroutine to_xdp_base ( s , v , p , stat ) integer , parameter :: wp = xdp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 50 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 64 !! number of fractional number factors integer :: e real ( wp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._wp ** ( nwnb - e ), e = 1 , nwnb )] real ( wp ), parameter :: fractional_base ( nfnb ) = [( 1 0._wp ** ( - e ), e = 1 , nfnb )] real ( wp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 19 !! Maximum depth to read values on int_dp integer ( dp ) :: int_dp1 , int_dp2 !! long integers to capture whole and fractional part integer :: i_exp !! integer to capture exponent number integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp , icount , aux !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number using two int64 values pP = 127 int_dp1 = 0 int_dp2 = 0 icount = 0 aux = 1 do i = p , min ( 2 * maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then icount = icount + 1 if ( icount <= maxdpt ) then int_dp1 = int_dp1 * 10 + val else if ( icount < 2 * maxdpt ) then int_dp2 = int_dp2 * 10 + val end if else if ( val == period ) then pP = i aux = 0 else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then if ( icount <= maxdpt ) then v = sign * int_dp1 * expbase ( exp_aux ) else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * expbase ( exp_aux - icount + maxdpt ) end if else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * 1 0._wp ** ( sige * i_exp - resp + maxdpt + aux ) end if stat = 0 end subroutine #:endif #:if WITH_QP elemental subroutine to_qp_base ( s , v , p , stat ) integer , parameter :: wp = qp !! Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent ! -- In/out Variables character ( * ), intent ( in ) :: s !! input string real ( wp ), intent ( inout ) :: v !! Output real value integer ( int8 ), intent ( out ) :: p !! last position within the string integer ( int8 ), intent ( out ) :: stat !! status upon success or failure to read ! -- Internal Variables integer ( int8 ), parameter :: nwnb = 50 !! number of whole number factors integer ( int8 ), parameter :: nfnb = 64 !! number of fractional number factors integer :: e real ( wp ), parameter :: whole_number_base ( nwnb ) = [( 1 0._wp ** ( nwnb - e ), e = 1 , nwnb )] real ( wp ), parameter :: fractional_base ( nfnb ) = [( 1 0._wp ** ( - e ), e = 1 , nfnb )] real ( wp ), parameter :: expbase ( nwnb + nfnb ) = [ whole_number_base , fractional_base ] integer ( int8 ) :: sign , sige !! sign of integer number and exponential integer , parameter :: maxdpt = 19 !! Maximum depth to read values on int_dp integer ( dp ) :: int_dp1 , int_dp2 !! long integers to capture whole and fractional part integer :: i_exp !! integer to capture exponent number integer :: exp_aux integer ( int8 ) :: i , pP , pE , val , resp , icount , aux !---------------------------------------------- stat = 23 !! initialize error status with any number > 0 !---------------------------------------------- ! Find first non white space p = shift_to_nonwhitespace ( s ) !---------------------------------------------- ! Verify leading negative sign = 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sign = - 1 p = p + 1 end if if ( iachar ( s ( p : p )) == Inf ) then v = sign * ieee_value ( v , ieee_positive_inf ) return else if ( iachar ( s ( p : p )) == NaN ) then v = ieee_value ( v , ieee_quiet_nan ) return end if !---------------------------------------------- ! read whole and fractional number using two int64 values pP = 127 int_dp1 = 0 int_dp2 = 0 icount = 0 aux = 1 do i = p , min ( 2 * maxdpt + p - 1 , len ( s )) val = iachar ( s ( i : i )) - digit_0 if ( val >= 0 . and . val <= 9 ) then icount = icount + 1 if ( icount <= maxdpt ) then int_dp1 = int_dp1 * 10 + val else if ( icount < 2 * maxdpt ) then int_dp2 = int_dp2 * 10 + val end if else if ( val == period ) then pP = i aux = 0 else exit end if end do pE = i ! Fix the exponent position do while ( i <= len ( s ) ) val = iachar ( s ( i : i )) - digit_0 if ( val < 0 . or . val > 9 ) exit i = i + 1 end do p = i resp = pE - min ( pP , p ) ! If no decimal indicator found it is taken as being in the current p position if ( resp <= 0 ) resp = resp + 1 !---------------------------------------------- ! Get exponential sige = 1 if ( p < len ( s ) ) then if ( any ([ le , BE , ld , BD ] + digit_0 == iachar ( s ( p : p ))) ) p = p + 1 if ( iachar ( s ( p : p )) == minus_sign + digit_0 ) then sige = - 1 p = p + 1 else if ( iachar ( s ( p : p )) == plus_sign + digit_0 ) then p = p + 1 end if end if i_exp = 0 do while ( p <= len ( s ) ) val = iachar ( s ( p : p )) - digit_0 if ( val >= 0 . and . val <= 9 ) then i_exp = i_exp * 10_int8 + val p = p + 1 else exit end if end do exp_aux = nwnb - 1 + resp - sige * i_exp if ( exp_aux > 0 . and . exp_aux <= nwnb + nfnb ) then if ( icount <= maxdpt ) then v = sign * int_dp1 * expbase ( exp_aux ) else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * expbase ( exp_aux - icount + maxdpt ) end if else v = sign * ( int_dp1 + int_dp2 * fractional_base ( maxdpt - 1 )) * 1 0._wp ** ( sige * i_exp - resp + maxdpt + aux ) end if stat = 0 end subroutine #:endif !--------------------------------------------- ! Internal Utility functions !--------------------------------------------- elemental function shift_to_nonwhitespace ( s ) result ( p ) !! move string to position of the next non white space character character ( * ), intent ( in ) :: s !! character chain integer ( int8 ) :: p !! position !---------------------------------------------- p = 1 do while ( p < len ( s ) . and . ( iachar ( s ( p : p )) == WS . or . iachar ( s ( p : p )) == LF . or . iachar ( s ( p : p )) == CR ) ) p = p + 1 end do end function elemental function shift_to_whitespace ( s ) result ( p ) !! move string to position of the next white space character character ( * ), intent ( in ) :: s !! character chain integer ( int8 ) :: p !! position !---------------------------------------------- p = 1 do while ( p < len ( s ) . and . . not .( iachar ( s ( p : p )) == WS . or . iachar ( s ( p : p )) == LF . or . iachar ( s ( p : p )) == CR ) ) p = p + 1 end do end function end module stdlib_str2num","tags":"","loc":"sourcefile/stdlib_str2num.fypp.html"},{"title":"stdlib_stats_distribution_uniform.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set ALL_KINDS_TYPES = INT_KINDS_TYPES + RC_KINDS_TYPES module stdlib_stats_distribution_uniform use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 use stdlib_error , only : error_stop use stdlib_random , only : dist_rand implicit none private real ( dp ), parameter :: MESENNE_NUMBER = 1.0_dp / ( 2.0_dp ** 53 - 1.0_dp ) integer ( int64 ), parameter :: INT_ONE = 1_int64 public :: rvs_uniform public :: pdf_uniform public :: cdf_uniform public :: shuffle interface rvs_uniform !! version: experimental !! !! Get uniformly distributed random variate for integer, real and complex !! variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! rvs_uniform-uniform-distribution-random-variates)) module procedure rvs_unif_0_rsp ! 0 dummy variable # : for k1 , t1 in ALL_KINDS_TYPES module procedure rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ! 1 dummy variable # : endfor # : for k1 , t1 in ALL_KINDS_TYPES module procedure rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ! 2 dummy variables # : endfor # : for k1 , t1 in ALL_KINDS_TYPES module procedure rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ! 3 dummy variables # : endfor end interface rvs_uniform interface pdf_uniform !! version: experimental !! !! Get uniform distribution probability density (pdf) for integer, real and !! complex variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! pdf_uniform-uniform-probability-density-function)) # : for k1 , t1 in ALL_KINDS_TYPES module procedure pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface pdf_uniform interface cdf_uniform !! version: experimental !! !! Get uniform distribution cumulative distribution function (cdf) for integer, !! real and complex variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! cdf_uniform-uniform-cumulative-distribution-function)) !! # : for k1 , t1 in ALL_KINDS_TYPES module procedure cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cdf_uniform interface shuffle !! version: experimental !! !! Fisher-Yates shuffle algorithm for a rank one array of integer, real and !! complex variables. !! ([Specification](../page/specs/stdlib_stats_distribution_uniform.html# !! shuffle-using-fisher-yates-algorithm-to-generate-a-random-permutation-of-a-list)) !! # : for k1 , t1 in ALL_KINDS_TYPES module procedure shuffle_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface shuffle contains # : for k1 , t1 in INT_KINDS_TYPES impure elemental function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) result ( res ) ! ! Uniformly distributed integer in [0, scale] ! Bitmask with rejection ! https://www.pcg-random.org/posts/bounded-rands.html ! ! Fortran 90 translated from c by Jim-215-fisher ! ${ t1 }$ , intent ( in ) :: scale ${ t1 }$ :: res , u , mask integer :: zeros , bits_left , bits if ( scale <= 0 _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_1): Uniform\" & // \" distribution scale parameter must be positive\" ) zeros = leadz ( scale ) bits = bit_size ( scale ) - zeros mask = shiftr ( not ( 0 _${ k1 }$ ), zeros ) L1 : do u = dist_rand ( scale ) res = iand ( u , mask ) if ( res <= scale ) exit L1 bits_left = zeros L2 : do if ( bits_left < bits ) exit L2 u = shiftr ( u , bits ) res = iand ( u , mask ) if ( res <= scale ) exit L1 bits_left = bits_left - bits end do L2 end do L1 end function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES impure elemental function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Uniformly distributed integer in [loc, loc + scale] ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res if ( scale <= 0 _${ k1 }$ ) call error_stop ( \"Error(rvs_unif): Uniform\" & // \" distribution scale parameter must be positive\" ) res = loc + rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) end function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ ( ) result ( res ) ! ! Uniformly distributed float in [0,1] ! Based on the paper by Frederic Goualard, \"Generating Random Floating- ! Point Numbers By Dividing Integers: a Case Study\", Proceedings of ! ICCS 2020, June 2020, Amsterdam, Netherlands ! ${ t1 }$ :: res integer ( int64 ) :: tmp tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) ! Get random from [0,2^53-1] res = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) ! convert to [0,1] end function rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) result ( res ) ! ! Uniformly distributed float in [0, scale] ! ${ t1 }$ , intent ( in ) :: scale ${ t1 }$ :: res if ( scale == 0. _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_1): \" & // \"Uniform distribution scale parameter must be non-zero\" ) res = scale * rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ ( ) end function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Uniformly distributed float in [loc, loc + scale] ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res if ( scale == 0. _${ k1 }$ ) call error_stop ( \"Error(rvs_unif): \" & // \"Uniform distribution scale parameter must be non-zero\" ) res = loc + scale * rvs_unif_0_$ { t1 [ 0 ] }{ k1 }$ ( ) end function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ ( scale ) result ( res ) ! ! Uniformly distributed complex in [(0,0i), (scale, i(scale))] ! The real part and imaginary part are independent of each other, so that ! the joint distribution is on an unit square [(0,0i), (scale,i(scale))] ! ${ t1 }$ , intent ( in ) :: scale ${ t1 }$ :: res real ( ${ k1 }$ ) :: r1 , tr , ti if ( scale == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) call error_stop ( \"Error(rvs_uni_\" & // \"1): Uniform distribution scale parameter must be non-zero\" ) r1 = rvs_unif_0_r$ { k1 }$ ( ) if ( scale % re == 0.0 _${ k1 }$ ) then ti = scale % im * r1 tr = 0.0 _${ k1 }$ else if ( scale % im == 0.0 _${ k1 }$ ) then tr = scale % re * r1 ti = 0.0 _${ k1 }$ else tr = scale % re * r1 r1 = rvs_unif_0_r$ { k1 }$ ( ) ti = scale % im * r1 end if res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_unif_1_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Uniformly distributed complex in [(loc,iloc), (loc + scale, i(loc + ! scale))]. ! The real part and imaginary part are independent of each other, so that ! the joint distribution is on an unit square [(loc,iloc), (loc + scale, ! i(loc + scale))] ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res real ( ${ k1 }$ ) :: r1 , tr , ti if ( scale == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) call error_stop ( \"Error(rvs_uni_\" & // \"): Uniform distribution scale parameter must be non-zero\" ) r1 = rvs_unif_0_r$ { k1 }$ ( ) if ( scale % re == 0.0 _${ k1 }$ ) then tr = loc % re ti = loc % im + scale % im * r1 else if ( scale % im == 0.0 _${ k1 }$ ) then tr = loc % re + scale % re * r1 ti = loc % im else tr = loc % re + scale % re * r1 r1 = rvs_unif_0_r$ { k1 }$ ( ) ti = loc % im + scale % im * r1 end if res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) integer , intent ( in ) :: array_size ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res ( array_size ) ${ t1 }$ :: u , mask , nn integer :: i , zeros , bits_left , bits if ( scale == 0 _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_array): \" & // \"Uniform distribution scale parameter must be non-zero\" ) zeros = leadz ( scale ) bits = bit_size ( scale ) - zeros mask = shiftr ( not ( 0 _${ k1 }$ ), zeros ) do i = 1 , array_size L1 : do u = dist_rand ( scale ) nn = iand ( u , mask ) if ( nn <= scale ) exit L1 bits_left = zeros L2 : do if ( bits_left < bits ) exit L2 u = shiftr ( u , bits ) nn = iand ( u , mask ) if ( nn <= scale ) exit L1 bits_left = bits_left - bits end do L2 end do L1 res ( i ) = loc + nn end do end function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) integer , intent ( in ) :: array_size ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res ( array_size ) ${ t1 }$ :: t integer ( int64 ) :: tmp integer :: i if ( scale == 0. _${ k1 }$ ) call error_stop ( \"Error(rvs_unif_array):\" & // \" Uniform distribution scale parameter must be non-zero\" ) do i = 1 , array_size tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) t = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) res ( i ) = loc + scale * t end do end function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) integer , intent ( in ) :: array_size ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res ( array_size ) real ( ${ k1 }$ ) :: r1 , tr , ti integer ( int64 ) :: tmp integer :: i if ( scale == ( 0.0 _${ k1 }$ , 0.0 _${ k1 }$ )) call error_stop ( \"Error(rvs_unif\" & // \"_array): Uniform distribution scale parameter must be non-zero\" ) do i = 1 , array_size tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) r1 = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) if ( scale % re == 0.0 _${ k1 }$ ) then tr = loc % re ti = loc % im + scale % im * r1 else if ( scale % im == 0.0 _${ k1 }$ ) then tr = loc % re + scale % re * r1 ti = loc % im else tr = loc % re + scale % re * r1 tmp = shiftr ( dist_rand ( INT_ONE ), 11 ) r1 = real ( tmp * MESENNE_NUMBER , kind = ${ k1 }$ ) ti = loc % im + scale % im * r1 end if res ( i ) = cmplx ( tr , ti , kind = ${ k1 }$ ) end do end function rvs_unif_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES elemental function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real :: res if ( scale == 0 _${ k1 }$ ) then res = 0.0 else if ( x < loc . or . x > ( loc + scale )) then res = 0.0 else res = 1. / ( scale + 1 _${ k1 }$ ) end if end function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( scale == zero ) then res = zero else if ( x < loc . or . x > ( loc + scale )) then res = zero else res = one / scale end if end function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res , tr , ti real ( ${ k1 }$ ), parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ tr = loc % re + scale % re ; ti = loc % im + scale % im if ( scale == ( zero , zero )) then res = zero else if (( x % re >= loc % re . and . x % re <= tr ) . and . & ( x % im >= loc % im . and . x % im <= ti )) then res = one / ( scale % re * scale % im ) else res = zero end if end function pdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES elemental function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real :: res if ( scale == 0 _${ k1 }$ ) then res = 0.0 else if ( x < loc ) then res = 0.0 else if ( x >= loc . and . x <= ( loc + scale )) then res = real (( x - loc + 1 _${ k1 }$ )) / real (( scale + 1 _${ k1 }$ )) else res = 1.0 end if end function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( scale == zero ) then res = zero else if ( x < loc ) then res = zero else if ( x >= loc . and . x <= ( loc + scale )) then res = ( x - loc ) / scale else res = one end if end function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res real ( ${ k1 }$ ), parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ logical :: r1 , r2 , i1 , i2 if ( scale == ( zero , zero )) then res = zero return end if r1 = x % re < loc % re r2 = x % re > ( loc % re + scale % re ) i1 = x % im < loc % im i2 = x % im > ( loc % im + scale % im ) if ( r1 . or . i1 ) then res = zero else if ((. not . r1 ) . and . (. not . r2 ) . and . i2 ) then res = ( x % re - loc % re ) / scale % re else if ((. not . i1 ) . and . (. not . i2 ) . and . r2 ) then res = ( x % im - loc % im ) / scale % im else if ((. not . r1 ) . and . (. not . r2 ) . and . (. not . i1 ) . and . (. not . i2 )) & then res = (( x % re - loc % re ) / scale % re ) * (( x % im - loc % im ) / & scale % im ) else if ( r2 . and . i2 ) then res = one end if end function cdf_unif_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in ALL_KINDS_TYPES function shuffle_$ { t1 [ 0 ] }{ k1 }$ ( list ) result ( res ) ${ t1 }$ , intent ( in ) :: list (:) ${ t1 }$ :: res ( size ( list )) ${ t1 }$ :: tmp integer :: n , i , j n = size ( list ) res = list do i = 1 , n - 1 j = rvs_uniform ( n - i ) + i tmp = res ( i ) res ( i ) = res ( j ) res ( j ) = tmp end do end function shuffle_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_stats_distribution_uniform","tags":"","loc":"sourcefile/stdlib_stats_distribution_uniform.fypp.html"},{"title":"stdlib_linalg_svd.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_svd !! Singular-Value Decomposition use stdlib_linalg_constants use stdlib_linalg_lapack , only : gesdd use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR , LINALG_SUCCESS implicit none ( type , external ) character ( * ), parameter :: this = 'svd' !> List of internal GESDD tasks: !> Return full matrices U, V^T to separate storage character , parameter :: GESDD_FULL_MATRICES = 'A' !> Return shrunk matrices U, V^T to k = min(m,n) character , parameter :: GESDD_SHRINK_MATRICES = 'S' !> Overwrite A storage with U (if M>=N) or VT (if M Do not return either U or VT (singular values array only) character , parameter :: GESDD_SINGVAL_ONLY = 'N' contains !> Process GESDD output flag elemental subroutine handle_gesdd_info ( err , info , m , n ) !> Error handler type ( linalg_state_type ), intent ( inout ) :: err !> GESDD return flag integer ( ilp ), intent ( in ) :: info !> Input matrix size integer ( ilp ), intent ( in ) :: m , n select case ( info ) case ( 0 ) ! Success! err % state = LINALG_SUCCESS case ( - 1 ) err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'Invalid task ID on input to GESDD.' ) case ( - 5 , - 3 : - 2 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix size: a=' ,[ m , n ]) case ( - 8 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix U size, with a=' ,[ m , n ]) case ( - 10 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid matrix V size, with a=' ,[ m , n ]) case ( - 4 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'A contains invalid/NaN values.' ) case ( 1 :) err = linalg_state_type ( this , LINALG_ERROR , 'SVD computation did not converge.' ) case default err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'Unknown error returned by GESDD.' ) end select end subroutine handle_gesdd_info # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" !> Singular values of matrix A module function stdlib_linalg_svdvals_$ { ri }$ ( a , err ) result ( s ) !!### Summary !! Compute singular values S from the singular-value decomposition of a matrix A = U \\cdot S \\cdot \\V^T . !! !!### Description !! !! This function returns the array of singular values from the singular value decomposition of a `real` !! or `complex` matrix A = U \\cdot S \\cdot V^T . !! !! param: a Input matrix of size [m,n]. !! param: err [optional] State return flag. !! !!### Return value !! !! param: s `real` array of size [min(m,n)] returning a list of singular values. !! !> Input matrix A[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Array of singular values real ( ${ rk }$ ), allocatable :: s (:) !> Create ${ rt }$ , pointer :: amat (:,:) integer ( ilp ) :: m , n , k !> Create an internal pointer so the intent of A won't affect the next call amat => a m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) k = min ( m , n ) !> Allocate return storage allocate ( s ( k )) !> Compute singular values call stdlib_linalg_svd_$ { ri }$ ( amat , s , overwrite_a = . false ., err = err ) end function stdlib_linalg_svdvals_$ { ri }$ !> SVD of matrix A = U S V^T, returning S and optionally U and V^T module subroutine stdlib_linalg_svd_$ { ri }$ ( a , s , u , vt , overwrite_a , full_matrices , err ) !!### Summary !! Compute singular value decomposition of a matrix A = U \\cdot S \\cdot \\V^T !! !!### Description !! !! This function computes the singular value decomposition of a `real` or `complex` matrix A , !! and returns the array of singular values, and optionally the left matrix U containing the !! left unitary singular vectors, and the right matrix V^T , containing the right unitary !! singular vectors. !! !! param: a Input matrix of size [m,n]. !! param: s Output `real` array of size [min(m,n)] returning a list of singular values. !! param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns. !! param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: full_matrices [optional] If `.true.` (default), matrices U and V^T have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with `k=min(m,n)`. !! param: err [optional] State return flag. !! !> Input matrix A[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Array of singular values real ( ${ rk }$ ), intent ( out ) :: s (:) !> The columns of U contain the left singular vectors ${ rt }$ , optional , intent ( out ), target :: u (:,:) !> The rows of V^T contain the right singular vectors ${ rt }$ , optional , intent ( out ), target :: vt (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise !> they are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) logical ( lk ), optional , intent ( in ) :: full_matrices !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , lda , ldu , ldvt , info , k , lwork , liwork , lrwork integer ( ilp ), allocatable :: iwork (:) logical ( lk ) :: overwrite_a_ , full_storage , compute_uv , temp_u , temp_vt , can_overwrite_amat character :: task ${ rt }$ , target :: work_dummy ( 1 ), u_dummy ( 1 , 1 ), vt_dummy ( 1 , 1 ) ${ rt }$ , allocatable :: work (:) real ( ${ rk }$ ), allocatable :: rwork (:) ${ rt }$ , pointer :: amat (:,:), umat (:,:), vtmat (:,:) !> Matrix determinant size m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) k = min ( m , n ) lda = m if (. not . k > 0 ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid or matrix size: a=' ,[ m , n ]) call linalg_error_handling ( err0 , err ) return elseif (. not . size ( s , kind = ilp ) >= k ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'singular value array has insufficient size:' ,& ' s=' , shape ( s , kind = ilp ), ', k=' , k ) call linalg_error_handling ( err0 , err ) return endif ! Integer storage liwork = 8 * k allocate ( iwork ( liwork )) ! Can A be overwritten? By default, do not overwrite overwrite_a_ = . false . if ( present ( overwrite_a )) overwrite_a_ = overwrite_a ! Initialize a matrix temporary? if ( overwrite_a_ ) then amat => a else allocate ( amat ( m , n ), source = a ) endif ! Check if we can overwrite amat with data that will be lost can_overwrite_amat = (. not . overwrite_a_ ) . and . merge (. not . present ( u ),. not . present ( vt ), m >= n ) ! Full-size matrices if ( present ( full_matrices )) then full_storage = full_matrices else full_storage = . true . endif ! Decide if U, VT matrices should be computed compute_uv = present ( u ) . or . present ( vt ) ! U, VT storage if ( present ( u )) then ! User input umat => u temp_u = . false . elseif (( m >= n . and . . not . overwrite_a_ ) . or . . not . compute_uv ) then ! U not wanted, and A can be overwritten: do not allocate umat => u_dummy temp_u = . false . elseif (. not . full_storage ) then ! Allocate with minimum size allocate ( umat ( m , k )) temp_u = . true . else ! Allocate with regular size allocate ( umat ( m , m )) temp_u = . true . end if if ( present ( vt )) then ! User input vtmat => vt temp_vt = . false . elseif (( m < n . and . . not . overwrite_a_ ) . or . . not . compute_uv ) then ! amat can be overwritten, VT not wanted: VT is returned upon A vtmat => vt_dummy temp_vt = . false . elseif (. not . full_storage ) then ! Allocate with minimum size allocate ( vtmat ( k , n )) temp_vt = . true . else ! Allocate with regular size allocate ( vtmat ( n , n )) temp_vt = . true . end if ldu = size ( umat , 1 , kind = ilp ) ldvt = size ( vtmat , 1 , kind = ilp ) ! Decide SVD task if (. not . compute_uv ) then task = GESDD_SINGVAL_ONLY elseif ( can_overwrite_amat ) then ! A is a copy: we can overwrite its storage task = GESDD_OVERWRITE_A elseif (. not . full_storage ) then task = GESDD_SHRINK_MATRICES else task = GESDD_FULL_MATRICES end if ! Compute workspace # : if rt . startswith ( 'complex' ) if ( task == GESDD_SINGVAL_ONLY ) then lrwork = max ( 1 , 7 * k ) else lrwork = max ( 1 , 5 * k * ( k + 1 ), 2 * k * ( k + max ( m , n )) + k ) endif allocate ( rwork ( lrwork )) # : else lrwork = - 1_ilp ! not needed # : endif ! First call: request working storage space lwork = - 1_ilp call gesdd ( task , m , n , amat , lda , s , umat , ldu , vtmat , ldvt ,& work_dummy , lwork , #{ if rt . startswith ( 'complex' ) }# rwork , #{ endif }# iwork , info ) call handle_gesdd_info ( err0 , info , m , n ) ! Compute SVD if ( info == 0 ) then !> Prepare working storage lwork = nint ( real ( work_dummy ( 1 ), kind = ${ rk }$ ), kind = ilp ) allocate ( work ( lwork )) !> Compute SVD call gesdd ( task , m , n , amat , lda , s , umat , ldu , vtmat , ldvt ,& work , lwork , #{ if rt . startswith ( 'complex' ) }# rwork , #{ endif }# iwork , info ) call handle_gesdd_info ( err0 , info , m , n ) endif ! Finalize storage and process output flag if (. not . overwrite_a_ ) deallocate ( amat ) if ( temp_u ) deallocate ( umat ) if ( temp_vt ) deallocate ( vtmat ) call linalg_error_handling ( err0 , err ) end subroutine stdlib_linalg_svd_$ { ri }$ # : endif # : endfor end submodule stdlib_linalg_svd","tags":"","loc":"sourcefile/stdlib_linalg_svd.fypp.html"},{"title":"stdlib_math_linspace.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_math ) stdlib_math_linspace implicit none contains # : for k1 , t1 in REAL_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end ${ t1 }$ :: res ( DEFAULT_LINSPACE_LENGTH ) res = linspace ( start , end , DEFAULT_LINSPACE_LENGTH ) end function ${ RName }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) pure module function ${ RName }$ ( start , end , n ) result ( res ) ${ t1 }$ , intent ( in ) :: start ${ t1 }$ , intent ( in ) :: end integer , intent ( in ) :: n ${ t1 }$ :: res ( max ( n , 0 )) integer :: i ! Looping index ${ t1 }$ :: interval ! Difference between adjacent elements if ( n <= 0 ) return ! If passed length is less than or equal to 0, return an empty (allocated with length 0) array if ( n == 1 ) then res ( 1 ) = end return end if interval = ( end - start ) / real (( n - 1 ), ${ k1 }$ ) res ( 1 ) = start res ( n ) = end do i = 2 , n - 1 res ( i ) = real (( i - 1 ), ${ k1 }$ ) * interval + start end do end function ${ RName }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) module procedure ${ RName }$ res = linspace ( start , end , DEFAULT_LINSPACE_LENGTH ) end procedure ${ RName }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) module procedure ${ RName }$ real ( ${ k1 }$ ) :: x ( max ( n , 0 )) ! array of the real part of complex number real ( ${ k1 }$ ) :: y ( max ( n , 0 )) ! array of the imaginary part of the complex number x = linspace ( start % re , end % re , n ) y = linspace ( start % im , end % im , n ) res = cmplx ( x , y , kind = ${ k1 }$ ) end procedure ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_default\" , 1 , t1 , k1 ) module procedure ${ RName }$ res = linspace ( real ( start , kind = dp ), real ( end , kind = dp ), DEFAULT_LINSPACE_LENGTH ) end procedure ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"linspace_n\" , 1 , t1 , k1 ) module procedure ${ RName }$ res = linspace ( real ( start , kind = dp ), real ( end , kind = dp ), n ) end procedure ${ RName }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_math_linspace.fypp.html"},{"title":"stdlib_hash_32bit_fnv.fypp – Fortran-lang/stdlib","text":"FNV_1_HASH and FNV_1A_Hash are translations to Fortran 2008 of the FNV-1 and FNV-1a hash functions of Glenn Fowler, Landon Curt Noll,\n and Phong Vo, that has been released into the public domain. Permission\n has been granted, by Landon Curt Noll, for the use of these algorithms\n in the Fortran Standard Library. A description of these functions is\n available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function. Source Code !!------------------------------------------------------------------------------ !! `FNV_1_HASH` and `FNV_1A_Hash` are translations to Fortran 2008 of the !! `FNV-1` and `FNV-1a` hash functions of Glenn Fowler, Landon Curt Noll, !! and Phong Vo, that has been released into the public domain. Permission !! has been granted, by Landon Curt Noll, for the use of these algorithms !! in the Fortran Standard Library. A description of these functions is !! available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function. !!------------------------------------------------------------------------------ !#! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_32bit ) stdlib_hash_32bit_fnv !! An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt !! Noll, and Kiem-Phong-Vo, !! https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function implicit none integer ( int_hash ), parameter :: & offset_basis = int ( z '811C9DC5' , int_hash ), & prime = int ( z '01000193' , int_hash ) contains pure module function int8_fnv_1 ( key ) result ( hash_code ) !! The original FNV-1 8-bit key algorithm. integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) hash_code = hash_code * prime if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if end do end function int8_fnv_1 #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1 ( key ) result ( hash_code ) ! A ${k1}$ array key wrapper for the FNV-1 algorithm. integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 ) ) ) end function ${ k1 }$_ fnv_1 #:endfor elemental module function character_fnv_1 ( key ) result ( hash_code ) ! A default character key wrapper for the FNV-1 algorithm. character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , & 0_int8 , & bytes_char * & len ( key , kind = int64 ) ) ) end function character_fnv_1 pure module function int8_fnv_1a ( key ) result ( hash_code ) !! The original FNV-1a 8-bit key algorithm. integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if hash_code = hash_code * prime end do end function int8_fnv_1a #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1a ( key ) result ( hash_code ) ! A ${k1}$ array key wrapper for the FNV-1a algorithm. integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 )) ) end function ${ k1 }$_ fnv_1a #:endfor elemental module function character_fnv_1a ( key ) result ( hash_code ) ! A default character key wrapper for the FNV-1 algorithm. character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & ( bits_char / bits_int8 ) * & len ( key , kind = int64 ) ) ) end function character_fnv_1a end submodule stdlib_hash_32bit_fnv","tags":"","loc":"sourcefile/stdlib_hash_32bit_fnv.fypp.html"},{"title":"stdlib_io_npy.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifer: MIT #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES !> Description of the npy format taken from !> https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html !> !>## Format Version 1.0 !> !> The first 6 bytes are a magic string: exactly \\x93NUMPY. !> !> The next 1 byte is an unsigned byte: !> the major version number of the file format, e.g. \\x01. !> !> The next 1 byte is an unsigned byte: !> the minor version number of the file format, e.g. \\x00. !> Note: the version of the file format is not tied to the version of the numpy package. !> !> The next 2 bytes form a little-endian unsigned short int: !> the length of the header data HEADER_LEN. !> !> The next HEADER_LEN bytes form the header data describing the array’s format. !> It is an ASCII string which contains a Python literal expression of a dictionary. !> It is terminated by a newline (\\n) and padded with spaces (\\x20) to make the total !> of len(magic string) + 2 + len(length) + HEADER_LEN be evenly divisible by 64 for !> alignment purposes. !> !> The dictionary contains three keys: !> !> - “descr”: dtype.descr !> An object that can be passed as an argument to the numpy.dtype constructor !> to create the array’s dtype. !> !> - “fortran_order”: bool !> Whether the array data is Fortran-contiguous or not. Since Fortran-contiguous !> arrays are a common form of non-C-contiguity, we allow them to be written directly !> to disk for efficiency. !> !> - “shape”: tuple of int !> The shape of the array. !> !> For repeatability and readability, the dictionary keys are sorted in alphabetic order. !> This is for convenience only. A writer SHOULD implement this if possible. A reader MUST !> NOT depend on this. !> !> Following the header comes the array data. If the dtype contains Python objects !> (i.e. dtype.hasobject is True), then the data is a Python pickle of the array. !> Otherwise the data is the contiguous (either C- or Fortran-, depending on fortran_order) !> bytes of the array. Consumers can figure out the number of bytes by multiplying the !> number of elements given by the shape (noting that shape=() means there is 1 element) !> by dtype.itemsize. !> !>## Format Version 2.0 !> !> The version 1.0 format only allowed the array header to have a total size of 65535 bytes. !> This can be exceeded by structured arrays with a large number of columns. !> The version 2.0 format extends the header size to 4 GiB. numpy.save will automatically !> save in 2.0 format if the data requires it, else it will always use the more compatible !> 1.0 format. !> !> The description of the fourth element of the header therefore has become: !> “The next 4 bytes form a little-endian unsigned int: the length of the header data !> HEADER_LEN.” !> !>## Format Version 3.0 !> !> This version replaces the ASCII string (which in practice was latin1) with a !> utf8-encoded string, so supports structured types with any unicode field names. module stdlib_io_npy use stdlib_kinds , only : int8 , int16 , int32 , int64 , sp , dp , xdp , qp implicit none private public :: save_npy , load_npy !> Version: experimental !> !> Save multidimensional array in npy format !> ([Specification](../page/specs/stdlib_io.html#save_npy)) interface save_npy # : for k1 , t1 in KINDS_TYPES # : for rank in RANKS module subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) character ( len =* ), intent ( in ) :: filename ${ t1 }$ , intent ( in ) :: array ${ ranksuffix ( rank ) }$ integer , intent ( out ), optional :: iostat character ( len = :), allocatable , intent ( out ), optional :: iomsg end subroutine save_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor # : endfor end interface save_npy !> Version: experimental !> !> Load multidimensional array in npy format !> ([Specification](../page/specs/stdlib_io.html#load_npy)) interface load_npy # : for k1 , t1 in KINDS_TYPES # : for rank in RANKS module subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ ( filename , array , iostat , iomsg ) character ( len =* ), intent ( in ) :: filename ${ t1 }$ , allocatable , intent ( out ) :: array ${ ranksuffix ( rank ) }$ integer , intent ( out ), optional :: iostat character ( len = :), allocatable , intent ( out ), optional :: iomsg end subroutine load_npy_$ { t1 [ 0 ] }{ k1 }$_${ rank }$ # : endfor # : endfor end interface load_npy character ( len =* ), parameter :: nl = achar ( 10 ) character ( len =* ), parameter :: & type_iint8 = \" 0 ) then error stop module_name // \" % \" // procedure // & \": Internal Error at stdlib_hashmaps: \" // & \"System uses 2 bytes per character, so \" // & \"key_size can't be an odd number.\" end if key_as_char = ishft ( key_size , - 1 ) case ( 4 ) if ( iand ( key_size , 3_int64 ) > 0 ) then error stop module_name // \" % \" // procedure // & \": Internal Error at stdlib_hashmaps: \" // & \"System uses 4 bytes per character, and \" // & \"key_size is not a multiple of four.\" end if key_as_char = ishft ( key_size , - 2 ) case default error stop module_name // \" % \" // procedure // & \": Internal Error: \" // & \"System doesn't use a power of two for its \" // & \"character size as expected by stdlib_hashmaps.\" end select allocate ( character ( len = key_as_char ) :: value ) value ( 1 : key_as_char ) = transfer ( key % value , value ) end subroutine get_char_key subroutine get_other ( other , value ) !! Version: Experimental !! !! Gets the contents of the other as a CLASS(*) string !! Arguments: !! other - the input other data !! value - the contents of other mapped to a CLASS(*) variable type ( other_type ), intent ( in ) :: other class ( * ), allocatable , intent ( out ) :: value allocate ( value , source = other % value ) end subroutine get_other subroutine get_int8_key ( key , value ) !! Version: Experimental !! !! Gets the contents of the key as an INTEGER(INT8) vector !! Arguments: !! key - the input key !! value - the contents of key mapped to an INTEGER(INT8) vector type ( key_type ), intent ( in ) :: key integer ( int8 ), allocatable , intent ( out ) :: value (:) value = key % value end subroutine get_int8_key pure subroutine get_int32_key ( key , value ) !! Version: Experimental !! !! Gets the contents of the key as an INTEGER(INT32) vector !! Arguments: !! key - the input key !! value - the contents of key mapped to an INTEGER(INT32) vector type ( key_type ), intent ( in ) :: key integer ( int32 ), allocatable , intent ( out ) :: value (:) value = transfer ( key % value , value ) end subroutine get_int32_key subroutine set_char_key ( key , value ) !! Version: Experimental !! !! Sets the contents of the key from a CHARACTER string !! Arguments: !! key - the output key !! value - the input CHARACTER string type ( key_type ), intent ( out ) :: key character ( * ), intent ( in ) :: value key % value = transfer ( value , key % value , & bytes_char * len ( value ) ) end subroutine set_char_key subroutine set_other ( other , value ) !! Version: Experimental !! !! Sets the contents of the other data from a CLASS(*) variable !! Arguments: !! other - the output other data !! value - the input CLASS(*) variable type ( other_type ), intent ( out ) :: other class ( * ), intent ( in ) :: value allocate ( other % value , source = value ) end subroutine set_other subroutine set_int8_key ( key , value ) !! Version: Experimental !! !! Sets the contents of the key from an INTEGER(INT8) vector !! Arguments: !! key - the output key !! value - the input INTEGER(INT8) vector type ( key_type ), intent ( out ) :: key integer ( int8 ), intent ( in ) :: value (:) key % value = value end subroutine set_int8_key pure subroutine set_int32_key ( key , value ) !! Version: Experimental !! !! Sets the contents of the key from an INTEGER(INT32) vector !! Arguments: !! key - the output key !! value - the input INTEGER(INT32) vector type ( key_type ), intent ( out ) :: key integer ( int32 ), intent ( in ) :: value (:) key % value = transfer ( value , key % value ) end subroutine set_int32_key pure function fnv_1_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1 algorithm !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1_hasher fnv_1_hasher = fnv_1_hash ( key % value ) end function fnv_1_hasher pure function fnv_1a_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the FNV_1a algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#fnv_1a_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: fnv_1a_hasher fnv_1a_hasher = fnv_1a_hash ( key % value ) end function fnv_1a_hasher pure function seeded_nmhash32_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32 hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32_hasher seeded_nmhash32_hasher = nmhash32 ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32_hasher pure function seeded_nmhash32x_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the NMHASH32X hash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32x_hasher-calculates-a-hash-code-from-a-key)) !! Arguments: !! key - the key to be hashed !! seed - the seed (unused) for the hashing algorithm type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_nmhash32x_hasher seeded_nmhash32x_hasher = nmhash32x ( key % value , & int ( z 'DEADBEEF' , int32 ) ) end function seeded_nmhash32x_hasher pure function seeded_water_hasher ( key ) !! Version: Experimental !! !! Hashes a key with the waterhash algorithm !! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_water_hasher-calculates-a-hash-code-from-a-key)) !! !! Arguments: !! key - the key to be hashed type ( key_type ), intent ( in ) :: key integer ( int_hash ) :: seeded_water_hasher seeded_water_hasher = water_hash ( key % value , & int ( z 'DEADBEEF1EADBEEF' , int64 ) ) end function seeded_water_hasher end module stdlib_hashmap_wrappers","tags":"","loc":"sourcefile/stdlib_hashmap_wrappers.f90.html"},{"title":"stdlib_stats_median.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set IR_KINDS_TYPES_OUTPUT = list(zip(INT_KINDS,INT_TYPES, ['dp']*len(INT_KINDS))) + list(zip(REAL_KINDS, REAL_TYPES, REAL_KINDS)) submodule ( stdlib_stats ) stdlib_stats_median use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan , ieee_is_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval use stdlib_selection , only : select implicit none contains # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median_all\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res integer ( kind = int64 ) :: c , n ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if (. not . optval ( mask , . true .) . or . size ( x ) == 0 ) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x ))) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if # : endif n = size ( x , kind = int64 ) c = floor ( ( n + 1 ) / 2. _${ o1 }$ , kind = int64 ) x_tmp = reshape ( x , [ n ]) call select ( x_tmp , c , val ) if ( mod ( n , 2_int64 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) !instead of call select(x_tmp, c+1, val1, left = c) # : if t1 [ 0 ] == 'r' res = ( val + val1 ) / 2. _${ o1 }$ # : else res = ( real ( val , kind = ${ o1 }$ ) + & real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else res = val end if end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( \"median\" , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: c , n # : if rank > 1 # : for fj in range ( 1 , rank + 1 ) integer :: j$ { fj }$ # : endfor # : endif ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if (. not . optval ( mask , . true .) . or . size ( x ) == 0 ) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if n = size ( x , dim ) c = floor ( ( n + 1 ) / 2. _${ o1 }$ ) allocate ( x_tmp ( n )) select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) ! Loop over every dimension of the array except \"dim\" # : for fj in list ( range ( 1 , fi )) + list ( range ( fi + 1 , rank + 1 )) do j$ { fj }$ = 1 , size ( x , ${ fj }$ ) # : endfor x_tmp (:) = x$ { select_subvector ( 'j' , rank , fi ) }$ # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x_tmp ))) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) # : if fi == 1 return # : else cycle # : endif end if # : endif call select ( x_tmp , c , val ) if ( mod ( n , 2 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & # : if t1 [ 0 ] == 'r' ( val + val1 ) / 2. _${ o1 }$ # : else ( real ( val , kind = ${ o1 }$ ) + real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else res$ { reduce_subvector ( 'j' , rank , fi ) }$ = val end if # : for fj in range ( 1 , rank ) end do # : endfor # : endfor case default call error_stop ( \"ERROR (median): wrong dimension\" ) end select end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_all_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res integer ( kind = int64 ) :: c , n ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if ( any ( shape ( x ) . ne . shape ( mask ))) then call error_stop ( \"ERROR (median): shapes of x and mask are different\" ) end if # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x ))) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if # : endif x_tmp = pack ( x , mask ) n = size ( x_tmp , kind = int64 ) if ( n == 0 ) then res = ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if c = floor ( ( n + 1 ) / 2. _${ o1 }$ , kind = int64 ) call select ( x_tmp , c , val ) if ( mod ( n , 2_int64 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) # : if t1 [ 0 ] == 'r' res = ( val + val1 ) / 2. _${ o1 }$ # : else res = ( real ( val , kind = ${ o1 }$ ) + real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else if ( mod ( n , 2_int64 ) == 1 ) then res = val end if end function ${ name }$ # : endfor # : endfor # : for k1 , t1 , o1 in IR_KINDS_TYPES_OUTPUT # : for rank in RANKS # : set name = rname ( 'median_mask' , rank , t1 , k1 , o1 ) module function ${ name }$ ( x , dim , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ real ( ${ o1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer ( kind = int64 ) :: c , n # : if rank > 1 # : for fj in range ( 1 , rank + 1 ) integer :: j$ { fj }$ # : endfor # : endif ${ t1 }$ :: val , val1 ${ t1 }$ , allocatable :: x_tmp (:) if ( any ( shape ( x ) . ne . shape ( mask ))) then call error_stop ( \"ERROR (median): shapes of x and mask are different\" ) end if select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) ! Loop over every dimension of the array except \"dim\" # : for fj in list ( range ( 1 , fi )) + list ( range ( fi + 1 , rank + 1 )) do j$ { fj }$ = 1 , size ( x , ${ fj }$ ) # : endfor x_tmp = pack ( x$ { select_subvector ( 'j' , rank , fi ) }$ , & mask$ { select_subvector ( 'j' , rank , fi ) }$ ) # : if t1 [ 0 ] == 'r' if ( any ( ieee_is_nan ( x_tmp ))) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) # : if rank == 1 return # : else cycle # : endif end if # : endif n = size ( x_tmp , kind = int64 ) if ( n == 0 ) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & ieee_value ( 1. _${ o1 }$ , ieee_quiet_nan ) return end if c = floor ( ( n + 1 ) / 2. _${ o1 }$ , kind = int64 ) call select ( x_tmp , c , val ) if ( mod ( n , 2_int64 ) == 0 ) then val1 = minval ( x_tmp ( c + 1 : n )) res$ { reduce_subvector ( 'j' , rank , fi ) }$ = & # : if t1 [ 0 ] == 'r' ( val + val1 ) / 2. _${ o1 }$ # : else ( real ( val , kind = ${ o1 }$ ) + real ( val1 , kind = ${ o1 }$ )) / 2. _${ o1 }$ # : endif else if ( mod ( n , 2_int64 ) == 1 ) then res$ { reduce_subvector ( 'j' , rank , fi ) }$ = val end if deallocate ( x_tmp ) # : for fj in range ( 1 , rank ) end do # : endfor # : endfor case default call error_stop ( \"ERROR (median): wrong dimension\" ) end select end function ${ name }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_median.fypp.html"},{"title":"stdlib_linalg_outer_product.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RCI_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_linalg ) stdlib_linalg_outer_product implicit none contains # : for k1 , t1 in RCI_KINDS_TYPES pure module function outer_product_$ { t1 [ 0 ] }{ k1 }$ ( u , v ) result ( res ) ${ t1 }$ , intent ( in ) :: u (:), v (:) ${ t1 }$ :: res ( size ( u ), size ( v )) integer :: col do col = 1 , size ( v ) res (:, col ) = v ( col ) * u end do end function outer_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_linalg_outer_product.fypp.html"},{"title":"stdlib_error.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_error !! Provides support for catching and handling errors !! ([Specification](../page/specs/stdlib_error.html)) use , intrinsic :: iso_fortran_env , only : stderr => error_unit use stdlib_optval , only : optval implicit none private interface ! f{08,18}estop.f90 module subroutine error_stop ( msg , code ) !! version: experimental !! !! Provides a call to `error stop` and allows the user to specify a code and message !! ([Specification](..//page/specs/stdlib_error.html#description_1)) character ( * ), intent ( in ) :: msg integer , intent ( in ), optional :: code end subroutine error_stop end interface public :: check , error_stop contains subroutine check ( condition , msg , code , warn ) !! version: experimental !! !! Checks the value of a logical condition !! ([Specification](../page/specs/stdlib_error.html#description)) !! !!##### Behavior !! !! If `condition == .false.` and: !! !! * No other arguments are provided, it stops the program with the default !! message and exit code `1`; !! * `msg` is provided, it prints the value of `msg`; !! * `code` is provided, it stops the program with the given exit code; !! * `warn` is provided and `.true.`, it doesn't stop the program and prints !! the message. !! !!##### Examples !! !!* If `a /= 5`, stops the program with exit code `1` !! and prints `Check failed.` !!``` fortran !! call check(a == 5) !!``` !! !!* As above, but prints `a == 5 failed`. !!``` fortran !! call check(a == 5, msg='a == 5 failed.') !!``` !! !!* As above, but doesn't stop the program. !!``` fortran !! call check(a == 5, msg='a == 5 failed.', warn=.true.) !!``` !! !!* As example #2, but stops the program with exit code `77` !!``` fortran !! call check(a == 5, msg='a == 5 failed.', code=77) !!``` ! ! Arguments ! --------- logical , intent ( in ) :: condition character ( * ), intent ( in ), optional :: msg integer , intent ( in ), optional :: code logical , intent ( in ), optional :: warn character ( * ), parameter :: msg_default = 'Check failed.' if (. not . condition ) then if ( optval ( warn , . false .)) then write ( stderr , * ) optval ( msg , msg_default ) else call error_stop ( optval ( msg , msg_default ), optval ( code , 1 )) end if end if end subroutine check end module stdlib_error","tags":"","loc":"sourcefile/stdlib_error.f90.html"},{"title":"stdlib_codata_type.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS = REAL_KINDS module stdlib_codata_type !! Codata constant type !! ([Specification](../page/specs/stdlib_constants.html)) use stdlib_kinds , only : #{ for k in KINDS [: - 1 ] }#${ k }$ , #{ endfor }#${ KINDS [ - 1 ] }$ use stdlib_io , only : FMT_REAL_DP use stdlib_optval , only : optval private type , public :: codata_constant_type !! version: experimental !! !! Derived type for representing a Codata constant. !! ([Specification](../page/specs/stdlib_constants.html)) character ( len = 64 ) :: name real ( dp ) :: value real ( dp ) :: uncertainty character ( len = 32 ) :: unit contains procedure :: print # : for k in KINDS procedure :: to_real_$ { k }$ # : endfor generic :: to_real => #{ for k in KINDS [: - 1 ] }# to_real_$ { k }$ , #{ endfor }# to_real_$ { KINDS [ - 1 ] }$ end type interface to_real !! Get the constant value or uncertainty. # : for k in KINDS module procedure to_real_$ { k }$ # : endfor end interface public :: to_real contains subroutine print ( self ) !! Print out the constant's name, value, uncertainty and unit. class ( codata_constant_type ), intent ( in ) :: self print \"(A64, SP, \" // FMT_REAL_DP // \", A5, \" // FMT_REAL_DP // \", 1X, A32)\" , self % name , self % value , \"+/-\" , self % uncertainty , self % unit end subroutine #:for k in KINDS elemental pure real ( ${ k }$ ) function to_real_$ { k }$ ( self , mold , uncertainty ) result ( r ) !! version: experimental !! !! Get the constant value or uncertainty for the kind ${k}$ !! ([Specification](../page/specs/stdlib_constants.html)) class ( codata_constant_type ), intent ( in ) :: self !! Codata constant real ( ${ k }$ ), intent ( in ) :: mold !! dummy argument to disambiguate at compile time the generic interface logical , intent ( in ), optional :: uncertainty !! Set to true if the uncertainty is required. Default to .false.. !! logical :: u u = optval ( uncertainty , . false .) if ( u . eqv . . false .) then r = real ( self % value , kind ( mold )) else r = real ( self % uncertainty , kind ( mold )) end if end function #:endfor end module stdlib_codata_type","tags":"","loc":"sourcefile/stdlib_codata_type.fypp.html"},{"title":"stdlib_hash_64bit.fypp – Fortran-lang/stdlib","text":"Source Code #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int8\", \"int16\", \"int32\", \"int64\"] module stdlib_hash_64bit use , intrinsic :: iso_fortran_env , only : & character_storage_size use stdlib_kinds , only : & dp , & int8 , & int16 , & int32 , & int64 implicit none private integer , parameter , public :: & int_hash = int64 !! The number of bits in the output hash ! The number of bits used by each integer type integer , parameter , public :: & ! Should be 8 bits_int8 = bit_size ( 0_int8 ), & ! Should be 16 bits_int16 = bit_size ( 0_int16 ), & ! Should be 32 bits_int32 = bit_size ( 0_int32 ), & ! Should be 64 bits_int64 = bit_size ( 0_int64 ) integer , parameter , public :: & ! Should be 1 bytes_int8 = bits_int8 / bits_int8 , & ! Should be 2 bytes_int16 = bits_int16 / bits_int8 , & ! Should be 4 bytes_int32 = bits_int32 / bits_int8 , & ! Should be 8 bytes_int64 = bits_int64 / bits_int8 integer , parameter , public :: & bits_char = character_storage_size , & bytes_char = bits_char / bits_int8 ! Dealing with different endians logical , parameter , public :: & little_endian = ( 1 == transfer ( [ 1_int8 , 0_int8 ], 0_int16 ) ) public :: & fibonacci_hash , & fnv_1_hash , & fnv_1a_hash , & new_pengy_hash_seed , & new_spooky_hash_seed , & odd_random_integer , & pengy_hash , & spooky_hash , & spookyhash_128 , & universal_mult_hash ! pow64_over_phi is the odd number that most closely approximates 2**64/phi, ! where phi is the golden ratio 1.618... integer ( int64 ), parameter :: & pow64_over_phi = int ( z '9E3779B97F4A7C15' , int64 ) integer ( int_hash ), parameter :: & two_32 = 2_int_hash ** 32 ! constants used by Bob Jenkins' SpookyHash integer ( int32 ), parameter :: & sc_numvars = 12 , & sc_blocksize = sc_numvars * 8 , & sc_buffsize = 2 * sc_blocksize , & sc_constsub = int ( z 'deadbeef' , int32 ) ! twos complement \"deadbeef\" integer ( int64 ), parameter :: & sc_const = transfer ( [ sc_constsub , sc_constsub ], 0_int64 ) type :: spooky_subhash integer ( int8 ) :: data ( 0 : 2 * sc_blocksize - 1 ) integer ( int64 ) :: state ( 0 : sc_numvars - 1 ) integer ( int64 ) :: length integer ( int16 ) :: remainder end type spooky_subhash interface fnv_1_hash !! Version: experimental !! !! FNV_1 interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#fnv_1-calculates-a-hash-code-from-a-key)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1 ( key ) result ( hash_code ) !! FNV_1 hash function for rank 1 arrays of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code end function ${ k1 }$_ fnv_1 # : endfor elemental module function character_fnv_1 ( key ) result ( hash_code ) !! FNV_1 hash function for character strings character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code end function character_fnv_1 end interface fnv_1_hash interface fnv_1a_hash !! Version: experimental !! !! FNV_1A interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#fnv_1a-calculates-a-hash-code-from-a-key)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1a ( key ) result ( hash_code ) !! FNV_1A hash function for rank 1 arrays of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code end function ${ k1 }$_ fnv_1a # : endfor elemental module function character_fnv_1a ( key ) result ( hash_code ) !! FNV_1A hash function for character strings character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code end function character_fnv_1a end interface fnv_1a_hash interface spooky_hash !! Version: experimental !! !! SPOOKY_HASH interfaces !!([Specification](../page/specs/stdlib_hash_procedures.html#spooky_hash-maps-a-character-string-or-integer-vector-to-an-integer)) # : for k1 in INT_KINDS module function ${ k1 }$_ spooky_hash ( key , seed ) & result ( hash_code ) !! SPOOKY HASH function for rank 1 arrays of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key ( 0 :) integer ( int_hash ), intent ( in ) :: seed ( 2 ) integer ( int_hash ) :: hash_code ( 2 ) end function ${ k1 }$_ spooky_hash # : endfor module function character_spooky_hash ( key , seed ) & result ( hash_code ) !! SPOOKY hash function for character strings character ( * ), intent ( in ) :: key integer ( int_hash ), intent ( in ) :: seed ( 2 ) integer ( int_hash ) :: hash_code ( 2 ) end function character_spooky_hash end interface spooky_hash interface module subroutine spookyHash_128 ( key , hash_inout ) !! Version: experimental !! integer ( int8 ), intent ( in ), target :: key ( 0 :) integer ( int_hash ), intent ( inout ) :: hash_inout ( 2 ) end subroutine spookyHash_128 end interface interface spooky_init !! Version: experimental !! pure module subroutine spookysubhash_init ( self , seed ) type ( spooky_subhash ), intent ( out ) :: self integer ( int_hash ), intent ( in ) :: seed ( 2 ) end subroutine spookysubhash_init end interface spooky_init interface spooky_update module subroutine spookyhash_update ( spooky , key ) !! Version: experimental !! type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int8 ), intent ( in ) :: key ( 0 :) end subroutine spookyhash_update end interface spooky_update interface spooky_final module subroutine spookyhash_final ( spooky , hash_code ) !! Version: experimental !! type ( spooky_subhash ), intent ( inout ) :: spooky integer ( int_hash ), intent ( inout ) :: hash_code ( 2 ) end subroutine spookyhash_final end interface spooky_final interface module subroutine new_spooky_hash_seed ( seed ) !! Version: experimental !! !! Random seed generator for SPOOKY_HASH integer ( int64 ), intent ( inout ) :: seed ( 2 ) end subroutine new_spooky_hash_seed end interface interface pengy_hash !! Version: experimental !! !! PENGY_HASH interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#pengy_hash-maps-a-character-string-or-integer-vector-to-an-integer)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ pengy_hash ( key , seed ) result ( hash_code ) !! PENGY_HASH hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code end function ${ k1 }$_ pengy_hash # : endfor elemental module function character_pengy_hash ( key , seed ) & result ( hash_code ) !! MIR HASH STRICT function for character strings character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: hash_code end function character_pengy_hash end interface pengy_hash interface module subroutine new_pengy_hash_seed ( seed ) !! Version: experimental !! !! Random seed generator for MIR_HASH_STRICT integer ( int32 ), intent ( inout ) :: seed end subroutine new_pengy_hash_seed end interface contains elemental function fibonacci_hash ( key , nbits ) result ( sample ) !! Version: experimental !! !! Maps the 64 bit integer `key` to an unsigned integer value with only `nbits` !! bits where `nbits` is less than 64 !! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * pow64_over_phi , - 64 + nbits ) end function fibonacci_hash elemental function universal_mult_hash ( key , seed , nbits ) result ( sample ) !! Version: experimental !! !! Uses the \"random\" odd 64 bit integer `seed` to map the 64 bit integer `key` to !! an unsigned integer value with only `nbits` bits where `nbits` is less than 64. !! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits_1)) integer ( int64 ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed integer , intent ( in ) :: nbits integer ( int64 ) :: sample sample = ishft ( key * seed , - 64 + nbits ) end function universal_mult_hash subroutine odd_random_integer ( harvest ) !! Version: experimental !! !! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over !! the odd integers of the 64 bit kind. !! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-odd-integer)) integer ( int64 ), intent ( out ) :: harvest real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , int32 ) harvest = transfer ( part , harvest ) harvest = ishft ( harvest , 1 ) + 1_int64 end subroutine odd_random_integer subroutine random_integer ( harvest ) !! Version: experimental !! !! Returns a 64 bit pseudo random integer, `harvest`, distributed uniformly over !! the values of the 64 bit kind. integer ( int64 ), intent ( out ) :: harvest real ( dp ) :: sample ( 2 ) integer ( int32 ) :: part ( 2 ) call random_number ( sample ) part = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , int32 ) harvest = transfer ( part , harvest ) end subroutine random_integer end module stdlib_hash_64bit","tags":"","loc":"sourcefile/stdlib_hash_64bit.fypp.html"},{"title":"stdlib_linalg_blas_c.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_c use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_caxpy public :: stdlib_ccopy public :: stdlib_cdotc public :: stdlib_cdotu public :: stdlib_cgbmv public :: stdlib_cgemm public :: stdlib_cgemv public :: stdlib_cgerc public :: stdlib_cgeru public :: stdlib_chbmv public :: stdlib_chemm public :: stdlib_chemv public :: stdlib_cher public :: stdlib_cher2 public :: stdlib_cher2k public :: stdlib_cherk public :: stdlib_chpmv public :: stdlib_chpr public :: stdlib_chpr2 public :: stdlib_crotg public :: stdlib_cscal public :: stdlib_csrot public :: stdlib_csscal public :: stdlib_cswap public :: stdlib_csymm public :: stdlib_csyr2k public :: stdlib_csyrk public :: stdlib_ctbmv public :: stdlib_ctbsv public :: stdlib_ctpmv public :: stdlib_ctpsv public :: stdlib_ctrmm public :: stdlib_ctrmv public :: stdlib_ctrsm public :: stdlib_ctrsv ! 32-bit real constants real ( sp ), parameter , private :: negone = - 1.00_sp real ( sp ), parameter , private :: zero = 0.00_sp real ( sp ), parameter , private :: half = 0.50_sp real ( sp ), parameter , private :: one = 1.00_sp real ( sp ), parameter , private :: two = 2.00_sp real ( sp ), parameter , private :: three = 3.00_sp real ( sp ), parameter , private :: four = 4.00_sp real ( sp ), parameter , private :: eight = 8.00_sp real ( sp ), parameter , private :: ten = 1 0.00_sp ! 32-bit complex constants complex ( sp ), parameter , private :: czero = ( 0.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: chalf = ( 0.5_sp , 0.0_sp ) complex ( sp ), parameter , private :: cone = ( 1.0_sp , 0.0_sp ) complex ( sp ), parameter , private :: cnegone = ( - 1.0_sp , 0.0_sp ) ! 32-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( sp ), parameter , private :: rradix = real ( radix ( zero ), sp ) real ( sp ), parameter , private :: ulp = epsilon ( zero ) real ( sp ), parameter , private :: eps = ulp * half real ( sp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( sp ), parameter , private :: safmax = one / safmin real ( sp ), parameter , private :: smlnum = safmin / ulp real ( sp ), parameter , private :: bignum = safmax * ulp real ( sp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( sp ), parameter , private :: rtmax = sqrt ( bignum ) ! 32-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( sp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( sp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( sp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( sp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure subroutine stdlib_caxpy ( n , ca , cx , incx , cy , incy ) !! CAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( inout ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_scabs1 ( ca ) == 0.0e+0_sp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cy ( i ) + ca * cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cy ( iy ) + ca * cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_caxpy pure subroutine stdlib_ccopy ( n , cx , incx , cy , incy ) !! CCOPY copies a vector x to a vector y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ) complex ( sp ), intent ( out ) :: cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n cy ( i ) = cx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n cy ( iy ) = cx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_ccopy pure complex ( sp ) function stdlib_cdotc ( n , cx , incx , cy , incy ) !! CDOTC forms the dot product of two complex vectors !! CDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotc = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( i )) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + conjg ( cx ( ix )) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotc = ctemp return end function stdlib_cdotc pure complex ( sp ) function stdlib_cdotu ( n , cx , incx , cy , incy ) !! CDOTU forms the dot product of two complex vectors !! CDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( in ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy ctemp = ( 0.0_sp , 0.0_sp ) stdlib_cdotu = ( 0.0_sp , 0.0_sp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = ctemp + cx ( i ) * cy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = ctemp + cx ( ix ) * cy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_cdotu = ctemp return end function stdlib_cdotu pure subroutine stdlib_cgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! CGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_cgbmv pure subroutine stdlib_cgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cgemm pure subroutine stdlib_cgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! CGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_cgemv pure subroutine stdlib_cgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgerc pure subroutine stdlib_cgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! CGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_cgeru pure subroutine stdlib_chbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! CHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: conjg , max , min , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = sp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chbmv pure subroutine stdlib_chemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = sp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = sp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = sp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_chemm pure subroutine stdlib_chemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! CHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = sp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_chemv pure subroutine stdlib_cher ( uplo , n , alpha , x , incx , a , lda ) !! CHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_cher pure subroutine stdlib_cher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! CHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: a ( lda , * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: conjg , max , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = sp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_cher2 pure subroutine stdlib_cher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha real ( sp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max , real ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == real ( czero , KIND = sp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = sp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = sp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = sp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = sp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = sp ) end if else if ( beta == real ( czero , KIND = sp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_cher2k pure subroutine stdlib_cherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: cmplx , conjg , max , real ! Local Scalars complex ( sp ) :: temp real ( sp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( i , l ), KIND = sp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = sp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = sp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = sp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = sp ) + real ( temp * a ( j , l ), KIND = sp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = sp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_cherk pure subroutine stdlib_chpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! CHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ), x ( * ) complex ( sp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = sp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = sp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_chpmv pure subroutine stdlib_chpr ( uplo , n , alpha , x , incx , ap ) !! CHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = sp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp , KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( j ), KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( temp * x ( jx ), KIND = sp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr pure subroutine stdlib_chpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! CHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( sp ), intent ( inout ) :: ap ( * ) complex ( sp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: conjg , real ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = sp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = sp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = sp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = sp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = sp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_chpr2 pure subroutine stdlib_crotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in SROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by SROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._sp ) ! Scaling Constants ! Scalar Arguments real ( sp ), intent ( out ) :: c complex ( sp ), intent ( inout ) :: a complex ( sp ), intent ( in ) :: b complex ( sp ), intent ( out ) :: s ! Local Scalars real ( sp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( sp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( sp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = sp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = sp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = sp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_crotg pure subroutine stdlib_cscal ( n , ca , cx , incx ) !! CSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: ca integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = ca * cx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = ca * cx ( i ) end do end if return end subroutine stdlib_cscal pure subroutine stdlib_csrot ( n , cx , incx , cy , incy , c , s ) !! CSROT applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( sp ), intent ( in ) :: c , s ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( sp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * cx ( i ) + s * cy ( i ) cy ( i ) = c * cy ( i ) - s * cx ( i ) cx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * cx ( ix ) + s * cy ( iy ) cy ( iy ) = c * cy ( iy ) - s * cx ( ix ) cx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_csrot pure subroutine stdlib_csscal ( n , sa , cx , incx ) !! CSSCAL scales a complex vector by a real constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( sp ), intent ( in ) :: sa integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: aimag , cmplx , real if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx cx ( i ) = cmplx ( sa * real ( cx ( i ), KIND = sp ), sa * aimag ( cx ( i )), KIND = sp ) end do end if return end subroutine stdlib_csscal pure subroutine stdlib_cswap ( n , cx , incx , cy , incy ) !! CSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( sp ), intent ( inout ) :: cx ( * ), cy ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: ctemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = cx ( i ) cx ( i ) = cy ( i ) cy ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = cx ( ix ) cx ( ix ) = cy ( iy ) cy ( iy ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_cswap pure subroutine stdlib_csymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_csymm pure subroutine stdlib_csyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! CSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_csyr2k pure subroutine stdlib_csyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! CSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_csyrk pure subroutine stdlib_ctbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctbmv pure subroutine stdlib_ctbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! CTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ctbsv pure subroutine stdlib_ctpmv ( uplo , trans , diag , n , ap , x , incx ) !! CTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpmv pure subroutine stdlib_ctpsv ( uplo , trans , diag , n , ap , x , incx ) !! CTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: ap ( * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ctpsv pure subroutine stdlib_ctrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ctrmm pure subroutine stdlib_ctrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ctrmv pure subroutine stdlib_ctrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! CTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( sp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ctrsm pure subroutine stdlib_ctrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! CTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( sp ), intent ( in ) :: a ( lda , * ) complex ( sp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( sp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'CTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ctrsv end module stdlib_linalg_blas_c","tags":"","loc":"sourcefile/stdlib_linalg_blas_c.fypp.html"},{"title":"stdlib_sorting_sort_index.fypp – Fortran-lang/stdlib","text":"This file is subjec† both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The generic subroutine, SORT_INDEX , is substantially a translation to\nFortran 2008 of the \"Rust\" sort sorting routines in slice.rs The rust sort implementation is distributed with the header: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\n file at the top-level directory of this distribution and at\n http://rust-lang.org/COPYRIGHT. Licensed under the Apache License, Version 2.0 or the MIT license , at your\n option. This file may not be copied, modified, or distributed\n except according to those terms. so the license for the original slice.rs code is compatible with the use\nof modified versions of the code in the Fortran Standard Library under\nthe MIT license. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=:)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #:set INT_INDEX_TYPES_ALT_NAME = list(zip([\"int_index\", \"int_index_low\"], [\"integer(int_index)\", \"integer(int_index_low)\"], [\"default\", \"low\"])) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME !! Licensing: !! !! This file is subjec† both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! The generic subroutine, `SORT_INDEX`, is substantially a translation to !! Fortran 2008 of the `\"Rust\" sort` sorting routines in !! [`slice.rs`](https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs) !! The `rust sort` implementation is distributed with the header: !! !! Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT !! file at the top-level directory of this distribution and at !! http://rust-lang.org/COPYRIGHT. !! !! Licensed under the Apache License, Version 2.0 or the MIT license !! , at your !! option. This file may not be copied, modified, or distributed !! except according to those terms. !! !! so the license for the original`slice.rs` code is compatible with the use !! of modified versions of the code in the Fortran Standard Library under !! the MIT license. submodule ( stdlib_sorting ) stdlib_sorting_sort_index implicit none contains #:for ki, ti, namei in INT_INDEX_TYPES_ALT_NAME # : for t1 , t2 , t3 , name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ sort_index_$ { namei }$ ( array , index , work , iwork , reverse ) ! A modification of `${name1}$_ord_sort` to return an array of indices that ! would perform a stable sort of the `ARRAY` as input, and also sort `ARRAY` ! as desired. The indices by default ! correspond to a non-decreasing sort, but if the optional argument ! `REVERSE` is present with a value of `.TRUE.` the indices correspond to ! a non-increasing sort. The logic of the determination of indexing largely ! follows the `\"Rust\" sort` found in `slice.rs`: ! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159 ! The Rust version is a simplification of the Timsort algorithm described ! in https://svn.python.org/projects/python/trunk/Objects/listsort.txt, as ! it drops both the use of 'galloping' to identify bounds of regions to be ! sorted and the estimation of the optimal `run size`. However it remains ! a hybrid sorting algorithm combining an iterative Merge sort controlled ! by a stack of `RUNS` identified by regions of uniformly decreasing or ! non-decreasing sequences that may be expanded to a minimum run size, with ! an insertion sort. ! ! Note the Fortran implementation simplifies the logic as it only has to ! deal with Fortran arrays of intrinsic types and not the full generality ! of Rust's arrays and lists for arbitrary types. It also adds the ! estimation of the optimal `run size` as suggested in Tim Peters' ! original listsort.txt, and the optional `work` and `iwork` arrays to be ! used as scratch memory. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( out ) :: index ( 0 :) ${ t3 }$ , intent ( out ), optional :: work ( 0 :) ${ ti }$ , intent ( out ), optional :: iwork ( 0 :) logical , intent ( in ), optional :: reverse ${ ti }$ :: array_size , i , stat ${ t2 }$ , allocatable :: buf (:) ${ ti }$ , allocatable :: ibuf (:) if ( size ( array , kind = int_index ) > huge ( 1 _${ ki }$ ) ) then error stop \"Too many entries for the kind of index.\" end if array_size = size ( array , kind = ${ ki }$ ) if ( size ( index , kind = ${ ki }$ ) < array_size ) then error stop \"index array is too small.\" end if do i = 0 , array_size - 1 index ( i ) = i + 1 end do if ( optval ( reverse , . false .) ) then call reverse_segment ( array , index ) end if ! If necessary allocate buffers to serve as scratch memory. if ( present ( work ) ) then if ( size ( work , kind = ${ ki }$ ) < array_size / 2 ) then error stop \"work array is too small.\" end if if ( present ( iwork ) ) then if ( size ( iwork , kind = ${ ki }$ ) < array_size / 2 ) then error stop \"iwork array is too small.\" endif call merge_sort ( array , index , work , iwork ) else allocate ( ibuf ( 0 : array_size / 2 - 1 ), stat = stat ) if ( stat /= 0 ) error stop \"Allocation of index buffer failed.\" call merge_sort ( array , index , work , ibuf ) end if else # : if t1 [ 0 : 4 ] == \"char\" allocate ( ${ t3 }$ :: buf ( 0 : array_size / 2 - 1 ), & stat = stat ) # : else allocate ( buf ( 0 : array_size / 2 - 1 ), stat = stat ) # : endif if ( stat /= 0 ) error stop \"Allocation of array buffer failed.\" if ( present ( iwork ) ) then if ( size ( iwork , kind = ${ ki }$ ) < array_size / 2 ) then error stop \"iwork array is too small.\" endif call merge_sort ( array , index , buf , iwork ) else allocate ( ibuf ( 0 : array_size / 2 - 1 ), stat = stat ) if ( stat /= 0 ) error stop \"Allocation of index buffer failed.\" call merge_sort ( array , index , buf , ibuf ) end if end if if ( optval ( reverse , . false .) ) then call reverse_segment ( array , index ) end if contains pure function calc_min_run ( n ) result ( min_run ) !! Returns the minimum length of a run from 32-63 so that N/MIN_RUN is !! less than or equal to a power of two. See !! https://svn.python.org/projects/python/trunk/Objects/listsort.txt ${ ti }$ :: min_run ${ ti }$ , intent ( in ) :: n ${ ti }$ :: num , r num = n r = 0 _${ ki }$ do while ( num >= 64 ) r = ior ( r , iand ( num , 1 _${ ki }$ ) ) num = ishft ( num , - 1 _${ ki }$ ) end do min_run = num + r end function calc_min_run pure subroutine insertion_sort ( array , index ) ! Sorts `ARRAY` using an insertion sort, while maintaining consistency in ! location of the indices in `INDEX` to the elements of `ARRAY`. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ ti }$ :: i , j , key_index ${ t3 }$ :: key do j = 1 , size ( array , kind = ${ ki }$ ) - 1 key = array ( j ) key_index = index ( j ) i = j - 1 do while ( i >= 0 ) if ( array ( i ) <= key ) exit array ( i + 1 ) = array ( i ) index ( i + 1 ) = index ( i ) i = i - 1 end do array ( i + 1 ) = key index ( i + 1 ) = key_index end do end subroutine insertion_sort pure function collapse ( runs ) result ( r ) ! Examine the stack of runs waiting to be merged, identifying adjacent runs ! to be merged until the stack invariants are restablished: ! ! 1. len(-3) > len(-2) + len(-1) ! 2. len(-2) > len(-1) ${ ti }$ :: r type ( run_type_$ { namei }$ ), intent ( in ), target :: runs ( 0 :) ${ ti }$ :: n logical :: test n = size ( runs , kind = ${ ki }$ ) test = . false . if ( n >= 2 ) then if ( runs ( n - 1 ) % base == 0 . or . & runs ( n - 2 ) % len <= runs ( n - 1 ) % len ) then test = . true . else if ( n >= 3 ) then ! X exists if ( runs ( n - 3 ) % len <= & runs ( n - 2 ) % len + runs ( n - 1 ) % len ) then test = . true . ! |X| <= |Y| + |Z| => will need to merge due to rho1 or rho2 else if ( n >= 4 ) then if ( runs ( n - 4 ) % len <= & runs ( n - 3 ) % len + runs ( n - 2 ) % len ) then test = . true . ! |W| <= |X| + |Y| => will need to merge due to rho1 or rho3 end if end if end if end if if ( test ) then ! By default merge Y & Z, rho2 or rho3 if ( n >= 3 ) then if ( runs ( n - 3 ) % len < runs ( n - 1 ) % len ) then r = n - 3 ! |X| < |Z| => merge X & Y, rho1 return end if end if r = n - 2 ! |Y| <= |Z| => merge Y & Z, rho4 return else r = - 1 end if end function collapse pure subroutine insert_head ( array , index ) ! Inserts `array(0)` into the pre-sorted sequence `array(1:)` so that the ! whole `array(0:)` becomes sorted, copying the first element into ! a temporary variable, iterating until the right place for it is found. ! copying every traversed element into the slot preceding it, and finally, ! copying data from the temporary variable into the resulting hole. ! Consistency of the indices in `index` with the elements of `array` ! are maintained. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ t3 }$ :: tmp ${ ti }$ :: i , tmp_index tmp = array ( 0 ) tmp_index = index ( 0 ) find_hole : do i = 1 , size ( array , kind = ${ ki }$ ) - 1 if ( array ( i ) >= tmp ) exit find_hole array ( i - 1 ) = array ( i ) index ( i - 1 ) = index ( i ) end do find_hole array ( i - 1 ) = tmp index ( i - 1 ) = tmp_index end subroutine insert_head subroutine merge_sort ( array , index , buf , ibuf ) ! The Rust merge sort borrows some (but not all) of the ideas from TimSort, ! which is described in detail at ! (http://svn.python.org/projects/python/trunk/Objects/listsort.txt). ! ! The algorithm identifies strictly descending and non-descending ! subsequences, which are called natural runs. Where these runs are less ! than a minimum run size they are padded by adding additional samples ! using an insertion sort. The merge process is driven by a stack of ! pending unmerged runs. Each newly found run is pushed onto the stack, ! and then pairs of adjacentd runs are merged until these two invariants ! are satisfied: ! ! 1. for every `i` in `1..size(runs)-1`: `runs(i - 1)%len > runs(i)%len` ! 2. for every `i` in `2..size(runs)-1`: `runs(i - 2)%len > ! runs(i - 1)%len + runs(i)%len` ! ! The invariants ensure that the total running time is `O(n log n)` ! worst-case. Consistency of the indices in `index` with the elements of ! `array` are maintained. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ t3 }$ , intent ( inout ) :: buf ( 0 :) ${ ti }$ , intent ( inout ) :: ibuf ( 0 :) ${ ti }$ :: array_size , finish , min_run , r , r_count , & start type ( run_type_$ { namei }$ ) :: runs ( 0 : max_merge_stack - 1 ), left , right array_size = size ( array , kind = ${ ki }$ ) ! Very short runs are extended using insertion sort to span at least this ! many elements. Slices of up to this length are sorted using insertion sort. min_run = calc_min_run ( array_size ) if ( array_size <= min_run ) then if ( array_size >= 2 ) call insertion_sort ( array , index ) return end if ! Following Rust sort, natural runs in `array` are identified by traversing ! it backwards. By traversing it backward, merges more often go in the ! opposite direction (forwards). According to developers of Rust sort, ! merging forwards is slightly faster than merging backwards. Therefore ! identifying runs by traversing backwards should improve performance. r_count = 0 finish = array_size - 1 do while ( finish >= 0 ) ! Find the next natural run, and reverse it if it's strictly descending. start = finish if ( start > 0 ) then start = start - 1 if ( array ( start + 1 ) < array ( start ) ) then Descending : do while ( start > 0 ) if ( array ( start ) >= array ( start - 1 ) ) & exit Descending start = start - 1 end do Descending call reverse_segment ( array ( start : finish ), & index ( start : finish ) ) else Ascending : do while ( start > 0 ) if ( array ( start ) < array ( start - 1 ) ) exit Ascending start = start - 1 end do Ascending end if end if ! If the run is too short insert some more elements using an insertion sort. Insert : do while ( start > 0 ) if ( finish - start >= min_run - 1 ) exit Insert start = start - 1 call insert_head ( array ( start : finish ), index ( start : finish ) ) end do Insert if ( start == 0 . and . finish == array_size - 1 ) return runs ( r_count ) = run_type_$ { namei }$ ( base = start , & len = finish - start + 1 ) finish = start - 1 r_count = r_count + 1 ! Determine whether pairs of adjacent runs need to be merged to satisfy ! the invariants, and, if so, merge them. Merge_loop : do r = collapse ( runs ( 0 : r_count - 1 ) ) if ( r < 0 . or . r_count <= 1 ) exit Merge_loop left = runs ( r + 1 ) right = runs ( r ) call merge ( array ( left % base : & right % base + right % len - 1 ), & left % len , buf , & index ( left % base : & right % base + right % len - 1 ), ibuf ) runs ( r ) = run_type_$ { namei }$ ( base = left % base , & len = left % len + right % len ) if ( r == r_count - 3 ) runs ( r + 1 ) = runs ( r + 2 ) r_count = r_count - 1 end do Merge_loop end do if ( r_count /= 1 ) & error stop \"MERGE_SORT completed without RUN COUNT == 1.\" end subroutine merge_sort pure subroutine merge ( array , mid , buf , index , ibuf ) ! Merges the two non-decreasing runs `ARRAY(0:MID-1)` and `ARRAY(MID:)` ! using `BUF` as temporary storage, and stores the merged runs into ! `ARRAY(0:)`. `MID` must be > 0, and < `SIZE(ARRAY)-1`. Buffer `BUF` ! must be long enough to hold the shorter of the two runs. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( in ) :: mid ${ t3 }$ , intent ( inout ) :: buf ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ ti }$ , intent ( inout ) :: ibuf ( 0 :) ${ ti }$ :: array_len , i , j , k array_len = size ( array , kind = ${ ki }$ ) ! Merge first copies the shorter run into `buf`. Then, depending on which ! run was shorter, it traces the copied run and the longer run forwards ! (or backwards), comparing their next unprocessed elements and then ! copying the lesser (or greater) one into `array`. if ( mid <= array_len - mid ) then ! The left run is shorter. buf ( 0 : mid - 1 ) = array ( 0 : mid - 1 ) ibuf ( 0 : mid - 1 ) = index ( 0 : mid - 1 ) i = 0 j = mid merge_lower : do k = 0 , array_len - 1 if ( buf ( i ) <= array ( j ) ) then array ( k ) = buf ( i ) index ( k ) = ibuf ( i ) i = i + 1 if ( i >= mid ) exit merge_lower else array ( k ) = array ( j ) index ( k ) = index ( j ) j = j + 1 if ( j >= array_len ) then array ( k + 1 :) = buf ( i : mid - 1 ) index ( k + 1 :) = ibuf ( i : mid - 1 ) exit merge_lower end if end if end do merge_lower else ! The right run is shorter buf ( 0 : array_len - mid - 1 ) = array ( mid : array_len - 1 ) ibuf ( 0 : array_len - mid - 1 ) = index ( mid : array_len - 1 ) i = mid - 1 j = array_len - mid - 1 merge_upper : do k = array_len - 1 , 0 , - 1 if ( buf ( j ) >= array ( i ) ) then array ( k ) = buf ( j ) index ( k ) = ibuf ( j ) j = j - 1 if ( j < 0 ) exit merge_upper else array ( k ) = array ( i ) index ( k ) = index ( i ) i = i - 1 if ( i < 0 ) then array ( 0 : k - 1 ) = buf ( 0 : j ) index ( 0 : k - 1 ) = ibuf ( 0 : j ) exit merge_upper end if end if end do merge_upper end if end subroutine merge pure subroutine reverse_segment ( array , index ) ! Reverse a segment of an array in place ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( inout ) :: index ( 0 :) ${ ti }$ :: itemp , lo , hi ${ t3 }$ :: temp lo = 0 hi = size ( array , kind = ${ ki }$ ) - 1 do while ( lo < hi ) temp = array ( lo ) array ( lo ) = array ( hi ) array ( hi ) = temp itemp = index ( lo ) index ( lo ) = index ( hi ) index ( hi ) = itemp lo = lo + 1 hi = hi - 1 end do end subroutine reverse_segment end subroutine ${ name1 }$_ sort_index_$ { namei }$ # : endfor #:endfor end submodule stdlib_sorting_sort_index","tags":"","loc":"sourcefile/stdlib_sorting_sort_index.fypp.html"},{"title":"stdlib_hash_32bit.fypp – Fortran-lang/stdlib","text":"Source Code #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int8\", \"int16\", \"int32\", \"int64\"] module stdlib_hash_32bit use , intrinsic :: iso_fortran_env , only : & character_storage_size use stdlib_kinds , only : & dp , & int8 , & int16 , & int32 , & int64 implicit none private integer , parameter , public :: & int_hash = int32 !! The number of bits in the output hash ! pow32_over_phi is the odd integer that most closely approximates 2**32/phi, ! where phi is the golden ratio 1.618... integer ( int32 ), parameter :: & pow32_over_phi = int ( z '9E3779B9' , int32 ) ! The number of bits used by each integer type integer , parameter :: & ! Should be 8 bits_int8 = bit_size ( 0_int8 ), & ! Should be 16 bits_int16 = bit_size ( 0_int16 ), & ! Should be 32 bits_int32 = bit_size ( 0_int32 ), & ! Should be 64 bits_int64 = bit_size ( 0_int64 ) integer , parameter :: & ! Should be 1 bytes_int8 = bits_int8 / bits_int8 , & ! Should be 2 bytes_int16 = bits_int16 / bits_int8 , & ! Should be 4 bytes_int32 = bits_int32 / bits_int8 , & ! Should be 8 bytes_int64 = bits_int64 / bits_int8 integer , parameter :: & bits_char = character_storage_size , & bytes_char = bits_char / bits_int8 ! Dealing with different endians logical , parameter , public :: & little_endian = ( 1 == transfer ([ 1_int8 , 0_int8 ], 0_int16 ) ) public :: & fibonacci_hash , & fnv_1_hash , & fnv_1a_hash , & new_nmhash32_seed , & new_nmhash32x_seed , & new_water_hash_seed ,& nmhash32 , & nmhash32x , & odd_random_integer , & universal_mult_hash ,& water_hash interface fnv_1_hash !! Version: experimental !! !! FNV_1 interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#fnv_1_hash-calculates-a-hash-code-from-a-key)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1 ( key ) result ( hash_code ) !! FNV_1 hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code end function ${ k1 }$_ fnv_1 # : endfor elemental module function character_fnv_1 ( key ) result ( hash_code ) !! FNV_1 hash function for default character string keys character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code end function character_fnv_1 end interface fnv_1_hash interface fnv_1a_hash !! Version: experimental !! !! FNV_1A interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#fnv_1a_hash-calculates-a-hash-code-from-a-key)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1a ( key ) result ( hash_value ) !! FNV_1A hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_value end function ${ k1 }$_ fnv_1a # : endfor elemental module function character_fnv_1a ( key ) result ( hash_value ) !! FNV_1A hash function for default character string keys character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_value end function character_fnv_1a end interface fnv_1a_hash interface nmhash32 !! Version: experimental !! !! NMHASH32 interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#nmhash32-calculates-a-hash-code-from-a-key-and-a-seed)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ nmhash32 ( key , seed ) & result ( hash_value ) !! NMHASH32 hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_value end function ${ k1 }$_ nmhash32 # : endfor elemental module function character_nmhash32 ( key , seed ) & result ( hash_value ) !! NMHASH32 hash function for default character string keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_value end function character_nmhash32 end interface nmhash32 interface nmhash32x !! Version: experimental !! !! NMHASH32X interfaces !! ([Specification](file:///home/jvandenp/stdlib/API-doc/page/specs/stdlib_hash_procedures.html#nmhash32x-calculates-a-hash-code-from-a-key-and-a-seed)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ nmhash32x ( key , seed ) & result ( hash_value ) !! NMHASH32 hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_value end function ${ k1 }$_ nmhash32x # : endfor elemental module function character_nmhash32x ( key , seed ) & result ( hash_value ) !! NMHASH32 hash function for default character string keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_value end function character_nmhash32x end interface nmhash32x interface water_hash !! Version: experimental !! !! WATER_HASH interfaces !! ([Specification](../page/specs/stdlib_hash_procedures.html#water_hash-calculates-a-hash-code-from-a-key-and-a-seed)) # : for k1 in INT_KINDS pure module function ${ k1 }$_ water_hash ( key , seed ) & result ( hash_code ) !! WATER HASH function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key ( 0 :) integer ( int64 ), intent ( in ) :: seed integer ( int_hash ) :: hash_code end function ${ k1 }$_ water_hash # : endfor elemental module function character_water_hash ( key , seed ) & result ( hash_code ) !! WATER hash function for default character string keys character ( * ), intent ( in ) :: key integer ( int64 ), intent ( in ) :: seed integer ( int_hash ) :: hash_code end function character_water_hash end interface water_hash interface new_water_hash_seed !! Version: experimental !! !! ([Specification](file:///home/jvandenp/stdlib/API-doc/page/specs/stdlib_hash_procedures.html#new_water_hash_seed-returns-a-valid-input-seed-for-water_hash)) module subroutine new_water_hash_seed ( seed ) integer ( int64 ), intent ( inout ) :: seed end subroutine new_water_hash_seed end interface new_water_hash_seed interface new_nmhash32_seed !! Version: experimental !! !! ([Specification](../page/specs/stdlib_hash_procedures.html#new_nmhash32_seed-returns-a-valid-input-seed-for-nmhash32) module subroutine new_nmhash32_seed ( seed ) integer ( int32 ), intent ( inout ) :: seed end subroutine new_nmhash32_seed end interface new_nmhash32_seed interface new_nmhash32x_seed !! Version: experimental !! !! ([Specification](../page/specs/stdlib_hash_procedures.html#new_nmhash32x_seed-returns-a-valid-input-seed-for-nmhash32x)) module subroutine new_nmhash32x_seed ( seed ) integer ( int32 ), intent ( inout ) :: seed end subroutine new_nmhash32x_seed end interface new_nmhash32x_seed contains elemental function fibonacci_hash ( key , nbits ) result ( sample ) !! Version: experimental !! !! Maps the 32 bit integer `key` to an unsigned integer value with only `nbits` !! bits where `nbits` is less than 32 !! ([Specification](../page/specs/stdlib_hash_procedures.html#fibonacci_hash-maps-an-integer-to-a-smaller-number-of-bits)) integer ( int32 ), intent ( in ) :: key integer , intent ( in ) :: nbits integer ( int32 ) :: sample sample = ishft ( key * pow32_over_phi , - 32 + nbits ) end function fibonacci_hash elemental function universal_mult_hash ( key , seed , nbits ) result ( sample ) !! Version: experimental !! !! Uses the \"random\" odd 32 bit integer `seed` to map the 32 bit integer `key` to !! an unsigned integer value with only `nbits` bits where `nbits` is less than 32 !! ([Specification](../page/specs/stdlib_hash_procedures.html#universal_mult_hash-maps-an-integer-to-a-smaller-number-of-bits)) integer ( int32 ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer , intent ( in ) :: nbits integer ( int32 ) :: sample sample = ishft ( key * seed , - 32 + nbits ) end function universal_mult_hash subroutine odd_random_integer ( harvest ) !! Version: experimental !! !! Returns a 32 bit pseudo random integer, `harvest`, distributed uniformly over !! the odd integers of the `int32` kind. !! ([Specification](../page/specs/stdlib_hash_procedures.html#odd_random_integer-returns-an-odd-integer)) integer ( int32 ), intent ( out ) :: harvest real ( dp ) :: sample call random_number ( sample ) harvest = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) harvest = ishft ( harvest , 1 ) + 1_int32 end subroutine odd_random_integer end module stdlib_hash_32bit","tags":"","loc":"sourcefile/stdlib_hash_32bit.fypp.html"},{"title":"stdlib_bitsets_large.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_bitsets ) stdlib_bitsets_large implicit none contains elemental module function all_large ( self ) result ( all ) ! Returns .TRUE. if all bits in SELF are 1, .FALSE. otherwise. logical :: all class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: block , full_blocks , pos all = . true . full_blocks = bits ( self ) / block_size do block = 1_bits_kind , full_blocks if ( self % blocks ( block ) /= - 1_block_kind ) then all = . false . return end if end do if ( full_blocks == size ( self % blocks ) ) return do pos = 0_bits_kind , modulo ( bits ( self ), block_size ) - 1 if ( . not . btest ( self % blocks ( full_blocks + 1 ), pos ) ) then all = . false . return end if end do end function all_large elemental module subroutine and_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise AND of the original bits in SET1 ! and SET2. It is required that SET1 have the same number of bits as ! SET2 otherwise the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = iand ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) end do end subroutine and_large elemental module subroutine and_not_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise and of the original bits in SET1 ! with the bitwise negation of SET2. SET1 and SET2 must have the same ! number of bits otherwise the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = & iand ( set1 % blocks ( block_ ), not ( set2 % blocks ( block_ ) ) ) end do end subroutine and_not_large elemental module function any_large ( self ) result ( any ) ! Returns .TRUE. if any bit in SELF is 1, .FALSE. otherwise. logical :: any class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( self % blocks , kind = bits_kind ) if ( self % blocks ( block_ ) /= 0 ) then any = . true . return end if end do any = . false . end function any_large # : for k1 in INT_KINDS pure module subroutine assign_log$ { k1 }$_ large ( self , logical_vector ) ! Used to define assignment from an array of type logical for bitset_large type ( bitset_large ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) integer ( bits_kind ) :: blocks integer ( bits_kind ) :: log_size integer ( bits_kind ) :: index log_size = size ( logical_vector , kind = bits_kind ) self % num_bits = log_size if ( log_size == 0 ) then blocks = 0 else blocks = ( log_size - 1 ) / block_size + 1 end if allocate ( self % blocks ( blocks ) ) self % blocks (:) = 0 do index = 0_bits_kind , log_size - 1 if ( logical_vector ( index + 1 ) ) then call self % set ( index ) end if end do end subroutine assign_log$ { k1 }$_ large pure module subroutine log ${ k1 }$_ assign_large ( logical_vector , set ) ! Used to define assignment to an array of type logical for bitset_large logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_large ), intent ( in ) :: set integer ( bits_kind ) :: index allocate ( logical_vector ( set % num_bits ) ) do index = 0_bits_kind , set % num_bits - 1 if ( set % value ( index ) == 1 ) then logical_vector ( index + 1 ) = . true . else logical_vector ( index + 1 ) = . false . end if end do end subroutine log ${ k1 }$_ assign_large # : endfor elemental module function bit_count_large ( self ) result ( bit_count ) ! Returns the number of non-zero bits in SELF. integer ( bits_kind ) :: bit_count class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: nblocks , pos nblocks = size ( self % blocks , kind = bits_kind ) bit_count = sum ( popcnt ( self % blocks ( 1 : nblocks - 1 ) ) ) do pos = 0_bits_kind , self % num_bits - ( nblocks - 1 ) * block_size - 1 if ( btest ( self % blocks ( nblocks ), pos ) ) bit_count = bit_count + 1 end do end function bit_count_large elemental module subroutine clear_bit_large ( self , pos ) ! ! Sets to zero the POS position in SELF. If POS is less than zero or ! greater than BITS(SELF)-1 it is ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer :: clear_block , block_bit if ( pos < 0 . OR . ( pos > self % num_bits - 1 ) ) return clear_block = pos / block_size + 1 block_bit = pos - ( clear_block - 1 ) * block_size self % blocks ( clear_block ) = & ibclr ( self % blocks ( clear_block ), block_bit ) end subroutine clear_bit_large pure module subroutine clear_range_large ( self , start_pos , stop_pos ) ! ! Sets to zero all bits from the START_POS to STOP_POS positions in SELF. ! If STOP_POS < START_POS then no bits are modified. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: bit , block_ , first_block , last_block , & true_first , true_last true_first = max ( 0_bits_kind , start_pos ) true_last = min ( self % num_bits - 1 , stop_pos ) if ( true_last < true_first ) return first_block = true_first / block_size + 1 last_block = true_last / block_size + 1 if ( first_block == last_block ) then ! TRUE_FIRST and TRUE_LAST are in the same block call mvbits ( all_zeros , & true_first - ( first_block - 1 ) * block_size , & true_last - true_first + 1 , & self % blocks ( first_block ), & true_first - ( first_block - 1 ) * block_size ) return end if ! Do \"partial\" black containing FIRST bit = true_first - ( first_block - 1 ) * block_size call mvbits ( all_zeros , & bit , & block_size - bit , & self % blocks ( first_block ), & bit ) ! Do \"partial\" black containing LAST bit = true_last - ( last_block - 1 ) * block_size call mvbits ( all_zeros , & 0 , & bit + 1 , & self % blocks ( last_block ), & 0 ) ! Do intermediate blocks do block_ = first_block + 1 , last_block - 1 self % blocks ( block_ ) = all_zeros end do end subroutine clear_range_large elemental module function eqv_large ( set1 , set2 ) result ( eqv ) ! ! Returns .TRUE. if all bits in SET1 and SET2 have the same value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: eqv type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block , common_blocks eqv = . false . common_blocks = size ( set1 % blocks , kind = bits_kind ) do block = 1 , common_blocks if ( set1 % blocks ( block ) /= set2 % blocks ( block ) ) return end do eqv = . true . end function eqv_large module subroutine extract_large ( new , old , start_pos , stop_pos , status ) ! Creates a new bitset, NEW, from a range, START_POS to STOP_POS, in bitset ! OLD. If START_POS is greater than STOP_POS the new bitset is empty. ! If START_POS is less than zero or STOP_POS is greater than BITS(OLD)-1 ! then if STATUS is present it has the value INDEX_INVALID_ERROR, ! otherwise processing stops with an informative message. type ( bitset_large ), intent ( out ) :: new type ( bitset_large ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits , blocks , ex_block , i , j , k , old_block character ( * ), parameter :: procedure = 'EXTRACT' if ( start_pos < 0 ) then call error_handler ( 'had a START_POS less than 0.' , & index_invalid_error , status , & module_name , procedure ) return end if if ( stop_pos >= old % num_bits ) then call error_handler ( 'had a STOP_POS greater than BITS(OLD)-1.' , & index_invalid_error , status , & module_name , procedure ) return end if bits = stop_pos - start_pos + 1 if ( bits <= 0 ) then new % num_bits = 0 allocate ( new % blocks ( 0 ) ) return end if blocks = (( bits - 1 ) / block_size ) + 1 new % num_bits = bits allocate ( new % blocks ( blocks ) ) new % blocks (:) = 0 do i = 0_bits_kind , bits - 1 ex_block = i / block_size + 1 j = i - ( ex_block - 1 ) * block_size old_block = ( start_pos + i ) / block_size + 1 k = ( start_pos + i ) - ( old_block - 1 ) * block_size if ( btest ( old % blocks ( old_block ), k ) ) then new % blocks ( ex_block ) = ibset ( new % blocks ( ex_block ), j ) end if end do if ( present ( status ) ) status = success end subroutine extract_large elemental module subroutine flip_bit_large ( self , pos ) ! ! Flips the value at the POS position in SELF, provided the position is ! valid. If POS is less than 0 or greater than BITS(SELF)-1, no value is ! changed. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( bits_kind ) :: flip_block , block_bit if ( pos < 0 . OR . pos > self % num_bits - 1 ) return flip_block = pos / block_size + 1 block_bit = pos - ( flip_block - 1 ) * block_size if ( btest ( self % blocks ( flip_block ), block_bit ) ) then self % blocks ( flip_block ) = ibclr ( self % blocks ( flip_block ), & block_bit ) else self % blocks ( flip_block ) = ibset ( self % blocks ( flip_block ), & block_bit ) end if end subroutine flip_bit_large pure module subroutine flip_range_large ( self , start_pos , stop_pos ) ! ! Flips all valid bits from the START_POS to the STOP_POS positions in ! SELF. If STOP_POS < START_POS no bits are flipped. Positions less than ! 0 or greater than BITS(SELF)-1 are ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: bit , block_ , end_bit , first_block , last_block , & start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) if ( end_bit < start_bit ) return first_block = start_bit / block_size + 1 last_block = end_bit / block_size + 1 if ( first_block == last_block ) then ! FIRST and LAST are in the same block call mvbits ( not ( self % blocks ( first_block )), & start_bit - ( first_block - 1 ) * block_size , & end_bit - start_bit + 1 , & self % blocks ( first_block ), & start_bit - ( first_block - 1 ) * block_size ) return end if ! Do \"partial\" black containing FIRST bit = start_bit - ( first_block - 1 ) * block_size call mvbits ( not ( self % blocks ( first_block ) ), & bit , & block_size - bit , & self % blocks ( first_block ), & bit ) ! Do \"partial\" black containing LAST bit = end_bit - ( last_block - 1 ) * block_size call mvbits ( not ( self % blocks ( last_block ) ), & 0 , & bit + 1 , & self % blocks ( last_block ), & 0 ) ! Do remaining blocks do block_ = first_block + 1 , last_block - 1 self % blocks ( block_ ) = not ( self % blocks ( block_ ) ) end do end subroutine flip_range_large module subroutine from_string_large ( self , string , status ) ! Initializes the bitset `self` treating `string` as a binary literal ! `status` may have the values: ! `success` - if no problems were found, ! `alloc_fault` - if allocation of the bitset failed ! `char_string_too_large_error` - if `string` was too large, or ! `char_string_invalid_error` - if string had an invalid character. class ( bitset_large ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'FROM_STRING' integer ( int64 ) :: bit integer ( int64 ) :: bits character ( 1 ) :: char bits = len ( string , kind = int64 ) if ( bits > huge ( 0_bits_kind ) ) then call error_handler ( 'STRING was too long for a ' // & 'BITSET_LARGE SELF.' , & char_string_too_large_error , status , & module_name , procedure ) return end if call init_zero_large ( self , int ( bits , kind = bits_kind ), status ) if ( present ( status ) ) then if ( status /= success ) return end if do bit = 1_bits_kind , bits char = string ( bit : bit ) if ( char == '0' ) then call self % clear ( int ( bits - bit , kind = bits_kind ) ) else if ( char == '1' ) then call self % set ( int ( bits - bit , kind = bits_kind ) ) else call error_handler ( 'STRING had a character other than ' // & '0 or 1.' , & char_string_invalid_error , status , & module_name , procedure ) return end if end do if ( present ( status ) ) status = success end subroutine from_string_large elemental module function ge_large ( set1 , set2 ) result ( ge ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: ge type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( bgt ( set1 % blocks ( block_ ), set2 % blocks ( block_ ) ) ) then ge = . true . return else ge = . false . return end if end do ge = . true . end function ge_large elemental module function gt_large ( set1 , set2 ) result ( gt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: gt type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( bgt ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) ) then gt = . true . return else gt = . false . return end if end do gt = . false . end function gt_large module subroutine init_zero_large ( self , bits , status ) ! ! Creates the bitset, `self`, of size `bits`, with all bits initialized to ! zero. `bits` must be non-negative. If an error occurs and `status` is ! absent then processing stops with an informative stop code. `status` ! will have one of the values; ! * `success` - if no problems were found, ! * `array_size_invalid_error` - if `bits` is either negative or larger ! than 64 with `self` of class `bitset_64`, or ! * `alloc_fault` - if memory allocation failed ! class ( bitset_large ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"INIT\" integer :: blocks , ierr message = '' if ( bits < 0 ) then call error_handler ( 'BITS had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if if ( bits == 0 ) then self % num_bits = 0 allocate ( self % blocks ( 0 ), stat = ierr , errmsg = message ) if ( ierr /= 0 ) go to 998 return else blocks = (( bits - 1 ) / block_size ) + 1 end if self % num_bits = bits allocate ( self % blocks ( blocks ), stat = ierr , errmsg = message ) if ( ierr /= 0 ) go to 998 self % blocks (:) = all_zeros if ( present ( status ) ) status = success return 998 call error_handler ( 'Allocation failure for SELF.' , & alloc_fault , status , & module_name , procedure ) end subroutine init_zero_large module subroutine input_large ( self , unit , status ) ! ! Reads the components of the bitset, `self`, from the unformatted I/O ! unit, `unit`, assuming that the components were written using `output`. ! If an error occurs and `status` is absent then processing stops with ! an informative stop code. `status` has one of the values: ! * `success` - if no problem was found ! * `alloc_fault` - if it failed during allocation of memory for `self`, or ! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative ! or greater than 64 for a `bitset_64` input. ! * `read_failure` - if it failed during the reads from `unit` ! class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = 'INPUT' integer :: stat read ( unit , iostat = ierr , iomsg = message ) bits if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( bits < 0 ) then call error_handler ( 'BITS in UNIT had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'Allocation failure for SELF.' , & alloc_fault , status , module_name , procedure ) return end if if ( bits < 1 ) return read ( unit , iostat = ierr , iomsg = message ) self % blocks (:) if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( present ( status ) ) status = success end subroutine input_large elemental module function le_large ( set1 , set2 ) result ( le ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: le type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( blt ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) ) then le = . true . return else le = . false . return end if end do le = . true . end function le_large elemental module function lt_large ( set1 , set2 ) result ( lt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: lt type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ do block_ = size ( set1 % blocks , kind = bits_kind ), 1_bits_kind , - 1 if ( set1 % blocks ( block_ ) == set2 % blocks ( block_ ) ) then cycle else if ( blt ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) ) then lt = . true . return else lt = . false . return end if end do lt = . false . end function lt_large elemental module function neqv_large ( set1 , set2 ) result ( neqv ) ! ! Returns .TRUE. if any bits in SET1 and SET2 differ in value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: neqv type ( bitset_large ), intent ( in ) :: set1 , set2 integer ( bits_kind ) :: block_ neqv = . true . do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) if ( set1 % blocks ( block_ ) /= set2 % blocks ( block_ ) ) return end do neqv = . false . end function neqv_large elemental module function none_large ( self ) result ( none ) ! ! Returns .TRUE. if none of the bits in SELF have the value 1. ! logical :: none class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ) :: block none = . true . do block = 1_bits_kind , size ( self % blocks , kind = bits_kind ) if ( self % blocks ( block ) /= 0 ) then none = . false . return end if end do end function none_large elemental module subroutine not_large ( self ) ! ! Sets the bits in SELF to their logical complement ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ) :: bit , full_blocks , block integer :: remaining_bits if ( self % num_bits == 0 ) return full_blocks = self % num_bits / block_size do block = 1_bits_kind , full_blocks self % blocks ( block ) = not ( self % blocks ( block ) ) end do remaining_bits = self % num_bits - full_blocks * block_size do bit = 0 , remaining_bits - 1 if ( btest ( self % blocks ( block ), bit ) ) then self % blocks ( block ) = ibclr ( self % blocks ( block ), bit ) else self % blocks ( block ) = ibset ( self % blocks ( block ), bit ) end if end do end subroutine not_large elemental module subroutine or_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise OR of the original bits in SET1 ! and SET2. SET1 and SET2 must have the same number of bits otherwise ! the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1 , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = ior ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) end do end subroutine or_large module subroutine output_large ( self , unit , status ) ! ! Writes the components of the bitset, SELF, to the unformatted I/O ! unit, UNIT, in a unformatted sequence compatible with INPUT. If ! STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value WRITE_FAILURE if the write failed. ! class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"OUTPUT\" write ( unit , iostat = ierr , iomsg = message ) self % num_bits if ( ierr /= 0 ) go to 999 if ( self % num_bits < 1 ) return write ( unit , iostat = ierr , iomsg = message ) self % blocks (:) if ( ierr /= 0 ) go to 999 return 999 call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) end subroutine output_large module subroutine read_bitset_string_large ( self , string , status ) ! ! Uses the bitset literal in the default character `string`, to define ! the bitset, `self`. The literal may be preceded by an an arbitrary ! sequence of blank characters. If `status` is absent an error results ! in an error stop with an informative stop code. If `status` ! is present it has one of the values ! * `success` - if no problems occurred, ! * `alloc_fault` - if allocation of memory for SELF failed, ! * `array_size_invalid_error - if `bits(self)` in `string` is greater ! than 64 for a `bitset_64`, ! * `char_string_invalid_error` - if the bitset literal has an invalid ! character, ! * `char_string_too_small_error - if the string ends before all the bits ! are read. ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! class ( bitset_large ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits integer ( bits_kind ) :: digits , pos character ( * ), parameter :: procedure = \"READ_BITSET\" integer :: stat pos = 1 find_start : do pos = 1_bits_kind , len ( string , kind = bits_kind ) if ( string ( pos : pos ) /= ' ' ) exit end do find_start if ( pos > len ( string ) - 8 ) go to 999 if ( string ( pos : pos ) /= 's' . AND . string ( pos : pos ) /= 'S' ) go to 999 pos = pos + 1 bits = 0 digits = 0 do select case ( iachar ( string ( pos : pos ) ) ) case ( ia0 : ia9 ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) go to 996 if ( digits > max_digits ) go to 996 bits = bits * 10 + iachar ( string ( pos : pos ) ) - ia0 if ( bits < 0 ) go to 996 case ( iachar ( 'b' ), iachar ( 'B' )) exit case default call error_handler ( 'There was an invalid character ' // & 'in STRING' , & char_string_invalid_error , status , & module_name , procedure ) return end select pos = pos + 1 end do if ( bits + pos > len ( string ) ) then call error_handler ( 'STRING was too small for the number of ' // & 'bits specified by STRING.' , & char_string_too_small_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'There was an allocation fault for SELF.' , & alloc_fault , status , module_name , procedure ) return end if pos = pos + 1 bit = bits - 1 do if ( string ( pos : pos ) == '0' ) then call self % clear ( bit ) else if ( string ( pos : pos ) == '1' ) then call self % set ( bit ) else go to 999 end if pos = pos + 1 bit = bit - 1 if ( bit < 0 ) exit end do if ( present ( status ) ) status = success return 996 call error_handler ( 'There was an integer overflow in reading' // & 'size of bitset literal from UNIT' , & integer_overflow_error , status , & module_name , procedure ) return 999 call error_handler ( 'There was an invalid character in STRING' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_string_large module subroutine read_bitset_unit_large ( self , unit , advance , status ) ! ! Uses the bitset literal at the current position in the formatted ! file with I/O unit, `unit`, to define the bitset, `self`. The literal ! may be preceded by an arbitrary sequence of blank characters. ! If `advance` is present it must be either 'YES' or 'NO'. If absent ! it has the default value of 'YES' to determine whether advancing ! I/O occurs. If `status` is absent an error results in an error stop ! with an informative stop code. If `status` is present it has one of ! the values: ! * `success` - if no problem occurred, ! * `alloc_fault` - if allocation of `self` failed, ! * `array_size_invalid_error` - if `bits(self)` in the bitset literal ! is greater than 64 for a `bitset_64`. ! * `char_string_invalid_error` - if the read of the bitset literal found ! an invalid character, ! * `eof_failure` - if a `read` statement reaches an end-of-file before ! completing the read of the bitset literal, ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! * `read_failure` - if a `read` statement fails, ! class ( bitset_large ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits , digits integer :: ierr character ( len = 128 ) :: message character ( * ), parameter :: procedure = \"READ_BITSET\" character ( len = 1 ) :: char do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char select case ( char ) case ( ' ' ) cycle case ( 's' , 'S' ) exit case default go to 999 end select end do bits = 0 digits = 0 do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == 'b' . or . char == 'B' ) exit select case ( char ) case ( '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) & go to 996 if ( digits > max_digits ) go to 996 bits = 10 * bits + iachar ( char ) - iachar ( '0' ) if ( bits < 0 ) go to 996 case default go to 999 end select end do if ( bits < 0 . OR . digits == 0 . OR . digits > max_digits ) go to 999 call self % init ( bits , status ) if ( present ( status ) ) then call error_handler ( 'There was an allocation fault for SELF.' , & alloc_fault , status , module_name , procedure ) return end if do bit = 1 , bits - 1 read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if end do read ( unit , & advance = optval ( advance , 'YES' ), & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if if ( present ( status ) ) status = success return 996 call error_handler ( 'Integer overflow in reading size of ' // & 'bitset literal from UNIT.' , & read_failure , status , module_name , procedure ) return 997 call error_handler ( 'Failure on read of UNIT.' , & read_failure , status , module_name , procedure ) return 998 call error_handler ( 'End of File of UNIT before finishing a ' // & 'bitset literal.' , & eof_failure , status , module_name , procedure ) return 999 call error_handler ( 'Invalid character in bitset literal in UNIT ' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_unit_large elemental module subroutine set_bit_large ( self , pos ) ! ! Sets the value at the POS position in SELF, provided the position is ! valid. If the position is less than 0 or greater than BITS(SELF)-1 ! then SELF is unchanged. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( bits_kind ) :: set_block , block_bit if ( pos < 0 . OR . pos > self % num_bits - 1 ) return set_block = pos / block_size + 1 block_bit = pos - ( set_block - 1 ) * block_size self % blocks ( set_block ) = ibset ( self % blocks ( set_block ), block_bit ) end subroutine set_bit_large pure module subroutine set_range_large ( self , start_pos , stop_pos ) ! ! Sets all valid bits to 1 from the START_POS to the STOP_POS positions ! in SELF. If STOP_POS < START_POS no bits are changed. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_large ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: bit , block_ , end_bit , first_block , last_block , & start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) if ( end_bit < start_bit ) return first_block = start_bit / block_size + 1 last_block = end_bit / block_size + 1 if ( first_block == last_block ) then ! FIRST and LAST are in the same block call mvbits ( all_ones , & start_bit - ( first_block - 1 ) * block_size , & end_bit - start_bit + 1 , & self % blocks ( first_block ), & start_bit - ( first_block - 1 ) * block_size ) return end if ! Do \"partial\" black containing FIRST bit = start_bit - ( first_block - 1 ) * block_size call mvbits ( all_ones , & bit , & block_size - bit , & self % blocks ( first_block ), & bit ) ! Do \"partial\" black containing LAST bit = end_bit - ( last_block - 1 ) * block_size call mvbits ( all_ones , & 0 , & bit + 1 , & self % blocks ( last_block ), & 0 ) ! Do remaining blocks do block_ = first_block + 1 , last_block - 1 self % blocks ( block_ ) = all_ones end do end subroutine set_range_large elemental module function test_large ( self , pos ) result ( test ) ! ! Returns .TRUE. if the POS position is set, .FALSE. otherwise. If POS ! is negative or greater than BITS(SELF) - 1 the result is .FALSE.. ! logical :: test class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( bits_kind ) :: bit_block if ( pos < 0 . or . pos >= self % num_bits ) then test = . false . else bit_block = pos / block_size + 1 test = btest ( self % blocks ( bit_block ), & pos - ( bit_block - 1 ) * block_size ) end if end function test_large module subroutine to_string_large ( self , string , status ) ! ! Represents the value of SELF as a binary literal in STRING ! Status may have the values SUCCESS or ALLOC_FAULT ! class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'TO_STRING' integer ( bits_kind ) :: bit , bit_count , pos integer :: stat bit_count = self % num_bits allocate ( character ( len = bit_count ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if do bit = 0_bits_kind , bit_count - 1 pos = bit_count - bit if ( self % test ( bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success end subroutine to_string_large elemental module function value_large ( self , pos ) result ( value ) ! ! Returns 1 if the POS position is set, 0 otherwise. If POS is negative ! or greater than BITS(SELF) - 1 the result is 0. ! integer :: value class ( bitset_large ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos integer :: bit_block if ( pos < 0 . or . pos >= self % num_bits ) then value = 0 else bit_block = pos / block_size + 1 if ( btest ( self % blocks ( bit_block ), & pos - ( bit_block - 1 ) * block_size ) ) then value = 1 else value = 0 end if end if end function value_large module subroutine write_bitset_string_large ( self , string , status ) ! ! Writes a bitset literal to the allocatable default character STRING, ! representing the individual bit values in the bitset_t, SELF. ! If STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value ALLOC_FAULT if allocation of ! the output string failed. ! class ( bitset_large ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , & bit_count , & count_digits , & pos integer :: stat character ( * ), parameter :: procedure = 'WRITE_BITSET' bit_count = bits ( self ) call digit_count ( self % num_bits , count_digits ) allocate ( character ( len = count_digits + bit_count + 2 ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if write ( string , \"('S', i0)\" ) self % num_bits string ( count_digits + 2 : count_digits + 2 ) = \"B\" do bit = 0_bits_kind , bit_count - 1 pos = count_digits + 2 + bit_count - bit if ( self % test ( bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success contains subroutine digit_count ( bits , digits ) integer ( bits_kind ), intent ( in ) :: bits integer ( bits_kind ), intent ( out ) :: digits integer ( bits_kind ) :: factor factor = bits if ( factor <= 0 ) then digits = 1 return end if do digits = 1 , 127 factor = factor / 10 if ( factor == 0 ) return end do end subroutine digit_count end subroutine write_bitset_string_large module subroutine write_bitset_unit_large ( self , unit , advance , status ) ! ! Writes a bitset literal to the I/O unit, UNIT, representing the ! individual bit values in the bitset_t, SELF. By default or if ! ADVANCE is present with the value 'YES', advancing output is used. ! If ADVANCE is present with the value 'NO', then the current record ! is not advanced by the write. If STATUS is absent an error results ! in an error stop with an informative stop code. If STATUS is ! present it has the default value of SUCCESS, the value ! ALLOC_FAULT if allocation of the output string failed, or ! WRITE_FAILURE if the WRITE statement outputting the literal failed. ! class ( bitset_large ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer :: ierr character (:), allocatable :: string character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"WRITE_BITSET\" call self % write_bitset ( string , status ) if ( present ( status ) ) then if ( status /= success ) return end if write ( unit , & FMT = '(A)' , & advance = optval ( advance , 'YES' ), & iostat = ierr , & iomsg = message ) & string if ( ierr /= 0 ) then call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) return endif end subroutine write_bitset_unit_large elemental module subroutine xor_large ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise XOR of the original bits in SET1 ! and SET2. SET1 and SET2 must have the same number of bits otherwise ! the result is undefined. ! type ( bitset_large ), intent ( inout ) :: set1 type ( bitset_large ), intent ( in ) :: set2 integer ( bits_kind ) :: block_ do block_ = 1_bits_kind , size ( set1 % blocks , kind = bits_kind ) set1 % blocks ( block_ ) = ieor ( set1 % blocks ( block_ ), & set2 % blocks ( block_ ) ) end do end subroutine xor_large end submodule stdlib_bitsets_large","tags":"","loc":"sourcefile/stdlib_bitsets_large.fypp.html"},{"title":"stdlib_linalg_least_squares.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set RHS_SUFFIX = [\"one\",\"many\"] #:set RHS_SYMBOL = [ranksuffix(r) for r in [1,2]] #:set RHS_EMPTY = [emptyranksuffix(r) for r in [1,2]] #:set ALL_RHS = list(zip(RHS_SYMBOL,RHS_SUFFIX,RHS_EMPTY)) submodule ( stdlib_linalg ) stdlib_linalg_least_squares !! Least-squares solution to Ax=b use stdlib_linalg_constants use stdlib_linalg_lapack , only : gelsd , stdlib_ilaenv use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling , LINALG_ERROR , & LINALG_INTERNAL_ERROR , LINALG_VALUE_ERROR implicit none ( type , external ) character ( * ), parameter :: this = 'lstsq' contains elemental subroutine handle_gelsd_info ( info , lda , n , ldb , nrhs , err ) integer ( ilp ), intent ( in ) :: info , lda , n , ldb , nrhs type ( linalg_state_type ), intent ( out ) :: err ! Process output select case ( info ) case ( 0 ) ! Success case (: - 1 ) err = linalg_state_type ( this , LINALG_VALUE_ERROR , 'invalid problem size a=' ,[ lda , n ], & ', b=' ,[ ldb , nrhs ]) case ( 1 :) err = linalg_state_type ( this , LINALG_ERROR , 'SVD did not converge.' ) case default err = linalg_state_type ( this , LINALG_INTERNAL_ERROR , 'catastrophic error' ) end select end subroutine handle_gelsd_info # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" ! Workspace needed by gelsd elemental subroutine ${ ri }$ gelsd_space ( m , n , nrhs , lrwork , liwork , lcwork ) integer ( ilp ), intent ( in ) :: m , n , nrhs integer ( ilp ), intent ( out ) :: lrwork , liwork , lcwork integer ( ilp ) :: smlsiz , mnmin , nlvl mnmin = min ( m , n ) ! Maximum size of the subproblems at the bottom of the computation (~25) smlsiz = stdlib_ilaenv ( 9 , '${ri}$gelsd' , ' ' , 0 , 0 , 0 , 0 ) ! The exact minimum amount of workspace needed depends on M, N and NRHS. nlvl = max ( 0 , ilog2 ( mnmin / ( smlsiz + 1 )) + 1 ) ! Real space # : if rt . startswith ( 'complex' ) lrwork = 10 * mnmin + 2 * mnmin * smlsiz + 8 * mnmin * nlvl + 3 * smlsiz * nrhs + max (( smlsiz + 1 ) ** 2 , n * ( 1 + nrhs ) + 2 * nrhs ) # : else lrwork = 12 * mnmin + 2 * mnmin * smlsiz + 8 * mnmin * nlvl + mnmin * nrhs + ( smlsiz + 1 ) ** 2 # : endif lrwork = max ( 1 , lrwork ) ! Complex space lcwork = 2 * mnmin + nrhs * mnmin ! Integer space liwork = max ( 1 , 3 * mnmin * nlvl + 11 * mnmin ) ! For good performance, the workspace should generally be larger. ! Allocate 25% more space than strictly needed. lrwork = ceiling ( 1.25 * lrwork , kind = ilp ) lcwork = ceiling ( 1.25 * lcwork , kind = ilp ) liwork = ceiling ( 1.25 * liwork , kind = ilp ) end subroutine ${ ri }$ gelsd_space # : endif # : endfor # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" ! Compute the integer, real, [complex] working space requested byu the least squares procedure pure module subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ ( a , b , lrwork , liwork #{ if rt . startswith ( 'c' ) }# , lcwork #{ endif }# ) !> Input matrix a[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> Right hand side vector or array, b[m] or b[m,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Size of the working space arrays integer ( ilp ), intent ( out ) :: lrwork , liwork integer ( ilp ) #{ if rt . startswith ( 'c' ) }# , intent ( out ) #{ endif }# :: lcwork integer ( ilp ) :: m , n , nrhs m = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) nrhs = size ( b , kind = ilp ) / size ( b , 1 , kind = ilp ) call ${ ri }$ gelsd_space ( m , n , nrhs , lrwork , liwork , lcwork ) end subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ ! Compute the least-squares solution to a real system of linear equations Ax = b module function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ ( a , b , cond , overwrite_a , rank , err ) result ( x ) !!### Summary !! Compute least-squares solution to a real system of linear equations Ax = b !! !!### Description !! !! This function computes the least-squares solution of a linear matrix problem. !! !! param: a Input matrix of size [m,n]. !! param: b Right-hand-side vector of size [m] or matrix of size [m,nrhs]. !! param: cond [optional] Real input threshold indicating that singular values `s_i <= cond*maxval(s)` !! do not contribute to the matrix rank. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: rank [optional] integer flag returning matrix rank. !! param: err [optional] State return flag. !! return: x Solution vector of size [n] or solution matrix of size [n,nrhs]. !! !> Input matrix a[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[m] or b[m,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ integer ( ilp ) :: n , nrhs , ldb n = size ( a , 2 , kind = ilp ) ldb = size ( b , 1 , kind = ilp ) nrhs = size ( b , kind = ilp ) / ldb ! Initialize solution with the shape of the rhs # : if ndsuf == \"one\" allocate ( x ( n )) # : else allocate ( x ( n , nrhs )) # : endif call stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ ( a , b , x ,& cond = cond , overwrite_a = overwrite_a , rank = rank , err = err ) end function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ ! Compute the least-squares solution to a real system of linear equations Ax = b module subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ ( a , b , x , real_storage , int_storage , & #{ if rt . startswith ( 'c' ) }# cmpl_storage , #{ endif }# cond , singvals , overwrite_a , rank , err ) !!### Summary !! Compute least-squares solution to a real system of linear equations Ax = b !! !!### Description !! !! This function computes the least-squares solution of a linear matrix problem. !! !! param: a Input matrix of size [m,n]. !! param: b Right-hand-side vector of size [n] or matrix of size [n,nrhs]. !! param: x Solution vector of size at [>=n] or solution matrix of size [>=n,nrhs]. !! param: real_storage [optional] Real working space !! param: int_storage [optional] Integer working space # : if rt . startswith ( 'c' ) !! param: cmpl_storage [optional] Complex working space # : endif !! param: cond [optional] Real input threshold indicating that singular values `s_i <= cond*maxval(s)` !! do not contribute to the matrix rank. !! param: singvals [optional] Real array of size [min(m,n)] returning a list of singular values. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: rank [optional] integer flag returning matrix rank. !! param: err [optional] State return flag. !! !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] real working storage space real ( ${ rk }$ ), optional , intent ( inout ), target :: real_storage (:) !> [optional] integer working storage space integer ( ilp ), optional , intent ( inout ), target :: int_storage (:) # : if rt . startswith ( 'c' ) !> [optional] complex working storage space ${ rt }$ , optional , intent ( inout ), target :: cmpl_storage (:) # : endif !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD real ( ${ rk }$ ), optional , intent ( out ), target :: singvals (:) !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !! Local variables type ( linalg_state_type ) :: err0 integer ( ilp ) :: m , n , lda , ldb , nrhs , ldx , nrhsx , info , mnmin , mnmax , arank , lrwork , liwork , lcwork integer ( ilp ) :: nrs , nis , ncs , nsvd integer ( ilp ), pointer :: iwork (:) logical ( lk ) :: copy_a , large_enough_x real ( ${ rk }$ ) :: acond , rcond real ( ${ rk }$ ), pointer :: rwork (:), singular (:) ${ rt }$ , pointer :: xmat (:,:), amat (:,:), cwork (:) ! Problem sizes m = size ( a , 1 , kind = ilp ) lda = size ( a , 1 , kind = ilp ) n = size ( a , 2 , kind = ilp ) ldb = size ( b , 1 , kind = ilp ) nrhs = size ( b , kind = ilp ) / ldb ldx = size ( x , 1 , kind = ilp ) nrhsx = size ( x , kind = ilp ) / ldx mnmin = min ( m , n ) mnmax = max ( m , n ) if ( lda < 1 . or . n < 1 . or . ldb < 1 . or . ldb /= m . or . ldx < n ) then err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'insufficient sizes: a=' ,[ lda , n ], & 'b=' ,[ ldb , nrhs ], ' x=' ,[ ldx , nrhsx ]) call linalg_error_handling ( err0 , err ) if ( present ( rank )) rank = 0 return end if ! Can A be overwritten? By default, do not overwrite if ( present ( overwrite_a )) then copy_a = . not . overwrite_a else copy_a = . true . _ lk endif ! Initialize a matrix temporary if ( copy_a ) then allocate ( amat ( lda , n ), source = a ) else amat => a endif ! If x is large enough to store b, use it as temporary rhs storage. large_enough_x = ldx >= m if ( large_enough_x ) then xmat ( 1 : ldx , 1 : nrhs ) => x else allocate ( xmat ( m , nrhs )) endif # : if ndsuf == \"one\" xmat ( 1 : m , 1 ) = b # : else xmat ( 1 : m , 1 : nrhs ) = b # : endif ! Singular values array (in decreasing order) if ( present ( singvals )) then singular => singvals nsvd = size ( singular , kind = ilp ) else allocate ( singular ( mnmin )) nsvd = mnmin endif ! rcond is used to determine the effective rank of A. ! Singular values S(i) <= RCOND*maxval(S) are treated as zero. ! Use same default value as NumPy if ( present ( cond )) then rcond = cond else rcond = epsilon ( 0.0 _${ rk }$ ) * mnmax endif if ( rcond < 0 ) rcond = epsilon ( 0.0 _${ rk }$ ) * mnmax ! Get working space size call ${ ri }$ gelsd_space ( m , n , nrhs , lrwork , liwork , lcwork ) ! Real working space if ( present ( real_storage )) then rwork => real_storage else allocate ( rwork ( lrwork )) endif nrs = size ( rwork , kind = ilp ) ! Integer working space if ( present ( int_storage )) then iwork => int_storage else allocate ( iwork ( liwork )) endif nis = size ( iwork , kind = ilp ) # : if rt . startswith ( 'complex' ) ! Complex working space if ( present ( cmpl_storage )) then cwork => cmpl_storage else allocate ( cwork ( lcwork )) endif ncs = size ( cwork , kind = ilp ) # : endif if ( nrs < lrwork . or . nis < liwork #{ if rt . startswith ( 'c' ) }# . or . ncs < lcwork #{ endif }# & . or . nsvd < mnmin ) then ! Halt on insufficient space err0 = linalg_state_type ( this , LINALG_VALUE_ERROR , 'insufficient working space: ' ,& 'real=' , nrs , ' should be >=' , lrwork , & ', int=' , nis , ' should be >=' , liwork , & #{ if rt . startswith ( 'complex' ) }# ', cmplx=' , ncs , ' should be >=' , lcwork , & #{ endif }# ', singv=' , nsvd , ' should be >=' , mnmin ) else ! Solve system using singular value decomposition call gelsd ( m , n , nrhs , amat , lda , xmat , ldb , singular , rcond , arank , & # : if rt . startswith ( 'complex' ) cwork , ncs , rwork , iwork , info ) # : else rwork , nrs , iwork , info ) # : endif ! The condition number of A in the 2-norm = S(1)/S(min(m,n)). acond = singular ( 1 ) / singular ( mnmin ) ! Process output call handle_gelsd_info ( info , lda , n , ldb , nrhs , err0 ) endif ! Process output and return if (. not . large_enough_x ) then # : if ndsuf == \"one\" x ( 1 : n ) = xmat ( 1 : n , 1 ) # : else x ( 1 : n , 1 : nrhs ) = xmat ( 1 : n , 1 : nrhs ) # : endif deallocate ( xmat ) endif if ( copy_a ) deallocate ( amat ) if ( present ( rank )) rank = arank if (. not . present ( real_storage )) deallocate ( rwork ) if (. not . present ( int_storage )) deallocate ( iwork ) # : if rt . startswith ( 'complex' ) if (. not . present ( cmpl_storage )) deallocate ( cwork ) # : endif if (. not . present ( singvals )) deallocate ( singular ) call linalg_error_handling ( err0 , err ) end subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ # : endif # : endfor # : endfor ! Simple integer log2 implementation elemental integer ( ilp ) function ilog2 ( x ) integer ( ilp ), intent ( in ) :: x integer ( ilp ) :: remndr if ( x > 0 ) then remndr = x ilog2 = - 1_ilp do while ( remndr > 0 ) ilog2 = ilog2 + 1_ilp remndr = shiftr ( remndr , 1 ) end do else ilog2 = - huge ( 0_ilp ) endif end function ilog2 end submodule stdlib_linalg_least_squares","tags":"","loc":"sourcefile/stdlib_linalg_least_squares.fypp.html"},{"title":"stdlib_bitsets_64.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_bitsets ) stdlib_bitsets_64 implicit none contains elemental module function all_64 ( self ) result ( all ) ! Returns .TRUE. if all bits in SELF are 1, .FALSE. otherwise. logical :: all class ( bitset_64 ), intent ( in ) :: self intrinsic :: btest integer ( bits_kind ) :: pos do pos = 0 , self % num_bits - 1 if ( . not . btest ( self % block , pos ) ) then all = . false . return end if end do all = . true . end function all_64 elemental module subroutine and_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise AND of the original bits in SET1 ! and SET2. It is required that SET1 have the same number of bits as ! SET2 otherwise the result is undefined. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 ! The set2 extent includes the entire extent of set1. ! The (zeroed) region past the end of set1 is unaffected by ! the iand. set1 % block = iand ( set1 % block , & set2 % block ) end subroutine and_64 elemental module subroutine and_not_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise and of the original bits in SET1 ! with the bitwise negation of SET2. SET1 and SET2 must have the same ! number of bits otherwise the result is undefined. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 ! The not with iand means that the zero'ed regions past the end of each set ! do not interact with the in set regions set1 % block = iand ( set1 % block , not ( set2 % block ) ) end subroutine and_not_64 elemental module function any_64 ( self ) result ( any ) ! Returns .TRUE. if any bit in SELF is 1, .FALSE. otherwise. logical :: any class ( bitset_64 ), intent ( in ) :: self if ( self % block /= 0 ) then any = . true . return else any = . false . end if end function any_64 # : for k1 in INT_KINDS module subroutine assign_log$ { k1 }$_ 64 ( self , logical_vector ) ! Used to define assignment from an array of type logical for bitset_64 type ( bitset_64 ), intent ( out ) :: self logical ( ${ k1 }$ ), intent ( in ) :: logical_vector (:) integer ( bits_kind ) :: log_size integer ( bits_kind ) :: index log_size = size ( logical_vector , kind = bits_kind ) if ( log_size > 64 ) then error stop module_name // ' % ' // 'ASSIGNMENT' // \" has \" // & \"SIZE(LOGICAL_VECTOR) > 64 with assignment to a BITSET_64.\" end if self % num_bits = log_size self % block = 0 do index = 0 , log_size - 1 if ( logical_vector ( index + 1 ) ) then self % block = ibset ( self % block , index ) end if end do end subroutine assign_log$ { k1 }$_ 64 pure module subroutine log ${ k1 }$_ assign_64 ( logical_vector , set ) ! Used to define assignment to an array of type logical for bitset_64 logical ( ${ k1 }$ ), intent ( out ), allocatable :: logical_vector (:) type ( bitset_64 ), intent ( in ) :: set integer ( bits_kind ) :: index allocate ( logical_vector ( set % num_bits ) ) do index = 0 , set % num_bits - 1 if ( set % value ( index ) == 1 ) then logical_vector ( index + 1 ) = . true . else logical_vector ( index + 1 ) = . false . end if end do end subroutine log ${ k1 }$_ assign_64 # : endfor elemental module function bit_count_64 ( self ) result ( bit_count ) ! Returns the number of non-zero bits in SELF. integer ( bits_kind ) :: bit_count class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ) :: pos bit_count = 0 do pos = 0 , self % num_bits - 1 if ( btest ( self % block , pos ) ) bit_count = bit_count + 1 end do end function bit_count_64 elemental module subroutine clear_bit_64 ( self , pos ) ! ! Sets to zero the POS position in SELF. If POS is less than zero or ! greater than BITS(SELF)-1 it is ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . OR . ( pos > self % num_bits - 1 ) ) & return self % block = ibclr ( self % block , pos ) end subroutine clear_bit_64 pure module subroutine clear_range_64 ( self , start_pos , stop_pos ) ! ! Sets to zero all bits from the START_POS to STOP_POS positions in SELF. ! If STOP_POS < START_POS then no bits are modified. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: true_first , true_last true_first = max ( 0_bits_kind , start_pos ) true_last = min ( self % num_bits - 1 , stop_pos ) if ( true_last < true_first ) return call mvbits ( all_zeros , & true_first , & true_last - true_first + 1 , & self % block , & true_first ) end subroutine clear_range_64 elemental module function eqv_64 ( set1 , set2 ) result ( eqv ) ! ! Returns .TRUE. if all bits in SET1 and SET2 have the same value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: eqv type ( bitset_64 ), intent ( in ) :: set1 , set2 eqv = set1 % block == set2 % block end function eqv_64 module subroutine extract_64 ( new , old , start_pos , stop_pos , status ) ! Creates a new bitset, NEW, from a range, START_POS to STOP_POS, in bitset ! OLD. If START_POS is greater than STOP_POS the new bitset is empty. ! If START_POS is less than zero or STOP_POS is greater than BITS(OLD)-1 ! then if STATUS is present it has the value INDEX_INVALID_ERROR, ! otherwise processing stops with an informative message. type ( bitset_64 ), intent ( out ) :: new type ( bitset_64 ), intent ( in ) :: old integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits , i , k character ( * ), parameter :: procedure = 'EXTRACT' if ( start_pos < 0 ) then call error_handler ( 'had a START_POS less than 0.' , & index_invalid_error , status , & module_name , procedure ) return end if if ( stop_pos >= old % num_bits ) then call error_handler ( 'had a STOP_POS greater than BITS(OLD)-1.' , & index_invalid_error , status , & module_name , procedure ) return end if bits = stop_pos - start_pos + 1 if ( bits <= 0 ) then new % num_bits = 0 new % block = 0 return else new % num_bits = bits do i = 0 , bits - 1 k = start_pos + i if ( btest ( old % block , k ) ) & new % block = ibset ( new % block , i ) end do end if if ( present ( status ) ) status = success end subroutine extract_64 elemental module subroutine flip_bit_64 ( self , pos ) ! ! Flips the value at the POS position in SELF, provided the position is ! valid. If POS is less than 0 or greater than BITS(SELF)-1, no value is ! changed. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . OR . pos > self % num_bits - 1 ) return if ( btest ( self % block , pos ) ) then self % block = ibclr ( self % block , pos ) else self % block = ibset ( self % block , pos ) end if end subroutine flip_bit_64 pure module subroutine flip_range_64 ( self , start_pos , stop_pos ) ! ! Flips all valid bits from the START_POS to the STOP_POS positions in ! SELF. If STOP_POS < START_POS no bits are flipped. Positions less than ! 0 or greater than BITS(SELF)-1 are ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: end_bit , start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) call mvbits ( not ( self % block ), & start_bit , & end_bit - start_bit + 1 , & self % block , & start_bit ) end subroutine flip_range_64 module subroutine from_string_64 ( self , string , status ) ! Initializes the bitset `self` treating `string` as a binary literal ! `status` may have the values: ! `success` - if no problems were found, ! `alloc_fault` - if allocation of the bitset failed ! `char_string_too_large_error` - if `string` was too large, or ! `char_string_invalid_error` - if string had an invalid character. class ( bitset_64 ), intent ( out ) :: self character ( * ), intent ( in ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'FROM_STRING' integer ( int64 ) :: bit integer ( int64 ) :: bits character ( 1 ) :: char bits = len ( string , kind = int64 ) if ( bits > 64 ) then call error_handler ( 'STRING was too long for a ' // & 'BITSET_64 SELF.' , & char_string_too_large_error , status , & module_name , procedure ) return end if self % num_bits = bits do bit = 1 , bits char = string ( bit : bit ) if ( char == '0' ) then call self % clear ( int ( bits - bit , kind = bits_kind ) ) else if ( char == '1' ) then call self % set ( int ( bits - bit , kind = bits_kind ) ) else call error_handler ( 'STRING had a character other than ' // & '0 or 1.' , & char_string_invalid_error , status , & module_name , procedure ) return end if end do if ( present ( status ) ) status = success end subroutine from_string_64 elemental module function ge_64 ( set1 , set2 ) result ( ge ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: ge type ( bitset_64 ), intent ( in ) :: set1 , set2 ge = bge ( set1 % block , set2 % block ) end function ge_64 elemental module function gt_64 ( set1 , set2 ) result ( gt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 1 in SET1 and to 0 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: gt type ( bitset_64 ), intent ( in ) :: set1 , set2 gt = bgt ( set1 % block , set2 % block ) end function gt_64 module subroutine init_zero_64 ( self , bits , status ) ! ! Creates the bitset, `self`, of size `bits`, with all bits initialized to ! zero. `bits` must be non-negative. If an error occurs and `status` is ! absent then processing stops with an informative stop code. `status` ! will have one of the values: ! * `success` - if no problems were found, ! * `array_size_invalid_error` - if `bits` is either negative or larger ! than 64 with `self` of class `bitset_64`, or ! * `alloc_fault` - if memory allocation failed ! class ( bitset_64 ), intent ( out ) :: self integer ( bits_kind ), intent ( in ) :: bits integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = \"INIT\" if ( bits < 0 ) then call error_handler ( 'BITS had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if if ( bits > 64 ) then call error_handler ( 'BITS had a value greater than 64.' , & array_size_invalid_error , status , & module_name , procedure ) return end if self % num_bits = bits self % block = all_zeros if ( present ( status ) ) status = success end subroutine init_zero_64 module subroutine input_64 ( self , unit , status ) ! ! Reads the components of the bitset, `self`, from the unformatted I/O ! unit, `unit`, assuming that the components were written using `output`. ! If an error occurs and `status` is absent then processing stops with ! an informative stop code. `status` has one of the values: ! * `success` - if no problem was found ! * `alloc_fault` - if it failed during allocation of memory for `self`, or ! * `array_size_invalid_error` if the `bits(self)` in `unit` is negative ! or greater than 64 for a `bitset_64` input. ! * `read_failure` - if it failed during the reads from `unit` ! class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer ( bits_kind ) :: bits integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = 'INPUT' integer :: stat read ( unit , iostat = ierr , iomsg = message ) bits if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( bits < 0 ) then call error_handler ( 'BITS in UNIT had a negative value.' , & array_size_invalid_error , status , & module_name , procedure ) return end if if ( bits > 64 ) then call error_handler ( 'BITS in UNIT had a value greater than 64.' , & array_size_invalid_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'Allocation failure for SELF.' , & alloc_fault , status , module_name , procedure ) return end if if ( bits < 1 ) return read ( unit , iostat = ierr , iomsg = message ) self % block if ( ierr /= 0 ) then call error_handler ( 'Failure on a READ statement for UNIT.' , & read_failure , status , module_name , procedure ) return end if if ( present ( status ) ) status = success end subroutine input_64 elemental module function le_64 ( set1 , set2 ) result ( le ) ! ! Returns .TRUE. if the bits in SET1 and SET2 are the same or the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: le type ( bitset_64 ), intent ( in ) :: set1 , set2 le = ble ( set1 % block , set2 % block ) end function le_64 elemental module function lt_64 ( set1 , set2 ) result ( lt ) ! ! Returns .TRUE. if the bits in SET1 and SET2 differ and the ! highest order different bit is set to 0 in SET1 and to 1 in set2. ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: lt type ( bitset_64 ), intent ( in ) :: set1 , set2 lt = blt ( set1 % block , set2 % block ) end function lt_64 elemental module function neqv_64 ( set1 , set2 ) result ( neqv ) ! ! Returns .TRUE. if all bits in SET1 and SET2 have the same value, ! .FALSE. otherwise. The sets must have the same number of bits ! otherwise the results are undefined. ! logical :: neqv type ( bitset_64 ), intent ( in ) :: set1 , set2 neqv = set1 % block /= set2 % block end function neqv_64 elemental module function none_64 ( self ) result ( none ) ! ! Returns .TRUE. if none of the bits in SELF have the value 1. ! logical :: none class ( bitset_64 ), intent ( in ) :: self none = . true . if ( self % block /= 0 ) then none = . false . return end if end function none_64 elemental module subroutine not_64 ( self ) ! ! Sets the bits in SELF to their logical complement ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ) :: bit if ( self % num_bits == 0 ) return do bit = 0 , self % num_bits - 1 if ( btest ( self % block , bit ) ) then self % block = ibclr ( self % block , bit ) else self % block = ibset ( self % block , bit ) end if end do end subroutine not_64 elemental module subroutine or_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise OR of the original bits in SET1 ! and SET2. If SET1 has fewer bits than SET2 then the additional bits ! in SET2 are ignored. If SET1 has more bits than SET2, then the ! absent SET2 bits are treated as if present with zero value. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 if ( set1 % num_bits >= set2 % num_bits ) then set1 % block = ior ( set1 % block , & set2 % block ) else ! The set1 extent ends before set2 => set2 bits must not affect bits in ! set1 beyond its extent => set those bits to zero while keeping proper ! values of other bits in set2 set1 % block = & ior ( set1 % block , & ibits ( set2 % block , & 0 , & set1 % num_bits ) ) end if end subroutine or_64 module subroutine output_64 ( self , unit , status ) ! ! Writes the components of the bitset, SELF, to the unformatted I/O ! unit, UNIT, in a unformatted sequence compatible with INPUT. If ! STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value WRITE_FAILURE if the write failed. ! class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit integer , intent ( out ), optional :: status integer :: ierr character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"OUTPUT\" write ( unit , iostat = ierr , iomsg = message ) self % num_bits if ( ierr /= 0 ) go to 999 if ( self % num_bits < 1 ) return write ( unit , iostat = ierr , iomsg = message ) self % block if ( ierr /= 0 ) go to 999 return 999 call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) end subroutine output_64 module subroutine read_bitset_string_64 ( self , string , status ) ! ! Uses the bitset literal in the default character `string`, to define ! the bitset, `self`. The literal may be preceded by an an arbitrary ! sequence of blank characters. If `status` is absent an error results ! in an error stop with an informative stop code. If `status` ! is present it has one of the values ! * `success` - if no problems occurred, ! * `alloc_fault` - if allocation of memory for SELF failed, ! * `array_size_invalid_error - if `bits(self)` in `string` is greater ! than 64 for a `bitset_64`, ! * `char_string_invalid_error` - if the bitset literal has an invalid ! character, ! * `char_string_too_small_error - if the string ends before all the bits ! are read. ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! class ( bitset_64 ), intent ( out ) :: self character ( len =* ), intent ( in ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits integer ( bits_kind ) :: digits , pos character ( * ), parameter :: procedure = \"READ_BITSET\" integer :: stat pos = 1 find_start : do pos = 1 , len ( string ) if ( string ( pos : pos ) /= ' ' ) exit end do find_start if ( pos > len ( string ) - 8 ) go to 999 if ( string ( pos : pos ) /= 's' . AND . string ( pos : pos ) /= 'S' ) go to 999 pos = pos + 1 bits = 0 digits = 0 do select case ( iachar ( string ( pos : pos ) ) ) case ( ia0 : ia9 ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) & go to 996 if ( digits > max_digits ) go to 996 bits = bits * 10 + iachar ( string ( pos : pos ) ) - ia0 if ( bits < 0 ) go to 996 case ( iachar ( 'b' ), iachar ( 'B' )) exit case default go to 999 end select pos = pos + 1 end do if ( bits > 64 ) then call error_handler ( 'BITS in STRING was greater than 64.' , & char_string_too_large_error , status , & module_name , procedure ) return end if if ( bits + pos > len ( string ) ) then call error_handler ( 'STRING was too small for the number of ' // & 'bits specified by STRING.' , & char_string_too_small_error , status , & module_name , procedure ) return end if call self % init ( bits , stat ) if ( stat /= success ) then call error_handler ( 'There was an allocation fault for SELF.' , & alloc_fault , status , module_name , procedure ) return end if pos = pos + 1 bit = bits - 1 do if ( string ( pos : pos ) == '0' ) then call self % clear ( bit ) ! this may not be needed else if ( string ( pos : pos ) == '1' ) then call self % set ( bit ) else go to 999 end if pos = pos + 1 bit = bit - 1 if ( bit < 0 ) exit end do if ( present ( status ) ) status = success return 996 call error_handler ( 'There was an integer overflow in reading' // & 'size of bitset literal from UNIT' , & integer_overflow_error , status , & module_name , procedure ) return 999 call error_handler ( 'There was an invalid character in STRING' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_string_64 module subroutine read_bitset_unit_64 ( self , unit , advance , status ) ! ! Uses the bitset literal at the current position in the formatted ! file with I/O unit, `unit`, to define the bitset, `self`. The literal ! may be preceded by an arbitrary sequence of blank characters. ! If `advance` is present it must be either 'YES' or 'NO'. If absent ! it has the default value of 'YES' to determine whether advancing ! I/O occurs. If `status` is absent an error results in an error stop ! with an informative stop code. If `status` is present it has one of ! the values: ! * `success` - if no problem occurred, ! * `alloc_fault` - if allocation of `self` failed, ! * `array_size_invalid_error` - if `bits(self)` in the bitset literal ! is greater than 64 for a `bitset_64`. ! * `char_string_invalid_error` - if the read of the bitset literal found ! an invalid character, ! * `eof_failure` - if a `read` statement reaches an end-of-file before ! completing the read of the bitset literal, ! * `integer_overflow_error` - if the bitset literal has a `bits(self)` ! value too large to be represented, ! * `read_failure` - if a `read` statement fails, ! class ( bitset_64 ), intent ( out ) :: self integer , intent ( in ) :: unit character ( * ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , bits , digits integer :: ierr character ( len = 128 ) :: message character ( * ), parameter :: procedure = \"READ_BITSET\" character ( len = 1 ) :: char do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char select case ( char ) case ( ' ' ) cycle case ( 's' , 'S' ) exit case default go to 999 end select end do bits = 0 digits = 0 do read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 998 , & end = 999 , & iostat = ierr , & iomsg = message ) char if ( char == 'b' . or . char == 'B' ) exit select case ( char ) case ( '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' ) digits = digits + 1 if ( digits == max_digits . AND . bits > overflow_bits ) & go to 996 if ( digits > max_digits ) go to 996 bits = 10 * bits + iachar ( char ) - iachar ( '0' ) if ( bits < 0 ) go to 996 case default go to 999 end select end do if ( bits < 0 . OR . digits == 0 . OR . digits > max_digits ) go to 999 if ( bits > 64 ) then call error_handler ( 'BITS in UNIT was greater than 64.' , & array_size_invalid_error , status , & module_name , procedure ) return end if call self % init ( bits ) do bit = 1 , bits - 1 read ( unit , & advance = 'NO' , & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if end do read ( unit , & advance = optval ( advance , 'YES' ), & FMT = '(A1)' , & err = 997 , & end = 998 , & iostat = ierr , & iomsg = message ) char if ( char == '0' ) then call self % clear ( bits - bit ) else if ( char == '1' ) then call self % set ( bits - bit ) else go to 999 end if if ( present ( status ) ) status = success return 996 call error_handler ( 'Integer overflow in reading size of ' // & 'bitset literal from UNIT.' , & read_failure , status , module_name , procedure ) return 997 call error_handler ( 'Failure on read of UNIT.' , & read_failure , status , module_name , procedure ) return 998 call error_handler ( 'End of File of UNIT before finishing a ' // & 'bitset literal.' , & eof_failure , status , module_name , procedure ) return 999 call error_handler ( 'Invalid character in bitset literal in UNIT ' , & char_string_invalid_error , status , & module_name , procedure ) end subroutine read_bitset_unit_64 elemental module subroutine set_bit_64 ( self , pos ) ! ! Sets the value at the POS position in SELF, provided the position is ! valid. If the position is less than 0 or greater than BITS(SELF)-1 ! then SELF is unchanged. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: pos integer ( block_kind ) :: dummy if ( pos < 0 . OR . pos > self % num_bits - 1 ) return dummy = ibset ( self % block , pos ) self % block = dummy end subroutine set_bit_64 pure module subroutine set_range_64 ( self , start_pos , stop_pos ) ! ! Sets all valid bits to 1 from the START_POS to the STOP_POS positions ! in SELF. If STOP_POA < START_POS no bits are changed. Positions outside ! the range 0 to BITS(SELF)-1 are ignored. ! class ( bitset_64 ), intent ( inout ) :: self integer ( bits_kind ), intent ( in ) :: start_pos , stop_pos integer ( bits_kind ) :: end_bit , start_bit start_bit = max ( 0_bits_kind , start_pos ) end_bit = min ( stop_pos , self % num_bits - 1 ) if ( end_bit < start_bit ) return ! FIRST and LAST are in the same block call mvbits ( all_ones , & start_bit , & end_bit - start_bit + 1 , & self % block , & start_bit ) end subroutine set_range_64 elemental module function test_64 ( self , pos ) result ( test ) ! ! Returns .TRUE. if the POS position is set, .FALSE. otherwise. If POS ! is negative or greater than BITS(SELF) - 1 the result is .FALSE.. ! logical :: test class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . or . pos >= self % num_bits ) then test = . false . else test = btest ( self % block , pos ) end if end function test_64 module subroutine to_string_64 ( self , string , status ) ! ! Represents the value of SELF as a binary literal in STRING ! Status may have the values SUCCESS or ALLOC_FAULT ! class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status character ( * ), parameter :: procedure = 'TO_STRING' integer :: bit , bit_count , pos , stat bit_count = self % num_bits allocate ( character ( len = bit_count ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if do bit = 0 , bit_count - 1 pos = bit_count - bit if ( btest ( self % block , bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success end subroutine to_string_64 elemental module function value_64 ( self , pos ) result ( value ) ! ! Returns 1 if the POS position is set, 0 otherwise. If POS is negative ! or greater than BITS(SELF) - 1 the result is 0. ! integer :: value class ( bitset_64 ), intent ( in ) :: self integer ( bits_kind ), intent ( in ) :: pos if ( pos < 0 . or . pos >= self % num_bits ) then value = 0 else if ( btest ( self % block , pos ) ) then value = 1 else value = 0 end if end if end function value_64 module subroutine write_bitset_string_64 ( self , string , status ) ! ! Writes a bitset literal to the allocatable default character STRING, ! representing the individual bit values in the bitset_t, SELF. ! If STATUS is absent an error results in an error stop with an ! informative stop code. If STATUS is present it has the default ! value of SUCCESS, or the value ALLOC_FAULT if allocation of ! the output string failed. ! class ( bitset_64 ), intent ( in ) :: self character ( len = :), allocatable , intent ( out ) :: string integer , intent ( out ), optional :: status integer ( bits_kind ) :: bit , & bit_count , & count_digits , & pos integer :: stat character ( * ), parameter :: procedure = 'WRITE_BITSET' bit_count = bits ( self ) call digit_count ( self % num_bits , count_digits ) allocate ( character ( len = count_digits + bit_count + 2 ) :: string , stat = stat ) if ( stat > 0 ) then call error_handler ( 'There was an allocation fault for STRING.' , & alloc_fault , status , module_name , procedure ) return end if write ( string , \"('S', i0)\" ) self % num_bits string ( count_digits + 2 : count_digits + 2 ) = \"B\" do bit = 0 , bit_count - 1 pos = count_digits + 2 + bit_count - bit if ( btest ( self % block , bit ) ) then string ( pos : pos ) = '1' else string ( pos : pos ) = '0' end if end do if ( present ( status ) ) status = success contains subroutine digit_count ( bits , digits ) integer ( bits_kind ), intent ( in ) :: bits integer ( bits_kind ), intent ( out ) :: digits integer ( bits_kind ) :: factor factor = bits if ( factor <= 0 ) then digits = 1 return end if do digits = 1 , 127 factor = factor / 10 if ( factor == 0 ) return end do end subroutine digit_count end subroutine write_bitset_string_64 module subroutine write_bitset_unit_64 ( self , unit , advance , status ) ! ! Writes a bitset literal to the I/O unit, UNIT, representing the ! individual bit values in the bitset_t, SELF. By default or if ! ADVANCE is present with the value 'YES', advancing output is used. ! If ADVANCE is present with the value 'NO', then the current record ! is not advanced by the write. If STATUS is absent an error results ! in an error stop with an informative stop code. If STATUS is ! present it has the default value of SUCCESS, the value ! ALLOC_FAULT if allocation of the output string failed, or ! WRITE_FAILURE if the WRITE statement outputting the literal failed. ! class ( bitset_64 ), intent ( in ) :: self integer , intent ( in ) :: unit character ( len =* ), intent ( in ), optional :: advance integer , intent ( out ), optional :: status integer :: ierr character (:), allocatable :: string character ( len = 120 ) :: message character ( * ), parameter :: procedure = \"WRITE_BITSET\" call self % write_bitset ( string , status ) if ( present ( status ) ) then if ( status /= success ) return end if write ( unit , & FMT = '(A)' , & advance = optval ( advance , 'YES' ), & iostat = ierr , & iomsg = message ) & string if ( ierr /= 0 ) then call error_handler ( 'Failure on a WRITE statement for UNIT.' , & write_failure , status , module_name , procedure ) return endif end subroutine write_bitset_unit_64 elemental module subroutine xor_64 ( set1 , set2 ) ! ! Sets the bits in SET1 to the bitwise XOR of the original bits in SET1 ! and SET2. SET1 and SET2 must have the same number of bits otherwise ! the result is undefined. ! type ( bitset_64 ), intent ( inout ) :: set1 type ( bitset_64 ), intent ( in ) :: set2 set1 % block = ieor ( set1 % block , & set2 % block ) end subroutine xor_64 end submodule stdlib_bitsets_64","tags":"","loc":"sourcefile/stdlib_bitsets_64.fypp.html"},{"title":"stdlib_codata.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_codata !! Codata Constants - Autogenerated use stdlib_kinds , only : dp , int32 use stdlib_codata_type private integer ( int32 ), parameter , public :: YEAR = 2022 !! Year of release. type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_ELECTRON_MASS_RATIO = & codata_constant_type ( \"alpha particle-electron mass ratio\" , & 729 4.29954171_dp , 0.00000017_dp , & \"\" ) !! alpha particle-electron mass ratio type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS = & codata_constant_type ( \"alpha particle mass\" , & 6.6446573450e-27_dp , 0.0000000021e-27_dp , & \"kg\" ) !! alpha particle mass type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"alpha particle mass energy equivalent\" , & 5.9719201997e-10_dp , 0.0000000019e-10_dp , & \"J\" ) !! alpha particle mass energy equivalent type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"alpha particle mass energy equivalent in MeV\" , & 372 7.3794118_dp , 0.0000012_dp , & \"MeV\" ) !! alpha particle mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MASS_IN_U = & codata_constant_type ( \"alpha particle mass in u\" , & 4.001506179129_dp , 0.000000000062_dp , & \"u\" ) !! alpha particle mass in u type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_MOLAR_MASS = & codata_constant_type ( \"alpha particle molar mass\" , & 4.0015061833e-3_dp , 0.0000000012e-3_dp , & \"kg mol^-1\" ) !! alpha particle molar mass type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_PROTON_MASS_RATIO = & codata_constant_type ( \"alpha particle-proton mass ratio\" , & 3.972599690252_dp , 0.000000000070_dp , & \"\" ) !! alpha particle-proton mass ratio type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"alpha particle relative atomic mass\" , & 4.001506179129_dp , 0.000000000062_dp , & \"\" ) !! alpha particle relative atomic mass type ( codata_constant_type ), parameter , public :: ALPHA_PARTICLE_RMS_CHARGE_RADIUS = & codata_constant_type ( \"alpha particle rms charge radius\" , & 1.6785e-15_dp , 0.0021e-15_dp , & \"m\" ) !! alpha particle rms charge radius type ( codata_constant_type ), parameter , public :: ANGSTROM_STAR = & codata_constant_type ( \"Angstrom star\" , & 1.00001495e-10_dp , 0.00000090e-10_dp , & \"m\" ) !! Angstrom star type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_CONSTANT = & codata_constant_type ( \"atomic mass constant\" , & 1.66053906892e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! atomic mass constant type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT = & codata_constant_type ( \"atomic mass constant energy equivalent\" , & 1.49241808768e-10_dp , 0.00000000046e-10_dp , & \"J\" ) !! atomic mass constant energy equivalent type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"atomic mass constant energy equivalent in MeV\" , & 93 1.49410372_dp , 0.00000029_dp , & \"MeV\" ) !! atomic mass constant energy equivalent in MeV type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-electron volt relationship\" , & 9.3149410372e8_dp , 0.0000000029e8_dp , & \"eV\" ) !! atomic mass unit-electron volt relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_HARTREE_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-hartree relationship\" , & 3.4231776922e7_dp , 0.0000000011e7_dp , & \"E_h\" ) !! atomic mass unit-hartree relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_HERTZ_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-hertz relationship\" , & 2.25234272185e23_dp , 0.00000000070e23_dp , & \"Hz\" ) !! atomic mass unit-hertz relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-inverse meter relationship\" , & 7.5130066209e14_dp , 0.0000000023e14_dp , & \"m^-1\" ) !! atomic mass unit-inverse meter relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_JOULE_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-joule relationship\" , & 1.49241808768e-10_dp , 0.00000000046e-10_dp , & \"J\" ) !! atomic mass unit-joule relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_KELVIN_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-kelvin relationship\" , & 1.08095402067e13_dp , 0.00000000034e13_dp , & \"K\" ) !! atomic mass unit-kelvin relationship type ( codata_constant_type ), parameter , public :: ATOMIC_MASS_UNIT_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"atomic mass unit-kilogram relationship\" , & 1.66053906892e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! atomic mass unit-kilogram relationship type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_1ST_HYPERPOLARIZABILITY = & codata_constant_type ( \"atomic unit of 1st hyperpolarizability\" , & 3.2063612996e-53_dp , 0.0000000015e-53_dp , & \"C^3 m^3 J^-2\" ) !! atomic unit of 1st hyperpolarizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_2ND_HYPERPOLARIZABILITY = & codata_constant_type ( \"atomic unit of 2nd hyperpolarizability\" , & 6.2353799735e-65_dp , 0.0000000039e-65_dp , & \"C^4 m^4 J^-3\" ) !! atomic unit of 2nd hyperpolarizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ACTION = & codata_constant_type ( \"atomic unit of action\" , & 1.054571817e-34_dp , 0.0_dp , & \"J s\" ) !! atomic unit of action type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_CHARGE = & codata_constant_type ( \"atomic unit of charge\" , & 1.602176634e-19_dp , 0.0_dp , & \"C\" ) !! atomic unit of charge type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_CHARGE_DENSITY = & codata_constant_type ( \"atomic unit of charge density\" , & 1.08120238677e12_dp , 0.00000000051e12_dp , & \"C m^-3\" ) !! atomic unit of charge density type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_CURRENT = & codata_constant_type ( \"atomic unit of current\" , & 6.6236182375082e-3_dp , 0.0000000000072e-3_dp , & \"A\" ) !! atomic unit of current type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_DIPOLE_MOM = & codata_constant_type ( \"atomic unit of electric dipole mom.\" , & 8.4783536198e-30_dp , 0.0000000013e-30_dp , & \"C m\" ) !! atomic unit of electric dipole mom. type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_FIELD = & codata_constant_type ( \"atomic unit of electric field\" , & 5.14220675112e11_dp , 0.00000000080e11_dp , & \"V m^-1\" ) !! atomic unit of electric field type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_FIELD_GRADIENT = & codata_constant_type ( \"atomic unit of electric field gradient\" , & 9.7173624424e21_dp , 0.0000000030e21_dp , & \"V m^-2\" ) !! atomic unit of electric field gradient type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_POLARIZABILITY = & codata_constant_type ( \"atomic unit of electric polarizability\" , & 1.64877727212e-41_dp , 0.00000000051e-41_dp , & \"C^2 m^2 J^-1\" ) !! atomic unit of electric polarizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_POTENTIAL = & codata_constant_type ( \"atomic unit of electric potential\" , & 2 7.211386245981_dp , 0.000000000030_dp , & \"V\" ) !! atomic unit of electric potential type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ELECTRIC_QUADRUPOLE_MOM = & codata_constant_type ( \"atomic unit of electric quadrupole mom.\" , & 4.4865515185e-40_dp , 0.0000000014e-40_dp , & \"C m^2\" ) !! atomic unit of electric quadrupole mom. type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_ENERGY = & codata_constant_type ( \"atomic unit of energy\" , & 4.3597447222060e-18_dp , 0.0000000000048e-18_dp , & \"J\" ) !! atomic unit of energy type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_FORCE = & codata_constant_type ( \"atomic unit of force\" , & 8.2387235038e-8_dp , 0.0000000013e-8_dp , & \"N\" ) !! atomic unit of force type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_LENGTH = & codata_constant_type ( \"atomic unit of length\" , & 5.29177210544e-11_dp , 0.00000000082e-11_dp , & \"m\" ) !! atomic unit of length type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MAG_DIPOLE_MOM = & codata_constant_type ( \"atomic unit of mag. dipole mom.\" , & 1.85480201315e-23_dp , 0.00000000058e-23_dp , & \"J T^-1\" ) !! atomic unit of mag. dipole mom. type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MAG_FLUX_DENSITY = & codata_constant_type ( \"atomic unit of mag. flux density\" , & 2.35051757077e5_dp , 0.00000000073e5_dp , & \"T\" ) !! atomic unit of mag. flux density type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MAGNETIZABILITY = & codata_constant_type ( \"atomic unit of magnetizability\" , & 7.8910365794e-29_dp , 0.0000000049e-29_dp , & \"J T^-2\" ) !! atomic unit of magnetizability type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MASS = & codata_constant_type ( \"atomic unit of mass\" , & 9.1093837139e-31_dp , 0.0000000028e-31_dp , & \"kg\" ) !! atomic unit of mass type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_MOMENTUM = & codata_constant_type ( \"atomic unit of momentum\" , & 1.99285191545e-24_dp , 0.00000000031e-24_dp , & \"kg m s^-1\" ) !! atomic unit of momentum type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_PERMITTIVITY = & codata_constant_type ( \"atomic unit of permittivity\" , & 1.11265005620e-10_dp , 0.00000000017e-10_dp , & \"F m^-1\" ) !! atomic unit of permittivity type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_TIME = & codata_constant_type ( \"atomic unit of time\" , & 2.4188843265864e-17_dp , 0.0000000000026e-17_dp , & \"s\" ) !! atomic unit of time type ( codata_constant_type ), parameter , public :: ATOMIC_UNIT_OF_VELOCITY = & codata_constant_type ( \"atomic unit of velocity\" , & 2.18769126216e6_dp , 0.00000000034e6_dp , & \"m s^-1\" ) !! atomic unit of velocity type ( codata_constant_type ), parameter , public :: AVOGADRO_CONSTANT = & codata_constant_type ( \"Avogadro constant\" , & 6.02214076e23_dp , 0.0_dp , & \"mol^-1\" ) !! Avogadro constant type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON = & codata_constant_type ( \"Bohr magneton\" , & 9.2740100657e-24_dp , 0.0000000029e-24_dp , & \"J T^-1\" ) !! Bohr magneton type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_EV_T = & codata_constant_type ( \"Bohr magneton in eV/T\" , & 5.7883817982e-5_dp , 0.0000000018e-5_dp , & \"eV T^-1\" ) !! Bohr magneton in eV/T type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_HZ_T = & codata_constant_type ( \"Bohr magneton in Hz/T\" , & 1.39962449171e10_dp , 0.00000000044e10_dp , & \"Hz T^-1\" ) !! Bohr magneton in Hz/T type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_INVERSE_METER_PER_TESLA = & codata_constant_type ( \"Bohr magneton in inverse meter per tesla\" , & 4 6.686447719_dp , 0.000000015_dp , & \"m^-1 T^-1\" ) !! Bohr magneton in inverse meter per tesla type ( codata_constant_type ), parameter , public :: BOHR_MAGNETON_IN_K_T = & codata_constant_type ( \"Bohr magneton in K/T\" , & 0.67171381472_dp , 0.00000000021_dp , & \"K T^-1\" ) !! Bohr magneton in K/T type ( codata_constant_type ), parameter , public :: BOHR_RADIUS = & codata_constant_type ( \"Bohr radius\" , & 5.29177210544e-11_dp , 0.00000000082e-11_dp , & \"m\" ) !! Bohr radius type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT = & codata_constant_type ( \"Boltzmann constant\" , & 1.380649e-23_dp , 0.0_dp , & \"J K^-1\" ) !! Boltzmann constant type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT_IN_EV_K = & codata_constant_type ( \"Boltzmann constant in eV/K\" , & 8.617333262e-5_dp , 0.0_dp , & \"eV K^-1\" ) !! Boltzmann constant in eV/K type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT_IN_HZ_K = & codata_constant_type ( \"Boltzmann constant in Hz/K\" , & 2.083661912e10_dp , 0.0_dp , & \"Hz K^-1\" ) !! Boltzmann constant in Hz/K type ( codata_constant_type ), parameter , public :: BOLTZMANN_CONSTANT_IN_INVERSE_METER_PER_KELVIN = & codata_constant_type ( \"Boltzmann constant in inverse meter per kelvin\" , & 6 9.50348004_dp , 0.0_dp , & \"m^-1 K^-1\" ) !! Boltzmann constant in inverse meter per kelvin type ( codata_constant_type ), parameter , public :: CHARACTERISTIC_IMPEDANCE_OF_VACUUM = & codata_constant_type ( \"characteristic impedance of vacuum\" , & 37 6.730313412_dp , 0.000000059_dp , & \"ohm\" ) !! characteristic impedance of vacuum type ( codata_constant_type ), parameter , public :: CLASSICAL_ELECTRON_RADIUS = & codata_constant_type ( \"classical electron radius\" , & 2.8179403205e-15_dp , 0.0000000013e-15_dp , & \"m\" ) !! classical electron radius type ( codata_constant_type ), parameter , public :: COMPTON_WAVELENGTH = & codata_constant_type ( \"Compton wavelength\" , & 2.42631023538e-12_dp , 0.00000000076e-12_dp , & \"m\" ) !! Compton wavelength type ( codata_constant_type ), parameter , public :: CONDUCTANCE_QUANTUM = & codata_constant_type ( \"conductance quantum\" , & 7.748091729e-5_dp , 0.0_dp , & \"S\" ) !! conductance quantum type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_AMPERE_90 = & codata_constant_type ( \"conventional value of ampere-90\" , & 1.00000008887_dp , 0.0_dp , & \"A\" ) !! conventional value of ampere-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_COULOMB_90 = & codata_constant_type ( \"conventional value of coulomb-90\" , & 1.00000008887_dp , 0.0_dp , & \"C\" ) !! conventional value of coulomb-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_FARAD_90 = & codata_constant_type ( \"conventional value of farad-90\" , & 0.99999998220_dp , 0.0_dp , & \"F\" ) !! conventional value of farad-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_HENRY_90 = & codata_constant_type ( \"conventional value of henry-90\" , & 1.00000001779_dp , 0.0_dp , & \"H\" ) !! conventional value of henry-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_JOSEPHSON_CONSTANT = & codata_constant_type ( \"conventional value of Josephson constant\" , & 48359 7.9e9_dp , 0.0_dp , & \"Hz V^-1\" ) !! conventional value of Josephson constant type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_OHM_90 = & codata_constant_type ( \"conventional value of ohm-90\" , & 1.00000001779_dp , 0.0_dp , & \"ohm\" ) !! conventional value of ohm-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_VOLT_90 = & codata_constant_type ( \"conventional value of volt-90\" , & 1.00000010666_dp , 0.0_dp , & \"V\" ) !! conventional value of volt-90 type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_VON_KLITZING_CONSTANT = & codata_constant_type ( \"conventional value of von Klitzing constant\" , & 2581 2.807_dp , 0.0_dp , & \"ohm\" ) !! conventional value of von Klitzing constant type ( codata_constant_type ), parameter , public :: CONVENTIONAL_VALUE_OF_WATT_90 = & codata_constant_type ( \"conventional value of watt-90\" , & 1.00000019553_dp , 0.0_dp , & \"W\" ) !! conventional value of watt-90 type ( codata_constant_type ), parameter , public :: COPPER_X_UNIT = & codata_constant_type ( \"Copper x unit\" , & 1.00207697e-13_dp , 0.00000028e-13_dp , & \"m\" ) !! Copper x unit type ( codata_constant_type ), parameter , public :: DEUTERON_ELECTRON_MAG_MOM_RATIO = & codata_constant_type ( \"deuteron-electron mag. mom. ratio\" , & - 4.664345550e-4_dp , 0.000000012e-4_dp , & \"\" ) !! deuteron-electron mag. mom. ratio type ( codata_constant_type ), parameter , public :: DEUTERON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"deuteron-electron mass ratio\" , & 367 0.482967655_dp , 0.000000063_dp , & \"\" ) !! deuteron-electron mass ratio type ( codata_constant_type ), parameter , public :: DEUTERON_G_FACTOR = & codata_constant_type ( \"deuteron g factor\" , & 0.8574382335_dp , 0.0000000022_dp , & \"\" ) !! deuteron g factor type ( codata_constant_type ), parameter , public :: DEUTERON_MAG_MOM = & codata_constant_type ( \"deuteron mag. mom.\" , & 4.330735087e-27_dp , 0.000000011e-27_dp , & \"J T^-1\" ) !! deuteron mag. mom. type ( codata_constant_type ), parameter , public :: DEUTERON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"deuteron mag. mom. to Bohr magneton ratio\" , & 4.669754568e-4_dp , 0.000000012e-4_dp , & \"\" ) !! deuteron mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: DEUTERON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"deuteron mag. mom. to nuclear magneton ratio\" , & 0.8574382335_dp , 0.0000000022_dp , & \"\" ) !! deuteron mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: DEUTERON_MASS = & codata_constant_type ( \"deuteron mass\" , & 3.3435837768e-27_dp , 0.0000000010e-27_dp , & \"kg\" ) !! deuteron mass type ( codata_constant_type ), parameter , public :: DEUTERON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"deuteron mass energy equivalent\" , & 3.00506323491e-10_dp , 0.00000000094e-10_dp , & \"J\" ) !! deuteron mass energy equivalent type ( codata_constant_type ), parameter , public :: DEUTERON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"deuteron mass energy equivalent in MeV\" , & 187 5.61294500_dp , 0.00000058_dp , & \"MeV\" ) !! deuteron mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: DEUTERON_MASS_IN_U = & codata_constant_type ( \"deuteron mass in u\" , & 2.013553212544_dp , 0.000000000015_dp , & \"u\" ) !! deuteron mass in u type ( codata_constant_type ), parameter , public :: DEUTERON_MOLAR_MASS = & codata_constant_type ( \"deuteron molar mass\" , & 2.01355321466e-3_dp , 0.00000000063e-3_dp , & \"kg mol^-1\" ) !! deuteron molar mass type ( codata_constant_type ), parameter , public :: DEUTERON_NEUTRON_MAG_MOM_RATIO = & codata_constant_type ( \"deuteron-neutron mag. mom. ratio\" , & - 0.44820652_dp , 0.00000011_dp , & \"\" ) !! deuteron-neutron mag. mom. ratio type ( codata_constant_type ), parameter , public :: DEUTERON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"deuteron-proton mag. mom. ratio\" , & 0.30701220930_dp , 0.00000000079_dp , & \"\" ) !! deuteron-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: DEUTERON_PROTON_MASS_RATIO = & codata_constant_type ( \"deuteron-proton mass ratio\" , & 1.9990075012699_dp , 0.0000000000084_dp , & \"\" ) !! deuteron-proton mass ratio type ( codata_constant_type ), parameter , public :: DEUTERON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"deuteron relative atomic mass\" , & 2.013553212544_dp , 0.000000000015_dp , & \"\" ) !! deuteron relative atomic mass type ( codata_constant_type ), parameter , public :: DEUTERON_RMS_CHARGE_RADIUS = & codata_constant_type ( \"deuteron rms charge radius\" , & 2.12778e-15_dp , 0.00027e-15_dp , & \"m\" ) !! deuteron rms charge radius type ( codata_constant_type ), parameter , public :: ELECTRON_CHARGE_TO_MASS_QUOTIENT = & codata_constant_type ( \"electron charge to mass quotient\" , & - 1.75882000838e11_dp , 0.00000000055e11_dp , & \"C kg^-1\" ) !! electron charge to mass quotient type ( codata_constant_type ), parameter , public :: ELECTRON_DEUTERON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-deuteron mag. mom. ratio\" , & - 214 3.9234921_dp , 0.0000056_dp , & \"\" ) !! electron-deuteron mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_DEUTERON_MASS_RATIO = & codata_constant_type ( \"electron-deuteron mass ratio\" , & 2.724437107629e-4_dp , 0.000000000047e-4_dp , & \"\" ) !! electron-deuteron mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_G_FACTOR = & codata_constant_type ( \"electron g factor\" , & - 2.00231930436092_dp , 0.00000000000036_dp , & \"\" ) !! electron g factor type ( codata_constant_type ), parameter , public :: ELECTRON_GYROMAG_RATIO = & codata_constant_type ( \"electron gyromag. ratio\" , & 1.76085962784e11_dp , 0.00000000055e11_dp , & \"s^-1 T^-1\" ) !! electron gyromag. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"electron gyromag. ratio in MHz/T\" , & 2802 4.9513861_dp , 0.0000087_dp , & \"MHz T^-1\" ) !! electron gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: ELECTRON_HELION_MASS_RATIO = & codata_constant_type ( \"electron-helion mass ratio\" , & 1.819543074649e-4_dp , 0.000000000053e-4_dp , & \"\" ) !! electron-helion mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM = & codata_constant_type ( \"electron mag. mom.\" , & - 9.2847646917e-24_dp , 0.0000000029e-24_dp , & \"J T^-1\" ) !! electron mag. mom. type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM_ANOMALY = & codata_constant_type ( \"electron mag. mom. anomaly\" , & 1.15965218046e-3_dp , 0.00000000018e-3_dp , & \"\" ) !! electron mag. mom. anomaly type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"electron mag. mom. to Bohr magneton ratio\" , & - 1.00115965218046_dp , 0.00000000000018_dp , & \"\" ) !! electron mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"electron mag. mom. to nuclear magneton ratio\" , & - 183 8.281971877_dp , 0.000000032_dp , & \"\" ) !! electron mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MASS = & codata_constant_type ( \"electron mass\" , & 9.1093837139e-31_dp , 0.0000000028e-31_dp , & \"kg\" ) !! electron mass type ( codata_constant_type ), parameter , public :: ELECTRON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"electron mass energy equivalent\" , & 8.1871057880e-14_dp , 0.0000000026e-14_dp , & \"J\" ) !! electron mass energy equivalent type ( codata_constant_type ), parameter , public :: ELECTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"electron mass energy equivalent in MeV\" , & 0.51099895069_dp , 0.00000000016_dp , & \"MeV\" ) !! electron mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: ELECTRON_MASS_IN_U = & codata_constant_type ( \"electron mass in u\" , & 5.485799090441e-4_dp , 0.000000000097e-4_dp , & \"u\" ) !! electron mass in u type ( codata_constant_type ), parameter , public :: ELECTRON_MOLAR_MASS = & codata_constant_type ( \"electron molar mass\" , & 5.4857990962e-7_dp , 0.0000000017e-7_dp , & \"kg mol^-1\" ) !! electron molar mass type ( codata_constant_type ), parameter , public :: ELECTRON_MUON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-muon mag. mom. ratio\" , & 20 6.7669881_dp , 0.0000046_dp , & \"\" ) !! electron-muon mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_MUON_MASS_RATIO = & codata_constant_type ( \"electron-muon mass ratio\" , & 4.83633170e-3_dp , 0.00000011e-3_dp , & \"\" ) !! electron-muon mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_NEUTRON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-neutron mag. mom. ratio\" , & 96 0.92048_dp , 0.00023_dp , & \"\" ) !! electron-neutron mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_NEUTRON_MASS_RATIO = & codata_constant_type ( \"electron-neutron mass ratio\" , & 5.4386734416e-4_dp , 0.0000000022e-4_dp , & \"\" ) !! electron-neutron mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"electron-proton mag. mom. ratio\" , & - 65 8.21068789_dp , 0.00000019_dp , & \"\" ) !! electron-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_PROTON_MASS_RATIO = & codata_constant_type ( \"electron-proton mass ratio\" , & 5.446170214889e-4_dp , 0.000000000094e-4_dp , & \"\" ) !! electron-proton mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"electron relative atomic mass\" , & 5.485799090441e-4_dp , 0.000000000097e-4_dp , & \"\" ) !! electron relative atomic mass type ( codata_constant_type ), parameter , public :: ELECTRON_TAU_MASS_RATIO = & codata_constant_type ( \"electron-tau mass ratio\" , & 2.87585e-4_dp , 0.00019e-4_dp , & \"\" ) !! electron-tau mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TO_ALPHA_PARTICLE_MASS_RATIO = & codata_constant_type ( \"electron to alpha particle mass ratio\" , & 1.370933554733e-4_dp , 0.000000000032e-4_dp , & \"\" ) !! electron to alpha particle mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TO_SHIELDED_HELION_MAG_MOM_RATIO = & codata_constant_type ( \"electron to shielded helion mag. mom. ratio\" , & 86 4.05823986_dp , 0.00000070_dp , & \"\" ) !! electron to shielded helion mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"electron to shielded proton mag. mom. ratio\" , & - 65 8.2275856_dp , 0.0000027_dp , & \"\" ) !! electron to shielded proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: ELECTRON_TRITON_MASS_RATIO = & codata_constant_type ( \"electron-triton mass ratio\" , & 1.819200062327e-4_dp , 0.000000000068e-4_dp , & \"\" ) !! electron-triton mass ratio type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT = & codata_constant_type ( \"electron volt\" , & 1.602176634e-19_dp , 0.0_dp , & \"J\" ) !! electron volt type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"electron volt-atomic mass unit relationship\" , & 1.07354410083e-9_dp , 0.00000000033e-9_dp , & \"u\" ) !! electron volt-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_HARTREE_RELATIONSHIP = & codata_constant_type ( \"electron volt-hartree relationship\" , & 3.6749322175665e-2_dp , 0.0000000000040e-2_dp , & \"E_h\" ) !! electron volt-hartree relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_HERTZ_RELATIONSHIP = & codata_constant_type ( \"electron volt-hertz relationship\" , & 2.417989242e14_dp , 0.0_dp , & \"Hz\" ) !! electron volt-hertz relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"electron volt-inverse meter relationship\" , & 8.065543937e5_dp , 0.0_dp , & \"m^-1\" ) !! electron volt-inverse meter relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_JOULE_RELATIONSHIP = & codata_constant_type ( \"electron volt-joule relationship\" , & 1.602176634e-19_dp , 0.0_dp , & \"J\" ) !! electron volt-joule relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_KELVIN_RELATIONSHIP = & codata_constant_type ( \"electron volt-kelvin relationship\" , & 1.160451812e4_dp , 0.0_dp , & \"K\" ) !! electron volt-kelvin relationship type ( codata_constant_type ), parameter , public :: ELECTRON_VOLT_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"electron volt-kilogram relationship\" , & 1.782661921e-36_dp , 0.0_dp , & \"kg\" ) !! electron volt-kilogram relationship type ( codata_constant_type ), parameter , public :: ELEMENTARY_CHARGE = & codata_constant_type ( \"elementary charge\" , & 1.602176634e-19_dp , 0.0_dp , & \"C\" ) !! elementary charge type ( codata_constant_type ), parameter , public :: ELEMENTARY_CHARGE_OVER_H_BAR = & codata_constant_type ( \"elementary charge over h-bar\" , & 1.519267447e15_dp , 0.0_dp , & \"A J^-1\" ) !! elementary charge over h-bar type ( codata_constant_type ), parameter , public :: FARADAY_CONSTANT = & codata_constant_type ( \"Faraday constant\" , & 9648 5.33212_dp , 0.0_dp , & \"C mol^-1\" ) !! Faraday constant type ( codata_constant_type ), parameter , public :: FERMI_COUPLING_CONSTANT = & codata_constant_type ( \"Fermi coupling constant\" , & 1.1663787e-5_dp , 0.0000006e-5_dp , & \"GeV^-2\" ) !! Fermi coupling constant type ( codata_constant_type ), parameter , public :: FINE_STRUCTURE_CONSTANT = & codata_constant_type ( \"fine-structure constant\" , & 7.2973525643e-3_dp , 0.0000000011e-3_dp , & \"\" ) !! fine-structure constant type ( codata_constant_type ), parameter , public :: FIRST_RADIATION_CONSTANT = & codata_constant_type ( \"first radiation constant\" , & 3.741771852e-16_dp , 0.0_dp , & \"W m^2\" ) !! first radiation constant type ( codata_constant_type ), parameter , public :: FIRST_RADIATION_CONSTANT_FOR_SPECTRAL_RADIANCE = & codata_constant_type ( \"first radiation constant for spectral radiance\" , & 1.191042972e-16_dp , 0.0_dp , & \"W m^2 sr^-1\" ) !! first radiation constant for spectral radiance type ( codata_constant_type ), parameter , public :: HARTREE_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"hartree-atomic mass unit relationship\" , & 2.92126231797e-8_dp , 0.00000000091e-8_dp , & \"u\" ) !! hartree-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: HARTREE_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"hartree-electron volt relationship\" , & 2 7.211386245981_dp , 0.000000000030_dp , & \"eV\" ) !! hartree-electron volt relationship type ( codata_constant_type ), parameter , public :: HARTREE_ENERGY = & codata_constant_type ( \"Hartree energy\" , & 4.3597447222060e-18_dp , 0.0000000000048e-18_dp , & \"J\" ) !! Hartree energy type ( codata_constant_type ), parameter , public :: HARTREE_ENERGY_IN_EV = & codata_constant_type ( \"Hartree energy in eV\" , & 2 7.211386245981_dp , 0.000000000030_dp , & \"eV\" ) !! Hartree energy in eV type ( codata_constant_type ), parameter , public :: HARTREE_HERTZ_RELATIONSHIP = & codata_constant_type ( \"hartree-hertz relationship\" , & 6.5796839204999e15_dp , 0.0000000000072e15_dp , & \"Hz\" ) !! hartree-hertz relationship type ( codata_constant_type ), parameter , public :: HARTREE_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"hartree-inverse meter relationship\" , & 2.1947463136314e7_dp , 0.0000000000024e7_dp , & \"m^-1\" ) !! hartree-inverse meter relationship type ( codata_constant_type ), parameter , public :: HARTREE_JOULE_RELATIONSHIP = & codata_constant_type ( \"hartree-joule relationship\" , & 4.3597447222060e-18_dp , 0.0000000000048e-18_dp , & \"J\" ) !! hartree-joule relationship type ( codata_constant_type ), parameter , public :: HARTREE_KELVIN_RELATIONSHIP = & codata_constant_type ( \"hartree-kelvin relationship\" , & 3.1577502480398e5_dp , 0.0000000000034e5_dp , & \"K\" ) !! hartree-kelvin relationship type ( codata_constant_type ), parameter , public :: HARTREE_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"hartree-kilogram relationship\" , & 4.8508702095419e-35_dp , 0.0000000000053e-35_dp , & \"kg\" ) !! hartree-kilogram relationship type ( codata_constant_type ), parameter , public :: HELION_ELECTRON_MASS_RATIO = & codata_constant_type ( \"helion-electron mass ratio\" , & 549 5.88527984_dp , 0.00000016_dp , & \"\" ) !! helion-electron mass ratio type ( codata_constant_type ), parameter , public :: HELION_G_FACTOR = & codata_constant_type ( \"helion g factor\" , & - 4.2552506995_dp , 0.0000000034_dp , & \"\" ) !! helion g factor type ( codata_constant_type ), parameter , public :: HELION_MAG_MOM = & codata_constant_type ( \"helion mag. mom.\" , & - 1.07461755198e-26_dp , 0.00000000093e-26_dp , & \"J T^-1\" ) !! helion mag. mom. type ( codata_constant_type ), parameter , public :: HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"helion mag. mom. to Bohr magneton ratio\" , & - 1.15874098083e-3_dp , 0.00000000094e-3_dp , & \"\" ) !! helion mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"helion mag. mom. to nuclear magneton ratio\" , & - 2.1276253498_dp , 0.0000000017_dp , & \"\" ) !! helion mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: HELION_MASS = & codata_constant_type ( \"helion mass\" , & 5.0064127862e-27_dp , 0.0000000016e-27_dp , & \"kg\" ) !! helion mass type ( codata_constant_type ), parameter , public :: HELION_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"helion mass energy equivalent\" , & 4.4995394185e-10_dp , 0.0000000014e-10_dp , & \"J\" ) !! helion mass energy equivalent type ( codata_constant_type ), parameter , public :: HELION_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"helion mass energy equivalent in MeV\" , & 280 8.39161112_dp , 0.00000088_dp , & \"MeV\" ) !! helion mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: HELION_MASS_IN_U = & codata_constant_type ( \"helion mass in u\" , & 3.014932246932_dp , 0.000000000074_dp , & \"u\" ) !! helion mass in u type ( codata_constant_type ), parameter , public :: HELION_MOLAR_MASS = & codata_constant_type ( \"helion molar mass\" , & 3.01493225010e-3_dp , 0.00000000094e-3_dp , & \"kg mol^-1\" ) !! helion molar mass type ( codata_constant_type ), parameter , public :: HELION_PROTON_MASS_RATIO = & codata_constant_type ( \"helion-proton mass ratio\" , & 2.993152671552_dp , 0.000000000070_dp , & \"\" ) !! helion-proton mass ratio type ( codata_constant_type ), parameter , public :: HELION_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"helion relative atomic mass\" , & 3.014932246932_dp , 0.000000000074_dp , & \"\" ) !! helion relative atomic mass type ( codata_constant_type ), parameter , public :: HELION_SHIELDING_SHIFT = & codata_constant_type ( \"helion shielding shift\" , & 5.9967029e-5_dp , 0.0000023e-5_dp , & \"\" ) !! helion shielding shift type ( codata_constant_type ), parameter , public :: HERTZ_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"hertz-atomic mass unit relationship\" , & 4.4398216590e-24_dp , 0.0000000014e-24_dp , & \"u\" ) !! hertz-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: HERTZ_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"hertz-electron volt relationship\" , & 4.135667696e-15_dp , 0.0_dp , & \"eV\" ) !! hertz-electron volt relationship type ( codata_constant_type ), parameter , public :: HERTZ_HARTREE_RELATIONSHIP = & codata_constant_type ( \"hertz-hartree relationship\" , & 1.5198298460574e-16_dp , 0.0000000000017e-16_dp , & \"E_h\" ) !! hertz-hartree relationship type ( codata_constant_type ), parameter , public :: HERTZ_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"hertz-inverse meter relationship\" , & 3.335640951e-9_dp , 0.0_dp , & \"m^-1\" ) !! hertz-inverse meter relationship type ( codata_constant_type ), parameter , public :: HERTZ_JOULE_RELATIONSHIP = & codata_constant_type ( \"hertz-joule relationship\" , & 6.62607015e-34_dp , 0.0_dp , & \"J\" ) !! hertz-joule relationship type ( codata_constant_type ), parameter , public :: HERTZ_KELVIN_RELATIONSHIP = & codata_constant_type ( \"hertz-kelvin relationship\" , & 4.799243073e-11_dp , 0.0_dp , & \"K\" ) !! hertz-kelvin relationship type ( codata_constant_type ), parameter , public :: HERTZ_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"hertz-kilogram relationship\" , & 7.372497323e-51_dp , 0.0_dp , & \"kg\" ) !! hertz-kilogram relationship type ( codata_constant_type ), parameter , public :: HYPERFINE_TRANSITION_FREQUENCY_OF_CS_133 = & codata_constant_type ( \"hyperfine transition frequency of Cs-133\" , & 9192631770_dp , 0.0_dp , & \"Hz\" ) !! hyperfine transition frequency of Cs-133 type ( codata_constant_type ), parameter , public :: INVERSE_FINE_STRUCTURE_CONSTANT = & codata_constant_type ( \"inverse fine-structure constant\" , & 13 7.035999177_dp , 0.000000021_dp , & \"\" ) !! inverse fine-structure constant type ( codata_constant_type ), parameter , public :: INVERSE_METER_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"inverse meter-atomic mass unit relationship\" , & 1.33102504824e-15_dp , 0.00000000041e-15_dp , & \"u\" ) !! inverse meter-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"inverse meter-electron volt relationship\" , & 1.239841984e-6_dp , 0.0_dp , & \"eV\" ) !! inverse meter-electron volt relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_HARTREE_RELATIONSHIP = & codata_constant_type ( \"inverse meter-hartree relationship\" , & 4.5563352529132e-8_dp , 0.0000000000050e-8_dp , & \"E_h\" ) !! inverse meter-hartree relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_HERTZ_RELATIONSHIP = & codata_constant_type ( \"inverse meter-hertz relationship\" , & 299792458_dp , 0.0_dp , & \"Hz\" ) !! inverse meter-hertz relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_JOULE_RELATIONSHIP = & codata_constant_type ( \"inverse meter-joule relationship\" , & 1.986445857e-25_dp , 0.0_dp , & \"J\" ) !! inverse meter-joule relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_KELVIN_RELATIONSHIP = & codata_constant_type ( \"inverse meter-kelvin relationship\" , & 1.438776877e-2_dp , 0.0_dp , & \"K\" ) !! inverse meter-kelvin relationship type ( codata_constant_type ), parameter , public :: INVERSE_METER_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"inverse meter-kilogram relationship\" , & 2.210219094e-42_dp , 0.0_dp , & \"kg\" ) !! inverse meter-kilogram relationship type ( codata_constant_type ), parameter , public :: INVERSE_OF_CONDUCTANCE_QUANTUM = & codata_constant_type ( \"inverse of conductance quantum\" , & 1290 6.40372_dp , 0.0_dp , & \"ohm\" ) !! inverse of conductance quantum type ( codata_constant_type ), parameter , public :: JOSEPHSON_CONSTANT = & codata_constant_type ( \"Josephson constant\" , & 48359 7.8484e9_dp , 0.0_dp , & \"Hz V^-1\" ) !! Josephson constant type ( codata_constant_type ), parameter , public :: JOULE_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"joule-atomic mass unit relationship\" , & 6.7005352471e9_dp , 0.0000000021e9_dp , & \"u\" ) !! joule-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: JOULE_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"joule-electron volt relationship\" , & 6.241509074e18_dp , 0.0_dp , & \"eV\" ) !! joule-electron volt relationship type ( codata_constant_type ), parameter , public :: JOULE_HARTREE_RELATIONSHIP = & codata_constant_type ( \"joule-hartree relationship\" , & 2.2937122783969e17_dp , 0.0000000000025e17_dp , & \"E_h\" ) !! joule-hartree relationship type ( codata_constant_type ), parameter , public :: JOULE_HERTZ_RELATIONSHIP = & codata_constant_type ( \"joule-hertz relationship\" , & 1.509190179e33_dp , 0.0_dp , & \"Hz\" ) !! joule-hertz relationship type ( codata_constant_type ), parameter , public :: JOULE_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"joule-inverse meter relationship\" , & 5.034116567e24_dp , 0.0_dp , & \"m^-1\" ) !! joule-inverse meter relationship type ( codata_constant_type ), parameter , public :: JOULE_KELVIN_RELATIONSHIP = & codata_constant_type ( \"joule-kelvin relationship\" , & 7.242970516e22_dp , 0.0_dp , & \"K\" ) !! joule-kelvin relationship type ( codata_constant_type ), parameter , public :: JOULE_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"joule-kilogram relationship\" , & 1.112650056e-17_dp , 0.0_dp , & \"kg\" ) !! joule-kilogram relationship type ( codata_constant_type ), parameter , public :: KELVIN_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"kelvin-atomic mass unit relationship\" , & 9.2510872884e-14_dp , 0.0000000029e-14_dp , & \"u\" ) !! kelvin-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: KELVIN_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"kelvin-electron volt relationship\" , & 8.617333262e-5_dp , 0.0_dp , & \"eV\" ) !! kelvin-electron volt relationship type ( codata_constant_type ), parameter , public :: KELVIN_HARTREE_RELATIONSHIP = & codata_constant_type ( \"kelvin-hartree relationship\" , & 3.1668115634564e-6_dp , 0.0000000000035e-6_dp , & \"E_h\" ) !! kelvin-hartree relationship type ( codata_constant_type ), parameter , public :: KELVIN_HERTZ_RELATIONSHIP = & codata_constant_type ( \"kelvin-hertz relationship\" , & 2.083661912e10_dp , 0.0_dp , & \"Hz\" ) !! kelvin-hertz relationship type ( codata_constant_type ), parameter , public :: KELVIN_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"kelvin-inverse meter relationship\" , & 6 9.50348004_dp , 0.0_dp , & \"m^-1\" ) !! kelvin-inverse meter relationship type ( codata_constant_type ), parameter , public :: KELVIN_JOULE_RELATIONSHIP = & codata_constant_type ( \"kelvin-joule relationship\" , & 1.380649e-23_dp , 0.0_dp , & \"J\" ) !! kelvin-joule relationship type ( codata_constant_type ), parameter , public :: KELVIN_KILOGRAM_RELATIONSHIP = & codata_constant_type ( \"kelvin-kilogram relationship\" , & 1.536179187e-40_dp , 0.0_dp , & \"kg\" ) !! kelvin-kilogram relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_ATOMIC_MASS_UNIT_RELATIONSHIP = & codata_constant_type ( \"kilogram-atomic mass unit relationship\" , & 6.0221407537e26_dp , 0.0000000019e26_dp , & \"u\" ) !! kilogram-atomic mass unit relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_ELECTRON_VOLT_RELATIONSHIP = & codata_constant_type ( \"kilogram-electron volt relationship\" , & 5.609588603e35_dp , 0.0_dp , & \"eV\" ) !! kilogram-electron volt relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_HARTREE_RELATIONSHIP = & codata_constant_type ( \"kilogram-hartree relationship\" , & 2.0614857887415e34_dp , 0.0000000000022e34_dp , & \"E_h\" ) !! kilogram-hartree relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_HERTZ_RELATIONSHIP = & codata_constant_type ( \"kilogram-hertz relationship\" , & 1.356392489e50_dp , 0.0_dp , & \"Hz\" ) !! kilogram-hertz relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_INVERSE_METER_RELATIONSHIP = & codata_constant_type ( \"kilogram-inverse meter relationship\" , & 4.524438335e41_dp , 0.0_dp , & \"m^-1\" ) !! kilogram-inverse meter relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_JOULE_RELATIONSHIP = & codata_constant_type ( \"kilogram-joule relationship\" , & 8.987551787e16_dp , 0.0_dp , & \"J\" ) !! kilogram-joule relationship type ( codata_constant_type ), parameter , public :: KILOGRAM_KELVIN_RELATIONSHIP = & codata_constant_type ( \"kilogram-kelvin relationship\" , & 6.509657260e39_dp , 0.0_dp , & \"K\" ) !! kilogram-kelvin relationship type ( codata_constant_type ), parameter , public :: LATTICE_PARAMETER_OF_SILICON = & codata_constant_type ( \"lattice parameter of silicon\" , & 5.431020511e-10_dp , 0.000000089e-10_dp , & \"m\" ) !! lattice parameter of silicon type ( codata_constant_type ), parameter , public :: LATTICE_SPACING_OF_IDEAL_SI_220 = & codata_constant_type ( \"lattice spacing of ideal Si (220)\" , & 1.920155716e-10_dp , 0.000000032e-10_dp , & \"m\" ) !! lattice spacing of ideal Si (220) type ( codata_constant_type ), parameter , public :: LOSCHMIDT_CONSTANT_273_15_K_100_KPA = & codata_constant_type ( \"Loschmidt constant (273.15 K, 100 kPa)\" , & 2.651645804e25_dp , 0.0_dp , & \"m^-3\" ) !! Loschmidt constant (273.15 K, 100 kPa) type ( codata_constant_type ), parameter , public :: LOSCHMIDT_CONSTANT_273_15_K_101_325_KPA = & codata_constant_type ( \"Loschmidt constant (273.15 K, 101.325 kPa)\" , & 2.686780111e25_dp , 0.0_dp , & \"m^-3\" ) !! Loschmidt constant (273.15 K, 101.325 kPa) type ( codata_constant_type ), parameter , public :: LUMINOUS_EFFICACY = & codata_constant_type ( \"luminous efficacy\" , & 683_dp , 0.0_dp , & \"lm W^-1\" ) !! luminous efficacy type ( codata_constant_type ), parameter , public :: MAG_FLUX_QUANTUM = & codata_constant_type ( \"mag. flux quantum\" , & 2.067833848e-15_dp , 0.0_dp , & \"Wb\" ) !! mag. flux quantum type ( codata_constant_type ), parameter , public :: MOLAR_GAS_CONSTANT = & codata_constant_type ( \"molar gas constant\" , & 8.314462618_dp , 0.0_dp , & \"J mol^-1 K^-1\" ) !! molar gas constant type ( codata_constant_type ), parameter , public :: MOLAR_MASS_CONSTANT = & codata_constant_type ( \"molar mass constant\" , & 1.00000000105e-3_dp , 0.00000000031e-3_dp , & \"kg mol^-1\" ) !! molar mass constant type ( codata_constant_type ), parameter , public :: MOLAR_MASS_OF_CARBON_12 = & codata_constant_type ( \"molar mass of carbon-12\" , & 1 2.0000000126e-3_dp , 0.0000000037e-3_dp , & \"kg mol^-1\" ) !! molar mass of carbon-12 type ( codata_constant_type ), parameter , public :: MOLAR_PLANCK_CONSTANT = & codata_constant_type ( \"molar Planck constant\" , & 3.990312712e-10_dp , 0.0_dp , & \"J Hz^-1 mol^-1\" ) !! molar Planck constant type ( codata_constant_type ), parameter , public :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_100_KPA = & codata_constant_type ( \"molar volume of ideal gas (273.15 K, 100 kPa)\" , & 2 2.71095464e-3_dp , 0.0_dp , & \"m^3 mol^-1\" ) !! molar volume of ideal gas (273.15 K, 100 kPa) type ( codata_constant_type ), parameter , public :: MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA = & codata_constant_type ( \"molar volume of ideal gas (273.15 K, 101.325 kPa)\" , & 2 2.41396954e-3_dp , 0.0_dp , & \"m^3 mol^-1\" ) !! molar volume of ideal gas (273.15 K, 101.325 kPa) type ( codata_constant_type ), parameter , public :: MOLAR_VOLUME_OF_SILICON = & codata_constant_type ( \"molar volume of silicon\" , & 1.205883199e-5_dp , 0.000000060e-5_dp , & \"m^3 mol^-1\" ) !! molar volume of silicon type ( codata_constant_type ), parameter , public :: MOLYBDENUM_X_UNIT = & codata_constant_type ( \"Molybdenum x unit\" , & 1.00209952e-13_dp , 0.00000053e-13_dp , & \"m\" ) !! Molybdenum x unit type ( codata_constant_type ), parameter , public :: MUON_COMPTON_WAVELENGTH = & codata_constant_type ( \"muon Compton wavelength\" , & 1.173444110e-14_dp , 0.000000026e-14_dp , & \"m\" ) !! muon Compton wavelength type ( codata_constant_type ), parameter , public :: MUON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"muon-electron mass ratio\" , & 20 6.7682827_dp , 0.0000046_dp , & \"\" ) !! muon-electron mass ratio type ( codata_constant_type ), parameter , public :: MUON_G_FACTOR = & codata_constant_type ( \"muon g factor\" , & - 2.00233184123_dp , 0.00000000082_dp , & \"\" ) !! muon g factor type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM = & codata_constant_type ( \"muon mag. mom.\" , & - 4.49044830e-26_dp , 0.00000010e-26_dp , & \"J T^-1\" ) !! muon mag. mom. type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM_ANOMALY = & codata_constant_type ( \"muon mag. mom. anomaly\" , & 1.16592062e-3_dp , 0.00000041e-3_dp , & \"\" ) !! muon mag. mom. anomaly type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"muon mag. mom. to Bohr magneton ratio\" , & - 4.84197048e-3_dp , 0.00000011e-3_dp , & \"\" ) !! muon mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: MUON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"muon mag. mom. to nuclear magneton ratio\" , & - 8.89059704_dp , 0.00000020_dp , & \"\" ) !! muon mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: MUON_MASS = & codata_constant_type ( \"muon mass\" , & 1.883531627e-28_dp , 0.000000042e-28_dp , & \"kg\" ) !! muon mass type ( codata_constant_type ), parameter , public :: MUON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"muon mass energy equivalent\" , & 1.692833804e-11_dp , 0.000000038e-11_dp , & \"J\" ) !! muon mass energy equivalent type ( codata_constant_type ), parameter , public :: MUON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"muon mass energy equivalent in MeV\" , & 10 5.6583755_dp , 0.0000023_dp , & \"MeV\" ) !! muon mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: MUON_MASS_IN_U = & codata_constant_type ( \"muon mass in u\" , & 0.1134289257_dp , 0.0000000025_dp , & \"u\" ) !! muon mass in u type ( codata_constant_type ), parameter , public :: MUON_MOLAR_MASS = & codata_constant_type ( \"muon molar mass\" , & 1.134289258e-4_dp , 0.000000025e-4_dp , & \"kg mol^-1\" ) !! muon molar mass type ( codata_constant_type ), parameter , public :: MUON_NEUTRON_MASS_RATIO = & codata_constant_type ( \"muon-neutron mass ratio\" , & 0.1124545168_dp , 0.0000000025_dp , & \"\" ) !! muon-neutron mass ratio type ( codata_constant_type ), parameter , public :: MUON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"muon-proton mag. mom. ratio\" , & - 3.183345146_dp , 0.000000071_dp , & \"\" ) !! muon-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: MUON_PROTON_MASS_RATIO = & codata_constant_type ( \"muon-proton mass ratio\" , & 0.1126095262_dp , 0.0000000025_dp , & \"\" ) !! muon-proton mass ratio type ( codata_constant_type ), parameter , public :: MUON_TAU_MASS_RATIO = & codata_constant_type ( \"muon-tau mass ratio\" , & 5.94635e-2_dp , 0.00040e-2_dp , & \"\" ) !! muon-tau mass ratio type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ACTION = & codata_constant_type ( \"natural unit of action\" , & 1.054571817e-34_dp , 0.0_dp , & \"J s\" ) !! natural unit of action type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ACTION_IN_EV_S = & codata_constant_type ( \"natural unit of action in eV s\" , & 6.582119569e-16_dp , 0.0_dp , & \"eV s\" ) !! natural unit of action in eV s type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ENERGY = & codata_constant_type ( \"natural unit of energy\" , & 8.1871057880e-14_dp , 0.0000000026e-14_dp , & \"J\" ) !! natural unit of energy type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_ENERGY_IN_MEV = & codata_constant_type ( \"natural unit of energy in MeV\" , & 0.51099895069_dp , 0.00000000016_dp , & \"MeV\" ) !! natural unit of energy in MeV type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_LENGTH = & codata_constant_type ( \"natural unit of length\" , & 3.8615926744e-13_dp , 0.0000000012e-13_dp , & \"m\" ) !! natural unit of length type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_MASS = & codata_constant_type ( \"natural unit of mass\" , & 9.1093837139e-31_dp , 0.0000000028e-31_dp , & \"kg\" ) !! natural unit of mass type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_MOMENTUM = & codata_constant_type ( \"natural unit of momentum\" , & 2.73092453446e-22_dp , 0.00000000085e-22_dp , & \"kg m s^-1\" ) !! natural unit of momentum type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_MOMENTUM_IN_MEV_C = & codata_constant_type ( \"natural unit of momentum in MeV/c\" , & 0.51099895069_dp , 0.00000000016_dp , & \"MeV/c\" ) !! natural unit of momentum in MeV/c type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_TIME = & codata_constant_type ( \"natural unit of time\" , & 1.28808866644e-21_dp , 0.00000000040e-21_dp , & \"s\" ) !! natural unit of time type ( codata_constant_type ), parameter , public :: NATURAL_UNIT_OF_VELOCITY = & codata_constant_type ( \"natural unit of velocity\" , & 299792458_dp , 0.0_dp , & \"m s^-1\" ) !! natural unit of velocity type ( codata_constant_type ), parameter , public :: NEUTRON_COMPTON_WAVELENGTH = & codata_constant_type ( \"neutron Compton wavelength\" , & 1.31959090382e-15_dp , 0.00000000067e-15_dp , & \"m\" ) !! neutron Compton wavelength type ( codata_constant_type ), parameter , public :: NEUTRON_ELECTRON_MAG_MOM_RATIO = & codata_constant_type ( \"neutron-electron mag. mom. ratio\" , & 1.04066884e-3_dp , 0.00000024e-3_dp , & \"\" ) !! neutron-electron mag. mom. ratio type ( codata_constant_type ), parameter , public :: NEUTRON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"neutron-electron mass ratio\" , & 183 8.68366200_dp , 0.00000074_dp , & \"\" ) !! neutron-electron mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_G_FACTOR = & codata_constant_type ( \"neutron g factor\" , & - 3.82608552_dp , 0.00000090_dp , & \"\" ) !! neutron g factor type ( codata_constant_type ), parameter , public :: NEUTRON_GYROMAG_RATIO = & codata_constant_type ( \"neutron gyromag. ratio\" , & 1.83247174e8_dp , 0.00000043e8_dp , & \"s^-1 T^-1\" ) !! neutron gyromag. ratio type ( codata_constant_type ), parameter , public :: NEUTRON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"neutron gyromag. ratio in MHz/T\" , & 2 9.1646935_dp , 0.0000069_dp , & \"MHz T^-1\" ) !! neutron gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: NEUTRON_MAG_MOM = & codata_constant_type ( \"neutron mag. mom.\" , & - 9.6623653e-27_dp , 0.0000023e-27_dp , & \"J T^-1\" ) !! neutron mag. mom. type ( codata_constant_type ), parameter , public :: NEUTRON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"neutron mag. mom. to Bohr magneton ratio\" , & - 1.04187565e-3_dp , 0.00000025e-3_dp , & \"\" ) !! neutron mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: NEUTRON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"neutron mag. mom. to nuclear magneton ratio\" , & - 1.91304276_dp , 0.00000045_dp , & \"\" ) !! neutron mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: NEUTRON_MASS = & codata_constant_type ( \"neutron mass\" , & 1.67492750056e-27_dp , 0.00000000085e-27_dp , & \"kg\" ) !! neutron mass type ( codata_constant_type ), parameter , public :: NEUTRON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"neutron mass energy equivalent\" , & 1.50534976514e-10_dp , 0.00000000076e-10_dp , & \"J\" ) !! neutron mass energy equivalent type ( codata_constant_type ), parameter , public :: NEUTRON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"neutron mass energy equivalent in MeV\" , & 93 9.56542194_dp , 0.00000048_dp , & \"MeV\" ) !! neutron mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: NEUTRON_MASS_IN_U = & codata_constant_type ( \"neutron mass in u\" , & 1.00866491606_dp , 0.00000000040_dp , & \"u\" ) !! neutron mass in u type ( codata_constant_type ), parameter , public :: NEUTRON_MOLAR_MASS = & codata_constant_type ( \"neutron molar mass\" , & 1.00866491712e-3_dp , 0.00000000051e-3_dp , & \"kg mol^-1\" ) !! neutron molar mass type ( codata_constant_type ), parameter , public :: NEUTRON_MUON_MASS_RATIO = & codata_constant_type ( \"neutron-muon mass ratio\" , & 8.89248408_dp , 0.00000020_dp , & \"\" ) !! neutron-muon mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"neutron-proton mag. mom. ratio\" , & - 0.68497935_dp , 0.00000016_dp , & \"\" ) !! neutron-proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE = & codata_constant_type ( \"neutron-proton mass difference\" , & 2.30557461e-30_dp , 0.00000067e-30_dp , & \"kg\" ) !! neutron-proton mass difference type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT = & codata_constant_type ( \"neutron-proton mass difference energy equivalent\" , & 2.07214712e-13_dp , 0.00000060e-13_dp , & \"J\" ) !! neutron-proton mass difference energy equivalent type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"neutron-proton mass difference energy equivalent in MeV\" , & 1.29333251_dp , 0.00000038_dp , & \"MeV\" ) !! neutron-proton mass difference energy equivalent in MeV type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_DIFFERENCE_IN_U = & codata_constant_type ( \"neutron-proton mass difference in u\" , & 1.38844948e-3_dp , 0.00000040e-3_dp , & \"u\" ) !! neutron-proton mass difference in u type ( codata_constant_type ), parameter , public :: NEUTRON_PROTON_MASS_RATIO = & codata_constant_type ( \"neutron-proton mass ratio\" , & 1.00137841946_dp , 0.00000000040_dp , & \"\" ) !! neutron-proton mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"neutron relative atomic mass\" , & 1.00866491606_dp , 0.00000000040_dp , & \"\" ) !! neutron relative atomic mass type ( codata_constant_type ), parameter , public :: NEUTRON_TAU_MASS_RATIO = & codata_constant_type ( \"neutron-tau mass ratio\" , & 0.528779_dp , 0.000036_dp , & \"\" ) !! neutron-tau mass ratio type ( codata_constant_type ), parameter , public :: NEUTRON_TO_SHIELDED_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"neutron to shielded proton mag. mom. ratio\" , & - 0.68499694_dp , 0.00000016_dp , & \"\" ) !! neutron to shielded proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: NEWTONIAN_CONSTANT_OF_GRAVITATION = & codata_constant_type ( \"Newtonian constant of gravitation\" , & 6.67430e-11_dp , 0.00015e-11_dp , & \"m^3 kg^-1 s^-2\" ) !! Newtonian constant of gravitation type ( codata_constant_type ), parameter , public :: NEWTONIAN_CONSTANT_OF_GRAVITATION_OVER_H_BAR_C = & codata_constant_type ( \"Newtonian constant of gravitation over h-bar c\" , & 6.70883e-39_dp , 0.00015e-39_dp , & \"(GeV/c^2)^-2\" ) !! Newtonian constant of gravitation over h-bar c type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON = & codata_constant_type ( \"nuclear magneton\" , & 5.0507837393e-27_dp , 0.0000000016e-27_dp , & \"J T^-1\" ) !! nuclear magneton type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_EV_T = & codata_constant_type ( \"nuclear magneton in eV/T\" , & 3.15245125417e-8_dp , 0.00000000098e-8_dp , & \"eV T^-1\" ) !! nuclear magneton in eV/T type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_INVERSE_METER_PER_TESLA = & codata_constant_type ( \"nuclear magneton in inverse meter per tesla\" , & 2.54262341009e-2_dp , 0.00000000079e-2_dp , & \"m^-1 T^-1\" ) !! nuclear magneton in inverse meter per tesla type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_K_T = & codata_constant_type ( \"nuclear magneton in K/T\" , & 3.6582677706e-4_dp , 0.0000000011e-4_dp , & \"K T^-1\" ) !! nuclear magneton in K/T type ( codata_constant_type ), parameter , public :: NUCLEAR_MAGNETON_IN_MHZ_T = & codata_constant_type ( \"nuclear magneton in MHz/T\" , & 7.6225932188_dp , 0.0000000024_dp , & \"MHz T^-1\" ) !! nuclear magneton in MHz/T type ( codata_constant_type ), parameter , public :: PLANCK_CONSTANT = & codata_constant_type ( \"Planck constant\" , & 6.62607015e-34_dp , 0.0_dp , & \"J Hz^-1\" ) !! Planck constant type ( codata_constant_type ), parameter , public :: PLANCK_CONSTANT_IN_EV_HZ = & codata_constant_type ( \"Planck constant in eV/Hz\" , & 4.135667696e-15_dp , 0.0_dp , & \"eV Hz^-1\" ) !! Planck constant in eV/Hz type ( codata_constant_type ), parameter , public :: PLANCK_LENGTH = & codata_constant_type ( \"Planck length\" , & 1.616255e-35_dp , 0.000018e-35_dp , & \"m\" ) !! Planck length type ( codata_constant_type ), parameter , public :: PLANCK_MASS = & codata_constant_type ( \"Planck mass\" , & 2.176434e-8_dp , 0.000024e-8_dp , & \"kg\" ) !! Planck mass type ( codata_constant_type ), parameter , public :: PLANCK_MASS_ENERGY_EQUIVALENT_IN_GEV = & codata_constant_type ( \"Planck mass energy equivalent in GeV\" , & 1.220890e19_dp , 0.000014e19_dp , & \"GeV\" ) !! Planck mass energy equivalent in GeV type ( codata_constant_type ), parameter , public :: PLANCK_TEMPERATURE = & codata_constant_type ( \"Planck temperature\" , & 1.416784e32_dp , 0.000016e32_dp , & \"K\" ) !! Planck temperature type ( codata_constant_type ), parameter , public :: PLANCK_TIME = & codata_constant_type ( \"Planck time\" , & 5.391247e-44_dp , 0.000060e-44_dp , & \"s\" ) !! Planck time type ( codata_constant_type ), parameter , public :: PROTON_CHARGE_TO_MASS_QUOTIENT = & codata_constant_type ( \"proton charge to mass quotient\" , & 9.5788331430e7_dp , 0.0000000030e7_dp , & \"C kg^-1\" ) !! proton charge to mass quotient type ( codata_constant_type ), parameter , public :: PROTON_COMPTON_WAVELENGTH = & codata_constant_type ( \"proton Compton wavelength\" , & 1.32140985360e-15_dp , 0.00000000041e-15_dp , & \"m\" ) !! proton Compton wavelength type ( codata_constant_type ), parameter , public :: PROTON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"proton-electron mass ratio\" , & 183 6.152673426_dp , 0.000000032_dp , & \"\" ) !! proton-electron mass ratio type ( codata_constant_type ), parameter , public :: PROTON_G_FACTOR = & codata_constant_type ( \"proton g factor\" , & 5.5856946893_dp , 0.0000000016_dp , & \"\" ) !! proton g factor type ( codata_constant_type ), parameter , public :: PROTON_GYROMAG_RATIO = & codata_constant_type ( \"proton gyromag. ratio\" , & 2.6752218708e8_dp , 0.0000000011e8_dp , & \"s^-1 T^-1\" ) !! proton gyromag. ratio type ( codata_constant_type ), parameter , public :: PROTON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"proton gyromag. ratio in MHz/T\" , & 4 2.577478461_dp , 0.000000018_dp , & \"MHz T^-1\" ) !! proton gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: PROTON_MAG_MOM = & codata_constant_type ( \"proton mag. mom.\" , & 1.41060679545e-26_dp , 0.00000000060e-26_dp , & \"J T^-1\" ) !! proton mag. mom. type ( codata_constant_type ), parameter , public :: PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"proton mag. mom. to Bohr magneton ratio\" , & 1.52103220230e-3_dp , 0.00000000045e-3_dp , & \"\" ) !! proton mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"proton mag. mom. to nuclear magneton ratio\" , & 2.79284734463_dp , 0.00000000082_dp , & \"\" ) !! proton mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: PROTON_MAG_SHIELDING_CORRECTION = & codata_constant_type ( \"proton mag. shielding correction\" , & 2.56715e-5_dp , 0.00041e-5_dp , & \"\" ) !! proton mag. shielding correction type ( codata_constant_type ), parameter , public :: PROTON_MASS = & codata_constant_type ( \"proton mass\" , & 1.67262192595e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! proton mass type ( codata_constant_type ), parameter , public :: PROTON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"proton mass energy equivalent\" , & 1.50327761802e-10_dp , 0.00000000047e-10_dp , & \"J\" ) !! proton mass energy equivalent type ( codata_constant_type ), parameter , public :: PROTON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"proton mass energy equivalent in MeV\" , & 93 8.27208943_dp , 0.00000029_dp , & \"MeV\" ) !! proton mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: PROTON_MASS_IN_U = & codata_constant_type ( \"proton mass in u\" , & 1.0072764665789_dp , 0.0000000000083_dp , & \"u\" ) !! proton mass in u type ( codata_constant_type ), parameter , public :: PROTON_MOLAR_MASS = & codata_constant_type ( \"proton molar mass\" , & 1.00727646764e-3_dp , 0.00000000031e-3_dp , & \"kg mol^-1\" ) !! proton molar mass type ( codata_constant_type ), parameter , public :: PROTON_MUON_MASS_RATIO = & codata_constant_type ( \"proton-muon mass ratio\" , & 8.88024338_dp , 0.00000020_dp , & \"\" ) !! proton-muon mass ratio type ( codata_constant_type ), parameter , public :: PROTON_NEUTRON_MAG_MOM_RATIO = & codata_constant_type ( \"proton-neutron mag. mom. ratio\" , & - 1.45989802_dp , 0.00000034_dp , & \"\" ) !! proton-neutron mag. mom. ratio type ( codata_constant_type ), parameter , public :: PROTON_NEUTRON_MASS_RATIO = & codata_constant_type ( \"proton-neutron mass ratio\" , & 0.99862347797_dp , 0.00000000040_dp , & \"\" ) !! proton-neutron mass ratio type ( codata_constant_type ), parameter , public :: PROTON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"proton relative atomic mass\" , & 1.0072764665789_dp , 0.0000000000083_dp , & \"\" ) !! proton relative atomic mass type ( codata_constant_type ), parameter , public :: PROTON_RMS_CHARGE_RADIUS = & codata_constant_type ( \"proton rms charge radius\" , & 8.4075e-16_dp , 0.0064e-16_dp , & \"m\" ) !! proton rms charge radius type ( codata_constant_type ), parameter , public :: PROTON_TAU_MASS_RATIO = & codata_constant_type ( \"proton-tau mass ratio\" , & 0.528051_dp , 0.000036_dp , & \"\" ) !! proton-tau mass ratio type ( codata_constant_type ), parameter , public :: QUANTUM_OF_CIRCULATION = & codata_constant_type ( \"quantum of circulation\" , & 3.6369475467e-4_dp , 0.0000000011e-4_dp , & \"m^2 s^-1\" ) !! quantum of circulation type ( codata_constant_type ), parameter , public :: QUANTUM_OF_CIRCULATION_TIMES_2 = & codata_constant_type ( \"quantum of circulation times 2\" , & 7.2738950934e-4_dp , 0.0000000023e-4_dp , & \"m^2 s^-1\" ) !! quantum of circulation times 2 type ( codata_constant_type ), parameter , public :: REDUCED_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced Compton wavelength\" , & 3.8615926744e-13_dp , 0.0000000012e-13_dp , & \"m\" ) !! reduced Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_MUON_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced muon Compton wavelength\" , & 1.867594306e-15_dp , 0.000000042e-15_dp , & \"m\" ) !! reduced muon Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_NEUTRON_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced neutron Compton wavelength\" , & 2.1001941520e-16_dp , 0.0000000011e-16_dp , & \"m\" ) !! reduced neutron Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_PLANCK_CONSTANT = & codata_constant_type ( \"reduced Planck constant\" , & 1.054571817e-34_dp , 0.0_dp , & \"J s\" ) !! reduced Planck constant type ( codata_constant_type ), parameter , public :: REDUCED_PLANCK_CONSTANT_IN_EV_S = & codata_constant_type ( \"reduced Planck constant in eV s\" , & 6.582119569e-16_dp , 0.0_dp , & \"eV s\" ) !! reduced Planck constant in eV s type ( codata_constant_type ), parameter , public :: REDUCED_PLANCK_CONSTANT_TIMES_C_IN_MEV_FM = & codata_constant_type ( \"reduced Planck constant times c in MeV fm\" , & 19 7.3269804_dp , 0.0_dp , & \"MeV fm\" ) !! reduced Planck constant times c in MeV fm type ( codata_constant_type ), parameter , public :: REDUCED_PROTON_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced proton Compton wavelength\" , & 2.10308910051e-16_dp , 0.00000000066e-16_dp , & \"m\" ) !! reduced proton Compton wavelength type ( codata_constant_type ), parameter , public :: REDUCED_TAU_COMPTON_WAVELENGTH = & codata_constant_type ( \"reduced tau Compton wavelength\" , & 1.110538e-16_dp , 0.000075e-16_dp , & \"m\" ) !! reduced tau Compton wavelength type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT = & codata_constant_type ( \"Rydberg constant\" , & 1097373 1.568157_dp , 0.000012_dp , & \"m^-1\" ) !! Rydberg constant type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT_TIMES_C_IN_HZ = & codata_constant_type ( \"Rydberg constant times c in Hz\" , & 3.2898419602500e15_dp , 0.0000000000036e15_dp , & \"Hz\" ) !! Rydberg constant times c in Hz type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT_TIMES_HC_IN_EV = & codata_constant_type ( \"Rydberg constant times hc in eV\" , & 1 3.605693122990_dp , 0.000000000015_dp , & \"eV\" ) !! Rydberg constant times hc in eV type ( codata_constant_type ), parameter , public :: RYDBERG_CONSTANT_TIMES_HC_IN_J = & codata_constant_type ( \"Rydberg constant times hc in J\" , & 2.1798723611030e-18_dp , 0.0000000000024e-18_dp , & \"J\" ) !! Rydberg constant times hc in J type ( codata_constant_type ), parameter , public :: SACKUR_TETRODE_CONSTANT_1_K_100_KPA = & codata_constant_type ( \"Sackur-Tetrode constant (1 K, 100 kPa)\" , & - 1.15170753496_dp , 0.00000000047_dp , & \"\" ) !! Sackur-Tetrode constant (1 K, 100 kPa) type ( codata_constant_type ), parameter , public :: SACKUR_TETRODE_CONSTANT_1_K_101_325_KPA = & codata_constant_type ( \"Sackur-Tetrode constant (1 K, 101.325 kPa)\" , & - 1.16487052149_dp , 0.00000000047_dp , & \"\" ) !! Sackur-Tetrode constant (1 K, 101.325 kPa) type ( codata_constant_type ), parameter , public :: SECOND_RADIATION_CONSTANT = & codata_constant_type ( \"second radiation constant\" , & 1.438776877e-2_dp , 0.0_dp , & \"m K\" ) !! second radiation constant type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_GYROMAG_RATIO = & codata_constant_type ( \"shielded helion gyromag. ratio\" , & 2.0378946078e8_dp , 0.0000000018e8_dp , & \"s^-1 T^-1\" ) !! shielded helion gyromag. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"shielded helion gyromag. ratio in MHz/T\" , & 3 2.434100033_dp , 0.000000028_dp , & \"MHz T^-1\" ) !! shielded helion gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_MAG_MOM = & codata_constant_type ( \"shielded helion mag. mom.\" , & - 1.07455311035e-26_dp , 0.00000000093e-26_dp , & \"J T^-1\" ) !! shielded helion mag. mom. type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"shielded helion mag. mom. to Bohr magneton ratio\" , & - 1.15867149457e-3_dp , 0.00000000094e-3_dp , & \"\" ) !! shielded helion mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"shielded helion mag. mom. to nuclear magneton ratio\" , & - 2.1274977624_dp , 0.0000000017_dp , & \"\" ) !! shielded helion mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_TO_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"shielded helion to proton mag. mom. ratio\" , & - 0.76176657721_dp , 0.00000000066_dp , & \"\" ) !! shielded helion to proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_HELION_TO_SHIELDED_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"shielded helion to shielded proton mag. mom. ratio\" , & - 0.7617861334_dp , 0.0000000031_dp , & \"\" ) !! shielded helion to shielded proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_GYROMAG_RATIO = & codata_constant_type ( \"shielded proton gyromag. ratio\" , & 2.675153194e8_dp , 0.000000011e8_dp , & \"s^-1 T^-1\" ) !! shielded proton gyromag. ratio type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_GYROMAG_RATIO_IN_MHZ_T = & codata_constant_type ( \"shielded proton gyromag. ratio in MHz/T\" , & 4 2.57638543_dp , 0.00000017_dp , & \"MHz T^-1\" ) !! shielded proton gyromag. ratio in MHz/T type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_MAG_MOM = & codata_constant_type ( \"shielded proton mag. mom.\" , & 1.4105705830e-26_dp , 0.0000000058e-26_dp , & \"J T^-1\" ) !! shielded proton mag. mom. type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"shielded proton mag. mom. to Bohr magneton ratio\" , & 1.5209931551e-3_dp , 0.0000000062e-3_dp , & \"\" ) !! shielded proton mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDED_PROTON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"shielded proton mag. mom. to nuclear magneton ratio\" , & 2.792775648_dp , 0.000000011_dp , & \"\" ) !! shielded proton mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: SHIELDING_DIFFERENCE_OF_D_AND_P_IN_HD = & codata_constant_type ( \"shielding difference of d and p in HD\" , & 1.98770e-8_dp , 0.00010e-8_dp , & \"\" ) !! shielding difference of d and p in HD type ( codata_constant_type ), parameter , public :: SHIELDING_DIFFERENCE_OF_T_AND_P_IN_HT = & codata_constant_type ( \"shielding difference of t and p in HT\" , & 2.39450e-8_dp , 0.00020e-8_dp , & \"\" ) !! shielding difference of t and p in HT type ( codata_constant_type ), parameter , public :: SPEED_OF_LIGHT_IN_VACUUM = & codata_constant_type ( \"speed of light in vacuum\" , & 299792458_dp , 0.0_dp , & \"m s^-1\" ) !! speed of light in vacuum type ( codata_constant_type ), parameter , public :: STANDARD_ACCELERATION_OF_GRAVITY = & codata_constant_type ( \"standard acceleration of gravity\" , & 9.80665_dp , 0.0_dp , & \"m s^-2\" ) !! standard acceleration of gravity type ( codata_constant_type ), parameter , public :: STANDARD_ATMOSPHERE = & codata_constant_type ( \"standard atmosphere\" , & 101325_dp , 0.0_dp , & \"Pa\" ) !! standard atmosphere type ( codata_constant_type ), parameter , public :: STANDARD_STATE_PRESSURE = & codata_constant_type ( \"standard-state pressure\" , & 100000_dp , 0.0_dp , & \"Pa\" ) !! standard-state pressure type ( codata_constant_type ), parameter , public :: STEFAN_BOLTZMANN_CONSTANT = & codata_constant_type ( \"Stefan-Boltzmann constant\" , & 5.670374419e-8_dp , 0.0_dp , & \"W m^-2 K^-4\" ) !! Stefan-Boltzmann constant type ( codata_constant_type ), parameter , public :: TAU_COMPTON_WAVELENGTH = & codata_constant_type ( \"tau Compton wavelength\" , & 6.97771e-16_dp , 0.00047e-16_dp , & \"m\" ) !! tau Compton wavelength type ( codata_constant_type ), parameter , public :: TAU_ELECTRON_MASS_RATIO = & codata_constant_type ( \"tau-electron mass ratio\" , & 347 7.23_dp , 0.23_dp , & \"\" ) !! tau-electron mass ratio type ( codata_constant_type ), parameter , public :: TAU_ENERGY_EQUIVALENT = & codata_constant_type ( \"tau energy equivalent\" , & 177 6.86_dp , 0.12_dp , & \"MeV\" ) !! tau energy equivalent type ( codata_constant_type ), parameter , public :: TAU_MASS = & codata_constant_type ( \"tau mass\" , & 3.16754e-27_dp , 0.00021e-27_dp , & \"kg\" ) !! tau mass type ( codata_constant_type ), parameter , public :: TAU_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"tau mass energy equivalent\" , & 2.84684e-10_dp , 0.00019e-10_dp , & \"J\" ) !! tau mass energy equivalent type ( codata_constant_type ), parameter , public :: TAU_MASS_IN_U = & codata_constant_type ( \"tau mass in u\" , & 1.90754_dp , 0.00013_dp , & \"u\" ) !! tau mass in u type ( codata_constant_type ), parameter , public :: TAU_MOLAR_MASS = & codata_constant_type ( \"tau molar mass\" , & 1.90754e-3_dp , 0.00013e-3_dp , & \"kg mol^-1\" ) !! tau molar mass type ( codata_constant_type ), parameter , public :: TAU_MUON_MASS_RATIO = & codata_constant_type ( \"tau-muon mass ratio\" , & 1 6.8170_dp , 0.0011_dp , & \"\" ) !! tau-muon mass ratio type ( codata_constant_type ), parameter , public :: TAU_NEUTRON_MASS_RATIO = & codata_constant_type ( \"tau-neutron mass ratio\" , & 1.89115_dp , 0.00013_dp , & \"\" ) !! tau-neutron mass ratio type ( codata_constant_type ), parameter , public :: TAU_PROTON_MASS_RATIO = & codata_constant_type ( \"tau-proton mass ratio\" , & 1.89376_dp , 0.00013_dp , & \"\" ) !! tau-proton mass ratio type ( codata_constant_type ), parameter , public :: THOMSON_CROSS_SECTION = & codata_constant_type ( \"Thomson cross section\" , & 6.6524587051e-29_dp , 0.0000000062e-29_dp , & \"m^2\" ) !! Thomson cross section type ( codata_constant_type ), parameter , public :: TRITON_ELECTRON_MASS_RATIO = & codata_constant_type ( \"triton-electron mass ratio\" , & 549 6.92153551_dp , 0.00000021_dp , & \"\" ) !! triton-electron mass ratio type ( codata_constant_type ), parameter , public :: TRITON_G_FACTOR = & codata_constant_type ( \"triton g factor\" , & 5.957924930_dp , 0.000000012_dp , & \"\" ) !! triton g factor type ( codata_constant_type ), parameter , public :: TRITON_MAG_MOM = & codata_constant_type ( \"triton mag. mom.\" , & 1.5046095178e-26_dp , 0.0000000030e-26_dp , & \"J T^-1\" ) !! triton mag. mom. type ( codata_constant_type ), parameter , public :: TRITON_MAG_MOM_TO_BOHR_MAGNETON_RATIO = & codata_constant_type ( \"triton mag. mom. to Bohr magneton ratio\" , & 1.6223936648e-3_dp , 0.0000000032e-3_dp , & \"\" ) !! triton mag. mom. to Bohr magneton ratio type ( codata_constant_type ), parameter , public :: TRITON_MAG_MOM_TO_NUCLEAR_MAGNETON_RATIO = & codata_constant_type ( \"triton mag. mom. to nuclear magneton ratio\" , & 2.9789624650_dp , 0.0000000059_dp , & \"\" ) !! triton mag. mom. to nuclear magneton ratio type ( codata_constant_type ), parameter , public :: TRITON_MASS = & codata_constant_type ( \"triton mass\" , & 5.0073567512e-27_dp , 0.0000000016e-27_dp , & \"kg\" ) !! triton mass type ( codata_constant_type ), parameter , public :: TRITON_MASS_ENERGY_EQUIVALENT = & codata_constant_type ( \"triton mass energy equivalent\" , & 4.5003878119e-10_dp , 0.0000000014e-10_dp , & \"J\" ) !! triton mass energy equivalent type ( codata_constant_type ), parameter , public :: TRITON_MASS_ENERGY_EQUIVALENT_IN_MEV = & codata_constant_type ( \"triton mass energy equivalent in MeV\" , & 280 8.92113668_dp , 0.00000088_dp , & \"MeV\" ) !! triton mass energy equivalent in MeV type ( codata_constant_type ), parameter , public :: TRITON_MASS_IN_U = & codata_constant_type ( \"triton mass in u\" , & 3.01550071597_dp , 0.00000000010_dp , & \"u\" ) !! triton mass in u type ( codata_constant_type ), parameter , public :: TRITON_MOLAR_MASS = & codata_constant_type ( \"triton molar mass\" , & 3.01550071913e-3_dp , 0.00000000094e-3_dp , & \"kg mol^-1\" ) !! triton molar mass type ( codata_constant_type ), parameter , public :: TRITON_PROTON_MASS_RATIO = & codata_constant_type ( \"triton-proton mass ratio\" , & 2.99371703403_dp , 0.00000000010_dp , & \"\" ) !! triton-proton mass ratio type ( codata_constant_type ), parameter , public :: TRITON_RELATIVE_ATOMIC_MASS = & codata_constant_type ( \"triton relative atomic mass\" , & 3.01550071597_dp , 0.00000000010_dp , & \"\" ) !! triton relative atomic mass type ( codata_constant_type ), parameter , public :: TRITON_TO_PROTON_MAG_MOM_RATIO = & codata_constant_type ( \"triton to proton mag. mom. ratio\" , & 1.0666399189_dp , 0.0000000021_dp , & \"\" ) !! triton to proton mag. mom. ratio type ( codata_constant_type ), parameter , public :: UNIFIED_ATOMIC_MASS_UNIT = & codata_constant_type ( \"unified atomic mass unit\" , & 1.66053906892e-27_dp , 0.00000000052e-27_dp , & \"kg\" ) !! unified atomic mass unit type ( codata_constant_type ), parameter , public :: VACUUM_ELECTRIC_PERMITTIVITY = & codata_constant_type ( \"vacuum electric permittivity\" , & 8.8541878188e-12_dp , 0.0000000014e-12_dp , & \"F m^-1\" ) !! vacuum electric permittivity type ( codata_constant_type ), parameter , public :: VACUUM_MAG_PERMEABILITY = & codata_constant_type ( \"vacuum mag. permeability\" , & 1.25663706127e-6_dp , 0.00000000020e-6_dp , & \"N A^-2\" ) !! vacuum mag. permeability type ( codata_constant_type ), parameter , public :: VON_KLITZING_CONSTANT = & codata_constant_type ( \"von Klitzing constant\" , & 2581 2.80745_dp , 0.0_dp , & \"ohm\" ) !! von Klitzing constant type ( codata_constant_type ), parameter , public :: WEAK_MIXING_ANGLE = & codata_constant_type ( \"weak mixing angle\" , & 0.22305_dp , 0.00023_dp , & \"\" ) !! weak mixing angle type ( codata_constant_type ), parameter , public :: WIEN_FREQUENCY_DISPLACEMENT_LAW_CONSTANT = & codata_constant_type ( \"Wien frequency displacement law constant\" , & 5.878925757e10_dp , 0.0_dp , & \"Hz K^-1\" ) !! Wien frequency displacement law constant type ( codata_constant_type ), parameter , public :: WIEN_WAVELENGTH_DISPLACEMENT_LAW_CONSTANT = & codata_constant_type ( \"Wien wavelength displacement law constant\" , & 2.897771955e-3_dp , 0.0_dp , & \"m K\" ) !! Wien wavelength displacement law constant type ( codata_constant_type ), parameter , public :: W_TO_Z_MASS_RATIO = & codata_constant_type ( \"W to Z mass ratio\" , & 0.88145_dp , 0.00013_dp , & \"\" ) !! W to Z mass ratio end module stdlib_codata","tags":"","loc":"sourcefile/stdlib_codata.f90.html"},{"title":"stdlib_specialfunctions.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_specialfunctions use stdlib_kinds , only : sp , dp , xdp , qp implicit none private public :: legendre public :: dlegendre interface legendre !! version: experimental !! !! Legendre polynomial pure elemental module function legendre_fp64 ( n , x ) result ( leg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: leg end function end interface interface dlegendre !! version: experimental !! !! First derivative Legendre polynomial pure elemental module function dlegendre_fp64 ( n , x ) result ( dleg ) integer , intent ( in ) :: n real ( dp ), intent ( in ) :: x real ( dp ) :: dleg end function end interface end module stdlib_specialfunctions","tags":"","loc":"sourcefile/stdlib_specialfunctions.f90.html"},{"title":"stdlib_stats_cov.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_cov use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = var ( x , dim , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = var ( x , dim , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res res = var ( x , dim , mask , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 1 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:) logical , intent ( in ), optional :: corrected real ( dp ) :: res res = var ( x , dim , mask , corrected = optval ( corrected , . true .)) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i ${ t1 }$ :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) ${ t1 }$ :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = x ( i , :) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( transpose ( center ), center ) # : else res = matmul ( transpose ( conjg ( center )), center ) # : endif case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = x (:, i ) - mean_ end do # : if t1 [ 0 ] == 'r' res = matmul ( center , transpose ( center )) # : else res = matmul ( center , transpose ( conjg ( center ))) # : endif case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select res = res / ( size ( x , dim ) - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i real ( dp ) :: mean_ ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) real ( dp ) :: center ( size ( x , 1 ), size ( x , 2 )) if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if mean_ = mean ( x , dim ) select case ( dim ) case ( 1 ) do i = 1 , size ( x , 1 ) center ( i , :) = real ( x ( i , :), dp ) - mean_ end do res = matmul ( transpose ( center ), center ) case ( 2 ) do i = 1 , size ( x , 2 ) center (:, i ) = real ( x (:, i ), dp ) - mean_ end do res = matmul ( center , transpose ( center )) case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select res = res / ( size ( x , dim ) - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected ${ t1 }$ :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j , n ${ t1 }$ :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) ${ t1 }$ :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& # : if t1 [ 0 ] == 'r' 0. _${ k1 }$ ,& # : else cmplx ( 0 , 0 , kind = ${ k1 }$ ),& # : endif mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select end function ${ RName }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : set RName = rname ( \"cov_mask\" , 2 , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ) :: dim logical , intent ( in ) :: mask (:,:) logical , intent ( in ), optional :: corrected real ( dp ) :: res ( merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )& , merge ( size ( x , 1 ), size ( x , 2 ), mask = 1 < dim )) integer :: i , j , n real ( dp ) :: centeri_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) real ( dp ) :: centerj_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) logical :: mask_ ( merge ( size ( x , 2 ), size ( x , 1 ), mask = 1 < dim )) select case ( dim ) case ( 1 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask (:, i ) . and . mask (:, j )) centeri_ = merge ( x (:, i ) - mean ( x (:, i ), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x (:, j ) - mean ( x (:, j ), mask = mask_ ),& 0._dp , mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centerj_ , centeri_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case ( 2 ) do i = 1 , size ( res , 2 ) do j = 1 , size ( res , 1 ) mask_ = merge (. true ., . false ., mask ( i , :) . and . mask ( j , :)) centeri_ = merge ( x ( i , :) - mean ( x ( i , :), mask = mask_ ),& 0._dp , mask_ ) centerj_ = merge ( x ( j , :) - mean ( x ( j , :), mask = mask_ ),& 0._dp , mask_ ) n = count ( mask_ ) res ( j , i ) = dot_product ( centeri_ , centerj_ )& / ( n - merge ( 1 , 0 ,& optval ( corrected , . true .) . and . n > 0 )) end do end do case default call error_stop ( \"ERROR (cov): wrong dimension\" ) end select end function ${ RName }$ # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_cov.fypp.html"},{"title":"stdlib_linalg_blas_q.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:if WITH_QP module stdlib_linalg_blas_q use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c use stdlib_linalg_blas_d use stdlib_linalg_blas_z implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_qasum public :: stdlib_qaxpy public :: stdlib_qcopy public :: stdlib_qdot public :: stdlib_qgbmv public :: stdlib_qgemm public :: stdlib_qgemv public :: stdlib_qger public :: stdlib_qnrm2 public :: stdlib_qrot public :: stdlib_qrotg public :: stdlib_qrotm public :: stdlib_qrotmg public :: stdlib_qsbmv public :: stdlib_qscal public :: stdlib_qsdot public :: stdlib_qspmv public :: stdlib_qspr public :: stdlib_qspr2 public :: stdlib_qswap public :: stdlib_qsymm public :: stdlib_qsymv public :: stdlib_qsyr public :: stdlib_qsyr2 public :: stdlib_qsyr2k public :: stdlib_qsyrk public :: stdlib_qtbmv public :: stdlib_qtbsv public :: stdlib_qtpmv public :: stdlib_qtpsv public :: stdlib_qtrmm public :: stdlib_qtrmv public :: stdlib_qtrsm public :: stdlib_qtrsv public :: stdlib_qzasum public :: stdlib_qznrm2 ! 128-bit real constants real ( qp ), parameter , private :: negone = - 1.00_qp real ( qp ), parameter , private :: zero = 0.00_qp real ( qp ), parameter , private :: half = 0.50_qp real ( qp ), parameter , private :: one = 1.00_qp real ( qp ), parameter , private :: two = 2.00_qp real ( qp ), parameter , private :: three = 3.00_qp real ( qp ), parameter , private :: four = 4.00_qp real ( qp ), parameter , private :: eight = 8.00_qp real ( qp ), parameter , private :: ten = 1 0.00_qp ! 128-bit complex constants complex ( qp ), parameter , private :: czero = ( 0.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: chalf = ( 0.5_qp , 0.0_qp ) complex ( qp ), parameter , private :: cone = ( 1.0_qp , 0.0_qp ) complex ( qp ), parameter , private :: cnegone = ( - 1.0_qp , 0.0_qp ) ! 128-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( qp ), parameter , private :: rradix = real ( radix ( zero ), qp ) real ( qp ), parameter , private :: ulp = epsilon ( zero ) real ( qp ), parameter , private :: eps = ulp * half real ( qp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( qp ), parameter , private :: safmax = one / safmin real ( qp ), parameter , private :: smlnum = safmin / ulp real ( qp ), parameter , private :: bignum = safmax * ulp real ( qp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( qp ), parameter , private :: rtmax = sqrt ( bignum ) ! 128-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( qp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( qp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( qp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( qp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure real ( qp ) function stdlib_qasum ( n , dx , incx ) !! DASUM: takes the sum of the absolute values. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_qasum = zero dtemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + abs ( dx ( i )) end do if ( n < 6 ) then stdlib_qasum = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 dtemp = dtemp + abs ( dx ( i )) + abs ( dx ( i + 1 )) + abs ( dx ( i + 2 )) + abs ( dx ( i + 3 )) + abs ( dx ( i + & 4 )) + abs ( dx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dtemp = dtemp + abs ( dx ( i )) end do end if stdlib_qasum = dtemp return end function stdlib_qasum pure subroutine stdlib_qaxpy ( n , da , dx , incx , dy , incy ) !! DAXPY: constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) real ( qp ), intent ( inout ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( da == 0.0_qp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dy ( i ) + da * dx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 dy ( i ) = dy ( i ) + da * dx ( i ) dy ( i + 1 ) = dy ( i + 1 ) + da * dx ( i + 1 ) dy ( i + 2 ) = dy ( i + 2 ) + da * dx ( i + 2 ) dy ( i + 3 ) = dy ( i + 3 ) + da * dx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dy ( iy ) + da * dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qaxpy pure subroutine stdlib_qcopy ( n , dx , incx , dy , incy ) !! DCOPY: copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ) real ( qp ), intent ( out ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 dy ( i ) = dx ( i ) dy ( i + 1 ) = dx ( i + 1 ) dy ( i + 2 ) = dx ( i + 2 ) dy ( i + 3 ) = dx ( i + 3 ) dy ( i + 4 ) = dx ( i + 4 ) dy ( i + 5 ) = dx ( i + 5 ) dy ( i + 6 ) = dx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qcopy pure real ( qp ) function stdlib_qdot ( n , dx , incx , dy , incy ) !! DDOT: forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stdlib_qdot = zero dtemp = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + dx ( i ) * dy ( i ) end do if ( n < 5 ) then stdlib_qdot = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 dtemp = dtemp + dx ( i ) * dy ( i ) + dx ( i + 1 ) * dy ( i + 1 ) + dx ( i + 2 ) * dy ( i + 2 ) + dx ( i + 3 ) * dy ( i + 3 ) + & dx ( i + 4 ) * dy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dtemp + dx ( ix ) * dy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_qdot = dtemp return end function stdlib_qdot pure subroutine stdlib_qgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! DGBMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_qgbmv pure subroutine stdlib_qgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DGEMM: performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_qgemm pure subroutine stdlib_qgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! DGEMV: performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_qgemv pure subroutine stdlib_qger ( m , n , alpha , x , incx , y , incy , a , lda ) !! DGER: performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( qp ), intent ( inout ) :: a ( lda , * ) real ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_qger pure function stdlib_qnrm2 ( n , x , incx ) !! DNRM2: returns the euclidean norm of a vector via the function !! name, so that !! DNRM2 := sqrt( x'*x ) real ( qp ) :: stdlib_qnrm2 ! -- reference blas level1 routine (version 3.9.1_qp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._qp ) real ( qp ), parameter :: maxn = huge ( 0.0_qp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( qp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_qnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_qnrm2 = scl * sqrt ( sumsq ) return end function stdlib_qnrm2 pure subroutine stdlib_qrot ( n , dx , incx , dy , incy , c , s ) !! DROT: applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n dtemp = c * dx ( i ) + s * dy ( i ) dy ( i ) = c * dy ( i ) - s * dx ( i ) dx ( i ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = c * dx ( ix ) + s * dy ( iy ) dy ( iy ) = c * dy ( iy ) - s * dx ( ix ) dx ( ix ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qrot pure subroutine stdlib_qrotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._qp ) ! Scaling Constants ! Scalar Arguments real ( qp ), intent ( inout ) :: a , b real ( qp ), intent ( out ) :: c , s ! Local Scalars real ( qp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_qrotg pure subroutine stdlib_qrotm ( n , dx , incx , dy , incy , dparam ) !! QROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See QROTMG for a description of data storage in DPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( in ) :: dparam ( 5 ) real ( qp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dflag , dh11 , dh12 , dh21 , dh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_qp two = 2.0_qp dflag = dparam ( 1 ) if ( n <= 0 . or . ( dflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z * dh12 dy ( i ) = w * dh21 + z * dh22 end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w + z * dh12 dy ( i ) = w * dh21 + z end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z dy ( i ) = - w + dh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z * dh12 dy ( ky ) = w * dh21 + z * dh22 kx = kx + incx ky = ky + incy end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w + z * dh12 dy ( ky ) = w * dh21 + z kx = kx + incx ky = ky + incy end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z dy ( ky ) = - w + dh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_qrotm pure subroutine stdlib_qrotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) !! QROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( qp ), intent ( in ) :: dy1 ! Array Arguments real ( qp ), intent ( out ) :: dparam ( 5 ) ! ===================================================================== ! Local Scalars real ( qp ) :: dflag , dh11 , dh12 , dh21 , dh22 , dp1 , dp2 , dq1 , dq2 , dtemp , du , gam , gamsq , & one , rgamsq , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_qp one = 1.0_qp two = 2.0_qp gam = 409 6.0_qp gamsq = 1677721 6.0_qp rgamsq = 5.9604645e-8_qp if ( dd1 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else ! case-dd1-nonnegative dp2 = dd2 * dy1 if ( dp2 == zero ) then dflag = - two dparam ( 1 ) = dflag return end if ! regular-case.. dp1 = dd1 * dx1 dq2 = dp2 * dy1 dq1 = dp1 * dx1 if ( abs ( dq1 ) > abs ( dq2 )) then dh21 = - dy1 / dx1 dh12 = dp2 / dp1 du = one - dh12 * dh21 if ( du > zero ) then dflag = zero dd1 = dd1 / du dd2 = dd2 / du dx1 = dx1 * du else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero end if else if ( dq2 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else dflag = one dh11 = dp1 / dp2 dh22 = dx1 / dy1 du = one + dh11 * dh22 dtemp = dd2 / du dd2 = dd1 / du dd1 = dtemp dx1 = dy1 * du end if end if ! procedure..scale-check if ( dd1 /= zero ) then do while (( dd1 <= rgamsq ) . or . ( dd1 >= gamsq )) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( dd1 <= rgamsq ) then dd1 = dd1 * gam ** 2 dx1 = dx1 / gam dh11 = dh11 / gam dh12 = dh12 / gam else dd1 = dd1 / gam ** 2 dx1 = dx1 * gam dh11 = dh11 * gam dh12 = dh12 * gam end if enddo end if if ( dd2 /= zero ) then do while ( ( abs ( dd2 ) <= rgamsq ) . or . ( abs ( dd2 ) >= gamsq ) ) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( abs ( dd2 ) <= rgamsq ) then dd2 = dd2 * gam ** 2 dh21 = dh21 / gam dh22 = dh22 / gam else dd2 = dd2 / gam ** 2 dh21 = dh21 * gam dh22 = dh22 * gam end if end do end if end if if ( dflag < zero ) then dparam ( 2 ) = dh11 dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 dparam ( 5 ) = dh22 else if ( dflag == zero ) then dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 else dparam ( 2 ) = dh11 dparam ( 5 ) = dh22 end if dparam ( 1 ) = dflag return end subroutine stdlib_qrotmg pure subroutine stdlib_qsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! DSBMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_qsbmv pure subroutine stdlib_qscal ( n , da , dx , incx ) !! DSCAL: scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( qp ), intent ( inout ) :: dx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dx ( i ) = da * dx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 dx ( i ) = da * dx ( i ) dx ( i + 1 ) = da * dx ( i + 1 ) dx ( i + 2 ) = da * dx ( i + 2 ) dx ( i + 3 ) = da * dx ( i + 3 ) dx ( i + 4 ) = da * dx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dx ( i ) = da * dx ( i ) end do end if return end subroutine stdlib_qscal pure real ( qp ) function stdlib_qsdot ( n , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! DSDOT: = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: sx ( * ), sy ( * ) ! authors: ! ======== ! lawson, c. l., (jpl), hanson, r. j., (snla), ! kincaid, d. r., (u. of texas), krogh, f. t., (jpl) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real stdlib_qsdot = zero if ( n <= 0 ) return if ( incx == incy . and . incx > 0 ) then ! code for equal, positive, non-unit increments. ns = n * incx do i = 1 , ns , incx stdlib_qsdot = stdlib_qsdot + real ( sx ( i ), KIND = qp ) * real ( sy ( i ), KIND = qp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n stdlib_qsdot = stdlib_qsdot + real ( sx ( kx ), KIND = qp ) * real ( sy ( ky ), KIND = qp ) kx = kx + incx ky = ky + incy end do end if return end function stdlib_qsdot pure subroutine stdlib_qspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! DSPMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( in ) :: ap ( * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_qspmv pure subroutine stdlib_qspr ( uplo , n , alpha , x , incx , ap ) !! DSPR: performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: ap ( * ) real ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_qspr pure subroutine stdlib_qspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! DSPR2: performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: ap ( * ) real ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_qspr2 pure subroutine stdlib_qswap ( n , dx , incx , dy , incy ) !! DSWAP: interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( qp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp dtemp = dx ( i + 1 ) dx ( i + 1 ) = dy ( i + 1 ) dy ( i + 1 ) = dtemp dtemp = dx ( i + 2 ) dx ( i + 2 ) = dy ( i + 2 ) dy ( i + 2 ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dx ( ix ) dx ( ix ) = dy ( iy ) dy ( iy ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_qswap pure subroutine stdlib_qsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYMM: performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_qsymm pure subroutine stdlib_qsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! DSYMV: performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( qp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_qsymv pure subroutine stdlib_qsyr ( uplo , n , alpha , x , incx , a , lda ) !! DSYR: performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: a ( lda , * ) real ( qp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_qsyr pure subroutine stdlib_qsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! DSYR2: performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( qp ), intent ( inout ) :: a ( lda , * ) real ( qp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_qsyr2 pure subroutine stdlib_qsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYR2K: performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_qsyr2k pure subroutine stdlib_qsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! DSYRK: performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_qsyrk pure subroutine stdlib_qtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_qtbmv pure subroutine stdlib_qtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_qtbsv pure subroutine stdlib_qtpmv ( uplo , trans , diag , n , ap , x , incx ) !! DTPMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: ap ( * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_qtpmv pure subroutine stdlib_qtpsv ( uplo , trans , diag , n , ap , x , incx ) !! DTPSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: ap ( * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_qtpsv pure subroutine stdlib_qtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRMM: performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_qtrmm pure subroutine stdlib_qtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRMV: performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_qtrmv pure subroutine stdlib_qtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRSM: solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( qp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_qtrsm pure subroutine stdlib_qtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRSV: solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( qp ), intent ( in ) :: a ( lda , * ) real ( qp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_qtrsv pure real ( qp ) function stdlib_qzasum ( n , zx , incx ) !! DZASUM: takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a quad precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( qp ) :: stemp integer ( ilp ) :: i , nincx stdlib_qzasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + stdlib_qcabs1 ( zx ( i )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + stdlib_qcabs1 ( zx ( i )) end do end if stdlib_qzasum = stemp return end function stdlib_qzasum pure function stdlib_qznrm2 ( n , x , incx ) !! DZNRM2: returns the euclidean norm of a vector via the function !! name, so that !! DZNRM2 := sqrt( x**H*x ) real ( qp ) :: stdlib_qznrm2 ! -- reference blas level1 routine (version 3.9.1_qp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._qp ) real ( qp ), parameter :: maxn = huge ( 0.0_qp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( qp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( qp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_qznrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = qp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_qznrm2 = scl * sqrt ( sumsq ) return end function stdlib_qznrm2 end module stdlib_linalg_blas_q #:endif","tags":"","loc":"sourcefile/stdlib_linalg_blas_q.fypp.html"},{"title":"stdlib_ansi.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Terminal color and style escape sequences module stdlib_ansi use stdlib_kinds , only : i1 => int8 use stdlib_string_type , only : string_type implicit none private public :: ansi_code public :: style_reset , style_bold , style_dim , style_italic , style_underline , & & style_blink , style_blink_fast , style_reverse , style_hidden , style_strikethrough public :: fg_color_black , fg_color_red , fg_color_green , fg_color_yellow , fg_color_blue , & & fg_color_magenta , fg_color_cyan , fg_color_white , fg_color_default public :: bg_color_black , bg_color_red , bg_color_green , bg_color_yellow , bg_color_blue , & & bg_color_magenta , bg_color_cyan , bg_color_white , bg_color_default public :: to_string , operator ( + ), operator ( // ) !> Container for terminal escape code type :: ansi_code private !> Style descriptor integer ( i1 ) :: style = - 1_i1 !> Background color descriptor integer ( i1 ) :: bg = - 1_i1 !> Foreground color descriptor integer ( i1 ) :: fg = - 1_i1 end type ansi_code !> Identifier for reset style type ( ansi_code ), parameter :: style_reset = ansi_code ( style = 0 ) !> Identifier for bold style type ( ansi_code ), parameter :: style_bold = ansi_code ( style = 1 ) !> Identifier for dim style type ( ansi_code ), parameter :: style_dim = ansi_code ( style = 2 ) !> Identifier for italic style type ( ansi_code ), parameter :: style_italic = ansi_code ( style = 3 ) !> Identifier for underline style type ( ansi_code ), parameter :: style_underline = ansi_code ( style = 4 ) !> Identifier for blink style type ( ansi_code ), parameter :: style_blink = ansi_code ( style = 5 ) !> Identifier for (fast) blink style type ( ansi_code ), parameter :: style_blink_fast = ansi_code ( style = 6 ) !> Identifier for reverse style type ( ansi_code ), parameter :: style_reverse = ansi_code ( style = 7 ) !> Identifier for hidden style type ( ansi_code ), parameter :: style_hidden = ansi_code ( style = 8 ) !> Identifier for strikethrough style type ( ansi_code ), parameter :: style_strikethrough = ansi_code ( style = 9 ) !> Identifier for black foreground color type ( ansi_code ), parameter :: fg_color_black = ansi_code ( fg = 0 ) !> Identifier for red foreground color type ( ansi_code ), parameter :: fg_color_red = ansi_code ( fg = 1 ) !> Identifier for green foreground color type ( ansi_code ), parameter :: fg_color_green = ansi_code ( fg = 2 ) !> Identifier for yellow foreground color type ( ansi_code ), parameter :: fg_color_yellow = ansi_code ( fg = 3 ) !> Identifier for blue foreground color type ( ansi_code ), parameter :: fg_color_blue = ansi_code ( fg = 4 ) !> Identifier for magenta foreground color type ( ansi_code ), parameter :: fg_color_magenta = ansi_code ( fg = 5 ) !> Identifier for cyan foreground color type ( ansi_code ), parameter :: fg_color_cyan = ansi_code ( fg = 6 ) !> Identifier for white foreground color type ( ansi_code ), parameter :: fg_color_white = ansi_code ( fg = 7 ) !> Identifier for the default foreground color type ( ansi_code ), parameter :: fg_color_default = ansi_code ( fg = 9 ) !> Identifier for black background color type ( ansi_code ), parameter :: bg_color_black = ansi_code ( bg = 0 ) !> Identifier for red background color type ( ansi_code ), parameter :: bg_color_red = ansi_code ( bg = 1 ) !> Identifier for green background color type ( ansi_code ), parameter :: bg_color_green = ansi_code ( bg = 2 ) !> Identifier for yellow background color type ( ansi_code ), parameter :: bg_color_yellow = ansi_code ( bg = 3 ) !> Identifier for blue background color type ( ansi_code ), parameter :: bg_color_blue = ansi_code ( bg = 4 ) !> Identifier for magenta background color type ( ansi_code ), parameter :: bg_color_magenta = ansi_code ( bg = 5 ) !> Identifier for cyan background color type ( ansi_code ), parameter :: bg_color_cyan = ansi_code ( bg = 6 ) !> Identifier for white background color type ( ansi_code ), parameter :: bg_color_white = ansi_code ( bg = 7 ) !> Identifier for the default background color type ( ansi_code ), parameter :: bg_color_default = ansi_code ( bg = 9 ) interface to_string !> Transform a color code into an actual ANSI escape sequence pure module function to_string_ansi_code ( code ) result ( str ) !> Color code to be used type ( ansi_code ), intent ( in ) :: code !> ANSI escape sequence representing the color code character ( len = :), allocatable :: str end function to_string_ansi_code end interface to_string interface operator ( + ) !> Add two escape sequences, attributes in the right value override the left value ones. pure module function add ( lval , rval ) result ( code ) !> First escape code type ( ansi_code ), intent ( in ) :: lval !> Second escape code type ( ansi_code ), intent ( in ) :: rval !> Combined escape code type ( ansi_code ) :: code end function add end interface operator ( + ) interface operator ( // ) !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left ( lval , code ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str end function concat_left !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right ( code , rval ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str end function concat_right !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left_str ( lval , code ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str end function concat_left_str !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right_str ( code , rval ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str end function concat_right_str end interface operator ( // ) end module stdlib_ansi","tags":"","loc":"sourcefile/stdlib_ansi.f90.html"},{"title":"stdlib_logger.f90 – Fortran-lang/stdlib","text":"Source Code module stdlib_logger !!### Module stdlib_logger !! !! This module defines a derived type, procedures, a variable, and !! constants to be used for logging information and reporting errors !! in Fortran applications. !!([Specification](../page/specs/stdlib_logger.html)) !! The derived type, `logger_type`, is to be used to define variables to !! serve as both local and global loggers. A logger directs its messages !! to selected I/O units so the user has a record (a log) of major events. !! For each entity of `logger_type` the reports go to a list of I/O units !! represented by the private internal array, `log_units`. If `log_units` is !! empty then output by default goes to `output_unit`. Otherwise reports !! go to `output_unit` only if it has been explicitly added to `log_units`. !! Each entity of type `logger_type` also maintains an internal state !! controlling the formatting of output. !! !! The procedures are as follows. The logical function !! `log_units_assigned` returns the number of I/O units in `log_units`. The !! subroutines `add_log_file` and `add_log_unit` include the specified file !! in `log_units`. `remove_log_units` removes the specified logical unit from !! the `log_units` array and optionally closes the file. `configure` !! configures the details of the logging process. `configuration` !! reports the details of that configuration. The subroutines !! `log_error`, `log_information`, `log_io_error`, `log_message`, !! `log_text_error`, and `log_warning` send messages to the log units. !! !! The variable `global_logger` of type `logger_type` can be used !! as a default global logger anywhere in the source code. !! !! The constants are used to report errors by some of the subroutines !! in their optional `stat` arguments. The constants are as follows. !! `success` indicates that no error has occurred. `close_failure` !! indicates that a `close` statement for an I/O unit failed. !! `index_invalid_error` indicates that `column` was invalid for !! the given `line`. `open_failure` indicates that an `open` statement !! failed. `read_only_error` indicates that an output unit did not have a !! `\"write\"` or `\"readwrite\"` action. `non_sequential_error` indicates !! that the unit did not have `sequential` access. `unformatted_in_error` !! indicates that the unit did not have a `form` of `\"formatted\"`. !! `unopened_in_error` indicates that the unit was not opened. `write_failure` !! indicates that at least one of the writes to `log_units` failed. use , intrinsic :: & iso_fortran_env , only : & error_unit , & input_unit , & output_unit use stdlib_ascii , only : to_lower use stdlib_optval , only : optval implicit none private public :: global_logger , logger_type !! public constants used as error flags integer , parameter , public :: & success = 0 , & close_failure = 1 , & index_invalid_error = 2 , & non_sequential_error = 3 , & open_failure = 4 , & read_only_error = 5 , & unformatted_in_error = 6 , & unopened_in_error = 7 , & write_failure = 8 integer , parameter , public :: & debug_level = 10 , & information_level = 20 , & warning_level = 30 , & error_level = 40 , & io_error_level = 40 , & text_error_level = 50 , & all_level = - 10 + min ( & debug_level , & information_level , & warning_level , & error_level , & io_error_level , & text_error_level ), & none_level = 10 + max ( & debug_level , & information_level , & warning_level , & error_level , & io_error_level , & text_error_level ) character ( * ), parameter :: module_name = 'stdlib_logger' type :: logger_type !! version: experimental !! Public derived type ([Specification](../page/specs/stdlib_logger.html#the-derived-type-logger_type)) private logical :: add_blank_line = . false . logical :: indent_lines = . true . integer :: level = information_level integer , allocatable :: log_units (:) integer :: max_width = 0 logical :: time_stamp = . true . integer :: units = 0 contains private procedure , public , pass ( self ) :: add_log_file procedure , public , pass ( self ) :: add_log_unit procedure , public , pass ( self ) :: configuration procedure , public , pass ( self ) :: configure procedure , public , pass ( self ) :: log_debug procedure , public , pass ( self ) :: log_error procedure , public , pass ( self ) :: log_information procedure , public , pass ( self ) :: log_io_error procedure , public , pass ( self ) :: log_message procedure , public , pass ( self ) :: log_text_error procedure , public , pass ( self ) :: log_units_assigned procedure , public , pass ( self ) :: log_warning procedure , public , pass ( self ) :: remove_log_unit final :: final_logger end type logger_type !! Variable of type `logger_type` to be used as a global logger type ( logger_type ) :: global_logger character ( * ), parameter :: & invalid_column = 'column is not a valid index to line.' contains subroutine add_log_file ( self , filename , unit , action , position , status , & stat ) !! version: experimental !! Opens a formatted sequential access output file, `filename` using !! `newunit` and adds the resulting unit number to `self`'s `log_units` !! array. `action`, if present, is the `action` specifier of the `open` !! statement, and has the default value of `\"write\"`. `position`, if present, !! is the `position` specifier, and has the default value of `\"REWIND\"`. !! `status`, if present, is the `status` specifier of the `open` statement, !! and has the default value of `\"REPLACE\"`. `stat`, if present, has the value !! `success` if `filename` could be opened, `read_only_error` if `action` is !! `\"read\"`, and `open_failure` otherwise. !!([Specification](../page/specs/stdlib_logger.html#add_log_file-open-a-file-and-add-its-unit-to-self-log_units)) class ( logger_type ), intent ( inout ) :: self !! The logger variable to which the file is to be added character ( * ), intent ( in ) :: filename !! The name of the file to be added to the logger integer , intent ( out ), optional :: unit !! The resulting I/O unit number character ( * ), intent ( in ), optional :: action !! The `action` specifier for the `open`` statement character ( * ), intent ( in ), optional :: position !! The `position` specifier for the `open` statement character ( * ), intent ( in ), optional :: status !! The `status` specifier for the `open` statement integer , intent ( out ), optional :: stat !! The error status on exit with the possible values !! * `success` - no errors found !! * `read_only_error` - file unopened as `action1 was `\"read\"` for an output !! file !! * `open_failure` - the `open` statement failed !!##### Example !! !! program main !! use stdlib_logger !! ... !! integer :: unit, stat !! ... !! call global_logger % add_log_file( 'error_log.txt', unit, & !! position='asis', stat=stat ) !! if ( stat /= success ) then !! error stop 'Unable to open \"error_log.txt\".' !! end if !! ... !! end program main character ( 16 ) :: aaction , aposition , astatus integer :: aunit character ( 128 ) :: iomsg integer :: iostat character ( * ), parameter :: procedure_name = 'add_log_file' integer , allocatable :: dummy (:) integer :: lun integer :: i aaction = optval ( action , 'write' ) aposition = optval ( position , 'rewind' ) astatus = optval ( status , 'replace' ) if ( len_trim ( aaction ) == 4 ) then do i = 1 , 4 aaction ( i : i ) = to_lower ( aaction ( i : i )) end do if ( aaction == 'read' ) then if ( present ( stat ) ) then stat = read_only_error return else error stop 'In ' // module_name // ' % ' // & procedure_name // ' action is \"read\" which ' // & 'does not allow writes to the file.' end if end if end if open ( newunit = aunit , file = filename , form = 'formatted' , action = aaction , & position = aposition , status = astatus , iostat = iostat , iomsg = iomsg , & err = 999 ) if ( allocated ( self % log_units ) ) then if ( size ( self % log_units ) == self % units ) then allocate ( dummy ( 2 * self % units ) ) do lun = 1 , self % units dummy ( lun ) = self % log_units ( lun ) end do dummy ( self % units + 1 :) = 0 call move_alloc ( dummy , self % log_units ) end if else allocate ( self % log_units ( 16 ) ) end if self % log_units ( self % units + 1 ) = aunit self % units = self % units + 1 if ( present ( unit ) ) unit = aunit if ( present ( stat ) ) stat = success return 999 if ( present ( stat ) ) then stat = open_failure return else call self % log_io_error ( 'Unable to open ' // trim ( filename ), & module = module_name , & procedure = procedure_name , & iostat = iostat , & iomsg = iomsg ) error stop module_name // ' % ' // procedure_name // & ': Unable to open file' end if end subroutine add_log_file subroutine add_log_unit ( self , unit , stat ) !! version: experimental !! Adds `unit` to the log file units in `log_units`. `unit` must be an `open` !! file, of `form` `\"formatted\"`, with `\"sequential\"` `access`, and an `action` !! of `\"write\"` or `\"readwrite\"`, otherwise either `stat`, if present, has a !! value other than `success` and `unit` is not entered into `log_units`, !! or, if `stat` is not presecn, processing stops. !!([Specification](../page/specs/stdlib_logger.html#add_log_unit-add-a-unit-to-the-array-self-log_units)) class ( logger_type ), intent ( inout ) :: self !! The logger variable to which the I/O unit is to be added integer , intent ( in ) :: unit !! The input logical unit number integer , intent ( out ), optional :: stat !! An error code with the possible values !! * `success` - no problems were found !! * `non_sequential_error` - `unit` did not have sequential access !! * `read_only_error` - `unit` was not writeable !! * `unformatted_in_error` - `unit` was an `'unformatted'` file !! * `unopened_in_error` - `unit` was not opened !!##### Example !! !! program main !! use stdlib_logger !! ... !! character(256) :: iomsg !! integer :: iostat, unit, stat !! ... !! open( newunit=unit, 'error_log.txt', form='formatted', & !! status='replace', position='rewind', err=999, & !! action='read', iostat=iostat, iomsg=iomsg ) !! ... !! call global_logger % add_log_unit( unit, stat ) !! select case ( stat ) !! ... !! case ( read_only_error ) !! error stop 'Unable to write to \"error_log.txt\".' !! ... !! end select !! ... !! 999 error stop 'Unable to open \"error_log.txt\". !! ... !! end program main integer , allocatable :: dummy (:) character ( * ), parameter :: procedure_name = 'set_log_unit' integer :: lun character ( 12 ) :: specifier logical :: question integer :: istat call validate_unit () if ( present ( stat ) ) then if ( stat /= success ) return end if do lun = 1 , self % units ! Check that unit is not already registered if ( self % log_units ( lun ) == unit ) return end do if ( allocated ( self % log_units ) ) then if ( size ( self % log_units ) == self % units ) then allocate ( dummy ( 2 * self % units ) ) do lun = 1 , self % units dummy ( lun ) = self % log_units ( lun ) end do call move_alloc ( dummy , self % log_units ) end if else allocate ( self % log_units ( 16 ) ) end if self % log_units ( self % units + 1 ) = unit self % units = self % units + 1 contains subroutine validate_unit () ! Check that unit is not input_unit if ( unit == input_unit ) then if ( present ( stat ) ) then stat = read_only_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' must not be input_unit.' end if end if ! Check that unit is opened inquire ( unit , opened = question , iostat = istat ) if ( istat /= 0 ) question = . false . if ( . not . question ) then if ( present ( stat ) ) then stat = unopened_in_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not open.' end if end if ! Check that unit is writeable inquire ( unit , write = specifier ) if ( specifier ( 1 : 1 ) /= 'Y' . and . specifier ( 1 : 1 ) /= 'y' ) then if ( present ( stat ) ) then stat = read_only_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not writeable.' end if end if inquire ( unit , sequential = specifier ) if ( specifier ( 1 : 1 ) /= 'Y' . and . specifier ( 1 : 1 ) /= 'y' ) then if ( present ( stat ) ) then stat = non_sequential_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not \"sequential\".' end if end if inquire ( unit , formatted = specifier ) if ( specifier ( 1 : 1 ) /= 'Y' . and . specifier ( 1 : 1 ) /= 'y' ) then if ( present ( stat ) ) then stat = unformatted_in_error return else error stop 'unit in ' // module_name // ' % ' // & procedure_name // ' is not \"formatted\".' end if end if if ( present ( stat ) ) stat = success end subroutine validate_unit end subroutine add_log_unit pure subroutine configuration ( self , add_blank_line , indent , level , & max_width , time_stamp , log_units ) !! version: experimental !! Reports the logging configuration of `self`. The following attributes are !! reported: !! 1. `add_blank_line` is a logical flag with `.true.` implying that output !! starts with a blank line, and `.false.` implying no blank line. !! 2. `indent` is a logical flag with `.true.` implying that subsequent columns !! will be indented 4 spaces and `.false.` implying no indentation. !! 3. `level` is the lowest level for printing a message !! 4. `max_width` is the maximum number of columns of output text with !! `max_width` == 0 => no bounds on output width. !! 5. `time_stamp` is a logical flag with `.true.` implying that the output !! will have a time stamp, and `.false.` implying that there will be no !! time stamp. !! 6. `log_units` is an array of the I/O unit numbers to which log output !! will be written. !!([Specification](../page/specs/stdlib_logger.html#configuration-report-a-loggers-configuration)) class ( logger_type ), intent ( in ) :: self !! The logger variable whose configuration is being reported logical , intent ( out ), optional :: add_blank_line !! A logical flag to add a preceding blank line logical , intent ( out ), optional :: indent !! A logical flag to indent subsequent lines integer , intent ( out ), optional :: level !! The minimum level for printing a message integer , intent ( out ), optional :: max_width !! The maximum number of columns for most outputs logical , intent ( out ), optional :: time_stamp !! A logical flag to add a time stamp integer , intent ( out ), allocatable , optional :: log_units (:) !! The I/O units used in output !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! contains !! ... !! subroutine example_sub(unit, ...) !! integer, intent(in) :: unit !! ... !! integer, allocatable :: log_units(:) !! ... !! call global_logger % configuration( log_units=log_units ) !! if ( size(log_units) == 0 ) then !! call add_logger_unit( unit ) !! end if !! .. !! end subroutine example_sub !! ... !! end module example_mod if ( present ( add_blank_line ) ) add_blank_line = self % add_blank_line if ( present ( indent ) ) indent = self % indent_lines if ( present ( level ) ) level = self % level if ( present ( max_width ) ) max_width = self % max_width if ( present ( time_stamp ) ) time_stamp = self % time_stamp if ( present ( log_units ) ) then if ( self % units . gt . 0 ) then log_units = self % log_units ( 1 : self % units ) else allocate ( log_units ( 0 )) end if end if end subroutine configuration pure subroutine configure ( self , add_blank_line , indent , level , max_width , & time_stamp ) !! version: experimental !! Configures the logging process for SELF. The following attributes are !! configured: !! 1. `add_blank_line` is a logical flag with `.true.` implying that output !! starts with a blank line, and `.false.` implying no blank line. !! `add_blank_line` has a startup value of `.false.`. !! 2. `indent` is a logical flag with `.true.` implying that subsequent lines !! will be indented 4 spaces and `.false.` implying no indentation. `indent` !! has a startup value of `.true.`. !! 3. `level` is the lowest level for printing a message !! 4. `max_width` is the maximum number of columns of output text with !! `max_width == 0` => no bounds on output width. `max_width` has a startup !! value of 0. !! 5. `time_stamp` is a logical flag with `.true.` implying that the output !! will have a time stamp, and `.false.` implying that there will be no !! time stamp. `time_stamp` has a startup value of `.true.`. !!([Specification](../page/specs/stdlib_logger.html#configure-configure-the-logging-process)) !!##### Example !! !! program main !! use stdlib_logger !! ... !! call global_logger % configure( indent=.false., max_width=72 ) !! ... class ( logger_type ), intent ( inout ) :: self logical , intent ( in ), optional :: add_blank_line logical , intent ( in ), optional :: indent integer , intent ( in ), optional :: level integer , intent ( in ), optional :: max_width logical , intent ( in ), optional :: time_stamp if ( present ( add_blank_line ) ) self % add_blank_line = add_blank_line if ( present ( level ) ) self % level = level if ( present ( indent ) ) self % indent_lines = indent if ( present ( max_width ) ) then if ( max_width <= 4 ) then self % max_width = 0 else self % max_width = max_width end if end if if ( present ( time_stamp ) ) self % time_stamp = time_stamp end subroutine configure subroutine final_logger ( self ) !! version: experimental !! Finalizes the `logger_type` entity `self` by flushing the units type ( logger_type ), intent ( in ) :: self integer :: iostat character ( 256 ) :: message integer :: unit do unit = 1 , self % units flush ( self % log_units ( unit ), iomsg = message , iostat = iostat ) if ( iostat /= 0 ) then write ( error_unit , '(a, i0)' ) 'In the logger_type ' // & 'finalizer an error occurred in flushing unit = ' , & self % log_units ( unit ) write ( error_unit , '(a, i0)' ) 'With iostat = ' , iostat write ( error_unit , '(a)' ) 'With iomsg = ' // trim ( message ) end if end do end subroutine final_logger subroutine format_output_string ( self , string , col_indent , len_buffer , buffer ) !! version: experimental !! Writes the STRING to UNIT ensuring that the number of characters !! does not exceed MAX_WIDTH and that the lines after the first !! one are indented four characters. class ( logger_type ), intent ( in ) :: self character ( * ), intent ( in ) :: string character ( * ), intent ( in ) :: col_indent integer , intent ( out ) :: len_buffer character ( len = :), allocatable , intent ( out ) :: buffer integer :: count , indent_len , index_ , length , remain integer , parameter :: new_len = len ( new_line ( 'a' )) length = len_trim ( string ) allocate ( character ( 2 * length ) :: buffer ) len_buffer = 0 indent_len = len ( col_indent ) call format_first_line () if ( self % indent_lines ) then do while ( remain > 0 ) call indent_format_subsequent_line () end do else do while ( remain > 0 ) call format_subsequent_line () end do end if contains subroutine format_first_line () if ( self % max_width == 0 . or . & ( length <= self % max_width . and . & index ( string ( 1 : length ), new_line ( 'a' )) == 0 ) ) then buffer ( 1 : length ) = string ( 1 : length ) len_buffer = length remain = 0 return else index_ = index ( string ( 1 : min ( length , self % max_width )), & new_line ( 'a' ) ) if ( index_ == 0 ) then do index_ = self % max_width , 1 , - 1 if ( string ( index_ : index_ ) == ' ' ) exit end do end if if ( index_ == 0 ) then buffer ( 1 : self % max_width ) = & string ( 1 : self % max_width ) len_buffer = self % max_width count = self % max_width remain = length - count return else buffer ( 1 : index_ - 1 ) = string ( 1 : index_ - 1 ) len_buffer = index_ - 1 count = index_ remain = length - count return end if end if end subroutine format_first_line subroutine format_subsequent_line () integer :: new_len_buffer character (:), allocatable :: dummy if ( remain <= self % max_width ) then new_len_buffer = len_buffer + length - count + new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // string ( count + 1 : length ) len_buffer = new_len_buffer count = length remain = 0 return else index_ = count + index ( string ( count + 1 : count + self % max_width ),& new_line ( 'a' )) if ( index_ == count ) then do index_ = count + self % max_width , count + 1 , - 1 if ( string ( index_ : index_ ) == ' ' ) exit end do end if if ( index_ == count ) then new_len_buffer = len_buffer + self % max_width + & new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // string ( count + 1 : count + self % max_width ) len_buffer = new_len_buffer count = count + self % max_width remain = length - count return else new_len_buffer = len_buffer + index_ - 1 & - count + new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // string ( count + 1 : index_ - 1 ) len_buffer = new_len_buffer count = index_ remain = length - count return end if end if end subroutine format_subsequent_line subroutine indent_format_subsequent_line () integer :: new_len_buffer character (:), allocatable :: dummy if ( index ( string ( count + 1 : length ), new_line ( 'a' )) == 0 . and . & remain <= self % max_width - indent_len ) then new_len_buffer = len_buffer + length & - count + new_len + indent_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // col_indent // string ( count + 1 : length ) len_buffer = new_len_buffer count = length remain = 0 return else index_ = count + index ( string ( count + 1 : & min ( length , count + self % max_width - indent_len ) ), & new_line ( 'a' )) if ( index_ == count ) then do index_ = count + self % max_width - indent_len , count + 1 , - 1 if ( string ( index_ : index_ ) == ' ' ) exit end do end if if ( index_ == count ) then new_len_buffer = len_buffer + self % max_width & + new_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // col_indent // & string ( count + 1 : count + self % max_width - indent_len ) len_buffer = new_len_buffer count = count + self % max_width - indent_len remain = length - count return else new_len_buffer = len_buffer + index_ - count - 1 & + new_len + indent_len if ( new_len_buffer > len ( buffer ) ) then allocate ( character ( 2 * len ( buffer ) ) :: dummy ) dummy = buffer call move_alloc ( dummy , buffer ) end if buffer ( len_buffer + 1 : new_len_buffer ) = & new_line ( 'a' ) // col_indent // string ( count + 1 : index_ - 1 ) len_buffer = new_len_buffer count = index_ remain = length - count return end if end if end subroutine indent_format_subsequent_line end subroutine format_output_string subroutine handle_write_failure ( unit , procedure_name , iostat , iomsg ) !! version: experimental !! Handles a failure to write to `unit` in `procedure_name` with `iostat` and !! `iomsg` by writing a description of the failure to `output_unit` and !! stopping. integer , intent ( in ) :: unit character ( * ), intent ( in ) :: procedure_name integer , intent ( in ) :: iostat character ( * ), intent ( in ) :: iomsg character ( 256 ) :: name logical :: named character ( 10 ) :: action write ( output_unit , '(a)' ) 'write failure in ' // module_name // & ' % ' // trim ( procedure_name ) // '.' if ( unit == - 999 ) then write ( output_unit , '(a, i0)' ) 'unit = internal file' else write ( output_unit , '(a, i0)' ) 'unit = ' , unit inquire ( unit , named = named ) if ( named ) then inquire ( unit , name = name ) write ( output_unit , '(a, a)' ) 'name = ' , trim ( name ) else write ( output_unit , '(a)' ) 'unit is unnamed' end if inquire ( unit , action = action ) write ( output_unit , '(a, a)' ) 'action = ' , trim ( action ) end if write ( output_unit , '(a, i0)' ) 'iostat = ' , iostat write ( output_unit , '(a, a )' ) 'iomsg = ' , trim ( iomsg ) error stop 'write failure in ' // module_name // '.' end subroutine handle_write_failure subroutine log_debug ( self , message , module , procedure ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !!([Specification](../page/specs/stdlib_logger.html#log_debug-writes-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, and then `message` is !! written with the prefix 'DEBUG: '. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( selection ) !! integer, intent(out) :: selection !! integer :: stat !! write(*,'(a)') \"Enter an integer to select a widget\" !! read(*,'(i0)') selection !! write( message, `(a, i0)' ) & !! \"The user selected \", selection !! call alogger % log_debug( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB' ) !! ... !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger used to send the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_information` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of !! `log_information` if ( self % level > debug_level ) return call self % log_message ( message , & module = module , & procedure = procedure , & prefix = 'DEBUG' ) end subroutine log_debug subroutine log_error ( self , message , module , procedure , stat , errmsg ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !! ([Specification](../specs/stdlib_logger.html#log_error-writes-the-string-message-to-self-log_units)) !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, then `message` is !! written with the prefix 'ERROR: ', and then if `stat` or `errmsg` !! are present they are written. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( size ) !! integer, intent(in) :: size !! character(128) :: errmsg, message !! integer :: stat !! allocate( a(size), stat=stat, errmsg=errmsg ) !! if ( stat /= 0 ) then !! write( message, `(a, i0)' ) & !! \"Allocation of A failed with SIZE = \", size !! alogger % call log_error( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB', & !! stat = stat, & !! errmsg = errmsg ) !! end if !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger to be used in logging the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_error` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of `log_error` integer , intent ( in ), optional :: stat !! The value of the `stat` specifier returned by a Fortran statement character ( len =* ), intent ( in ), optional :: errmsg !! The value of the `errmsg` specifier returned by a Fortran statement integer :: iostat character ( 28 ) :: dummy character ( 256 ) :: iomsg character ( * ), parameter :: procedure_name = 'log_error' character (:), allocatable :: suffix if ( self % level > error_level ) return if ( present ( stat ) ) then write ( dummy , '(a, i0)' , err = 999 , iostat = iostat , iomsg = iomsg ) & new_line ( 'a' ) // \"With stat = \" , stat else dummy = ' ' end if if ( present ( errmsg ) ) then if ( len_trim ( errmsg ) > 0 ) then suffix = trim ( dummy ) // & new_line ( 'a' ) // 'With errmsg = \"' // trim ( errmsg ) // '\"' else suffix = dummy end if else suffix = dummy end if call self % log_message ( trim ( message ) // suffix , & module = module , & procedure = procedure , & prefix = 'ERROR' ) return 999 call handle_write_failure ( - 999 , procedure_name , iostat , iomsg ) end subroutine log_error subroutine log_information ( self , message , module , procedure ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !!([Specification](../page/specs/stdlib_logger.html#log_information-writes-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, and then `message` is !! written with the prefix 'INFO: '. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( selection ) !! integer, intent(out) :: selection !! integer :: stat !! write(*,'(a)') \"Enter an integer to select a widget\" !! read(*,'(i0)') selection !! write( message, `(a, i0)' ) & !! \"The user selected \", selection !! call alogger % log_information( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB' ) !! ... !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger used to send the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_information` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of !! `log_information` if ( self % level > information_level ) return call self % log_message ( message , & module = module , & procedure = procedure , & prefix = 'INFO' ) end subroutine log_information subroutine log_io_error ( self , message , module , procedure , iostat , & iomsg ) !! version: experimental !! Writes the string `message` to the `self % log_units` with optional !! additional text. !!([Specification](../page/specs/stdlib_logger.html#log_io_error-write-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, then `message` is !! written with a prefix 'I/O ERROR: ', and then if `iostat` or `iomsg` !! are present they are also written. !! !!##### Example !! !! program example !! use stdlib_logger !! ... !! character(*), parameter :: filename = 'dummy.txt' !! integer :: iostat, lun !! character(128) :: iomsg !! character(*), parameter :: message = 'Failure in opening \"dummy.txt\".' !! !! open( newunit=lun, file = filename, form='formatted', & !! status='old', iostat=iostat, iomsg=iomsg ) !! if ( iostat /= 0 ) then !! call global_logger % log_io_error( message, procedure = 'EXAMPLE', & !! iostat=iostat, iomsg = iomsg ) !! error stop 'Error on opening ' // filename !! end if !! ... !! end program example class ( logger_type ), intent ( in ) :: self !! The logger variable to receivee the message character ( len =* ), intent ( in ) :: message !! A string to be written to LOG_UNIT character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of REPORT_ERROR character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of REPORT_ERROR integer , intent ( in ), optional :: iostat !! The value of the IOSTAT specifier returned by a Fortran I/O statement character ( len =* ), intent ( in ), optional :: iomsg !! The value of the IOMSG specifier returned by a Fortran I/O statement character ( 28 ) :: dummy character ( 256 ) :: iomsg2 integer :: iostat2 character ( * ), parameter :: procedure_name = 'log_io_error' character (:), allocatable :: suffix if ( self % level > io_error_level ) return if ( present ( iostat ) ) then write ( dummy , '(a, i0)' , err = 999 , iostat = iostat2 , iomsg = iomsg2 ) & new_line ( 'a' ) // \"With iostat = \" , iostat else dummy = ' ' end if if ( present ( iomsg ) ) then if ( len_trim ( iomsg ) > 0 ) then suffix = trim ( dummy ) // & new_line ( 'a' ) // 'With iomsg = \"' // trim ( iomsg ) // '\"' else suffix = trim ( dummy ) end if else suffix = trim ( dummy ) end if call self % log_message ( trim ( message ) // suffix , & module = module , & procedure = procedure , & prefix = 'I/O ERROR' ) return 999 call handle_write_failure ( - 999 , procedure_name , iostat2 , iomsg2 ) end subroutine log_io_error subroutine log_message ( self , message , module , procedure , prefix ) !! version: experimental !! Writes the string `message` to the `self % log_units` with optional !! additional text. !!([Specification](../page/specs/stdlib_logger.html#log_message-write-the-string-message-to-self-log_units)) !! !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by `module` !! and `procedure` if present, followed by `prefix // ': '` if present, !! and then `message`. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! contains !! ... !! subroutine example_sub( selection ) !! integer, intent(out) :: selection !! integer :: stat !! write(*,'(a)') \"Enter an integer to select a widget\" !! read(*,'(i0)') selection !! write( message, `(a, i0)' ) & !! \"The user selected \", selection !! call global_logger % log_message( message, & !! module = 'example_mod', & !! procedure = 'example_sub', & !! prefix = 'info' ) !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger variable to receive the message character ( len =* ), intent ( in ) :: message !! A string to be written to log_unit character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_message` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of `log_message` character ( len =* ), intent ( in ), optional :: prefix !! To be prepended to message as `prefix // ': ' // message`. integer :: unit integer :: iostat integer :: len_buffer character ( * ), parameter :: procedure_name = 'log_message' character ( 256 ) :: iomsg character (:), allocatable :: d_and_t , m_and_p , pref character (:), allocatable :: buffer pref = optval ( prefix , '' ) if ( len ( pref ) > 0 ) pref = pref // ': ' if ( self % time_stamp ) then d_and_t = time_stamp () // ': ' else d_and_t = '' end if if ( present ( module ) ) then if ( present ( procedure ) ) then m_and_p = trim ( module ) // ' % ' // trim ( procedure ) // ': ' else m_and_p = trim ( module ) // ': ' end if else if ( present ( procedure ) ) then m_and_p = trim ( procedure ) // ': ' else m_and_p = '' end if call format_output_string ( self , & d_and_t // m_and_p // pref // & trim ( message ), & ' ' , & len_buffer , & buffer ) if ( self % units == 0 ) then if ( self % add_blank_line ) then write ( output_unit , '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) & new_line ( 'a' ) // buffer ( 1 : len_buffer ) else write ( output_unit , '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) & buffer ( 1 : len_buffer ) end if else if ( self % add_blank_line ) then do unit = 1 , self % units write ( self % log_units ( unit ), '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) new_line ( 'a' ) // & buffer ( 1 : len_buffer ) end do else do unit = 1 , self % units write ( self % log_units ( unit ), '(a)' , err = 999 , iostat = iostat , & iomsg = iomsg ) & buffer ( 1 : len_buffer ) end do end if end if return 999 call handle_write_failure ( unit , procedure_name , iostat , iomsg ) end subroutine log_message subroutine log_text_error ( self , line , column , summary , filename , & line_number , caret , stat ) !! version: experimental !! Sends a message to `self % log_units` describing an error found !! in a line of text. !!([Specification](../page/specs/stdlib_logger.html#log_text_error-send-a-message-to-self-log_units-describing-an-error)) !!##### Behavior !! !! If time stamps are active first a time stamp is written. Then if !! `filename` or `line_number` or `column` are present they are written. !! Then `line` is written. Then the symbol `caret` is written below `line` !! at the column indicated by `column`. Then `summary` is written. ! !!##### Example !! !! program example !! ... !! character(*), parameter :: filename = 'dummy.txt' !! integer :: col_num, line_num, lun !! character(128) :: line !! character(*), parameter :: message = 'Bad text found.' !! !! open( newunit=lun, file = filename, statu='old', form='formatted' ) !! line_num = 0 !! do !! read( lun, fmt='(a)', end=900 ) line !! line_num = line_num + 1 !! call check_line( line, status, col_num ) !! if ( status /= 0 ) !! call global_logger % log_text_error( line, col_num, message, & !! filename, line_num ) !! error stop 'Error in reading ' // filename !! end if !! ... !! end do !!900 continue !! ... !! end program example !! class ( logger_type ), intent ( in ) :: self !! The logger variable to receive the message character ( * ), intent ( in ) :: line !! The line of text in which the error was found. integer , intent ( in ) :: column !! The one's based column in LINE at which the error starts. character ( * ), intent ( in ) :: summary !! A brief description of the error. character ( * ), intent ( in ), optional :: filename !! The name of the file, if any, in which the error was found. integer , intent ( in ), optional :: line_number !! The one's based line number in the file where `line` was found. character ( 1 ), intent ( in ), optional :: caret !! The symbol used to mark the column wher the error was first detected integer , intent ( out ), optional :: stat !! Integer flag that an error has occurred. Has the value `success` if no !! error hass occurred, `index_invalid_error` if `column` is less than zero or !! greater than `len(line)`, and `write_failure` if any of the `write` !! statements has failed. character ( 1 ) :: acaret character ( 128 ) :: iomsg integer :: iostat integer :: lun character ( * ), parameter :: procedure_name = 'LOG_TEXT_ERROR' character ( len = :), allocatable :: buffer if ( self % level > text_error_level ) return acaret = optval ( caret , '^' ) if ( column < 0 . or . column > len ( line ) + 1 ) then if ( present ( stat ) ) then stat = index_invalid_error return else call self % log_error ( invalid_column , & module = module_name , & procedure = procedure_name ) error stop module_name // ' % ' // procedure_name // ': ' // & invalid_column end if end if call write_log_text_error_buffer ( ) if ( self % units == 0 ) then write ( output_unit , '(a)' ) buffer else do lun = 1 , self % units write ( self % log_units ( lun ), '(a)' ) buffer end do end if contains subroutine write_log_text_error_buffer ( ) integer :: i character (:), allocatable :: location , marker if ( present ( filename ) ) then if ( present ( line_number ) ) then allocate ( character ( len_trim ( filename ) + 15 ) :: location ) write ( location , fmt = '(a, \":\", i0, \":\", i0)' , err = 999 , & iomsg = iomsg , iostat = iostat ) & trim ( filename ) , line_number , column else allocate ( character ( len_trim ( filename ) + 45 ) :: location ) write ( location , fmt = '(a, i0)' , err = 999 , iomsg = iomsg , & iostat = iostat ) & \"Error found in file: '\" // trim ( filename ) // & \"', at column: \" , column end if else if ( present ( line_number ) ) then allocate ( character ( 54 ) :: location ) write ( location , fmt = '(a, i0, a, i0)' , err = 999 , & iomsg = iomsg , iostat = iostat ) & 'Error found at line number: ' , line_number , & ', and column: ' , column else allocate ( character ( 36 ) :: location ) write ( location , & fmt = '(\"Error found in line at column:\", i0)' ) & column end if end if allocate ( character ( column ) :: marker ) do i = 1 , column - 1 marker ( i : i ) = ' ' end do marker ( column : column ) = acaret if ( self % add_blank_line ) then if ( self % time_stamp ) then buffer = new_line ( 'a' ) // time_stamp () // & new_line ( 'a' ) // trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) else buffer = new_line ( 'a' ) // trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) end if else if ( self % time_stamp ) then buffer = time_stamp () // & new_line ( 'a' ) // trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) else buffer = trim ( location ) // & new_line ( 'a' ) // new_line ( 'a' ) // trim ( line ) // & new_line ( 'a' ) // marker // & new_line ( 'a' ) // 'Error: ' // trim ( summary ) end if end if if ( present ( stat ) ) stat = success return 999 if ( present ( stat ) ) then stat = write_failure return else call handle_write_failure ( - 999 , procedure_name , iostat , & iomsg ) end if end subroutine write_log_text_error_buffer end subroutine log_text_error elemental function log_units_assigned ( self ) !! version: experimental !! Returns the number of units assigned to `self % log_units` !!([Specification](../page/specs/stdlib_logger.html#log_units_assigned-returns-the-number-of-active-io-units)) class ( logger_type ), intent ( in ) :: self !! The logger subject to the inquiry integer :: log_units_assigned !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub(unit, ...) !! integer, intent(in) :: unit !! ... !! integer, allocatable :: log_units(:) !! ... !! if ( alogger % log_units_assigned() == 0 ) then !! call alogger % add_log_unit( unit ) !! end if !! ... !! end subroutine example_sub !! ... !! end module example_mod log_units_assigned = self % units end function log_units_assigned subroutine log_warning ( self , message , module , procedure ) !! version: experimental !! Writes the string `message` to `self % log_units` with optional additional !! text. !!([Specification](../page/specs/stdlib_logger.html#log_warning-write-the-string-message-to-log_units)) !!##### Behavior !! !! If time stamps are active, a time stamp is written, followed by !! `module` and `procedure` if present, then `message` is !! written with the prefix 'WARN: '. !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! real, allocatable :: a(:) !! ... !! type(logger_type) :: alogger !! ... !! contains !! ... !! subroutine example_sub( size, stat ) !! integer, intent(in) :: size !! integer, intent(out) :: stat !! allocate( a(size) ) !! if ( stat /= 0 ) then !! write( message, `(a, i0)' ) & !! \"Allocation of A failed with SIZE = \", size !! call alogger % log_warning( message, & !! module = 'EXAMPLE_MOD', & !! procedure = 'EXAMPLE_SUB' ) !! end if !! end subroutine example_sub !! ... !! end module example_mod !! class ( logger_type ), intent ( in ) :: self !! The logger to which the message is written character ( len =* ), intent ( in ) :: message !! A string to be written to LOG_UNIT character ( len =* ), intent ( in ), optional :: module !! The name of the module containing the current invocation of `log_warning` character ( len =* ), intent ( in ), optional :: procedure !! The name of the procedure containing the current invocation of `log_warning` if ( self % level > warning_level ) return call self % log_message ( message , & module = module , & procedure = procedure , & prefix = 'WARN' ) end subroutine log_warning subroutine remove_log_unit ( self , unit , close_unit , stat ) !! version: experimental !! Remove the I/O unit from the self % log_units list. If `close_unit` is !! present and `.true.` then the corresponding file is closed. If `unit` is !! not in `log_units` then nothing is done. If `stat` is present it, by !! default, has the value `success`. If closing the `unit` fails, then if !! `stat` is present it has the value `close_failure`, otherwise processing !! stops with an informative message. !!([Specification](../page/specs/stdlib_logger.html#remove_log_unit-remove-unit-from-self-log_units)) class ( logger_type ), intent ( inout ) :: self !! The logger variable whose unit is to be removed integer , intent ( in ) :: unit !! The I/O unit to be removed from self logical , intent ( in ), optional :: close_unit !! A logical flag to close the unit while removing it from the SELF list integer , intent ( out ), optional :: stat !! An error status with the values !! * success - no problems found !! * close_failure - the close statement for unit failed !! !!##### Example !! !! module example_mod !! use stdlib_logger !! ... !! type(logger_type) :: alogger !! contains !! ... !! subroutine example_sub(unit, ...) !! integer, intent(in) :: unit !! ... !! call alogger % remove_log_unit( unit ) !! ... !! end subroutine example_sub !! ... !! end module example_mod character ( 128 ) :: errmsg integer :: lun , lun_old character ( * ), parameter :: procedure_name = 'REMOVE_LOG_UNIT' if ( present ( stat ) ) stat = success do lun = 1 , self % units if ( unit == self % log_units ( lun ) ) exit end do if ( lun == self % units + 1 ) return if ( present ( close_unit ) ) then if ( close_unit ) close ( unit , err = 999 , iomsg = errmsg ) end if do lun_old = lun + 1 , self % units self % log_units ( lun_old - 1 ) = self % log_units ( lun_old ) end do self % units = self % units - 1 return 999 if ( present ( stat ) ) then stat = close_failure return else write ( * , '(a, i0)' ) 'In ' // module_name // ' % ' // & procedure_name // ' close_unit failed for unit = ' , unit write ( * , '(a)' ) 'With iomsg = ' // trim ( errmsg ) error stop 'close_unit failed in ' // module_name // ' % ' // & procedure_name // '.' end if end subroutine remove_log_unit function time_stamp () !! Creates a time stamp in the format 'yyyy-mm-dd hh:mm:ss.sss' character ( 23 ) :: time_stamp character ( 8 ) :: date character ( 10 ) :: time call date_and_time ( date , time ) time_stamp ( 1 : 4 ) = date ( 1 : 4 ) time_stamp ( 5 : 5 ) = '-' time_stamp ( 6 : 7 ) = date ( 5 : 6 ) time_stamp ( 8 : 8 ) = '-' time_stamp ( 9 : 10 ) = date ( 7 : 8 ) time_stamp ( 11 : 11 ) = ' ' time_stamp ( 12 : 13 ) = time ( 1 : 2 ) time_stamp ( 14 : 14 ) = ':' time_stamp ( 15 : 16 ) = time ( 3 : 4 ) time_stamp ( 17 : 17 ) = ':' time_stamp ( 18 : 23 ) = time ( 5 : 10 ) end function time_stamp end module stdlib_logger","tags":"","loc":"sourcefile/stdlib_logger.f90.html"},{"title":"stdlib_ascii.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" !> The `stdlib_ascii` module provides procedures for handling and manipulating !> intrinsic character variables and constants. !> !> The specification of this module is available [here](../page/specs/stdlib_ascii.html). module stdlib_ascii use stdlib_kinds , only : int8 , int16 , int32 , int64 , lk , c_bool implicit none private ! Character validation functions public :: is_alpha , is_alphanum public :: is_digit , is_hex_digit , is_octal_digit public :: is_control , is_white , is_blank public :: is_ascii , is_punctuation public :: is_graphical , is_printable public :: is_lower , is_upper ! Character conversion functions public :: to_lower , to_upper , to_title , to_sentence , reverse ! All control characters in the ASCII table (see www.asciitable.com). character ( len = 1 ), public , parameter :: NUL = achar ( int ( z '00' )) !! Null character ( len = 1 ), public , parameter :: SOH = achar ( int ( z '01' )) !! Start of heading character ( len = 1 ), public , parameter :: STX = achar ( int ( z '02' )) !! Start of text character ( len = 1 ), public , parameter :: ETX = achar ( int ( z '03' )) !! End of text character ( len = 1 ), public , parameter :: EOT = achar ( int ( z '04' )) !! End of transmission character ( len = 1 ), public , parameter :: ENQ = achar ( int ( z '05' )) !! Enquiry character ( len = 1 ), public , parameter :: ACK = achar ( int ( z '06' )) !! Acknowledge character ( len = 1 ), public , parameter :: BEL = achar ( int ( z '07' )) !! Bell character ( len = 1 ), public , parameter :: BS = achar ( int ( z '08' )) !! Backspace character ( len = 1 ), public , parameter :: TAB = achar ( int ( z '09' )) !! Horizontal tab character ( len = 1 ), public , parameter :: LF = achar ( int ( z '0A' )) !! NL line feed, new line character ( len = 1 ), public , parameter :: VT = achar ( int ( z '0B' )) !! Vertical tab character ( len = 1 ), public , parameter :: FF = achar ( int ( z '0C' )) !! NP form feed, new page character ( len = 1 ), public , parameter :: CR = achar ( int ( z '0D' )) !! Carriage return character ( len = 1 ), public , parameter :: SO = achar ( int ( z '0E' )) !! Shift out character ( len = 1 ), public , parameter :: SI = achar ( int ( z '0F' )) !! Shift in character ( len = 1 ), public , parameter :: DLE = achar ( int ( z '10' )) !! Data link escape character ( len = 1 ), public , parameter :: DC1 = achar ( int ( z '11' )) !! Device control 1 character ( len = 1 ), public , parameter :: DC2 = achar ( int ( z '12' )) !! Device control 2 character ( len = 1 ), public , parameter :: DC3 = achar ( int ( z '13' )) !! Device control 3 character ( len = 1 ), public , parameter :: DC4 = achar ( int ( z '14' )) !! Device control 4 character ( len = 1 ), public , parameter :: NAK = achar ( int ( z '15' )) !! Negative acknowledge character ( len = 1 ), public , parameter :: SYN = achar ( int ( z '16' )) !! Synchronous idle character ( len = 1 ), public , parameter :: ETB = achar ( int ( z '17' )) !! End of transmission block character ( len = 1 ), public , parameter :: CAN = achar ( int ( z '18' )) !! Cancel character ( len = 1 ), public , parameter :: EM = achar ( int ( z '19' )) !! End of medium character ( len = 1 ), public , parameter :: SUB = achar ( int ( z '1A' )) !! Substitute character ( len = 1 ), public , parameter :: ESC = achar ( int ( z '1B' )) !! Escape character ( len = 1 ), public , parameter :: FS = achar ( int ( z '1C' )) !! File separator character ( len = 1 ), public , parameter :: GS = achar ( int ( z '1D' )) !! Group separator character ( len = 1 ), public , parameter :: RS = achar ( int ( z '1E' )) !! Record separator character ( len = 1 ), public , parameter :: US = achar ( int ( z '1F' )) !! Unit separator character ( len = 1 ), public , parameter :: DEL = achar ( int ( z '7F' )) !! Delete ! Constant character sequences character ( len =* ), public , parameter :: fullhex_digits = \"0123456789ABCDEFabcdef\" !! 0 .. 9A .. Fa .. f character ( len =* ), public , parameter :: hex_digits = fullhex_digits ( 1 : 16 ) !! 0 .. 9A .. F character ( len =* ), public , parameter :: lowerhex_digits = \"0123456789abcdef\" !! 0 .. 9a .. f character ( len =* ), public , parameter :: digits = hex_digits ( 1 : 10 ) !! 0 .. 9 character ( len =* ), public , parameter :: octal_digits = digits ( 1 : 8 ) !! 0 .. 7 character ( len =* ), public , parameter :: letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\" !! A .. Za .. z character ( len =* ), public , parameter :: uppercase = letters ( 1 : 26 ) !! A .. Z character ( len =* ), public , parameter :: lowercase = letters ( 27 :) !! a .. z character ( len =* ), public , parameter :: whitespace = \" \" // TAB // VT // CR // LF // FF !! ASCII _whitespace !> Returns a new character sequence which is the lower case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_lower module procedure :: to_lower end interface to_lower !> Returns a new character sequence which is the upper case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_upper module procedure :: to_upper end interface to_upper !> Returns a new character sequence which is the title case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_title module procedure :: to_title end interface to_title !> Returns a new character sequence which is the sentence case !> version of the input character sequence !> This method is pure and returns a character sequence interface to_sentence module procedure :: to_sentence end interface to_sentence !> Returns a new character sequence which is reverse of !> the input charater sequence !> This method is pure and returns a character sequence interface reverse module procedure :: reverse end interface reverse contains !> Checks whether `c` is an ASCII letter (A .. Z, a .. z). pure logical function is_alpha ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_alpha = ( c >= 'A' . and . c <= 'Z' ) . or . ( c >= 'a' . and . c <= 'z' ) end function !> Checks whether `c` is a letter or a number (0 .. 9, a .. z, A .. Z). pure logical function is_alphanum ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_alphanum = ( c >= '0' . and . c <= '9' ) . or . ( c >= 'a' . and . c <= 'z' ) & . or . ( c >= 'A' . and . c <= 'Z' ) end function !> Checks whether or not `c` is in the ASCII character set - !> i.e. in the range 0 .. 0x7F. pure logical function is_ascii ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_ascii = iachar ( c ) <= int ( z '7F' ) end function !> Checks whether `c` is a control character. pure logical function is_control ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) is_control = ic < int ( z '20' ) . or . ic == int ( z '7F' ) end function !> Checks whether `c` is a digit (0 .. 9). pure logical function is_digit ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_digit = ( '0' <= c ) . and . ( c <= '9' ) end function !> Checks whether `c` is a digit in base 8 (0 .. 7). pure logical function is_octal_digit ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_octal_digit = ( c >= '0' ) . and . ( c <= '7' ); end function !> Checks whether `c` is a digit in base 16 (0 .. 9, A .. F, a .. f). pure logical function is_hex_digit ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_hex_digit = ( c >= '0' . and . c <= '9' ) . or . ( c >= 'a' . and . c <= 'f' ) & . or . ( c >= 'A' . and . c <= 'F' ) end function !> Checks whether or not `c` is a punctuation character. That includes !> all ASCII characters which are not control characters, letters, !> digits, or whitespace. pure logical function is_punctuation ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) ! '~' '!' is_punctuation = ( ic <= int ( z '7E' )) . and . ( ic >= int ( z '21' )) . and . & (. not . is_alphanum ( c )) end function !> Checks whether or not `c` is a printable character other than the !> space character. pure logical function is_graphical ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) !The character is graphical if it's between '!' and '~' in the ASCII table, !that is: printable but not a space is_graphical = ( int ( z '21' ) <= ic ) . and . ( ic <= int ( z '7E' )) end function !> Checks whether or not `c` is a printable character - including the !> space character. pure logical function is_printable ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) !The character is printable if it's between ' ' and '~' in the ASCII table is_printable = ic >= iachar ( ' ' ) . and . ic <= int ( z '7E' ) end function !> Checks whether `c` is a lowercase ASCII letter (a .. z). pure logical function is_lower ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) is_lower = ic >= iachar ( 'a' ) . and . ic <= iachar ( 'z' ) end function !> Checks whether `c` is an uppercase ASCII letter (A .. Z). pure logical function is_upper ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. is_upper = ( c >= 'A' ) . and . ( c <= 'Z' ) end function !> Checks whether or not `c` is a whitespace character. That includes the !> space, tab, vertical tab, form feed, carriage return, and linefeed !> characters. pure logical function is_white ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) ! TAB, LF, VT, FF, CR is_white = ( c == ' ' ) . or . ( ic >= int ( z '09' ) . and . ic <= int ( z '0D' )); end function !> Checks whether or not `c` is a blank character. That includes the !> only the space and tab characters pure logical function is_blank ( c ) character ( len = 1 ), intent ( in ) :: c !! The character to test. integer :: ic ic = iachar ( c ) ! TAB is_blank = ( c == ' ' ) . or . ( ic == int ( z '09' )); end function !> Returns the corresponding lowercase letter, if `c` is an uppercase !> ASCII character, otherwise `c` itself. pure function char_to_lower ( c ) result ( t ) character ( len = 1 ), intent ( in ) :: c !! A character. character ( len = 1 ) :: t integer , parameter :: wp = iachar ( 'a' ) - iachar ( 'A' ), BA = iachar ( 'A' ), BZ = iachar ( 'Z' ) integer :: k !Check whether the integer equivalent is between BA=65 and BZ=90 k = ichar ( c ) if ( k >= BA . and . k <= BZ ) k = k + wp t = char ( k ) end function char_to_lower !> Returns the corresponding uppercase letter, if `c` is a lowercase !> ASCII character, otherwise `c` itself. pure function char_to_upper ( c ) result ( t ) character ( len = 1 ), intent ( in ) :: c !! A character. character ( len = 1 ) :: t integer , parameter :: wp = iachar ( 'a' ) - iachar ( 'A' ), la = iachar ( 'a' ), lz = iachar ( 'z' ) integer :: k !Check whether the integer equivalent is between la=97 and lz=122 k = ichar ( c ) if ( k >= la . and . k <= lz ) k = k - wp t = char ( k ) end function char_to_upper !> Convert character variable to lower case !> ([Specification](../page/specs/stdlib_ascii.html#to_lower)) !> !> Version: experimental pure function to_lower ( string ) result ( lower_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: lower_string integer :: i do i = 1 , len ( string ) lower_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_lower !> Convert character variable to upper case !> ([Specification](../page/specs/stdlib_ascii.html#to_upper)) !> !> Version: experimental pure function to_upper ( string ) result ( upper_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: upper_string integer :: i do i = 1 , len ( string ) upper_string ( i : i ) = char_to_upper ( string ( i : i )) end do end function to_upper !> Converts character sequence to title case !> ([Specification](../page/specs/stdlib_ascii.html#to_title)) !> !> Version: experimental pure function to_title ( string ) result ( title_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: title_string integer :: i logical :: capitalize_switch capitalize_switch = . true . do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then if ( capitalize_switch ) then title_string ( i : i ) = char_to_upper ( string ( i : i )) capitalize_switch = . false . else title_string ( i : i ) = char_to_lower ( string ( i : i )) end if else title_string ( i : i ) = string ( i : i ) capitalize_switch = . true . end if end do end function to_title !> Converts character sequence to sentence case !> ([Specification](../page/specs/stdlib_ascii.html#to_sentence)) !> !> Version: experimental pure function to_sentence ( string ) result ( sentence_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: sentence_string integer :: i , n n = len ( string ) do i = 1 , len ( string ) if ( is_alphanum ( string ( i : i ))) then sentence_string ( i : i ) = char_to_upper ( string ( i : i )) n = i exit else sentence_string ( i : i ) = string ( i : i ) end if end do do i = n + 1 , len ( string ) sentence_string ( i : i ) = char_to_lower ( string ( i : i )) end do end function to_sentence !> Reverse the character order in the input character variable !> ([Specification](../page/specs/stdlib_ascii.html#reverse)) !> !> Version: experimental pure function reverse ( string ) result ( reverse_string ) character ( len =* ), intent ( in ) :: string character ( len = len ( string )) :: reverse_string integer :: i , n n = len ( string ) do i = 1 , n reverse_string ( n - i + 1 : n - i + 1 ) = string ( i : i ) end do end function reverse end module stdlib_ascii","tags":"","loc":"sourcefile/stdlib_ascii.fypp.html"},{"title":"stdlib_quadrature.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_quadrature !! ([Specification](../page/specs/stdlib_quadrature.html#description)) use stdlib_kinds , only : sp , dp , xdp , qp implicit none private ! array integration public :: trapz public :: trapz_weights public :: simps public :: simps_weights public :: gauss_legendre public :: gauss_legendre_lobatto interface trapz !! version: experimental !! !! Integrates sampled values using trapezoidal rule !! ([Specification](../page/specs/stdlib_quadrature.html#description)) # : for k1 , t1 in REAL_KINDS_TYPES pure module function trapz_dx_$ { k1 }$ ( y , dx ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , intent ( in ) :: dx ${ t1 }$ :: integral end function trapz_dx_$ { k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES module function trapz_x_$ { k1 }$ ( y , x ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , dimension (:), intent ( in ) :: x ${ t1 }$ :: integral end function trapz_x_$ { k1 }$ # : endfor end interface trapz interface trapz_weights !! version: experimental !! !! Integrates sampled values using trapezoidal rule weights for given abscissas !! ([Specification](../page/specs/stdlib_quadrature.html#description_1)) # : for k1 , t1 in REAL_KINDS_TYPES pure module function trapz_weights_$ { k1 }$ ( x ) result ( w ) ${ t1 }$ , dimension (:), intent ( in ) :: x ${ t1 }$ , dimension ( size ( x )) :: w end function trapz_weights_$ { k1 }$ # : endfor end interface trapz_weights interface simps !! version: experimental !! !! Integrates sampled values using Simpson's rule !! ([Specification](../page/specs/stdlib_quadrature.html#description_3)) ! \"recursive\" is an implementation detail # : for k1 , t1 in REAL_KINDS_TYPES pure recursive module function simps_dx_$ { k1 }$ ( y , dx , even ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , intent ( in ) :: dx integer , intent ( in ), optional :: even ${ t1 }$ :: integral end function simps_dx_$ { k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES recursive module function simps_x_$ { k1 }$ ( y , x , even ) result ( integral ) ${ t1 }$ , dimension (:), intent ( in ) :: y ${ t1 }$ , dimension (:), intent ( in ) :: x integer , intent ( in ), optional :: even ${ t1 }$ :: integral end function simps_x_$ { k1 }$ # : endfor end interface simps interface simps_weights !! version: experimental !! !! Integrates sampled values using trapezoidal rule weights for given abscissas !! ([Specification](../page/specs/stdlib_quadrature.html#description_3)) # : for k1 , t1 in REAL_KINDS_TYPES pure recursive module function simps_weights_$ { k1 }$ ( x , even ) result ( w ) ${ t1 }$ , dimension (:), intent ( in ) :: x integer , intent ( in ), optional :: even ${ t1 }$ , dimension ( size ( x )) :: w end function simps_weights_$ { k1 }$ # : endfor end interface simps_weights interface gauss_legendre !! version: experimental !! !! Computes Gauss-Legendre quadrature nodes and weights. pure module subroutine gauss_legendre_fp64 ( x , w , interval ) real ( dp ), intent ( out ) :: x (:), w (:) real ( dp ), intent ( in ), optional :: interval ( 2 ) end subroutine end interface gauss_legendre interface gauss_legendre_lobatto !! version: experimental !! !! Computes Gauss-Legendre-Lobatto quadrature nodes and weights. pure module subroutine gauss_legendre_lobatto_fp64 ( x , w , interval ) real ( dp ), intent ( out ) :: x (:), w (:) real ( dp ), intent ( in ), optional :: interval ( 2 ) end subroutine end interface gauss_legendre_lobatto ! Interface for a simple f(x)-style integrand function. ! Could become fancier as we learn about the performance ! ramifications of different ways to do callbacks. abstract interface # : for k1 , t1 in REAL_KINDS_TYPES pure function integrand_$ { k1 }$ ( x ) result ( f ) import :: ${ k1 }$ ${ t1 }$ , intent ( in ) :: x ${ t1 }$ :: f end function integrand_$ { k1 }$ # : endfor end interface end module stdlib_quadrature","tags":"","loc":"sourcefile/stdlib_quadrature.fypp.html"},{"title":"stdlib_stats_moment.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set REDRANKS = range(2, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_moment use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim ${ t1 }$ , intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask ${ t1 }$ :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n ${ t1 }$ , allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if n = real ( size ( x , dim ), ${ k1 }$ ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - center ) ** order end do else allocate ( mean_ , source = mean ( x , ${ fi }$ )) do i = 1 , size ( x , ${ fi }$ ) res = res + ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean_ ) ** order end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"moment\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , order , dim , center , mask ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: order integer , intent ( in ) :: dim real ( dp ), intent ( in ), optional :: center$ { reduced_shape ( 'x' , rank , 'dim' ) }$ logical , intent ( in ), optional :: mask real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n real ( dp ), allocatable :: mean_$ { ranksuffix ( rank - 1 ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if n = real ( size ( x , dim ), dp ) res = 0 select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) if ( present ( center )) then do i = 1 , size ( x , ${ fi }$ ) res = res + ( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - & center ) ** order end do else allocate ( mean_ , source = mean ( x , ${ fi }$ )) do i = 1 , size ( x , ${ fi }$ ) res = res + ( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean_ ) ** order end do deallocate ( mean_ ) end if # : endfor case default call error_stop ( \"ERROR (moment): wrong dimension\" ) end select res = res / n end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_moment.fypp.html"},{"title":"stdlib_linalg_constants.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_constants use stdlib_kinds , only : sp , dp , qp , int32 , int64 , lk use , intrinsic :: ieee_arithmetic , only : ieee_is_nan !$ use omp_lib implicit none ( type , external ) public ! Integer size support for ILP64 builds should be done here integer , parameter :: ilp = int32 private :: int32 , int64 end module stdlib_linalg_constants","tags":"","loc":"sourcefile/stdlib_linalg_constants.fypp.html"},{"title":"stdlib_specialfunctions_gamma.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set R_KINDS_TYPES = [KT for KT in REAL_KINDS_TYPES if KT[0] in [\"sp\",\"dp\"]] #:set C_KINDS_TYPES = [KT for KT in CMPLX_KINDS_TYPES if KT[0] in [\"sp\",\"dp\"]] #:set CI_KINDS_TYPES = INT_KINDS_TYPES + C_KINDS_TYPES module stdlib_specialfunctions_gamma use iso_fortran_env , only : qp => real128 use stdlib_kinds , only : sp , dp , int8 , int16 , int32 , int64 use stdlib_error , only : error_stop implicit none private integer ( int8 ), parameter :: max_fact_int8 = 6_int8 integer ( int16 ), parameter :: max_fact_int16 = 8_int16 integer ( int32 ), parameter :: max_fact_int32 = 13_int32 integer ( int64 ), parameter :: max_fact_int64 = 21_int64 # : for k1 , t1 in R_KINDS_TYPES ${ t1 }$ , parameter :: tol_$ { k1 }$ = epsilon ( 1.0 _${ k1 }$ ) # : endfor real ( qp ), parameter :: tol_qp = epsilon ( 1.0_qp ) public :: gamma , log_gamma , log_factorial public :: lower_incomplete_gamma , log_lower_incomplete_gamma public :: upper_incomplete_gamma , log_upper_incomplete_gamma public :: regularized_gamma_p , regularized_gamma_q interface gamma !! Gamma function for integer and complex numbers !! # : for k1 , t1 in CI_KINDS_TYPES module procedure gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface gamma interface log_gamma !! Logarithm of gamma function !! # : for k1 , t1 in CI_KINDS_TYPES module procedure l_gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_gamma interface log_factorial !! Logarithm of factorial n!, integer variable !! # : for k1 , t1 in INT_KINDS_TYPES module procedure l_factorial_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_factorial interface lower_incomplete_gamma !! Lower incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface lower_incomplete_gamma interface log_lower_incomplete_gamma !! Logarithm of lower incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure l_ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure l_ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_lower_incomplete_gamma interface upper_incomplete_gamma !! Upper incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface upper_incomplete_gamma interface log_upper_incomplete_gamma !! Logarithm of upper incomplete gamma function !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure l_ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure l_ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface log_upper_incomplete_gamma interface regularized_gamma_p !! Regularized (normalized) lower incomplete gamma function, P !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure regamma_p_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure regamma_p_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface regularized_gamma_p interface regularized_gamma_q !! Regularized (normalized) upper incomplete gamma function, Q !! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure regamma_q_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES module procedure regamma_q_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface regularized_gamma_q interface gpx ! Incomplete gamma G function. ! Internal use only ! # : for k1 , t1 in R_KINDS_TYPES module procedure gpx_$ { t1 [ 0 ] }{ k1 }$ !for real p and x # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure gpx_$ { t1 [ 0 ] }{ k1 }{ k2 }$ !for integer p and real x # : endfor # : endfor end interface gpx interface l_gamma ! Logarithm of gamma with integer argument for designated output kind. ! Internal use only ! # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES module procedure l_gamma_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor end interface l_gamma contains # : for k1 , t1 in INT_KINDS_TYPES impure elemental function gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ${ t1 }$ , intent ( in ) :: z ${ t1 }$ :: res , i ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ if ( z <= zero ) call error_stop ( \"Error(gamma): Gamma function argument\" & // \" must be positive integer.\" ) if ( z > max_fact_$ { k1 }$ ) call error_stop ( \"Error(gamma): Gamma function\" & // \" integer argument is greater than the upper limit from which an\" & // \" integer overflow will be generated. Suggest switch to high \" & // \" precision or convert to real data type\" ) res = one do i = one , z - one res = res * i end do end function gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in C_KINDS_TYPES # : if k1 == \"sp\" # : set k2 = \"dp\" # : elif k1 == \"dp\" # : set k2 = \"qp\" # : endif # : set t2 = \"real({})\" . format ( k2 ) impure elemental function gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ${ t1 }$ , intent ( in ) :: z ${ t1 }$ :: res integer :: i real ( ${ k1 }$ ), parameter :: zero_k1 = 0.0 _${ k1 }$ ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , half = 0.5 _${ k2 }$ , & one = 1.0 _${ k2 }$ , pi = acos ( - one ), sqpi = sqrt ( pi ) complex ( ${ k2 }$ ) :: y , x , sum # : if k1 == \"sp\" # ! for single precision input, using double precision for calculation integer , parameter :: n = 10 ${ t2 }$ , parameter :: r = 1 0.900511 _${ k2 }$ ${ t2 }$ , parameter :: d ( 0 : n ) = [ 2.48574089138753566e-5 _${ k2 }$ , & 1.05142378581721974 _${ k2 }$ , & - 3.45687097222016235 _${ k2 }$ , & 4.51227709466894824 _${ k2 }$ , & - 2.98285225323576656 _${ k2 }$ , & 1.05639711577126713 _${ k2 }$ , & - 1.95428773191645870e-1 _${ k2 }$ , & 1.70970543404441224e-2 _${ k2 }$ , & - 5.71926117404305781e-4 _${ k2 }$ , & 4.63399473359905637e-6 _${ k2 }$ , & - 2.71994908488607704e-9 _${ k2 }$ ] ! parameters from above referenced source. # : elif k1 == \"dp\" # ! for double precision input, using quadruple precision for calculation integer , parameter :: n = 24 ${ t2 }$ , parameter :: r = 2 5.617904 _${ k2 }$ ${ t2 }$ , parameter :: d ( 0 : n ) = & [ 1.0087261714899910504854136977047144166e-11 _${ k2 }$ , & 1.6339627701280724777912729825256860624 _${ k2 }$ , & - 1.4205787702221583745972794018472259342e+1 _${ k2 }$ , & 5.6689501646428786119793943350900908698e+1 _${ k2 }$ , & - 1.3766376824252176069406853670529834070e+2 _${ k2 }$ , & 2.2739972766608392140035874845640820558e+2 _${ k2 }$ , & - 2.7058382145757164380300118233258834430e+2 _${ k2 }$ , & 2.39614374587263042692333711131832094166e+2 _${ k2 }$ , & - 1.6090450559507517723393498276315290189e+2 _${ k2 }$ , & 8.27378183187161305711485619113605553100e+1 _${ k2 }$ , & - 3.2678977082742592701862249152153110206e+1 _${ k2 }$ , & 9.89018079175824824537131521501652931756 _${ k2 }$ , & - 2.2762136356329318377213053650799013041 _${ k2 }$ , & 3.93265017303573867227590563182750070164e-1 _${ k2 }$ , & - 5.0051054352146209116457193223422284239e-2 _${ k2 }$ , & 4.57142601898244576789629257292603538238e-3 _${ k2 }$ , & - 2.8922592124650765614787233510990416584e-4 _${ k2 }$ , & 1.20833375377219592849746118012697473202e-5 _${ k2 }$ , & - 3.1220812187551248389268359432609135033e-7 _${ k2 }$ , & 4.55117045361638520378367871355819524460e-9 _${ k2 }$ , & - 3.2757632817493581828033170342853173968e-11 _${ k2 }$ , & 9.49784279240135747819870224486376897253e-14 _${ k2 }$ , & - 7.9480594917454410117072562195702526836e-17 _${ k2 }$ , & 1.04692819439870077791406760109955648941e-20 _${ k2 }$ , & - 5.8990280044857540075384586350723191533e-26 _${ k2 }$ ] ! parameters from above referenced source. # : endif if ( abs ( z % im ) < tol_$ { k1 }$ ) then res = cmplx ( gamma ( z % re ), kind = ${ k1 }$ ) return end if if ( z % re < zero_k1 ) then x = cmplx ( abs ( z % re ), - z % im , kind = ${ k1 }$ ) y = x - one else y = z - one end if sum = cmplx ( d ( 0 ), kind = ${ k2 }$ ) do i = 1 , n sum = sum + d ( i ) / ( y + i ) end do y = exp (( y + half ) * log ( y + half + r ) - y ) * sum y = y * 2 / sqpi !Re(z) > 0 return if ( z % re < zero_k1 ) then y = - pi / ( sin ( pi * x ) * x * y ) !Re(z) < 0 return end if res = y end function gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES impure elemental function l_gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ! ! Logarithm of gamma function for integer input ! ${ t1 }$ , intent ( in ) :: z real :: res ${ t1 }$ :: i ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ , two = 2 _${ k1 }$ if ( z <= zero ) call error_stop ( \"Error(log_gamma): Gamma function\" & // \" argument must be positive integer.\" ) select case ( z ) case ( one ) res = 0.0 case ( two :) res = 0.0 do i = one , z - one res = res + log ( real ( i )) end do end select end function l_gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function l_gamma_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( z , x ) result ( res ) ! ! Logarithm of gamma function for integer input with defined precision output ! ${ t1 }$ , intent ( in ) :: z ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res ${ t1 }$ :: i ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ , two = 2 _${ k1 }$ ${ t2 }$ , parameter :: zero_k2 = 0.0 _${ k2 }$ if ( z <= zero ) call error_stop ( \"Error(log_gamma): Gamma function\" & // \" argument must be positive integer.\" ) select case ( z ) case ( one ) res = zero_k2 case ( two :) res = zero_k2 do i = one , z - one res = res + log ( real ( i , ${ k2 }$ )) end do end select end function l_gamma_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in C_KINDS_TYPES # : if k1 == \"sp\" # : set k2 = \"dp\" # : elif k1 == \"dp\" # : set k2 = \"qp\" # : endif # : set t2 = \"real({})\" . format ( k2 ) impure elemental function l_gamma_$ { t1 [ 0 ] }{ k1 }$ ( z ) result ( res ) ! ! log_gamma function for any complex number, excluding negative whole number ! \"Computation of special functions\", Shanjie Zhang & Jianmin Jin, 1996, p.48 ! \"Computing the principal branch of log-gamma\", D.E.G. Hare, ! J. of Algorithms, 25(2), 1997 p. 221–236 ! ! Fortran 90 program by Jim-215-Fisher ! ${ t1 }$ , intent ( in ) :: z ${ t1 }$ :: res , z1 , z2 real ( ${ k1 }$ ) :: d integer :: m , i complex ( ${ k2 }$ ) :: zr , zr2 , sum , s real ( ${ k1 }$ ), parameter :: z_limit = 10 _${ k1 }$ , zero_k1 = 0.0 _${ k1 }$ integer , parameter :: n = 20 ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ , & pi = acos ( - one ), ln2pi = log ( 2 * pi ) ${ t2 }$ , parameter :: a ( n ) = [ & . 833333333333333333333333333333333333333 3E-1 _${ k2 }$ ,& - . 277777777777777777777777777777777777777 8E-2 _${ k2 }$ ,& . 793650793650793650793650793650793650793 7E-3 _${ k2 }$ ,& - . 595238095238095238095238095238095238095 2E-3 _${ k2 }$ ,& . 841750841750841750841750841750841750841 8E-3 _${ k2 }$ ,& - . 191752691752691752691752691752691752691 8E-2 _${ k2 }$ ,& . 641025641025641025641025641025641025641 0E-2 _${ k2 }$ ,& - . 295506535947712418300653594771241830065 4E-1 _${ k2 }$ ,& . 179644372368830573164938490015889396694 4E+0 _${ k2 }$ ,& - . 139243221690590111642743221690590111642 7E+1 _${ k2 }$ ,& . 134028640441683919944789510006901311249 1E+2 _${ k2 }$ ,& - . 156848284626002017306365132452088973828 1E+3 _${ k2 }$ ,& . 219310333333333333333333333333333333333 3E+4 _${ k2 }$ ,& - . 361087712537249893571732652192422307364 8E+5 _${ k2 }$ ,& . 691472268851313067108395250775673467553 3E+6 _${ k2 }$ ,& - . 152382215394074161922833649588867805186 6E+8 _${ k2 }$ ,& . 382900751391414141414141414141414141414 1E+9 _${ k2 }$ ,& - . 108822660357843910890151491655251053747 3E+11 _${ k2 }$ ,& . 347320283765002252252252252252252252252 3E+12 _${ k2 }$ ,& - . 123696021422692744542517103492713248810 8E+14 _${ k2 }$ ] ! parameters from above reference z2 = z if ( z % re < zero_k1 ) then z2 = cmplx ( abs ( z % re ), - z % im , kind = ${ k1 }$ ) + 1 end if d = hypot ( z2 % re , z2 % im ) z1 = z2 m = 0 if ( d <= z_limit ) then !for small |z| m = ceiling ( z_limit - d ) z1 = z2 + m end if zr = one / z1 zr2 = zr * zr sum = ((( a ( 20 ) * zr2 + a ( 19 )) * zr2 + a ( 18 )) * zr2 + a ( 17 )) * zr2 sum = ((( sum + a ( 16 )) * zr2 + a ( 15 )) * zr2 + a ( 14 )) * zr2 sum = ((( sum + a ( 13 )) * zr2 + a ( 12 )) * zr2 + a ( 11 )) * zr2 sum = ((( sum + a ( 10 )) * zr2 + a ( 9 )) * zr2 + a ( 8 )) * zr2 sum = ((( sum + a ( 7 )) * zr2 + a ( 6 )) * zr2 + a ( 5 )) * zr2 sum = ((( sum + a ( 4 )) * zr2 + a ( 3 )) * zr2 + a ( 2 )) * zr2 sum = ( sum + a ( 1 )) * zr + ln2pi / 2 - z1 + ( z1 - 0.5 _${ k2 }$ ) * log ( z1 ) if ( m /= 0 ) then s = cmplx ( zero , zero , kind = ${ k2 }$ ) do i = 1 , m s = s + log ( cmplx ( z1 , kind = ${ k2 }$ ) - i ) end do sum = sum - s end if if ( z % re < zero_k1 ) then sum = log ( pi ) - log ( sin ( pi * z )) - sum m = ceiling (( 2 * z % re - 3 ) / 4 ) sum % im = sum % im + 2 * pi * m * sign ( 1.0 _${ k1 }$ , z % im ) end if res = cmplx ( sum , kind = ${ k1 }$ ) end function l_gamma_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES impure elemental function l_factorial_$ { t1 [ 0 ] }{ k1 }$ ( n ) result ( res ) ! ! Log(n!) ! ${ t1 }$ , intent ( in ) :: n real :: res ${ t1 }$ , parameter :: zero = 0 _${ k1 }$ , one = 1 _${ k1 }$ , two = 2 _${ k1 }$ real , parameter :: zero_k2 = 0.0 if ( n < zero ) call error_stop ( \"Error(l_factorial): Logarithm of\" & // \" factorial function argument must be non-negative\" ) select case ( n ) case ( zero ) res = zero_k2 case ( one ) res = zero_k2 case ( two : ) res = l_gamma ( n + 1 , 1.0D0 ) end select end function l_factorial_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in R_KINDS_TYPES # : if k1 == \"sp\" # : set k2 = \"dp\" # : elif k1 == \"dp\" # : set k2 = \"qp\" # : endif # : set t2 = \"real({})\" . format ( k2 ) impure elemental function gpx_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of incomplete gamma G function with real argument p. ! ! Based on Rémy Abergel and Lionel Moisan \"Algorithm 1006, Fast and ! Accurate Evaluation of a Generalized Incomplete Gamma Function\", ACM ! Transactions on Mathematical Software, March 2020. ! ! Fortran 90 program by Jim-215-Fisher ! ${ t1 }$ , intent ( in ) :: p , x integer :: n , m ${ t2 }$ :: res , p_lim , a , b , g , c , d , y , ss ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ ${ t2 }$ , parameter :: dm = tiny ( 1.0 _${ k2 }$ ) * 10 ** 6 ${ t1 }$ , parameter :: zero_k1 = 0.0 _${ k1 }$ if ( p <= zero_k1 ) call error_stop ( \"Error(gpx): Incomplete gamma\" & // \" function must have a positive parameter p\" ) if ( x < - 9.0 _${ k1 }$ ) then p_lim = 5.0 _${ k1 }$ * ( sqrt ( abs ( x )) - 1.0 _${ k1 }$ ) elseif ( x >= - 9.0 _${ k1 }$ . and . x <= zero_k1 ) then p_lim = zero_k1 else p_lim = x endif if ( x < zero_k1 . and . p < p_lim . and . abs ( anint ( p ) - p ) > tol_$ { k1 }$ ) & call error_stop ( \"Error(gpx): Incomplete gamma function with \" & // \"negative x must come with a whole number p not too small\" ) if ( p >= p_lim ) then !use modified Lentz method of continued fraction !for eq. (15) in the above reference. a = one b = p g = a / b c = a / dm d = one / b n = 2 do if ( mod ( n , 2 ) == 0 ) then a = ( one - p - n / 2 ) * x else a = ( n / 2 ) * x end if b = p - one + n d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else if ( x >= zero_k1 ) then !use modified Lentz method of continued !fraction for eq. (16) in the reference. a = one b = x + one - p g = a / b c = a / dm d = one / b n = 2 do a = ( n - 1 ) * ( 1 + p - n ) b = b + 2 d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else !Algorithm 2 in the reference m = nint ( ss ) a = - x c = one / a d = p - one b = c * ( a - d ) n = 1 do c = d * ( d - one ) / ( a * a ) d = d - 2 y = c * ( a - d ) b = b + y n = n + 1 if ( n > int (( p - 2 ) / 2 ) . or . y < b * tol_$ { k2 }$ ) exit end do if ( y >= b * tol_$ { k2 }$ . and . mod ( m , 2 ) /= 0 ) b = b + d * c / a g = (( - 1 ) ** m * exp ( - a + log_gamma ( p ) - ( p - 1 ) * log ( a )) + b ) / a end if res = g end function gpx_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function gpx_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) result ( res ) ! ! Approximation of incomplete gamma G function with integer argument p. ! ! Based on Rémy Abergel and Lionel Moisan \"Algorithm 1006, Fast and ! Accurate Evaluation of a Generalized Incomplete Gamma Function\", ACM ! Transactions on Mathematical Software, March 2020. ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , p_lim , a , b , g , c , d , y integer :: n , m ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ ${ t2 }$ , parameter :: dm = tiny ( 1.0 _${ k2 }$ ) * 10 ** 6 ${ t1 }$ , parameter :: zero_k1 = 0 _${ k1 }$ , two = 2 _${ k1 }$ if ( p <= zero_k1 ) call error_stop ( \"Error(gpx): Incomplete gamma \" & // \"function must have a positive parameter p\" ) if ( x < - 9.0 _${ k2 }$ ) then p_lim = 5.0 _${ k2 }$ * ( sqrt ( abs ( x )) - 1.0 _${ k2 }$ ) else if ( x >= - 9.0 _${ k2 }$ . and . x <= zero ) then p_lim = zero else p_lim = x end if if ( real ( p , ${ k2 }$ ) >= p_lim ) then a = one b = p g = a / b c = a / dm d = one / b n = 2 do if ( mod ( n , 2 ) == 0 ) then a = ( 1 - p - n / 2 ) * x else a = ( n / 2 ) * x end if b = p - 1 + n d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else if ( x >= zero ) then a = one b = x + 1 - p g = a / b c = a / dm d = one / b n = 2 do a = - ( n - 1 ) * ( n - 1 - p ) b = b + 2 d = d * a + b if ( d == zero ) d = dm c = b + a / c if ( c == zero ) c = dm d = one / d y = c * d g = g * y n = n + 1 if ( abs ( y - one ) < tol_$ { k2 }$ ) exit end do else a = - x c = one / a d = p - 1 b = c * ( a - d ) n = 1 do c = d * ( d - one ) / ( a * a ) d = d - 2 y = c * ( a - d ) b = b + y n = n + 1 if ( int ( n , ${ k1 }$ ) > ( p - two ) / two . or . y < b * tol_$ { k2 }$ ) exit end do if ( y >= b * tol_$ { k2 }$ . and . mod ( p , two ) /= zero_k1 ) & b = b + d * c / a g = (( - 1 ) ** p * exp ( - a + l_gamma ( p , one ) - ( p - 1 ) * log ( a )) & + b ) / a end if res = g end function gpx_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function ingamma_low_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of lower incomplete gamma function with real p. ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = zero else if ( x > p ) then s1 = log_gamma ( p ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = exp ( s1 + log ( y )) else if ( x <= p . and . x > zero ) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ! ! Approximation of lower incomplete gamma function with integer p. ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = zero else if ( x > real ( p , ${ k2 }$ )) then s1 = l_gamma ( p , one ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = exp ( s1 + log ( y )) else if ( x <= real ( p , ${ k2 }$ ) . and . x > zero ) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else s1 = - x + p * log ( abs ( x )) res = gpx ( p , x ) * exp ( s1 ) res = ( - 1 ) ** p * res end if end function ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = zero else if ( x > p ) then s1 = log_gamma ( p ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = s1 + log ( y ) else if ( x <= p . and . x > zero ) then s1 = - x + p * log ( abs ( x )) res = log ( abs ( gpx ( p , x ))) + s1 else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = zero else if ( x > real ( p , ${ k2 }$ )) then s1 = l_gamma ( p , one ) y = one - exp ( - x + p * log ( x ) - s1 ) * gpx ( p , x ) res = s1 + log ( y ) else if ( x <= real ( p , ${ k2 }$ )) then s1 = - x + p * log ( abs ( x )) res = log ( abs ( gpx ( p , x ))) + s1 end if end function l_ingamma_low_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function ingamma_up_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of upper incomplete gamma function with real p. ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = gamma ( p ) else if ( x > p ) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else if ( x <= p . and . x > zero ) then y = log_gamma ( p ) s1 = - x + p * log ( x ) - y res = ( one - gpx ( p , x ) * exp ( s1 )) * exp ( y ) else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ! ! Approximation of upper incomplete gamma function with integer p. ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = gamma ( real ( p , ${ k2 }$ )) else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) res = gpx ( p , x ) * exp ( s1 ) else if ( x <= real ( p , ${ k2 }$ ) . and . x > zero ) then y = l_gamma ( p , one ) s1 = - x + p * log ( x ) - y res = gpx ( p , x ) * exp ( s1 ) res = ( one - res ) * exp ( y ) else y = l_gamma ( p , one ) s1 = - x + p * log ( abs ( x )) - y res = gpx ( p , x ) * exp ( s1 ) res = ( one - ( - 1 ) ** p * res ) * exp ( y ) end if end function ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 , y ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x == zero ) then res = log_gamma ( p ) else if ( x > p ) then s1 = - x + p * log ( x ) res = log ( gpx ( p , x )) + s1 else if ( x <= p . and . x > zero ) then y = log_gamma ( p ) s1 = - x + p * log ( x ) - y res = gpx ( p , x ) * exp ( s1 ) res = log ( one - res ) + y else call error_stop ( \"Error(Logarithm of upper incomplete gamma \" & // \"function): negative x must be with integer p\" ) end if end function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) & result ( res ) ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 , y ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x == zero ) then res = l_gamma ( p , one ) else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) res = log ( gpx ( p , x )) + s1 else if ( x <= real ( p , ${ k2 }$ ) . and . x > zero ) then y = l_gamma ( p , one ) s1 = - x + p * log ( x ) - y res = gpx ( p , x ) * exp ( s1 ) res = log ( one - res ) + y else y = l_gamma ( p , one ) s1 = - x + p * log ( abs ( x )) + log ( gpx ( p , x )) res = ( - 1 ) ** p * exp ( s1 ) res = log ( abs ( exp ( y ) - res )) end if end function l_ingamma_up_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function regamma_p_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplete gamma function P(p,x) for real p ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x < zero ) call error_stop ( \"Error(regamma_p): Regularized gamma_p\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = zero else if ( x > p ) then s1 = - x + p * log ( x ) - log_gamma ( p ) res = one - exp ( s1 + log ( gpx ( p , x ))) else if ( x <= p ) then s1 = - x + p * log ( abs ( x )) - log_gamma ( p ) res = exp ( log ( gpx ( p , x )) + s1 ) end if end function regamma_p_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function regamma_p_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplete gamma function P(p,x) for integer p ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x < zero ) call error_stop ( \"Error(regamma_p): Regularized gamma_p\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = zero else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) - l_gamma ( p , one ) res = one - exp ( s1 + log ( gpx ( p , x ))) else if ( x <= real ( p , ${ k2 }$ )) then s1 = - x + p * log ( abs ( x )) - l_gamma ( p , one ) res = exp ( log ( gpx ( p , x )) + s1 ) end if end function regamma_p_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor # : for k1 , t1 in R_KINDS_TYPES impure elemental function regamma_q_$ { t1 [ 0 ] }{ k1 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplete gamma function Q(p,x) for real p ! ${ t1 }$ , intent ( in ) :: p , x ${ t1 }$ :: res , s1 ${ t1 }$ , parameter :: zero = 0.0 _${ k1 }$ , one = 1.0 _${ k1 }$ if ( x < zero ) call error_stop ( \"Error(regamma_p): Regularized gamma_q\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = one else if ( x > p ) then s1 = - x + p * log ( x ) - log_gamma ( p ) res = exp ( s1 + log ( gpx ( p , x ))) else if ( x <= p ) then s1 = - x + p * log ( abs ( x )) - log_gamma ( p ) res = one - exp ( log ( gpx ( p , x )) + s1 ) end if end function regamma_q_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for k2 , t2 in R_KINDS_TYPES impure elemental function regamma_q_$ { t1 [ 0 ] }{ k1 }{ k2 }$ ( p , x ) result ( res ) ! ! Approximation of regularized incomplet gamma function Q(p,x) for integer p ! ${ t1 }$ , intent ( in ) :: p ${ t2 }$ , intent ( in ) :: x ${ t2 }$ :: res , s1 ${ t2 }$ , parameter :: zero = 0.0 _${ k2 }$ , one = 1.0 _${ k2 }$ if ( x < zero ) call error_stop ( \"Error(regamma_q): Regularized gamma_q\" & // \" function is not defined at x < 0\" ) if ( x == zero ) then res = one else if ( x > real ( p , ${ k2 }$ )) then s1 = - x + p * log ( x ) - l_gamma ( p , one ) res = exp ( log ( gpx ( p , x )) + s1 ) elseif ( x <= real ( p , ${ k2 }$ )) then s1 = - x + p * log ( abs ( x )) - l_gamma ( p , one ) res = one - exp ( s1 + log ( gpx ( p , x ))) end if end function regamma_q_$ { t1 [ 0 ] }{ k1 }{ k2 }$ # : endfor # : endfor end module stdlib_specialfunctions_gamma","tags":"","loc":"sourcefile/stdlib_specialfunctions_gamma.fypp.html"},{"title":"stdlib_optval.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES + & & [( 'l1' , 'logical' )] module stdlib_optval !! !! Provides a generic function `optval`, which can be used to !! conveniently implement fallback values for optional arguments !! to subprograms !! ([Specification](../page/specs/stdlib_optval.html)) !! !! If `x` is an `optional` parameter of a !! subprogram, then the expression `optval(x, default)` inside that !! subprogram evaluates to `x` if it is present, otherwise `default`. !! !! It is an error to call `optval` with a single actual argument. !! use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 implicit none private public :: optval interface optval !! version: experimental !! !! Fallback value for optional arguments !! ([Specification](../page/specs/stdlib_optval.html#description)) # : for k1 , t1 in KINDS_TYPES module procedure optval_$ { t1 [ 0 ] }{ k1 }$ # : endfor module procedure optval_character ! TODO: differentiate ascii & ucs char kinds end interface optval contains # : for k1 , t1 in KINDS_TYPES pure elemental function optval_$ { t1 [ 0 ] }{ k1 }$ ( x , default ) result ( y ) ${ t1 }$ , intent ( in ), optional :: x ${ t1 }$ , intent ( in ) :: default ${ t1 }$ :: y if ( present ( x )) then y = x else y = default end if end function optval_$ { t1 [ 0 ] }{ k1 }$ # : endfor ! Cannot be made elemental pure function optval_character ( x , default ) result ( y ) character ( len =* ), intent ( in ), optional :: x character ( len =* ), intent ( in ) :: default character ( len = :), allocatable :: y if ( present ( x )) then y = x else y = default end if end function optval_character end module stdlib_optval","tags":"","loc":"sourcefile/stdlib_optval.fypp.html"},{"title":"stdlib_linalg_state.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_linalg_state !! Version: experimental !! !! Provides a state/error handling derived type for advanced error handling of !! BLAS/LAPACK based linear algebra procedures. All procedures are pure. !! ([Specification](../page/specs/stdlib_linalg.html)) use stdlib_linalg_constants , only : ilp use stdlib_kinds , only : int8 , int16 , int32 , int64 , sp , dp , xdp , qp , lk use stdlib_io , only : FMT_REAL_SP , FMT_REAL_DP , FMT_REAL_QP , FMT_COMPLEX_SP , FMT_COMPLEX_DP , & FMT_COMPLEX_QP , FMT_REAL_XDP , FMT_COMPLEX_XDP implicit none ( type , external ) private !> Version: experimental !> !> A fixed-storage state variable for error handling of linear algebra routines public :: linalg_state_type !> Version: experimental !> !> Error state handling: if the user requested the error state variable on !> output, just return it to the user. Otherwise, halt the program on error. public :: linalg_error_handling !> Version: experimental !> !> Interfaces for comparison operators of error states with integer flags public :: operator ( == ), operator ( /= ) public :: operator ( < ), operator ( <= ) public :: operator ( > ), operator ( >= ) !> State return types integer ( ilp ), parameter , public :: LINALG_SUCCESS = 0_ilp integer ( ilp ), parameter , public :: LINALG_VALUE_ERROR = - 1_ilp integer ( ilp ), parameter , public :: LINALG_ERROR = - 2_ilp integer ( ilp ), parameter , public :: LINALG_INTERNAL_ERROR = - 3_ilp !> Use fixed-size character storage for performance integer ( ilp ), parameter :: MSG_LENGTH = 512_ilp integer ( ilp ), parameter :: NAME_LENGTH = 32_ilp !> `linalg_state_type` defines a state return type for a !> linear algebra routine. State contains a status flag, a comment, and a !> procedure specifier that can be used to mark where the error happened type :: linalg_state_type !> The current exit state integer ( ilp ) :: state = LINALG_SUCCESS !> Message associated to the current state character ( len = MSG_LENGTH ) :: message = repeat ( ' ' , MSG_LENGTH ) !> Location of the state change character ( len = NAME_LENGTH ) :: where_at = repeat ( ' ' , NAME_LENGTH ) contains !> Cleanup procedure :: destroy => state_destroy !> Print error message procedure :: print => state_print procedure :: print_msg => state_message !> State properties procedure :: ok => state_is_ok procedure :: error => state_is_error end type linalg_state_type !> Comparison operators interface operator ( == ) module procedure state_eq_flag module procedure flag_eq_state end interface interface operator ( /= ) module procedure state_neq_flag module procedure flag_neq_state end interface interface operator ( < ) module procedure state_lt_flag module procedure flag_lt_state end interface interface operator ( <= ) module procedure state_le_flag module procedure flag_le_state end interface interface operator ( > ) module procedure state_gt_flag module procedure flag_gt_state end interface interface operator ( >= ) module procedure state_ge_flag module procedure flag_ge_state end interface interface linalg_state_type module procedure new_state module procedure new_state_nowhere end interface linalg_state_type contains !> Interface to print linalg state flags pure function linalg_message ( flag ) result ( msg ) integer ( ilp ), intent ( in ) :: flag character ( len = :), allocatable :: msg select case ( flag ) case ( LINALG_SUCCESS ); msg = 'Success!' case ( LINALG_VALUE_ERROR ); msg = 'Value Error' case ( LINALG_ERROR ); msg = 'Algebra Error' case ( LINALG_INTERNAL_ERROR ); msg = 'Internal Error' case default ; msg = 'ERROR/INVALID FLAG' end select end function linalg_message !> Flow control: on output flag present, return it; otherwise, halt on error pure subroutine linalg_error_handling ( ierr , ierr_out ) type ( linalg_state_type ), intent ( in ) :: ierr type ( linalg_state_type ), optional , intent ( out ) :: ierr_out character ( len = :), allocatable :: err_msg if ( present ( ierr_out )) then ! Return error flag ierr_out = ierr elseif ( ierr % error ()) then err_msg = ierr % print () error stop err_msg end if end subroutine linalg_error_handling !> Formatted message pure function state_message ( this ) result ( msg ) class ( linalg_state_type ), intent ( in ) :: this character ( len = :), allocatable :: msg if ( this % state == LINALG_SUCCESS ) then msg = 'Success!' else msg = linalg_message ( this % state ) // ': ' // trim ( this % message ) end if end function state_message !> Produce a nice error string pure function state_print ( this ) result ( msg ) class ( linalg_state_type ), intent ( in ) :: this character ( len = :), allocatable :: msg if ( len_trim ( this % where_at ) > 0 ) then msg = '[' // trim ( this % where_at ) // '] returned ' // state_message ( this ) elseif ( this % error ()) then msg = 'Error encountered: ' // state_message ( this ) else msg = state_message ( this ) end if end function state_print !> Cleanup the object elemental subroutine state_destroy ( this ) class ( linalg_state_type ), intent ( inout ) :: this this % state = LINALG_SUCCESS this % message = repeat ( ' ' , len ( this % message )) this % where_at = repeat ( ' ' , len ( this % where_at )) end subroutine state_destroy !> Check if the current state is successful elemental logical ( lk ) function state_is_ok ( this ) class ( linalg_state_type ), intent ( in ) :: this state_is_ok = this % state == LINALG_SUCCESS end function state_is_ok !> Check if the current state is an error state elemental logical ( lk ) function state_is_error ( this ) class ( linalg_state_type ), intent ( in ) :: this state_is_error = this % state /= LINALG_SUCCESS end function state_is_error !> Compare an error state with an integer flag elemental logical ( lk ) function state_eq_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_eq_flag = err % state == flag end function state_eq_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_eq_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_eq_state = err % state == flag end function flag_eq_state !> Compare the error state with an integer flag elemental logical ( lk ) function state_neq_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_neq_flag = . not . state_eq_flag ( err , flag ) end function state_neq_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_neq_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_neq_state = . not . state_eq_flag ( err , flag ) end function flag_neq_state !> Compare the error state with an integer flag elemental logical ( lk ) function state_lt_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_lt_flag = err % state < flag end function state_lt_flag !> Compare the error state with an integer flag elemental logical ( lk ) function state_le_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_le_flag = err % state <= flag end function state_le_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_lt_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_lt_state = err % state < flag end function flag_lt_state !> Compare an integer flag with the error state elemental logical ( lk ) function flag_le_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_le_state = err % state <= flag end function flag_le_state !> Compare the error state with an integer flag elemental logical ( lk ) function state_gt_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_gt_flag = err % state > flag end function state_gt_flag !> Compare the error state with an integer flag elemental logical ( lk ) function state_ge_flag ( err , flag ) type ( linalg_state_type ), intent ( in ) :: err integer , intent ( in ) :: flag state_ge_flag = err % state >= flag end function state_ge_flag !> Compare an integer flag with the error state elemental logical ( lk ) function flag_gt_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_gt_state = err % state > flag end function flag_gt_state !> Compare an integer flag with the error state elemental logical ( lk ) function flag_ge_state ( flag , err ) integer , intent ( in ) :: flag type ( linalg_state_type ), intent ( in ) :: err flag_ge_state = err % state >= flag end function flag_ge_state !> Error creation message, with location location pure type ( linalg_state_type ) function new_state ( where_at , flag , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ) !> Location character ( len =* ), intent ( in ) :: where_at !> Input error flag integer , intent ( in ) :: flag !> Optional rank-agnostic arguments class ( * ), optional , intent ( in ), dimension (..) :: a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 !> Create state with no message new_state = new_state_nowhere ( flag , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ) !> Add location if ( len_trim ( where_at ) > 0 ) new_state % where_at = adjustl ( where_at ) end function new_state !> Error creation message, from N input variables (numeric or strings) pure type ( linalg_state_type ) function new_state_nowhere ( flag , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ) & result ( new_state ) !> Input error flag integer , intent ( in ) :: flag !> Optional rank-agnostic arguments class ( * ), optional , intent ( in ), dimension (..) :: a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , & a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20 ! Init object call new_state % destroy () !> Set error flag new_state % state = flag !> Set chain new_state % message = \"\" call appendr ( new_state % message , a1 ) call appendr ( new_state % message , a2 ) call appendr ( new_state % message , a3 ) call appendr ( new_state % message , a4 ) call appendr ( new_state % message , a5 ) call appendr ( new_state % message , a6 ) call appendr ( new_state % message , a7 ) call appendr ( new_state % message , a8 ) call appendr ( new_state % message , a9 ) call appendr ( new_state % message , a10 ) call appendr ( new_state % message , a11 ) call appendr ( new_state % message , a12 ) call appendr ( new_state % message , a13 ) call appendr ( new_state % message , a14 ) call appendr ( new_state % message , a15 ) call appendr ( new_state % message , a16 ) call appendr ( new_state % message , a17 ) call appendr ( new_state % message , a18 ) call appendr ( new_state % message , a19 ) call appendr ( new_state % message , a20 ) end function new_state_nowhere !> Append a generic value to the error flag (rank-agnostic) pure subroutine appendr ( msg , a , prefix ) class ( * ), optional , intent ( in ) :: a (..) character ( len =* ), intent ( inout ) :: msg character , optional , intent ( in ) :: prefix if ( present ( a )) then select rank ( v => a ) rank ( 0 ) call append ( msg , v , prefix ) rank ( 1 ) call appendv ( msg , v ) rank default msg = trim ( msg ) // ' ' end select endif end subroutine appendr ! Append a generic value to the error flag pure subroutine append ( msg , a , prefix ) class ( * ), intent ( in ) :: a character ( len =* ), intent ( inout ) :: msg character , optional , intent ( in ) :: prefix character ( len = MSG_LENGTH ) :: buffer , buffer2 character ( len = 2 ) :: sep integer :: ls ! Do not add separator if this is the first instance sep = ' ' ls = merge ( 1 , 0 , len_trim ( msg ) > 0 ) if ( present ( prefix )) then ls = ls + 1 sep ( ls : ls ) = prefix end if select type ( aa => a ) !> String type type is ( character ( len =* )) msg = trim ( msg ) // sep (: ls ) // aa !> Numeric types #:for k1, t1 in KINDS_TYPES type is ( ${ t1 }$ ) # : if 'complex' in t1 write ( buffer , FMT_REAL_$ { k1 }$ ) aa % re write ( buffer2 , FMT_REAL_$ { k1 }$ ) aa % im msg = trim ( msg ) // sep (: ls ) // '(' // trim ( adjustl ( buffer )) // ',' // trim ( adjustl ( buffer2 )) // ')' # : else # : if 'real' in t1 write ( buffer , FMT_REAL_$ { k1 }$ ) aa # : else write ( buffer , '(i0)' ) aa # : endif msg = trim ( msg ) // sep (: ls ) // trim ( adjustl ( buffer )) # : endif #:endfor class default msg = trim ( msg ) // ' ' end select end subroutine append !> Append a generic vector to the error flag pure subroutine appendv ( msg , a ) class ( * ), intent ( in ) :: a (:) character ( len =* ), intent ( inout ) :: msg integer :: j , ls character ( len = MSG_LENGTH ) :: buffer , buffer2 , buffer_format character ( len = 2 ) :: sep if ( size ( a ) <= 0 ) return ! Default: separate elements with one space sep = ' ' ls = 1 ! Open bracket msg = trim ( msg ) // ' [' ! Do not call append(msg(aa(j))), it will crash gfortran select type ( aa => a ) !> Strings (cannot use string_type due to `sequence`) type is ( character ( len =* )) msg = trim ( msg ) // adjustl ( aa ( 1 )) do j = 2 , size ( a ) msg = trim ( msg ) // sep (: ls ) // adjustl ( aa ( j )) end do !> Numeric types #:for k1, t1 in KINDS_TYPES type is ( ${ t1 }$ ) # : if 'complex' in t1 write ( buffer , FMT_REAL_$ { k1 }$ ) aa ( 1 )% re write ( buffer2 , FMT_REAL_$ { k1 }$ ) aa ( 1 )% im msg = trim ( msg ) // '(' // trim ( adjustl ( buffer )) // ',' // trim ( adjustl ( buffer2 )) // ')' do j = 2 , size ( a ) write ( buffer , FMT_REAL_$ { k1 }$ ) aa ( j )% re write ( buffer2 , FMT_REAL_$ { k1 }$ ) aa ( j )% im msg = trim ( msg ) // sep (: ls ) // '(' // trim ( adjustl ( buffer )) // ',' // trim ( adjustl ( buffer2 )) // ')' end do # : else # : if 'real' in t1 buffer_format = FMT_REAL_$ { k1 }$ # : else buffer_format = '(i0)' # : endif write ( buffer , buffer_format ) aa ( 1 ) msg = trim ( msg ) // adjustl ( buffer ) do j = 2 , size ( a ) write ( buffer , buffer_format ) aa ( j ) msg = trim ( msg ) // sep (: ls ) // adjustl ( buffer ) end do msg = trim ( msg ) // sep (: ls ) // trim ( adjustl ( buffer )) # : endif #:endfor class default msg = trim ( msg ) // ' ' end select ! Close bracket msg = trim ( msg ) // ']' end subroutine appendv end module stdlib_linalg_state","tags":"","loc":"sourcefile/stdlib_linalg_state.fypp.html"},{"title":"stdlib_array.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Module for index manipulation and general array handling !> !> The specification of this module is available [here](../page/specs/stdlib_array.html). module stdlib_array implicit none private public :: trueloc , falseloc contains !> Version: experimental !> !> Return the positions of the true elements in array. !> [Specification](../page/specs/stdlib_array.html#trueloc) pure function trueloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of true elements integer :: loc ( count ( array )) call logicalloc ( loc , array , . true ., lbound ) end function trueloc !> Version: experimental !> !> Return the positions of the false elements in array. !> [Specification](../page/specs/stdlib_array.html#falseloc) pure function falseloc ( array , lbound ) result ( loc ) !> Mask of logicals logical , intent ( in ) :: array (:) !> Lower bound of array to index integer , intent ( in ), optional :: lbound !> Locations of false elements integer :: loc ( count (. not . array )) call logicalloc ( loc , array , . false ., lbound ) end function falseloc !> Return the positions of the truthy elements in array pure subroutine logicalloc ( loc , array , truth , lbound ) !> Locations of truthy elements integer , intent ( out ) :: loc (:) !> Mask of logicals logical , intent ( in ) :: array (:) !> Truthy value logical , intent ( in ) :: truth !> Lower bound of array to index integer , intent ( in ), optional :: lbound integer :: i , pos , offset offset = 0 if ( present ( lbound )) offset = lbound - 1 i = 0 do pos = 1 , size ( array ) if ( array ( pos ). eqv . truth ) then i = i + 1 loc ( i ) = pos + offset end if end do end subroutine logicalloc end module stdlib_array","tags":"","loc":"sourcefile/stdlib_array.f90.html"},{"title":"stdlib_stats_var.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RANKS = range(1, MAXRANK + 1) #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES submodule ( stdlib_stats ) stdlib_stats_var use , intrinsic :: ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_error , only : error_stop use stdlib_optval , only : optval implicit none contains # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: mean if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), ${ k1 }$ ) mean = sum ( x ) / n # : if t1 [ 0 ] == 'r' res = sum (( x - mean ) ** 2 ) / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) # : else res = sum ( abs ( x - mean ) ** 2 ) / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) # : endif end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res real ( dp ) :: n , mean if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if n = real ( size ( x , kind = int64 ), dp ) mean = sum ( real ( x , dp )) / n res = sum (( real ( x , dp ) - mean ) ** 2 ) / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n ${ t1 }$ :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if res = 0. _${ k1 }$ select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = size ( x , dim ) mean = sum ( x , dim ) / n do i = 1 , size ( x , dim ) # : if t1 [ 0 ] == 'r' res = res + ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 # : else res = res + abs ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 # : endif end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ), optional :: mask logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n real ( dp ) :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ if (. not . optval ( mask , . true .)) then res = ieee_value ( 1._dp , ieee_quiet_nan ) return end if res = 0._dp select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = size ( x , dim ) mean = sum ( real ( x , dp ), dim ) / n do i = 1 , size ( x , dim ) res = res + ( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean ) ** 2 end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , optval ( corrected , . true .))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res real ( ${ k1 }$ ) :: n ${ t1 }$ :: mean n = real ( count ( mask , kind = int64 ), ${ k1 }$ ) mean = sum ( x , mask ) / n # : if t1 [ 0 ] == 'r' res = sum (( x - mean ) ** 2 , mask ) / ( n - & # : else res = sum ( abs ( x - mean ) ** 2 , mask ) / ( n - & # : endif merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask_all\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res real ( dp ) :: n , mean n = real ( count ( mask , kind = int64 ), dp ) mean = sum ( real ( x , dp ), mask ) / n res = sum (( real ( x , dp ) - mean ) ** 2 , mask ) / ( n - & merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in RC_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( ${ k1 }$ ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( ${ k1 }$ ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ ${ t1 }$ :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ res = 0. _${ k1 }$ select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = count ( mask , dim ) mean = sum ( x , dim , mask ) / n do i = 1 , size ( x , dim ) # : if t1 [ 0 ] == 'r' res = res + merge ( ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 ,& # : else res = res + merge ( abs ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ - mean ) ** 2 ,& # : endif 0. _${ k1 }$ ,& mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor # : for k1 , t1 in INT_KINDS_TYPES # : for rank in RANKS # : set RName = rname ( \"var_mask\" , rank , t1 , k1 , 'dp' ) module function ${ RName }$ ( x , dim , mask , corrected ) result ( res ) ${ t1 }$ , intent ( in ) :: x$ { ranksuffix ( rank ) }$ integer , intent ( in ) :: dim logical , intent ( in ) :: mask$ { ranksuffix ( rank ) }$ logical , intent ( in ), optional :: corrected real ( dp ) :: res$ { reduced_shape ( 'x' , rank , 'dim' ) }$ integer :: i real ( dp ) :: n$ { reduced_shape ( 'x' , rank , 'dim' ) }$ real ( dp ) :: mean$ { reduced_shape ( 'x' , rank , 'dim' ) }$ res = 0._dp select case ( dim ) # : for fi in range ( 1 , rank + 1 ) case ( ${ fi }$ ) n = count ( mask , dim ) mean = sum ( real ( x , dp ), dim , mask ) / n do i = 1 , size ( x , dim ) res = res + merge (( real ( x$ { select_subarray ( rank , [( fi , 'i' )]) }$ , dp ) - mean ) ** 2 ,& 0._dp , mask$ { select_subarray ( rank , [( fi , 'i' )]) }$ ) end do # : endfor case default call error_stop ( \"ERROR (var): wrong dimension\" ) end select res = res / ( n - merge ( 1 , 0 , ( optval ( corrected , . true .) . and . n > 0 ))) end function ${ RName }$ # : endfor # : endfor end submodule","tags":"","loc":"sourcefile/stdlib_stats_var.fypp.html"},{"title":"stdlib_hash_64bit_fnv.fypp – Fortran-lang/stdlib","text":"FNV_1_HASH and FNV_1A_HASH are translations to Fortran 2008 of the FNV-1 and FNV-1a hash functions of Glenn Fowler, Landon Curt Noll,\n and Phong Vo, that has been released into the public domain. Permission\n has been granted, by Landon Curt Noll, for the use of these algorithms\n in the Fortran Standard Library. A description of these functions is\n available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function.\n The functions have been modified from their normal form to also encode\n the size of the structure in the hash. Source Code !!------------------------------------------------------------------------------ !! `FNV_1_HASH` and `FNV_1A_HASH` are translations to Fortran 2008 of the !! `FNV-1` and `FNV-1a` hash functions of Glenn Fowler, Landon Curt Noll, !! and Phong Vo, that has been released into the public domain. Permission !! has been granted, by Landon Curt Noll, for the use of these algorithms !! in the Fortran Standard Library. A description of these functions is !! available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function. !! The functions have been modified from their normal form to also encode !! the size of the structure in the hash. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_64bit ) stdlib_hash_64bit_fnv ! An implementation of the FNV hashes 1 and 1a of Glenn Fowler, Landon Curt ! Noll, and Kiem-Phong-Vo, ! https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function implicit none integer ( int_hash ), parameter :: & offset_basis = int ( z 'CBF29CE484222325' , int_hash ), & prime = int ( z '100000001B3' , int_hash ) contains pure module function int8_fnv_1 ( key ) result ( hash_code ) integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) hash_code = hash_code * prime if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if end do end function int8_fnv_1 #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1 ( key ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 ) ) ) end function ${ k1 }$_ fnv_1 #:endfor elemental module function character_fnv_1 ( key ) result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1 ( transfer ( key , & 0_int8 , & bytes_char * & len ( key , kind = int64 ) ) ) end function character_fnv_1 pure module function int8_fnv_1a ( key ) result ( hash_code ) integer ( int8 ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code integer ( int64 ) :: i hash_code = offset_basis do i = 1_int64 , size ( key , kind = int64 ) if ( little_endian ) then hash_code = ieor ( hash_code , & transfer ( [ key ( i ), 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , 0_int8 ], & 0_int_hash ) ) else hash_code = ieor ( hash_code , & transfer ( [ 0_int8 , 0_int8 , 0_int8 , 0_int8 , & 0_int8 , 0_int8 , 0_int8 , key ( i )], & 0_int_hash ) ) end if hash_code = hash_code * prime end do end function int8_fnv_1a #:for k1 in INT_KINDS pure module function ${ k1 }$_ fnv_1a ( key ) result ( hash_code ) integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * & size ( key , kind = int64 ))) end function ${ k1 }$_ fnv_1a #:endfor elemental module function character_fnv_1a ( key ) result ( hash_code ) character ( * ), intent ( in ) :: key integer ( int_hash ) :: hash_code hash_code = int8_fnv_1a ( transfer ( key , 0_int8 , & ( bits_char / bits_int8 ) * & len ( key , kind = int64 ) ) ) end function character_fnv_1a end submodule stdlib_hash_64bit_fnv","tags":"","loc":"sourcefile/stdlib_hash_64bit_fnv.fypp.html"},{"title":"stdlib_hash_32bit_nm.fypp – Fortran-lang/stdlib","text":"NM_HASH32 and NM_HASH32X are translations to Fortran 2008 and signed\n two's complement arithmetic of the nmhash32 and nmhash32x scalar\n algorithms of James Z. M. Gao, copyright 2021. James Z. M. Gao's original\n C++ code, nmhash.h , is available at the URL:\n https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/nmhash.h\n under the BSD 2-Clause License:\n https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/LICENSE\n The algorithms come in multiple versions, depending on whether the\n vectorized instructions SSE2 or AVX2 are available. As neither instruction\n is available in portable Fortran 2008, the algorithms that do not use these\n instructions are used. The BSD 2-Clause license is as follows: BSD 2-Clause License Copyright (c) 2021, water hash algorithm. James Z.M. Gao\n All rights reserved. Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n POSSIBILITY OF SUCH DAMAGE. Source Code !!------------------------------------------------------------------------------ !! `NM_HASH32` and `NM_HASH32X` are translations to Fortran 2008 and signed !! two's complement arithmetic of the `nmhash32` and `nmhash32x` scalar !! algorithms of James Z. M. Gao, copyright 2021. James Z. M. Gao's original !! C++ code, `nmhash.h`, is available at the URL: !! https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/nmhash.h !! under the BSD 2-Clause License: !! https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/LICENSE !! The algorithms come in multiple versions, depending on whether the !! vectorized instructions SSE2 or AVX2 are available. As neither instruction !! is available in portable Fortran 2008, the algorithms that do not use these !! instructions are used. !! !! The BSD 2-Clause license is as follows: !! !! BSD 2-Clause License !! !! Copyright (c) 2021, water hash algorithm. James Z.M. Gao !! All rights reserved. !! !! Redistribution and use in source and binary forms, with or without !! modification, are permitted provided that the following conditions are met: !! !! 1. Redistributions of source code must retain the above copyright notice, !! this list of conditions and the following disclaimer. !! !! 2. Redistributions in binary form must reproduce the above copyright notice, !! this list of conditions and the following disclaimer in the documentation !! and/or other materials provided with the distribution. !! !! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" !! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE !! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE !! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE !! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR !! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF !! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS !! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN !! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) !! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE !! POSSIBILITY OF SUCH DAMAGE. !!------------------------------------------------------------------------------ #! Integer kinds to be considered during templating #:set INT_KINDS = [\"int16\", \"int32\", \"int64\"] submodule ( stdlib_hash_32bit ) stdlib_hash_32bit_nm implicit none ! Primes from XXH integer ( int32 ), parameter :: nmh_prime32_1 = int ( Z '9E3779B1' , int32 ) integer ( int32 ), parameter :: nmh_prime32_2 = int ( Z '85EBCA77' , int32 ) integer ( int32 ), parameter :: nmh_prime32_3 = int ( Z 'C2B2AE3D' , int32 ) integer ( int32 ), parameter :: nmh_prime32_4 = int ( Z '27D4EB2F' , int32 ) integer ( int32 ), parameter :: nmh_m1 = int ( z 'F0D9649B' , int32 ) integer ( int32 ), parameter :: nmh_m2 = int ( z '29A7935D' , int32 ) integer ( int32 ), parameter :: nmh_m3 = int ( z '55D35831' , int32 ) integer ( int32 ), parameter :: nmh_m1_v ( 0 : 31 ) = nmh_m1 integer ( int32 ), parameter :: nmh_m2_v ( 0 : 31 ) = nmh_m2 integer ( int32 ), parameter :: nmh_m3_v ( 0 : 31 ) = nmh_m3 logical , parameter :: nmh_short32_without_seed2 = . false . logical , parameter :: nmh_short32_with_seed2 = . true . integer , parameter :: init_size = 32 ! Pseudorandom secrets taken directly from FARSH. integer ( int32 ), parameter :: nmh_acc_init ( 0 : init_size - 1 ) = [ & int ( z 'B8FE6C39' , int32 ), int ( z '23A44BBE' , int32 ), & int ( z '7C01812C' , int32 ), int ( z 'F721AD1C' , int32 ), & int ( z 'DED46DE9' , int32 ), int ( z '839097DB' , int32 ), & int ( z '7240A4A4' , int32 ), int ( z 'B7B3671F' , int32 ), & int ( z 'CB79E64E' , int32 ), int ( z 'CCC0E578' , int32 ), & int ( z '825AD07D' , int32 ), int ( z 'CCFF7221' , int32 ), & int ( z 'B8084674' , int32 ), int ( z 'F743248E' , int32 ), & int ( z 'E03590E6' , int32 ), int ( z '813A264C' , int32 ), & int ( z '3C2852BB' , int32 ), int ( z '91C300CB' , int32 ), & int ( z '88D0658B' , int32 ), int ( z '1B532EA3' , int32 ), & int ( z '71644897' , int32 ), int ( z 'A20DF94E' , int32 ), & int ( z '3819EF46' , int32 ), int ( z 'A9DEACD8' , int32 ), & int ( z 'A8FA763F' , int32 ), int ( z 'E39C343F' , int32 ), & int ( z 'F9DCBBC7' , int32 ), int ( z 'C70B4F1D' , int32 ), & int ( z '8A51E04B' , int32 ), int ( z 'CDB45931' , int32 ), & int ( z 'C89F7EC9' , int32 ), int ( z 'D9787364' , int32 ) ] contains pure function nmh_readle32 ( p ) result ( v ) integer ( int32 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( p ( 1 : 4 ), 0_int32 ) else v = transfer ( [ p ( 4 ), p ( 3 ), p ( 2 ), p ( 1 ) ], 0_int32 ) end if end function nmh_readle32 pure function nmh_readle16 ( p ) result ( v ) integer ( int16 ) :: v integer ( int8 ), intent ( in ) :: p (:) if ( little_endian ) then v = transfer ( p ( 1 : 2 ), 0_int16 ) else v = transfer ( [ p ( 2 ), p ( 1 ) ], 0_int16 ) end if end function nmh_readle16 pure function nmhash32_0to8 ( x , seed ) result ( vx32 ) integer ( int32 ), intent ( in ) :: x integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: vx32 ! base mixer: [-6 -12 776bf593 -19 11 3fb39c65 -15 -9 e9139917 -11 16] ! = 0.027071104091278835 integer ( int32 ), parameter :: m1 = int ( z '776BF593' , int32 ) integer ( int32 ), parameter :: m2 = int ( z '3FB39C65' , int32 ) integer ( int32 ), parameter :: m3 = int ( z 'E9139917' , int32 ) integer ( int16 ) :: vx16 ( 2 ) vx32 = x vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , - 12 ), ishft ( vx32 , - 6 ) ) ) vx16 = transfer ( vx32 , 0_int16 , 2 ) vx16 = vx16 * transfer ( m1 , 0_int16 , 2 ) vx32 = transfer ( vx16 , 0_int32 ) vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , 11 ), ishft ( vx32 , - 19 ) ) ) vx16 = transfer ( vx32 , 0_int16 , 2 ) vx16 = vx16 * transfer ( m2 , 0_int16 , 2 ) vx32 = transfer ( vx16 , 0_int32 ) vx32 = ieor ( vx32 , seed ) vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , - 15 ), ishft ( vx32 , - 9 ) ) ) vx16 = transfer ( vx32 , 0_int16 , 2 ) vx16 = vx16 * transfer ( m3 , 0_int16 , 2 ) vx32 = transfer ( vx16 , 0_int32 ) vx32 = ieor ( vx32 , ieor ( ishft ( vx32 , 16 ), ishft ( vx32 , - 11 ) ) ) end function nmhash32_0to8 pure function nmhash32_9to255 ( p , seed , full_avalanche ) result ( result ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed logical , intent ( in ) :: full_avalanche integer ( int32 ) :: result integer ( int32 ) :: xu32 ( 0 : 3 ), yu32 ( 0 : 3 ) integer ( int16 ) :: xu16 ( 0 : 1 ) ! Due to an issue with Intel OneAPI ifort 2021 (see ! https://community.intel.com/t5/Intel-Fortran-Compiler/Intrinsic-transfer-with-a-provided-size-un-expected-behavior/m-p/1343313#M158733 ! ), it is not possible to define the following variables as a parameter. ! integer(int16), parameter :: & ! nmh_m1_16(0:1) = transfer( nmh_m1, 0_int16, 2 ), & ! nmh_m2_16(0:1) = transfer( nmh_m2, 0_int16, 2 ), & ! nmh_m3_16(0:1) = transfer( nmh_m3, 0_int16, 2 ) integer ( int16 ) :: nmh_m1_16 ( 0 : 1 ), nmh_m2_16 ( 0 : 1 ), nmh_m3_16 ( 0 : 1 ) integer ( int32 ) :: s1 integer ( int64 ) :: length integer ( int32 ) :: length32 ( 0 : 1 ) integer ( int64 ) :: i , j , r nmh_m1_16 ( 0 : 1 ) = transfer ( nmh_m1 , 0_int16 , 2 ) nmh_m2_16 ( 0 : 1 ) = transfer ( nmh_m2 , 0_int16 , 2 ) nmh_m3_16 ( 0 : 1 ) = transfer ( nmh_m3 , 0_int16 , 2 ) ! base mixer: [f0d9649b 5 -13 29a7935d -9 11 55d35831 -20 -10 ] = ! 0.93495901789135362 result = 0 length = size ( p , kind = int64 ) length32 = transfer ( length , 0_int32 , 2 ) if ( little_endian ) then s1 = seed + length32 ( 0 ) else s1 = seed + length32 ( 1 ) end if xu32 ( 0 ) = nmh_prime32_1 xu32 ( 1 ) = nmh_prime32_2 xu32 ( 2 ) = nmh_prime32_3 xu32 ( 3 ) = nmh_prime32_4 yu32 (:) = s1 if ( full_avalanche ) then ! 33 to 255 bytes r = ( length - 1 ) / 32 do i = 0 , r - 1 do j = 0 , 3 xu32 ( j ) = ieor ( xu32 ( j ), nmh_readle32 ( p ( i * 32 + j * 4 : ) ) ) yu32 ( j ) = ieor ( yu32 ( j ), & nmh_readle32 ( p ( i * 32 + j * 4 + 16 : ) ) ) xu32 ( j ) = xu32 ( j ) + yu32 ( j ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m1_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), & ieor ( ishft ( xu32 ( j ), 5 ), & ishft ( xu32 ( j ), - 13 )) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m2_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), yu32 ( j ) ) xu32 ( j ) = ieor ( xu32 ( j ), & ieor ( ishft ( xu32 ( j ), 11 ), & ishft ( xu32 ( j ), - 9 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m3_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), & ieor ( ishft ( xu32 ( j ), - 10 ), & ishft ( xu32 ( j ), - 20 ) ) ) end do end do do j = 0 , 3 xu32 ( j ) = ieor ( xu32 ( j ), & nmh_readle32 ( p ( length - 32 + j * 4 : ) ) ) yu32 ( j ) = ieor ( yu32 ( j ), & nmh_readle32 ( p ( length - 16 + j * 4 : ) ) ) end do else ! 9 to 32 bytes xu32 ( 0 ) = ieor ( xu32 ( 0 ), nmh_readle32 ( p ( 0 :))) xu32 ( 1 ) = ieor ( xu32 ( 1 ), nmh_readle32 ( p ( ishft ( ishft ( length , - 4 ), 3 ):))) xu32 ( 2 ) = ieor ( xu32 ( 2 ), nmh_readle32 ( p ( length - 8 :))) xu32 ( 3 ) = ieor ( xu32 ( 3 ), & nmh_readle32 ( p ( length - 8 - ishft ( ishft ( length , - 4 ), 3 ):))) yu32 ( 0 ) = ieor ( yu32 ( 0 ), nmh_readle32 ( p ( 4 :))) yu32 ( 1 ) = ieor ( yu32 ( 1 ), & nmh_readle32 ( p ( ishft ( ishft ( length , - 4 ), 3 ) + 4 :))) yu32 ( 2 ) = ieor ( yu32 ( 2 ), nmh_readle32 ( p ( length - 8 + 4 :))) yu32 ( 3 ) = ieor ( yu32 ( 3 ), & nmh_readle32 ( p ( length - 8 - & ishft ( ishft ( length , - 4 ), 3 ) + 4 :))) end if do j = 0 , 3 xu32 ( j ) = xu32 ( j ) + yu32 ( j ) yu32 ( j ) = ieor ( yu32 ( j ), ieor ( ishft ( yu32 ( j ), 17 ), & ishft ( yu32 ( j ), - 6 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m1_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), ieor ( ishft ( xu32 ( j ), 5 ), & ishft ( xu32 ( j ), - 13 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m2_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), yu32 ( j ) ) xu32 ( j ) = ieor ( xu32 ( j ), ieor ( ishft ( xu32 ( j ), 11 ), & ishft ( xu32 ( j ), - 9 ) ) ) xu16 = transfer ( xu32 ( j ), 0_int16 , 2 ) xu16 = xu16 * nmh_m3_16 xu32 ( j ) = transfer ( xu16 , 0_int32 ) xu32 ( j ) = ieor ( xu32 ( j ), ieor ( ishft ( xu32 ( j ), - 10 ), & ishft ( xu32 ( j ), - 20 ) ) ) end do xu32 ( 0 ) = ieor ( xu32 ( 0 ), nmh_prime32_1 ) xu32 ( 1 ) = ieor ( xu32 ( 1 ), nmh_prime32_2 ) xu32 ( 2 ) = ieor ( xu32 ( 2 ), nmh_prime32_3 ) xu32 ( 3 ) = ieor ( xu32 ( 3 ), nmh_prime32_4 ) do j = 1 , 3 xu32 ( 0 ) = xu32 ( 0 ) + xu32 ( j ) end do xu32 ( 0 ) = ieor ( xu32 ( 0 ), s1 + ishft ( s1 , - 5 ) ) xu16 = transfer ( xu32 ( 0 ), 0_int16 , 2 ) xu16 = xu16 * nmh_m3_16 xu32 ( 0 ) = transfer ( xu16 , 0_int32 ) xu32 ( 0 ) = ieor ( xu32 ( 0 ), & ieor ( ishft ( xu32 ( 0 ), - 10 ), ishft ( xu32 ( 0 ), - 20 ) ) ) result = xu32 ( 0 ) end function nmhash32_9to255 pure function nmhash32_9to32 ( p , seed ) result ( result ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: result result = nmhash32_9to255 ( p , seed , . false . ) end function nmhash32_9to32 pure function nmhash32_33to255 ( p , seed ) result ( result ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: result result = nmhash32_9to255 ( p , seed , . true . ) end function nmhash32_33to255 pure subroutine nmhash32_long_round ( accx , accy , p ) integer ( int32 ), intent ( inout ) :: accx ( 0 :) integer ( int32 ), intent ( inout ) :: accy ( 0 :) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int64 ), parameter :: nbgroups = init_size integer ( int64 ) :: i integer ( int16 ) :: dummy1 ( 0 : 1 ) integer ( int16 ) :: dummy2 ( 0 : 1 ) do i = 0 , nbgroups - 1 accx ( i ) = ieor ( accx ( i ), nmh_readle32 ( p ( i * 4 :) ) ) accy ( i ) = ieor ( accy ( i ), nmh_readle32 ( p ( i * 4 + nbgroups * 4 :) ) ) accx ( i ) = accx ( i ) + accy ( i ) accy ( i ) = ieor ( accy ( i ), ishft ( accx ( i ), - 1 ) ) dummy1 = transfer ( accx ( i ), 0_int16 , 2 ) dummy2 = transfer ( nmh_m1_v ( i ), 0_int16 , 2 ) dummy1 = dummy1 * dummy2 accx ( i ) = transfer ( dummy1 , 0_int32 ) accx ( i ) = ieor ( accx ( i ), ieor ( ishft ( accx ( i ), 5 ), & ishft ( accx ( i ), - 13 ) ) ) dummy1 = transfer ( accx ( i ), 0_int16 , 2 ) dummy2 = transfer ( nmh_m2_v ( i ), 0_int16 , 2 ) dummy1 = dummy1 * dummy2 accx ( i ) = transfer ( dummy1 , 0_int32 ) accx ( i ) = ieor ( accx ( i ), accy ( i ) ) accx ( i ) = ieor ( accx ( i ), ieor ( ishft ( accx ( i ), 11 ), & ishft ( accx ( i ), - 9 ) ) ) dummy1 = transfer ( accx ( i ), 0_int16 , 2 ) dummy2 = transfer ( nmh_m3_v ( i ), 0_int16 , 2 ) dummy1 = dummy1 * dummy2 accx ( i ) = transfer ( dummy1 , 0_int32 ) accx ( i ) = ieor ( accx ( i ), ieor ( ishft ( accx ( i ), - 10 ), & ishft ( accx ( i ), - 20 ) ) ) end do end subroutine nmhash32_long_round pure function nmhash32_long ( p , seed ) result ( sum ) integer ( int32 ) :: sum integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: accx ( 0 : size ( nmh_acc_init ) - 1 ) integer ( int32 ) :: accy ( 0 : size ( nmh_acc_init ) - 1 ) integer ( int64 ) :: nbrounds integer ( int64 ) :: len integer ( int32 ) :: len32 ( 0 : 1 ) integer ( int64 ) :: i len = size ( p , kind = int64 ) nbrounds = ( len - 1 ) / ( 4 * size ( accx , kind = int64 ) * 2 ) sum = 0 ! Init do i = 0_int64 , size ( nmh_acc_init , kind = int64 ) - 1 accx ( i ) = nmh_acc_init ( i ) accy ( i ) = seed end do ! init do i = 0_int64 , nbrounds - 1 call nmhash32_long_round ( accx , accy , & p ( i * 8 * size ( accx , kind = int64 ):) ) end do call nmhash32_long_round ( accx , accy , & p ( len - 8 * size ( accx , kind = int64 ):) ) ! merge acc do i = 0 , size ( accx , kind = int64 ) - 1 accx ( i ) = ieor ( accx ( i ), nmh_acc_init ( i ) ) sum = sum + accx ( i ) end do len32 = transfer ( len , 0_int32 , 2 ) if ( little_endian ) then sum = sum + len32 ( 1 ) sum = ieor ( sum , len32 ( 0 )) else sum = sum + len32 ( 0 ) sum = ieor ( sum , len32 ( 1 )) end if end function nmhash32_long pure function nmhash32_avalanche32 ( x ) result ( u32 ) integer ( int32 ) :: u32 integer ( int32 ), intent ( in ) :: x integer ( int16 ) :: u16 ( 0 : 1 ) integer ( int32 ), parameter :: m1 = int ( z 'CCE5196D' , int32 ) integer ( int32 ), parameter :: m2 = int ( z '464BE229' , int32 ) ! Due to an issue with Intel OneAPI ifort 2021 (see ! https://community.intel.com/t5/Intel-Fortran-Compiler/Intrinsic-transfer-with-a-provided-size-un-expected-behavior/m-p/1343313#M158733 ! ), it is not possible to define the following variables as a parameter. !integer(int16), parameter:: m1_16(0:1) = transfer(m1, 0_int16, 2) !integer(int16), parameter:: m2_16(0:1) = transfer(m2, 0_int16, 2) integer ( int16 ) :: m1_16 ( 0 : 1 ), m2_16 ( 0 : 1 ) ! [-21 -8 cce5196d 12 -7 464be229 -21 -8] = 3.2267098842182733 m1_16 ( 0 : 1 ) = transfer ( m1 , 0_int16 , 2 ) m2_16 ( 0 : 1 ) = transfer ( m2 , 0_int16 , 2 ) u32 = x u32 = ieor ( u32 , ieor ( ishft ( u32 , - 8 ), ishft ( u32 , - 21 ) ) ) u16 = transfer ( u32 , 0_int16 , 2 ) u16 ( 0 ) = u16 ( 0 ) * m1_16 ( 0 ) u16 ( 1 ) = u16 ( 1 ) * m1_16 ( 1 ) u32 = transfer ( u16 , 0_int32 ) u32 = ieor ( u32 , ieor ( ishft ( u32 , 12 ), ishft ( u32 , - 7 ) ) ) u16 = transfer ( u32 , 0_int16 , 2 ) u16 ( 0 ) = u16 ( 0 ) * m2_16 ( 0 ) u16 ( 1 ) = u16 ( 1 ) * m2_16 ( 1 ) u32 = transfer ( u16 , 0_int32 ) u32 = ieor ( u32 , ieor ( ishft ( u32 , - 8 ), ishft ( u32 , - 21 ) ) ) end function nmhash32_avalanche32 pure module function int8_nmhash32 ( key , seed ) result ( hash ) !! NMHASH32 hash function for rank 1 array keys of kind INT8 integer ( int32 ) :: hash integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: len integer ( int32 ) :: u32 integer ( int16 ) :: u16 ( 0 : 1 ) integer ( int32 ) :: x , y integer ( int32 ) :: new_seed len = size ( key , kind = int64 ) if ( len <= 32 ) then if ( len > 8 ) then hash = nmhash32_9to32 ( key , seed ) return else if ( len > 4 ) then x = nmh_readle32 ( key ) y = ieor ( nmh_readle32 ( key ( len - 4 :)), nmh_prime32_4 + 2 + seed ) x = x + y x = ieor ( x , ishft ( x , len + 7 ) ) hash = nmhash32_0to8 ( x , ishftc ( y , 5 ) ) return else select case ( len ) case ( 0 ) new_seed = seed + nmh_prime32_2 u32 = 0 case ( 1 ) new_seed = seed + nmh_prime32_2 + ishft ( 1_int32 , 24 ) + & 2_int32 if ( little_endian ) then u32 = transfer ( [ key ( 0 ), 0_int8 , 0_int8 , 0_int8 ], & 0_int32 ) else u32 = transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( 0 )], & 0_int32 ) end if case ( 2 ) new_seed = seed + nmh_prime32_2 + ishft ( 2_int32 , 24 ) + & 4_int32 if ( little_endian ) then u32 = transfer ( [ nmh_readle16 ( key ), 0_int16 ], 0_int32 ) else u32 = transfer ( [ 0_int16 , nmh_readle16 ( key )], 0_int32 ) end if case ( 3 ) new_seed = seed + nmh_prime32_2 + ishft ( 3_int32 , 24 ) + & 6_int32 if ( little_endian ) then u16 ( 1 ) = transfer ( [ key ( 2 ), 0_int8 ], 0_int16 ) u16 ( 0 ) = nmh_readle16 ( key ) else u16 ( 0 ) = transfer ( [ 0_int8 , key ( 2 )], 0_int16 ) u16 ( 1 ) = nmh_readle16 ( key ) end if u32 = transfer ( u16 , 0_int32 ) case ( 4 ) new_seed = seed + nmh_prime32_3 u32 = nmh_readle32 ( key ) case default hash = 0 return end select hash = nmhash32_0to8 ( u32 + new_seed , ishftc ( new_seed , 5 ) ) return end if else if ( len < 256_int64 ) then hash = nmhash32_33to255 ( key , seed ) return else hash = nmhash32_avalanche32 ( nmhash32_long ( key , seed )) return end if end function int8_nmhash32 pure function nmhash32x_0to4 ( x , seed ) result ( hash ) integer ( int32 ), intent ( in ) :: x integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash ! [bdab1ea9 18 a7896a1b 12 83796a2d 16] = 0.092922873297662509 hash = x hash = ieor ( hash , seed ) hash = hash * int ( z 'BDAB1EA9' , int32 ) hash = hash + ishftc ( seed , 31 ) hash = ieor ( hash , ishft ( hash , - 18 ) ) hash = hash * int ( z 'A7896A1B' , int32 ) hash = ieor ( hash , ishft ( hash , - 12 ) ) hash = hash * int ( z '83796A2D' , int32 ) hash = ieor ( hash , ishft ( hash , - 16 ) ) end function nmhash32x_0to4 pure function nmhash32x_5to8 ( p , seed ) result ( x ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: x integer ( int64 ) :: len integer ( int32 ) :: y ! 5 to 9 bytes ! mixer: [11049a7d 23 bcccdc7b 12 065e9dad 12] = 0.16577596555667246 len = size ( p , kind = int64 ) x = ieor ( nmh_readle32 ( p ), nmh_prime32_3 ) y = ieor ( nmh_readle32 ( p ( len - 4 :)), seed ) x = x + y x = ieor ( x , ishft ( x , - len ) ) x = x * int ( z '11049A7D' , int32 ) x = ieor ( x , ishft ( x , - 23 ) ) x = x * int ( z 'BCCCDC7B' , int32 ) x = ieor ( x , ishftc ( y , 3 ) ) x = ieor ( x , ishft ( x , - 12 ) ) x = x * int ( z '065E9DAD' , int32 ) x = ieor ( x , ishft ( x , - 12 ) ) end function nmhash32x_5to8 pure function nmhash32x_9to255 ( p , seed ) result ( x ) integer ( int8 ), intent ( in ) :: p ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: x integer ( int64 ) :: len integer ( int32 ) :: len32 ( 0 : 1 ), len_base integer ( int32 ) :: y integer ( int32 ) :: a , b integer ( int64 ) :: i , r ! - at least 9 bytes ! - base mixer: [11049a7d 23 bcccdc7b 12 065e9dad 12] = 0.16577596555667246 ! - tail mixer: [16 a52fb2cd 15 551e4d49 16] = 0.17162579707098322 len = size ( p , kind = int64 ) len32 = transfer ( len , 0_int32 , 2 ) if ( little_endian ) then len_base = len32 ( 0 ) else len_base = len32 ( 1 ) end if x = nmh_prime32_3 y = seed a = nmh_prime32_4 b = seed r = ( len - 1 ) / 16 do i = 0 , r - 1 x = ieor ( x , nmh_readle32 ( p ( i * 16 + 0 :) ) ) y = ieor ( y , nmh_readle32 ( p ( i * 16 + 4 :) ) ) x = ieor ( x , y ) x = x * int ( z '11049A7D' , int32 ) x = ieor ( x , ishft ( x , - 23 ) ) x = x * int ( z 'BCCCDC7B' , int32 ) y = ishftc ( y , 4 ) x = ieor ( x , y ) x = ieor ( x , ishft ( x , - 12 ) ) x = x * int ( z '065E9DAD' , int32 ) x = ieor ( x , ishft ( x , - 12 ) ) a = ieor ( a , nmh_readle32 ( p ( i * 16 + 8 :))) b = ieor ( b , nmh_readle32 ( p ( i * 16 + 12 :))) a = ieor ( a , b ) a = a * int ( z '11049A7D' , int32 ) a = ieor ( a , ishft ( a , - 23 ) ) a = a * int ( z 'BCCCDC7B' , int32 ) b = ishftc ( b , 3 ) a = ieor ( a , b ) a = ieor ( a , ishft ( a , - 12 ) ) a = a * int ( z '065E9DAD' , int32 ) a = ieor ( a , ishft ( a , - 12 ) ) end do if ( iand ( len_base - 1_int32 , 8_int32 ) /= 0 ) then if ( iand ( len_base - 1_int32 , 4_int32 ) /= 0 ) then a = ieor ( a , nmh_readle32 ( p ( r * 16 + 0 :) ) ) b = ieor ( b , nmh_readle32 ( p ( r * 16 + 4 :) ) ) a = ieor ( a , b ) a = a * int ( z '11049A7D' , int32 ) a = ieor ( a , ishft ( a , - 23 ) ) a = a * int ( z 'BCCCDC7B' , int32 ) a = ieor ( a , ishftc ( b , 4 )) a = ieor ( a , ishft ( a , - 12 )) a = a * int ( z '065E9DAD' , int32 ) else a = ieor ( a , nmh_readle32 ( p ( r * 16 :) ) + b ) a = ieor ( a , ishft ( a , - 16 ) ) a = a * int ( z 'A52FB2CD' , int32 ) a = ieor ( a , ishft ( a , - 15 ) ) a = a * int ( z '551E4D49' , int32 ) end if x = ieor ( x , nmh_readle32 ( p ( len - 8 :) ) ) y = ieor ( y , nmh_readle32 ( p ( len - 4 :) ) ) x = ieor ( x , y ) x = x * int ( z '11049A7D' , int32 ) x = ieor ( x , ishft ( x , - 23 ) ) x = x * int ( z 'BCCCDC7B' , int32 ); x = ieor ( x , ishftc ( y , 3 ) ) x = ieor ( x , ishft ( x , - 12 ) ) x = x * int ( z '065E9DAD' , int32 ) else if ( iand ( len_base - 1_int32 , 4_int32 ) /= 0 ) then a = ieor ( a , nmh_readle32 ( p ( r * 16 :) ) + b ) a = ieor ( a , ishft ( a , - 16 ) ) a = a * int ( z 'A52FB2CD' , int32 ) a = ieor ( a , ishft ( a , - 15 ) ) a = a * int ( z '551E4D49' , int32 ) end if x = ieor ( x , nmh_readle32 ( p ( len - 4 :) ) + y ) x = ieor ( x , ishft ( x , - 16 ) ) x = x * int ( z 'A52FB2CD' , int32 ) x = ieor ( x , ishft ( x , - 15 ) ) x = x * int ( z '551E4D49' , int32 ) end if x = ieor ( x , len_base ) x = ieor ( x , ishftc ( a , 27 )) ! rotate one lane to pass Diff test x = ieor ( x , ishft ( x , - 14 )) x = x * int ( z '141CC535' , int32 ) end function nmhash32x_9to255 pure function nmhash32x_avalanche32 ( x ) result ( hash ) integer ( int32 ) :: hash integer ( int32 ), intent ( in ) :: x ! Mixer with 2 mul from skeeto/hash-prospector: ! [15 d168aaad 15 af723597 15] = 0.15983776156606694 hash = x hash = ieor ( hash , ishft ( hash , - 15 ) ) hash = hash * int ( z 'D168AAAD' , int32 ) hash = ieor ( hash , ishft ( hash , - 15 ) ) hash = hash * int ( z 'AF723597' , int32 ) hash = ieor ( hash , ishft ( hash , - 15 ) ) end function nmhash32x_avalanche32 pure module function int8_nmhash32x ( key , seed ) result ( hash ) !! NMHASH32x hash function for rank 1 array keys of kind INT8 integer ( int32 ) :: hash integer ( int8 ), intent ( in ) :: key ( 0 :) integer ( int32 ), intent ( in ) :: seed integer ( int64 ) :: len integer ( int32 ) :: seed2 integer ( int32 ) :: u32 integer ( int16 ) :: u16 ( 0 : 1 ) len = size ( key , kind = int64 ) if ( len <= 8 ) then if ( len > 4 ) then hash = nmhash32x_5to8 ( key , seed ) return else ! 0 to 4 bytes select case ( len ) case ( 0 ) seed2 = seed + nmh_prime32_2 u32 = 0 case ( 1 ) seed2 = seed + nmh_prime32_2 + ishft ( 1_int32 , 24 ) + & ishft ( 1_int32 , 1 ) if ( little_endian ) then u32 = transfer ( [ key ( 0 ), 0_int8 , 0_int8 , 0_int8 ], & 0_int32 ) else u32 = transfer ( [ 0_int8 , 0_int8 , 0_int8 , key ( 0 )], & 0_int32 ) end if case ( 2 ) seed2 = seed + nmh_prime32_2 + ishft ( 2_int32 , 24 ) + & ishft ( 2_int32 , 1 ) if ( little_endian ) then u32 = transfer ( [ nmh_readle16 ( key ), 0_int16 ], 0_int32 ) else u32 = transfer ( [ 0_int16 , nmh_readle16 ( key )], 0_int32 ) end if case ( 3 ) seed2 = seed + nmh_prime32_2 + ishft ( 3_int32 , 24 ) + & ishft ( 3_int32 , 1 ) if ( little_endian ) then u16 ( 1 ) = transfer ( [ key ( 2 ), 0_int8 ], 0_int16 ) u16 ( 0 ) = nmh_readle16 ( key ) else u16 ( 0 ) = transfer ( [ 0_int8 , key ( 2 ) ], 0_int16 ) u16 ( 1 ) = nmh_readle16 ( key ) end if u32 = transfer ( u16 , 0_int32 ) case ( 4 ) seed2 = seed + nmh_prime32_1 u32 = nmh_readle32 ( key ) case default hash = 0 return end select hash = nmhash32x_0to4 ( u32 , seed2 ) return end if end if if ( len < 256 ) then hash = nmhash32x_9to255 ( key , seed ) return end if hash = nmhash32x_avalanche32 ( nmhash32_long ( key , seed )) end function int8_nmhash32x #:for k1 in INT_KINDS pure module function ${ k1 }$_ nmhash32 ( key , seed ) result ( hash_code ) !! NMHASH32 hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32 ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ nmhash32 #:endfor elemental module function character_nmhash32 ( key , seed ) result ( hash_code ) !! NMHASH32 hash function for default character keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32 ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_nmhash32 #:for k1 in INT_KINDS pure module function ${ k1 }$_ nmhash32x ( key , seed ) result ( hash_code ) !! NMHASH32X hash function for rank 1 array keys of kind ${k1}$ integer ( ${ k1 }$ ), intent ( in ) :: key (:) integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32x ( transfer ( key , 0_int8 , & bytes_$ { k1 }$ * size ( key , kind = int64 ) ), seed ) end function ${ k1 }$_ nmhash32x #:endfor elemental module function character_nmhash32x ( key , seed ) result ( hash_code ) !! NMHASH32X hash function for default character keys character ( * ), intent ( in ) :: key integer ( int32 ), intent ( in ) :: seed integer ( int32 ) :: hash_code hash_code = int8_nmhash32x ( transfer ( key , 0_int8 , & bytes_char * len ( key , kind = int64 ) ), seed ) end function character_nmhash32x module subroutine new_nmhash32_seed ( seed ) ! Random SEED generator for NMHASH32 integer ( int32 ), intent ( inout ) :: seed integer ( int32 ) :: old_seed real ( dp ) :: sample old_seed = seed find_seed : do call random_number ( sample ) seed = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) if ( seed /= old_seed ) return end do find_seed end subroutine new_nmhash32_seed module subroutine new_nmhash32x_seed ( seed ) ! Random SEED generator for NMHASH32X integer ( int32 ), intent ( inout ) :: seed integer ( int32 ) :: old_seed real ( dp ) :: sample old_seed = seed find_seed : do call random_number ( sample ) seed = int ( floor ( sample * 2_int64 ** 32 , int64 ) - 2_int64 ** 31 , & int32 ) if ( seed /= old_seed ) return end do find_seed end subroutine new_nmhash32x_seed end submodule stdlib_hash_32bit_nm","tags":"","loc":"sourcefile/stdlib_hash_32bit_nm.fypp.html"},{"title":"stdlib_strings.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" !> This module implements basic string handling routines. !> !> The specification of this module is available [here](../page/specs/stdlib_strings.html). module stdlib_strings use stdlib_ascii , only : whitespace use stdlib_string_type , only : string_type , char , verify , repeat , len use stdlib_optval , only : optval use stdlib_kinds , only : sp , dp , xdp , qp , int8 , int16 , int32 , int64 , lk , c_bool implicit none private public :: to_string public :: strip , chomp public :: starts_with , ends_with public :: slice , find , replace_all , padl , padr , count , zfill !> Version: experimental !> !> Format or transfer other types as a string. !> ([Specification](../page/specs/stdlib_strings.html#to_string)) interface to_string # : set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES # : set IL_KINDS_TYPES = INT_KINDS_TYPES + LOG_KINDS_TYPES # : for k1 , t1 in RC_KINDS_TYPES pure module function to_string_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ), optional :: format character ( len = :), allocatable :: string end function to_string_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in IL_KINDS_TYPES pure module function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ ( value ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len = #{ if t1 [ 0 ] == \"l\" }# 1 ) #{ else }# :), allocatable #{ endif }# :: string end function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ pure module function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ) :: format character ( len = :), allocatable :: string end function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end interface to_string !> Remove leading and trailing whitespace characters. !> !> Version: experimental interface strip module procedure :: strip_string module procedure :: strip_char end interface strip !> Remove trailing characters in set from string. !> If no character set is provided trailing whitespace is removed. !> !> Version: experimental interface chomp module procedure :: chomp_string module procedure :: chomp_char module procedure :: chomp_set_string_char module procedure :: chomp_set_char_char module procedure :: chomp_substring_string_string module procedure :: chomp_substring_char_string module procedure :: chomp_substring_string_char module procedure :: chomp_substring_char_char end interface chomp !> Check whether a string starts with substring or not !> !> Version: experimental interface starts_with module procedure :: starts_with_string_string module procedure :: starts_with_string_char module procedure :: starts_with_char_string module procedure :: starts_with_char_char end interface starts_with !> Check whether a string ends with substring or not !> !> Version: experimental interface ends_with module procedure :: ends_with_string_string module procedure :: ends_with_string_char module procedure :: ends_with_char_string module procedure :: ends_with_char_char end interface ends_with !> Extracts characters from the input string to return a new string !> !> Version: experimental interface slice module procedure :: slice_string module procedure :: slice_char end interface slice !> Finds the starting index of substring 'pattern' in the input 'string' !> [Specifications](link to the specs - to be completed) !> !> Version: experimental interface find module procedure :: find_string_string module procedure :: find_string_char module procedure :: find_char_string module procedure :: find_char_char end interface find !> Replaces all the occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Version: experimental interface replace_all module procedure :: replace_all_string_string_string module procedure :: replace_all_string_string_char module procedure :: replace_all_string_char_string module procedure :: replace_all_char_string_string module procedure :: replace_all_string_char_char module procedure :: replace_all_char_string_char module procedure :: replace_all_char_char_string module procedure :: replace_all_char_char_char end interface replace_all !> Version: experimental !> !> Left pad the input string !> [Specifications](../page/specs/stdlib_strings.html#padl) interface padl module procedure :: padl_string_default module procedure :: padl_string_pad_with module procedure :: padl_char_default module procedure :: padl_char_pad_with end interface padl !> Version: experimental !> !> Right pad the input string !> [Specifications](../page/specs/stdlib_strings.html#padr) interface padr module procedure :: padr_string_default module procedure :: padr_string_pad_with module procedure :: padr_char_default module procedure :: padr_char_pad_with end interface padr !> Version: experimental !> !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> [Specifications](../page/specs/stdlib_strings.html#count) interface count module procedure :: count_string_string module procedure :: count_string_char module procedure :: count_char_string module procedure :: count_char_char end interface count !> Version: experimental !> !> Left pad the input string with zeros. !> [Specifications](../page/specs/stdlib_strings.html#zfill) interface zfill module procedure :: zfill_string module procedure :: zfill_char end interface zfill contains !> Remove leading and trailing whitespace characters. pure function strip_string ( string ) result ( stripped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: stripped_string stripped_string = strip ( char ( string )) end function strip_string !> Remove leading and trailing whitespace characters. pure function strip_char ( string ) result ( stripped_string ) character ( len =* ), intent ( in ) :: string character ( len = :), allocatable :: stripped_string integer :: first , last first = verify ( string , whitespace ) if ( first == 0 ) then stripped_string = \"\" else last = verify ( string , whitespace , back = . true .) stripped_string = string ( first : last ) end if end function strip_char !> Remove trailing characters in set from string. !> Default character set variant where trailing whitespace is removed. pure function chomp_string ( string ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string type ( string_type ) :: chomped_string integer :: last last = verify ( string , whitespace , back = . true .) chomped_string = char ( string , 1 , last ) end function chomp_string !> Remove trailing characters in set from string. !> Default character set variant where trailing whitespace is removed. pure function chomp_char ( string ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string character ( len = :), allocatable :: chomped_string integer :: last last = verify ( string , whitespace , back = . true .) chomped_string = string ( 1 : last ) end function chomp_char !> Remove trailing characters in set from string. pure function chomp_set_string_char ( string , set ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string character ( len = 1 ), intent ( in ) :: set (:) type ( string_type ) :: chomped_string chomped_string = chomp ( char ( string ), set ) end function chomp_set_string_char !> Remove trailing characters in set from string. pure function chomp_set_char_char ( string , set ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string character ( len = 1 ), intent ( in ) :: set (:) character ( len = :), allocatable :: chomped_string integer :: last last = verify ( string , set_to_string ( set ), back = . true .) chomped_string = string ( 1 : last ) end function chomp_set_char_char !> Remove trailing substrings from string. pure function chomp_substring_string_string ( string , substring ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring type ( string_type ) :: chomped_string chomped_string = chomp ( char ( string ), char ( substring )) end function chomp_substring_string_string !> Remove trailing substrings from string. pure function chomp_substring_string_char ( string , substring ) result ( chomped_string ) ! Avoid polluting the module scope and use the assignment only in this scope use stdlib_string_type , only : assignment ( = ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring type ( string_type ) :: chomped_string chomped_string = chomp ( char ( string ), substring ) end function chomp_substring_string_char !> Remove trailing substrings from string. pure function chomp_substring_char_string ( string , substring ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring character ( len = :), allocatable :: chomped_string chomped_string = chomp ( string , char ( substring )) end function chomp_substring_char_string !> Remove trailing substrings from string. pure function chomp_substring_char_char ( string , substring ) result ( chomped_string ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring character ( len = :), allocatable :: chomped_string integer :: last , nsub last = len ( string ) nsub = len ( substring ) if ( nsub > 0 ) then do while ( string ( last - nsub + 1 : last ) == substring ) last = last - nsub end do end if chomped_string = string ( 1 : last ) end function chomp_substring_char_char !> Implementation to transfer a set of characters to a string representing the set. !> !> This function is internal and not part of the public API. pure function set_to_string ( set ) result ( string ) character ( len = 1 ), intent ( in ) :: set (:) character ( len = size ( set )) :: string string = transfer ( set , string ) end function set_to_string !> Check whether a string starts with substring or not pure function starts_with_char_char ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match integer :: nsub nsub = len ( substring ) if ( len ( string ) < nsub ) then match = . false . return end if match = string ( 1 : nsub ) == substring end function starts_with_char_char !> Check whether a string starts with substring or not elemental function starts_with_string_char ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match match = starts_with ( char ( string ), substring ) end function starts_with_string_char !> Check whether a string starts with substring or not elemental function starts_with_char_string ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = starts_with ( string , char ( substring )) end function starts_with_char_string !> Check whether a string starts with substring or not elemental function starts_with_string_string ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = starts_with ( char ( string ), char ( substring )) end function starts_with_string_string !> Check whether a string ends with substring or not pure function ends_with_char_char ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match integer :: last , nsub last = len ( string ) nsub = len ( substring ) if ( last < nsub ) then match = . false . return end if match = string ( last - nsub + 1 : last ) == substring end function ends_with_char_char !> Check whether a string ends with substring or not elemental function ends_with_string_char ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: substring logical :: match match = ends_with ( char ( string ), substring ) end function ends_with_string_char !> Check whether a string ends with substring or not elemental function ends_with_char_string ( string , substring ) result ( match ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = ends_with ( string , char ( substring )) end function ends_with_char_string !> Check whether a string ends with substring or not elemental function ends_with_string_string ( string , substring ) result ( match ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: substring logical :: match match = ends_with ( char ( string ), char ( substring )) end function ends_with_string_string !> 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 elemental function slice_string ( string , first , last , stride ) result ( sliced_string ) type ( string_type ), intent ( in ) :: string integer , intent ( in ), optional :: first , last , stride type ( string_type ) :: sliced_string sliced_string = string_type ( slice ( char ( string ), first , last , stride )) end function slice_string !> 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 pure function slice_char ( string , first , last , stride ) result ( sliced_string ) character ( len =* ), intent ( in ) :: string integer , intent ( in ), optional :: first , last , stride integer :: first_index , last_index , stride_vector , strides_taken , length_string , i , j character ( len = :), allocatable :: sliced_string length_string = len ( string ) first_index = 0 ! first_index = -infinity last_index = length_string + 1 ! last_index = +infinity stride_vector = 1 if ( present ( stride )) then if ( stride /= 0 ) then if ( stride < 0 ) then first_index = length_string + 1 ! first_index = +infinity last_index = 0 ! last_index = -infinity end if stride_vector = stride end if else if ( present ( first ) . and . present ( last )) then if ( last < first ) then stride_vector = - 1 end if end if end if if ( present ( first )) then first_index = first end if if ( present ( last )) then last_index = last end if if ( stride_vector > 0 ) then first_index = max ( first_index , 1 ) last_index = min ( last_index , length_string ) else first_index = min ( first_index , length_string ) last_index = max ( last_index , 1 ) end if strides_taken = floor ( real ( last_index - first_index ) / real ( stride_vector ) ) allocate ( character ( len = max ( 0 , strides_taken + 1 )) :: sliced_string ) j = 1 do i = first_index , last_index , stride_vector sliced_string ( j : j ) = string ( i : i ) j = j + 1 end do end function slice_char !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_string_string ( string , pattern , occurrence , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: res res = find ( char ( string ), char ( pattern ), occurrence , consider_overlapping ) end function find_string_string !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_string_char ( string , pattern , occurrence , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: res res = find ( char ( string ), pattern , occurrence , consider_overlapping ) end function find_string_char !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_char_string ( string , pattern , occurrence , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: res res = find ( string , char ( pattern ), occurrence , consider_overlapping ) end function find_char_string !> Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' !> in input 'string' !> Returns an integer elemental function find_char_char ( string , pattern , occurrence , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern integer , intent ( in ), optional :: occurrence logical , intent ( in ), optional :: consider_overlapping integer :: lps_array ( len ( pattern )) integer :: res , s_i , p_i , length_string , length_pattern , occurrence_ occurrence_ = optval ( occurrence , 1 ) res = 0 length_string = len ( string ) length_pattern = len ( pattern ) if ( length_pattern > 0 . and . length_pattern <= length_string & & . and . occurrence_ > 0 ) then lps_array = compute_lps ( pattern ) s_i = 1 p_i = 1 do while ( s_i <= length_string ) if ( string ( s_i : s_i ) == pattern ( p_i : p_i )) then if ( p_i == length_pattern ) then occurrence_ = occurrence_ - 1 if ( occurrence_ == 0 ) then res = s_i - length_pattern + 1 exit else if ( optval ( consider_overlapping , . true .)) then p_i = lps_array ( p_i ) else p_i = 0 end if end if s_i = s_i + 1 p_i = p_i + 1 else if ( p_i > 1 ) then p_i = lps_array ( p_i - 1 ) + 1 else s_i = s_i + 1 end if end do end if end function find_char_char !> Computes longest prefix suffix for each index of the input 'string' !> !> Returns an array of integers pure function compute_lps ( string ) result ( lps_array ) character ( len =* ), intent ( in ) :: string integer :: lps_array ( len ( string )) integer :: i , j , length_string length_string = len ( string ) if ( length_string > 0 ) then lps_array ( 1 ) = 0 i = 2 j = 1 do while ( i <= length_string ) if ( string ( j : j ) == string ( i : i )) then lps_array ( i ) = j i = i + 1 j = j + 1 else if ( j > 1 ) then j = lps_array ( j - 1 ) + 1 else lps_array ( i ) = 0 i = i + 1 end if end do end if end function compute_lps !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_string_string ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), & & char ( pattern ), char ( replacement ))) end function replace_all_string_string_string !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_string_char ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), char ( pattern ), replacement )) end function replace_all_string_string_char !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_char_string ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), pattern , char ( replacement ))) end function replace_all_string_char_string !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_string_string ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement character ( len = :), allocatable :: res res = replace_all ( string , char ( pattern ), char ( replacement )) end function replace_all_char_string_string !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_string_char_char ( string , pattern , replacement ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement type ( string_type ) :: res res = string_type ( replace_all ( char ( string ), pattern , replacement )) end function replace_all_string_char_char !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_string_char ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement character ( len = :), allocatable :: res res = replace_all ( string , char ( pattern ), replacement ) end function replace_all_char_string_char !> Replaces all occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_char_string ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern type ( string_type ), intent ( in ) :: replacement character ( len = :), allocatable :: res res = replace_all ( string , pattern , char ( replacement )) end function replace_all_char_char_string !> Replaces all the occurrences of substring 'pattern' in the input 'string' !> with the replacement 'replacement' !> Returns a new string pure function replace_all_char_char_char ( string , pattern , replacement ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern character ( len =* ), intent ( in ) :: replacement character ( len = :), allocatable :: res integer :: lps_array ( len ( pattern )) integer :: s_i , p_i , last , length_string , length_pattern res = \"\" length_string = len ( string ) length_pattern = len ( pattern ) last = 1 if ( length_pattern > 0 . and . length_pattern <= length_string ) then lps_array = compute_lps ( pattern ) s_i = 1 p_i = 1 do while ( s_i <= length_string ) if ( string ( s_i : s_i ) == pattern ( p_i : p_i )) then if ( p_i == length_pattern ) then res = res // & & string ( last : s_i - length_pattern ) // & & replacement last = s_i + 1 p_i = 0 end if s_i = s_i + 1 p_i = p_i + 1 else if ( p_i > 1 ) then p_i = lps_array ( p_i - 1 ) + 1 else s_i = s_i + 1 end if end do end if res = res // string ( last : length_string ) end function replace_all_char_char_char !> Left pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padl_string_default ( string , output_length ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length type ( string_type ) :: res res = string_type ( padl ( char ( string ), output_length , \" \" )) end function padl_string_default !> Left pad the input string with the 'pad_with' character !> !> Returns a new string pure function padl_string_pad_with ( string , output_length , pad_with ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with type ( string_type ) :: res res = string_type ( padl ( char ( string ), output_length , pad_with )) end function padl_string_pad_with !> Left pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padl_char_default ( string , output_length ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: res res = padl ( string , output_length , \" \" ) end function padl_char_default !> Left pad the input string with the 'pad_with' character !> !> Returns a new string pure function padl_char_pad_with ( string , output_length , pad_with ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with character ( len = max ( len ( string ), output_length )) :: res integer :: string_length string_length = len ( string ) if ( string_length < output_length ) then res = repeat ( pad_with , output_length - string_length ) res ( output_length - string_length + 1 : output_length ) = string else res = string end if end function padl_char_pad_with !> Right pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padr_string_default ( string , output_length ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: char_output type ( string_type ) :: res ! We're taking advantage of `char_output` being longer than `string` and ! initialized with whitespaces. By casting `string` to a `character` ! type and back to `string_type`, we're effectively right-padding ! `string` with spaces, so we don't need to pad explicitly. char_output = char ( string ) res = string_type ( char_output ) end function padr_string_default !> Right pad the input string with the 'pad_with' character !> !> Returns a new string pure function padr_string_pad_with ( string , output_length , pad_with ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with type ( string_type ) :: res res = string_type ( padr ( char ( string ), output_length , pad_with )) end function padr_string_pad_with !> Right pad the input string with \" \" (1 whitespace) !> !> Returns a new string pure function padr_char_default ( string , output_length ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: res res = string end function padr_char_default !> Right pad the input string with the 'pad_with' character !> !> Returns a new string pure function padr_char_pad_with ( string , output_length , pad_with ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = 1 ), intent ( in ) :: pad_with character ( len = max ( len ( string ), output_length )) :: res integer :: string_length string_length = len ( string ) res = string if ( string_length < output_length ) then res ( string_length + 1 : output_length ) = & repeat ( pad_with , output_length - string_length ) end if end function padr_char_pad_with !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_string_string ( string , pattern , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: res res = count ( char ( string ), char ( pattern ), consider_overlapping ) end function count_string_string !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_string_char ( string , pattern , consider_overlapping ) result ( res ) type ( string_type ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: res res = count ( char ( string ), pattern , consider_overlapping ) end function count_string_char !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_char_string ( string , pattern , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string type ( string_type ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: res res = count ( string , char ( pattern ), consider_overlapping ) end function count_char_string !> Returns the number of times substring 'pattern' has appeared in the !> input string 'string' !> Returns an integer elemental function count_char_char ( string , pattern , consider_overlapping ) result ( res ) character ( len =* ), intent ( in ) :: string character ( len =* ), intent ( in ) :: pattern logical , intent ( in ), optional :: consider_overlapping integer :: lps_array ( len ( pattern )) integer :: res , s_i , p_i , length_string , length_pattern res = 0 length_string = len ( string ) length_pattern = len ( pattern ) if ( length_pattern > 0 . and . length_pattern <= length_string ) then lps_array = compute_lps ( pattern ) s_i = 1 p_i = 1 do while ( s_i <= length_string ) if ( string ( s_i : s_i ) == pattern ( p_i : p_i )) then if ( p_i == length_pattern ) then res = res + 1 if ( optval ( consider_overlapping , . true .)) then p_i = lps_array ( p_i ) else p_i = 0 end if end if s_i = s_i + 1 p_i = p_i + 1 else if ( p_i > 1 ) then p_i = lps_array ( p_i - 1 ) + 1 else s_i = s_i + 1 end if end do end if end function count_char_char !> Left pad the input string with zeros !> !> Returns a new string pure function zfill_string ( string , output_length ) result ( res ) type ( string_type ), intent ( in ) :: string integer , intent ( in ) :: output_length type ( string_type ) :: res res = string_type ( padl ( char ( string ), output_length , \"0\" )) end function zfill_string !> Left pad the input string with zeros !> !> Returns a new string pure function zfill_char ( string , output_length ) result ( res ) character ( len =* ), intent ( in ) :: string integer , intent ( in ) :: output_length character ( len = max ( len ( string ), output_length )) :: res res = padl ( string , output_length , \"0\" ) end function zfill_char end module stdlib_strings","tags":"","loc":"sourcefile/stdlib_strings.fypp.html"},{"title":"stdlib_quadrature_trapz.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_quadrature ) stdlib_quadrature_trapz use stdlib_error , only : check implicit none contains # : for KIND in REAL_KINDS pure module function trapz_dx_$ { KIND }$ ( y , dx ) result ( integral ) real ( ${ KIND }$ ), dimension (:), intent ( in ) :: y real ( ${ KIND }$ ), intent ( in ) :: dx real ( ${ KIND }$ ) :: integral integer :: n n = size ( y ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ KIND }$ case ( 2 ) integral = 0.5 _${ KIND }$ * dx * ( y ( 1 ) + y ( 2 )) case default integral = dx * ( sum ( y ( 2 : n - 1 )) + 0.5 _${ KIND }$ * ( y ( 1 ) + y ( n ))) end select end function trapz_dx_$ { KIND }$ # : endfor # : for KIND in REAL_KINDS module function trapz_x_$ { KIND }$ ( y , x ) result ( integral ) real ( ${ KIND }$ ), dimension (:), intent ( in ) :: y real ( ${ KIND }$ ), dimension (:), intent ( in ) :: x real ( ${ KIND }$ ) :: integral integer :: i integer :: n n = size ( y ) call check ( size ( x ) == n , \"trapz: Arguments `x` and `y` must be the same size.\" ) select case ( n ) case ( 0 : 1 ) integral = 0.0 _${ KIND }$ case ( 2 ) integral = 0.5 _${ KIND }$ * ( x ( 2 ) - x ( 1 )) * ( y ( 1 ) + y ( 2 )) case default integral = 0.0 _${ KIND }$ do i = 2 , n integral = integral + ( x ( i ) - x ( i - 1 )) * ( y ( i ) + y ( i - 1 )) end do integral = 0.5 _${ KIND }$ * integral end select end function trapz_x_$ { KIND }$ # : endfor # : for KIND in REAL_KINDS pure module function trapz_weights_$ { KIND }$ ( x ) result ( w ) real ( ${ KIND }$ ), dimension (:), intent ( in ) :: x real ( ${ KIND }$ ), dimension ( size ( x )) :: w integer :: i integer :: n n = size ( x ) select case ( n ) case ( 0 ) ! no action needed case ( 1 ) w ( 1 ) = 0.0 _${ KIND }$ case ( 2 ) w = 0.5 _${ KIND }$ * ( x ( 2 ) - x ( 1 )) case default w ( 1 ) = 0.5 _${ KIND }$ * ( x ( 2 ) - x ( 1 )) w ( n ) = 0.5 _${ KIND }$ * ( x ( n ) - x ( n - 1 )) do i = 2 , size ( x ) - 1 w ( i ) = 0.5 _${ KIND }$ * ( x ( i + 1 ) - x ( i - 1 )) end do end select end function trapz_weights_$ { KIND }$ #:endfor end submodule stdlib_quadrature_trapz","tags":"","loc":"sourcefile/stdlib_quadrature_trapz.fypp.html"},{"title":"stdlib_linalg_blas_d.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_d use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_dasum public :: stdlib_daxpy public :: stdlib_dcopy public :: stdlib_ddot public :: stdlib_dgbmv public :: stdlib_dgemm public :: stdlib_dgemv public :: stdlib_dger public :: stdlib_dnrm2 public :: stdlib_drot public :: stdlib_drotg public :: stdlib_drotm public :: stdlib_drotmg public :: stdlib_dsbmv public :: stdlib_dscal public :: stdlib_dsdot public :: stdlib_dspmv public :: stdlib_dspr public :: stdlib_dspr2 public :: stdlib_dswap public :: stdlib_dsymm public :: stdlib_dsymv public :: stdlib_dsyr public :: stdlib_dsyr2 public :: stdlib_dsyr2k public :: stdlib_dsyrk public :: stdlib_dtbmv public :: stdlib_dtbsv public :: stdlib_dtpmv public :: stdlib_dtpsv public :: stdlib_dtrmm public :: stdlib_dtrmv public :: stdlib_dtrsm public :: stdlib_dtrsv public :: stdlib_dzasum public :: stdlib_dznrm2 ! 64-bit real constants real ( dp ), parameter , private :: negone = - 1.00_dp real ( dp ), parameter , private :: zero = 0.00_dp real ( dp ), parameter , private :: half = 0.50_dp real ( dp ), parameter , private :: one = 1.00_dp real ( dp ), parameter , private :: two = 2.00_dp real ( dp ), parameter , private :: three = 3.00_dp real ( dp ), parameter , private :: four = 4.00_dp real ( dp ), parameter , private :: eight = 8.00_dp real ( dp ), parameter , private :: ten = 1 0.00_dp ! 64-bit complex constants complex ( dp ), parameter , private :: czero = ( 0.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: chalf = ( 0.5_dp , 0.0_dp ) complex ( dp ), parameter , private :: cone = ( 1.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: cnegone = ( - 1.0_dp , 0.0_dp ) ! 64-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( dp ), parameter , private :: rradix = real ( radix ( zero ), dp ) real ( dp ), parameter , private :: ulp = epsilon ( zero ) real ( dp ), parameter , private :: eps = ulp * half real ( dp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( dp ), parameter , private :: safmax = one / safmin real ( dp ), parameter , private :: smlnum = safmin / ulp real ( dp ), parameter , private :: bignum = safmax * ulp real ( dp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( dp ), parameter , private :: rtmax = sqrt ( bignum ) ! 64-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( dp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( dp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( dp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( dp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure real ( dp ) function stdlib_dasum ( n , dx , incx ) !! DASUM takes the sum of the absolute values. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: abs , mod stdlib_dasum = zero dtemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 6 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + abs ( dx ( i )) end do if ( n < 6 ) then stdlib_dasum = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 6 dtemp = dtemp + abs ( dx ( i )) + abs ( dx ( i + 1 )) + abs ( dx ( i + 2 )) + abs ( dx ( i + 3 )) + abs ( dx ( i + & 4 )) + abs ( dx ( i + 5 )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dtemp = dtemp + abs ( dx ( i )) end do end if stdlib_dasum = dtemp return end function stdlib_dasum pure subroutine stdlib_daxpy ( n , da , dx , incx , dy , incy ) !! DAXPY constant times a vector plus a vector. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( inout ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( da == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 4 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dy ( i ) + da * dx ( i ) end do end if if ( n < 4 ) return mp1 = m + 1 do i = mp1 , n , 4 dy ( i ) = dy ( i ) + da * dx ( i ) dy ( i + 1 ) = dy ( i + 1 ) + da * dx ( i + 1 ) dy ( i + 2 ) = dy ( i + 2 ) + da * dx ( i + 2 ) dy ( i + 3 ) = dy ( i + 3 ) + da * dx ( i + 3 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dy ( iy ) + da * dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_daxpy pure subroutine stdlib_dcopy ( n , dx , incx , dy , incy ) !! DCOPY copies a vector, x, to a vector, y. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ) real ( dp ), intent ( out ) :: dy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 7 ) if ( m /= 0 ) then do i = 1 , m dy ( i ) = dx ( i ) end do if ( n < 7 ) return end if mp1 = m + 1 do i = mp1 , n , 7 dy ( i ) = dx ( i ) dy ( i + 1 ) = dx ( i + 1 ) dy ( i + 2 ) = dx ( i + 2 ) dy ( i + 3 ) = dx ( i + 3 ) dy ( i + 4 ) = dx ( i + 4 ) dy ( i + 5 ) = dx ( i + 5 ) dy ( i + 6 ) = dx ( i + 6 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dy ( iy ) = dx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dcopy pure real ( dp ) function stdlib_ddot ( n , dx , incx , dy , incy ) !! DDOT forms the dot product of two vectors. !! uses unrolled loops for increments equal to one. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod stdlib_ddot = zero dtemp = zero if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dtemp = dtemp + dx ( i ) * dy ( i ) end do if ( n < 5 ) then stdlib_ddot = dtemp return end if end if mp1 = m + 1 do i = mp1 , n , 5 dtemp = dtemp + dx ( i ) * dy ( i ) + dx ( i + 1 ) * dy ( i + 1 ) + dx ( i + 2 ) * dy ( i + 2 ) + dx ( i + 3 ) * dy ( i + 3 ) + & dx ( i + 4 ) * dy ( i + 4 ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dtemp + dx ( ix ) * dy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_ddot = dtemp return end function stdlib_ddot pure subroutine stdlib_dgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! DGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the band part of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_dgbmv pure subroutine stdlib_dgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: nota , notb ! set nota and notb as true if a and b respectively are not ! transposed and set nrowa and nrowb as the number of rows of a ! and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . stdlib_lsame ( transa , 'C' )) . and .(. not . stdlib_lsame ( transa ,& 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . stdlib_lsame ( transb , 'C' )) . and .(. not . stdlib_lsame (& transb , 'T' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == zero ). or . ( k == 0 )). and . ( beta == one ))) & return ! and if alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == zero ) then do i = 1 , m c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = zero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dgemm pure subroutine stdlib_dgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! DGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , leny y ( i ) = zero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , leny y ( iy ) = zero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = zero do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = zero ix = kx do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_dgemv pure subroutine stdlib_dger ( m , n , alpha , x , incx , y , incy , a , lda ) !! DGER performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DGER ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == zero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= zero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_dger pure function stdlib_dnrm2 ( n , x , incx ) !! DNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DNRM2 := sqrt( x'*x ) real ( dp ) :: stdlib_dnrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dnrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( x ( ix )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dnrm2 = scl * sqrt ( sumsq ) return end function stdlib_dnrm2 pure subroutine stdlib_drot ( n , dx , incx , dy , incy , c , s ) !! DROT applies a plane rotation. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: c , s integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n dtemp = c * dx ( i ) + s * dy ( i ) dy ( i ) = c * dy ( i ) - s * dx ( i ) dx ( i ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = c * dx ( ix ) + s * dy ( iy ) dy ( iy ) = c * dy ( iy ) - s * dx ( ix ) dx ( ix ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_drot pure subroutine stdlib_drotg ( a , b , c , s ) !! The computation uses the formulas !! sigma = sgn(a) if |a| > |b| !! = sgn(b) if |b| >= |a| !! r = sigma*sqrt( a**2 + b**2 ) !! c = 1; s = 0 if r = 0 !! c = a/r; s = b/r if r != 0 !! The subroutine also computes !! z = s if |a| > |b|, !! = 1/c if |b| >= |a| and c != 0 !! = 1 if c = 0 !! This allows c and s to be reconstructed from z as follows: !! If z = 1, set c = 0, s = 1. !! If |z| < 1, set c = sqrt(1 - z**2) and s = z. !! If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2). ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( inout ) :: a , b real ( dp ), intent ( out ) :: c , s ! Local Scalars real ( dp ) :: anorm , bnorm , scl , sigma , r , z anorm = abs ( a ) bnorm = abs ( b ) if ( bnorm == zero ) then c = one s = zero b = zero else if ( anorm == zero ) then c = zero s = one a = b b = one else scl = min ( safmax , max ( safmin , anorm , bnorm ) ) if ( anorm > bnorm ) then sigma = sign ( one , a ) else sigma = sign ( one , b ) end if r = sigma * ( scl * sqrt (( a / scl ) ** 2 + ( b / scl ) ** 2 ) ) c = a / r s = b / r if ( anorm > bnorm ) then z = s else if ( c /= zero ) then z = one / c else z = one end if a = r b = z end if return end subroutine stdlib_drotg pure subroutine stdlib_drotm ( n , dx , incx , dy , incy , dparam ) !! DROTM applies the modified Givens transformation, H, to the 2-by-N matrix !! \\left[ \\begin{array}{c}DX^T\\\\DY^T\\\\ \\end{array} \\right], !! where ^T indicates transpose. The elements of DX are in !! DX(LX+I*INCX), I = 0:N-1, where LX = 1 if INCX >= 0, else LX = (-INCX)*N, !! and similarly for DY using LY and INCY. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! See DROTMG for a description of data storage in DPARAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( in ) :: dparam ( 5 ) real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , two , w , z , zero integer ( ilp ) :: i , kx , ky , nsteps ! Data Statements zero = 0.0_dp two = 2.0_dp dflag = dparam ( 1 ) if ( n <= 0 . or . ( dflag + two == zero )) return if ( incx == incy . and . incx > 0 ) then nsteps = n * incx if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z * dh12 dy ( i ) = w * dh21 + z * dh22 end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w + z * dh12 dy ( i ) = w * dh21 + z end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , nsteps , incx w = dx ( i ) z = dy ( i ) dx ( i ) = w * dh11 + z dy ( i ) = - w + dh22 * z end do end if else kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy if ( dflag < zero ) then dh11 = dparam ( 2 ) dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z * dh12 dy ( ky ) = w * dh21 + z * dh22 kx = kx + incx ky = ky + incy end do else if ( dflag == zero ) then dh12 = dparam ( 4 ) dh21 = dparam ( 3 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w + z * dh12 dy ( ky ) = w * dh21 + z kx = kx + incx ky = ky + incy end do else dh11 = dparam ( 2 ) dh22 = dparam ( 5 ) do i = 1 , n w = dx ( kx ) z = dy ( ky ) dx ( kx ) = w * dh11 + z dy ( ky ) = - w + dh22 * z kx = kx + incx ky = ky + incy end do end if end if return end subroutine stdlib_drotm pure subroutine stdlib_drotmg ( dd1 , dd2 , dx1 , dy1 , dparam ) !! DROTMG Constructs the modified Givens transformation matrix H which zeros the !! second component of the 2-vector !! \\left[ {\\sqrt{DD_1}\\cdot DX_1,\\sqrt{DD_2}\\cdot DY_2} \\right]^T. !! With DPARAM(1)=DFLAG, H has one of the following forms: !! H=\\underbrace{\\begin{bmatrix}DH_{11} & DH_{12}\\\\DH_{21} & DH_{22}\\end{bmatrix}}_{DFLAG=-1}, !! \\underbrace{\\begin{bmatrix}1 & DH_{12}\\\\DH_{21} & 1\\end{bmatrix}}_{DFLAG=0}, !! \\underbrace{\\begin{bmatrix}DH_{11} & 1\\\\-1 & DH_{22}\\end{bmatrix}}_{DFLAG=1}, !! \\underbrace{\\begin{bmatrix}1 & 0\\\\0 & 1\\end{bmatrix}}_{DFLAG=-2}. !! Locations 2-4 of DPARAM contain DH11, DH21, DH12 and DH22 respectively. !! (Values of 1.0, -1.0, or 0.0 implied by the value of DPARAM(1) are not stored in DPARAM.) !! The values of parameters GAMSQ and RGAMSQ may be inexact. This is OK as they are only !! used for testing the size of DD1 and DD2. All actual scaling of data is done using GAM. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( inout ) :: dd1 , dd2 , dx1 real ( dp ), intent ( in ) :: dy1 ! Array Arguments real ( dp ), intent ( out ) :: dparam ( 5 ) ! ===================================================================== ! Local Scalars real ( dp ) :: dflag , dh11 , dh12 , dh21 , dh22 , dp1 , dp2 , dq1 , dq2 , dtemp , du , gam , gamsq , & one , rgamsq , two , zero ! Intrinsic Functions intrinsic :: abs ! Data Statements zero = 0.0_dp one = 1.0_dp two = 2.0_dp gam = 409 6.0_dp gamsq = 1677721 6.0_dp rgamsq = 5.9604645e-8_dp if ( dd1 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else ! case-dd1-nonnegative dp2 = dd2 * dy1 if ( dp2 == zero ) then dflag = - two dparam ( 1 ) = dflag return end if ! regular-case.. dp1 = dd1 * dx1 dq2 = dp2 * dy1 dq1 = dp1 * dx1 if ( abs ( dq1 ) > abs ( dq2 )) then dh21 = - dy1 / dx1 dh12 = dp2 / dp1 du = one - dh12 * dh21 if ( du > zero ) then dflag = zero dd1 = dd1 / du dd2 = dd2 / du dx1 = dx1 * du else ! this code path if here for safety. we do not expect this ! condition to ever hold except in edge cases with rounding ! errors. see doi: 10.1145/355841.355847 dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero end if else if ( dq2 < zero ) then ! go zero-h-d-and-dx1.. dflag = - one dh11 = zero dh12 = zero dh21 = zero dh22 = zero dd1 = zero dd2 = zero dx1 = zero else dflag = one dh11 = dp1 / dp2 dh22 = dx1 / dy1 du = one + dh11 * dh22 dtemp = dd2 / du dd2 = dd1 / du dd1 = dtemp dx1 = dy1 * du end if end if ! procedure..scale-check if ( dd1 /= zero ) then do while (( dd1 <= rgamsq ) . or . ( dd1 >= gamsq )) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( dd1 <= rgamsq ) then dd1 = dd1 * gam ** 2 dx1 = dx1 / gam dh11 = dh11 / gam dh12 = dh12 / gam else dd1 = dd1 / gam ** 2 dx1 = dx1 * gam dh11 = dh11 * gam dh12 = dh12 * gam end if enddo end if if ( dd2 /= zero ) then do while ( ( abs ( dd2 ) <= rgamsq ) . or . ( abs ( dd2 ) >= gamsq ) ) if ( dflag == zero ) then dh11 = one dh22 = one dflag = - one else dh21 = - one dh12 = one dflag = - one end if if ( abs ( dd2 ) <= rgamsq ) then dd2 = dd2 * gam ** 2 dh21 = dh21 / gam dh22 = dh22 / gam else dd2 = dd2 / gam ** 2 dh21 = dh21 * gam dh22 = dh22 * gam end if end do end if end if if ( dflag < zero ) then dparam ( 2 ) = dh11 dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 dparam ( 5 ) = dh22 else if ( dflag == zero ) then dparam ( 3 ) = dh21 dparam ( 4 ) = dh12 else dparam ( 2 ) = dh11 dparam ( 5 ) = dh22 end if dparam ( 1 ) = dflag return end subroutine stdlib_drotmg pure subroutine stdlib_dsbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! DSBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with one pass through a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( kplus1 , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( kplus1 , j ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( 1 , j ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( 1 , j ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + a ( l + i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsbmv pure subroutine stdlib_dscal ( n , da , dx , incx ) !! DSCAL scales a vector by a constant. !! uses unrolled loops for increment equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , m , mp1 , nincx ! Intrinsic Functions intrinsic :: mod if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 ! clean-up loop m = mod ( n , 5 ) if ( m /= 0 ) then do i = 1 , m dx ( i ) = da * dx ( i ) end do if ( n < 5 ) return end if mp1 = m + 1 do i = mp1 , n , 5 dx ( i ) = da * dx ( i ) dx ( i + 1 ) = da * dx ( i + 1 ) dx ( i + 2 ) = da * dx ( i + 2 ) dx ( i + 3 ) = da * dx ( i + 3 ) dx ( i + 4 ) = da * dx ( i + 4 ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx dx ( i ) = da * dx ( i ) end do end if return end subroutine stdlib_dscal pure real ( dp ) function stdlib_dsdot ( n , sx , incx , sy , incy ) !! Compute the inner product of two vectors with extended !! precision accumulation and result. !! Returns D.P. dot product accumulated in D.P., for S.P. SX and SY !! DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), !! where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is !! defined in a similar way using INCY. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( sp ), intent ( in ) :: sx ( * ), sy ( * ) ! authors: ! ======== ! lawson, c. l., (jpl), hanson, r. j., (snla), ! kincaid, d. r., (u. of texas), krogh, f. t., (jpl) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , kx , ky , ns ! Intrinsic Functions intrinsic :: real stdlib_dsdot = zero if ( n <= 0 ) return if ( incx == incy . and . incx > 0 ) then ! code for equal, positive, non-unit increments. ns = n * incx do i = 1 , ns , incx stdlib_dsdot = stdlib_dsdot + real ( sx ( i ), KIND = dp ) * real ( sy ( i ), KIND = dp ) end do else ! code for unequal or nonpositive increments. kx = 1 ky = 1 if ( incx < 0 ) kx = 1 + ( 1 - n ) * incx if ( incy < 0 ) ky = 1 + ( 1 - n ) * incy do i = 1 , n stdlib_dsdot = stdlib_dsdot + real ( sx ( kx ), KIND = dp ) * real ( sy ( ky ), KIND = dp ) kx = kx + incx ky = ky + incy end do end if return end function stdlib_dsdot pure subroutine stdlib_dspmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! DSPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * ap ( kk + j - 1 ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * ap ( kk ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * ap ( kk ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + ap ( k ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_dspmv pure subroutine stdlib_dspr ( uplo , n , alpha , x , incx , ap ) !! DSPR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr pure subroutine stdlib_dspr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! DSPR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n symmetric matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: ap ( * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with one pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = 1 , j ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do k = kk , kk + j - 1 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) k = kk do i = j , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do k = kk , kk + n - j ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_dspr2 pure subroutine stdlib_dswap ( n , dx , incx , dy , incy ) !! DSWAP interchanges two vectors. !! uses unrolled loops for increments equal to 1. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments real ( dp ), intent ( inout ) :: dx ( * ), dy ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: dtemp integer ( ilp ) :: i , ix , iy , m , mp1 ! Intrinsic Functions intrinsic :: mod if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 ! clean-up loop m = mod ( n , 3 ) if ( m /= 0 ) then do i = 1 , m dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp end do if ( n < 3 ) return end if mp1 = m + 1 do i = mp1 , n , 3 dtemp = dx ( i ) dx ( i ) = dy ( i ) dy ( i ) = dtemp dtemp = dx ( i + 1 ) dx ( i + 1 ) = dy ( i + 1 ) dy ( i + 1 ) = dtemp dtemp = dx ( i + 2 ) dx ( i + 2 ) = dy ( i + 2 ) dy ( i + 2 ) = dtemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n dtemp = dx ( ix ) dx ( ix ) = dy ( iy ) dy ( iy ) = dtemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_dswap pure subroutine stdlib_dsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == zero ). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( beta == zero ) then do j = 1 , n do i = 1 , m c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = zero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = zero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == zero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == zero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_dsymm pure subroutine stdlib_dsymv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! DSYMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) real ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == zero ). and . ( beta == one ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= one ) then if ( incy == 1 ) then if ( beta == zero ) then do i = 1 , n y ( i ) = zero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == zero ) then do i = 1 , n y ( iy ) = zero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == zero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + temp1 * a ( j , j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * a ( j , j ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = zero y ( j ) = y ( j ) + temp1 * a ( j , j ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = zero y ( jy ) = y ( jy ) + temp1 * a ( j , j ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + a ( i , j ) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsymv pure subroutine stdlib_dsyr ( uplo , n , alpha , x , incx , a , lda ) !! DSYR performs the symmetric rank 1 operation !! A := alpha*x*x**T + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = kx do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = alpha * x ( jx ) ix = jx do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jx = jx + incx end do end if end if return end subroutine stdlib_dsyr pure subroutine stdlib_dsyr2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! DSYR2 performs the symmetric rank 2 operation !! A := alpha*x*y**T + alpha*y*x**T + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n symmetric matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments real ( dp ), intent ( inout ) :: a ( lda , * ) real ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == zero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = 1 , j a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = kx iy = ky do i = 1 , j a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= zero ) . or . ( y ( j ) /= zero )) then temp1 = alpha * y ( j ) temp2 = alpha * x ( j ) do i = j , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do end if end do else do j = 1 , n if (( x ( jx ) /= zero ) . or . ( y ( jy ) /= zero )) then temp1 = alpha * y ( jy ) temp2 = alpha * x ( jx ) ix = jx iy = jy do i = j , n a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_dsyr2 pure subroutine stdlib_dsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! DSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= zero ) . or . ( b ( j , l ) /= zero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = zero temp2 = zero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_dsyr2k pure subroutine stdlib_dsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! DSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' )) . and .(& . not . stdlib_lsame ( trans , 'C' ))) then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= zero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = zero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_dsyrk pure subroutine stdlib_dtbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtbmv pure subroutine stdlib_dtbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! DTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= zero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= zero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t)*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_dtbsv pure subroutine stdlib_dtpmv ( uplo , trans , diag , n , ap , x , incx ) !! DTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk - 1 do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * ap ( kk ) k = kk + 1 do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpmv pure subroutine stdlib_dtpsv ( uplo , trans , diag , n , ap , x , incx ) !! DTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: ap ( * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: nounit ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with one pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_dtpsv pure subroutine stdlib_dtrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ), !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= zero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t. if ( upper ) then do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do else do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = alpha * a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) temp = temp * a ( k , k ) if ( temp /= one ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrmm pure subroutine stdlib_dtrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_dtrmv pure subroutine stdlib_dtrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! DTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.zero. if ( alpha == zero ) then do j = 1 , n do i = 1 , m b ( i , j ) = zero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= zero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= one ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= zero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = one / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ). if ( upper ) then do k = n , 1 , - 1 if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do else do k = 1 , n if ( nounit ) then temp = one / a ( k , k ) do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= zero ) then temp = a ( j , k ) do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= one ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do end if end if end if return end subroutine stdlib_dtrsm pure subroutine stdlib_dtrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! DTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments real ( dp ), intent ( in ) :: a ( lda , * ) real ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: nounit ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'DTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with one pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= zero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= zero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_dtrsv pure real ( dp ) function stdlib_dzasum ( n , zx , incx ) !! DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and !! returns a double precision result. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) ! ===================================================================== ! Local Scalars real ( dp ) :: stemp integer ( ilp ) :: i , nincx stdlib_dzasum = zero stemp = zero if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx stemp = stemp + stdlib_dcabs1 ( zx ( i )) end do end if stdlib_dzasum = stemp return end function stdlib_dzasum pure function stdlib_dznrm2 ( n , x , incx ) !! DZNRM2 returns the euclidean norm of a vector via the function !! name, so that !! DZNRM2 := sqrt( x**H*x ) real ( dp ) :: stdlib_dznrm2 ! -- reference blas level1 routine (version 3.9.1_dp) -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! march 2021 ! Constants integer , parameter :: wp = kind ( 1._dp ) real ( dp ), parameter :: maxn = huge ( 0.0_dp ) ! .. blue's scaling constants .. ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( in ) :: x ( * ) ! Local Scalars integer ( ilp ) :: i , ix logical ( lk ) :: notbig real ( dp ) :: abig , amed , asml , ax , scl , sumsq , ymax , ymin ! quick return if possible stdlib_dznrm2 = zero if ( n <= 0 ) return scl = one sumsq = zero ! compute the sum of squares in 3 accumulators: ! abig -- sums of squares scaled down to avoid overflow ! asml -- sums of squares scaled up to avoid underflow ! amed -- sums of squares that do not require scaling ! the thresholds and multipliers are ! tbig -- values bigger than this are scaled down by sbig ! tsml -- values smaller than this are scaled up by ssml notbig = . true . asml = zero amed = zero abig = zero ix = 1 if ( incx < 0 ) ix = 1 - ( n - 1 ) * incx do i = 1 , n ax = abs ( real ( x ( ix ), KIND = dp )) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ax = abs ( aimag ( x ( ix ))) if ( ax > tbig ) then abig = abig + ( ax * sbig ) ** 2 notbig = . false . else if ( ax < tsml ) then if ( notbig ) asml = asml + ( ax * ssml ) ** 2 else amed = amed + ax ** 2 end if ix = ix + incx end do ! combine abig and amed or amed and asml if more than one ! accumulator was used. if ( abig > zero ) then ! combine abig and amed if abig > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then abig = abig + ( amed * sbig ) * sbig end if scl = one / sbig sumsq = abig else if ( asml > zero ) then ! combine amed and asml if asml > 0. if ( ( amed > zero ) . or . ( amed > maxn ) . or . ( amed /= amed ) ) then amed = sqrt ( amed ) asml = sqrt ( asml ) / ssml if ( asml > amed ) then ymin = amed ymax = asml else ymin = asml ymax = amed end if scl = one sumsq = ymax ** 2 * ( one + ( ymin / ymax ) ** 2 ) else scl = one / ssml sumsq = asml end if else ! otherwise all values are mid-range scl = one sumsq = amed end if stdlib_dznrm2 = scl * sqrt ( sumsq ) return end function stdlib_dznrm2 end module stdlib_linalg_blas_d","tags":"","loc":"sourcefile/stdlib_linalg_blas_d.fypp.html"},{"title":"stdlib_ansi_to_string.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Implementation of the conversion to enumerator and identifier types to strings submodule ( stdlib_ansi ) stdlib_ansi_to_string implicit none character , parameter :: esc = achar ( 27 ), chars ( 0 : 9 ) = & [ \"0\" , \"1\" , \"2\" , \"3\" , \"4\" , \"5\" , \"6\" , \"7\" , \"8\" , \"9\" ] contains !> Transform a color code into an actual ANSI escape sequence pure module function to_string_ansi_code ( code ) result ( str ) !> Color code to be used type ( ansi_code ), intent ( in ) :: code !> ANSI escape sequence representing the color code character ( len = :), allocatable :: str if ( anycolor ( code )) then str = esc // \"[0\" ! Always reset the style if ( code % style > 0 . and . code % style < 10 ) str = str // \";\" // chars ( code % style ) if ( code % fg >= 0 . and . code % fg < 10 ) str = str // \";3\" // chars ( code % fg ) if ( code % bg >= 0 . and . code % bg < 10 ) str = str // \";4\" // chars ( code % bg ) str = str // \"m\" else str = \"\" end if end function to_string_ansi_code !> Check whether the code describes any color / style or is just a stub pure function anycolor ( code ) !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Any color / style is active logical :: anycolor anycolor = code % fg >= 0 . or . code % bg >= 0 . or . code % style >= 0 end function anycolor end submodule stdlib_ansi_to_string","tags":"","loc":"sourcefile/stdlib_ansi_to_string.f90.html"},{"title":"stdlib_string_type_constructor.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_string_type ) stdlib_string_type_constructor use stdlib_strings , only : to_string contains !> Constructor for new string instances from a scalar character value. elemental module function new_string ( string ) result ( new ) character ( len =* ), intent ( in ), optional :: string type ( string_type ) :: new if ( present ( string )) then new % raw = string end if end function new_string # : for kind in INT_KINDS !> Constructor for new string instances from an integer of kind ${kind}$. elemental module function new_string_from_integer_$ { kind }$ ( val ) result ( new ) integer ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new new % raw = to_string ( val ) end function new_string_from_integer_$ { kind }$ # : endfor # : for kind in LOG_KINDS !> Constructor for new string instances from a logical of kind ${kind}$. elemental module function new_string_from_logical_$ { kind }$ ( val ) result ( new ) logical ( ${ kind }$ ), intent ( in ) :: val type ( string_type ) :: new new % raw = to_string ( val ) end function new_string_from_logical_$ { kind }$ # : endfor end submodule stdlib_string_type_constructor","tags":"","loc":"sourcefile/stdlib_string_type_constructor.fypp.html"},{"title":"stdlib_ansi_operator.f90 – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT !> Implementation of the conversion to enumerator and identifier types to strings submodule ( stdlib_ansi ) stdlib_ansi_operator use stdlib_string_type , only : operator ( // ) implicit none contains !> Add two escape sequences, attributes in the right value override the left value ones. pure module function add ( lval , rval ) result ( code ) !> First escape code type ( ansi_code ), intent ( in ) :: lval !> Second escape code type ( ansi_code ), intent ( in ) :: rval !> Combined escape code type ( ansi_code ) :: code code % style = merge ( rval % style , lval % style , rval % style >= 0 ) code % fg = merge ( rval % fg , lval % fg , rval % fg >= 0 ) code % bg = merge ( rval % bg , lval % bg , rval % bg >= 0 ) end function add !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left ( lval , code ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str str = lval // to_string ( code ) end function concat_left !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right ( code , rval ) result ( str ) !> String to add the escape code to character ( len =* ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string character ( len = :), allocatable :: str str = to_string ( code ) // rval end function concat_right !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_left_str ( lval , code ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: lval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str str = lval // to_string ( code ) end function concat_left_str !> Concatenate an escape code with a string and turn it into an actual escape sequence pure module function concat_right_str ( code , rval ) result ( str ) !> String to add the escape code to type ( string_type ), intent ( in ) :: rval !> Escape sequence type ( ansi_code ), intent ( in ) :: code !> Concatenated string type ( string_type ) :: str str = to_string ( code ) // rval end function concat_right_str end submodule stdlib_ansi_operator","tags":"","loc":"sourcefile/stdlib_ansi_operator.f90.html"},{"title":"stdlib_linalg.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES #:set RCI_KINDS_TYPES = RC_KINDS_TYPES + INT_KINDS_TYPES #:set RHS_SUFFIX = [\"one\",\"many\"] #:set RHS_SYMBOL = [ranksuffix(r) for r in [1,2]] #:set RHS_EMPTY = [emptyranksuffix(r) for r in [1,2]] #:set ALL_RHS = list(zip(RHS_SYMBOL,RHS_SUFFIX,RHS_EMPTY)) module stdlib_linalg !!Provides a support for various linear algebra procedures !! ([Specification](../page/specs/stdlib_linalg.html)) use stdlib_kinds , only : xdp , int8 , int16 , int32 , int64 use stdlib_linalg_constants , only : sp , dp , qp , lk , ilp use stdlib_error , only : error_stop use stdlib_optval , only : optval use stdlib_linalg_state , only : linalg_state_type , linalg_error_handling implicit none private public :: det public :: operator (. det .) public :: diag public :: eye public :: lstsq public :: lstsq_space public :: solve public :: solve_lu public :: solve_lstsq public :: trace public :: svd public :: svdvals public :: outer_product public :: kronecker_product public :: cross_product public :: is_square public :: is_diagonal public :: is_symmetric public :: is_skew_symmetric public :: is_hermitian public :: is_triangular public :: is_hessenberg ! Export linalg error handling public :: linalg_state_type , linalg_error_handling interface diag !! version: experimental !! !! Creates a diagonal array or extract the diagonal elements of an array !! ([Specification](../page/specs/stdlib_linalg.html# !! diag-create-a-diagonal-array-or-extract-the-diagonal-elements-of-an-array)) ! ! Vector to matrix ! # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$ ( v ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) ${ t1 }$ :: res ( size ( v ), size ( v )) end function diag_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ k ( v , k ) result ( res ) ${ t1 }$ , intent ( in ) :: v (:) integer , intent ( in ) :: k ${ t1 }$ :: res ( size ( v ) + abs ( k ), size ( v ) + abs ( k )) end function diag_$ { t1 [ 0 ] }{ k1 }$_ k # : endfor ! ! Matrix to vector ! # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) ${ t1 }$ :: res ( minval ( shape ( A ))) end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat # : endfor # : for k1 , t1 in RCI_KINDS_TYPES module function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k ( A , k ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) integer , intent ( in ) :: k ${ t1 }$ :: res ( minval ( shape ( A )) - abs ( k )) end function diag_$ { t1 [ 0 ] }{ k1 }$_ mat_k # : endfor end interface ! Matrix trace interface trace !! version: experimental !! !! Computes the trace of a matrix !! ([Specification](../page/specs/stdlib_linalg.html# !! trace-trace-of-a-matrix)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure trace_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface ! Outer product (of two vectors) interface outer_product !! version: experimental !! !! Computes the outer product of two vectors, returning a rank-2 array !! ([Specification](../page/specs/stdlib_linalg.html# !! outer_product-computes-the-outer-product-of-two-vectors)) # : for k1 , t1 in RCI_KINDS_TYPES pure module function outer_product_$ { t1 [ 0 ] }{ k1 }$ ( u , v ) result ( res ) ${ t1 }$ , intent ( in ) :: u (:), v (:) ${ t1 }$ :: res ( size ( u ), size ( v )) end function outer_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface outer_product interface kronecker_product !! version: experimental !! !! Computes the Kronecker product of two arrays of size M1xN1, and of M2xN2, returning an (M1*M2)x(N1*N2) array !! ([Specification](../page/specs/stdlib_linalg.html# !! kronecker_product-computes-the-kronecker-product-of-two-matrices)) # : for k1 , t1 in RCI_KINDS_TYPES pure module function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ ( A , B ) result ( C ) ${ t1 }$ , intent ( in ) :: A (:,:), B (:,:) ${ t1 }$ :: C ( size ( A , dim = 1 ) * size ( B , dim = 1 ), size ( A , dim = 2 ) * size ( B , dim = 2 )) end function kronecker_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface kronecker_product ! Cross product (of two vectors) interface cross_product !! version: experimental !! !! Computes the cross product of two vectors, returning a rank-1 and size-3 array !! ([Specification](../page/specs/stdlib_linalg.html#cross_product-computes-the-cross-product-of-two-3-d-vectors)) # : for k1 , t1 in RCI_KINDS_TYPES pure module function cross_product_$ { t1 [ 0 ] }{ k1 }$ ( a , b ) result ( res ) ${ t1 }$ , intent ( in ) :: a ( 3 ), b ( 3 ) ${ t1 }$ :: res ( 3 ) end function cross_product_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cross_product ! Check for squareness interface is_square !! version: experimental !! !! Checks if a matrix (rank-2 array) is square !! ([Specification](../page/specs/stdlib_linalg.html# !! is_square-checks-if-a-matrix-is-square)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_square_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_square ! Check for diagonality interface is_diagonal !! version: experimental !! !! Checks if a matrix (rank-2 array) is diagonal !! ([Specification](../page/specs/stdlib_linalg.html# !! is_diagonal-checks-if-a-matrix-is-diagonal)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_diagonal_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_diagonal ! Check for symmetry interface is_symmetric !! version: experimental !! !! Checks if a matrix (rank-2 array) is symmetric !! ([Specification](../page/specs/stdlib_linalg.html# !! is_symmetric-checks-if-a-matrix-is-symmetric)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_symmetric ! Check for skew-symmetry interface is_skew_symmetric !! version: experimental !! !! Checks if a matrix (rank-2 array) is skew-symmetric !! ([Specification](../page/specs/stdlib_linalg.html# !! is_skew_symmetric-checks-if-a-matrix-is-skew-symmetric)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_skew_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_skew_symmetric ! Check for Hermiticity interface is_hermitian !! version: experimental !! !! Checks if a matrix (rank-2 array) is Hermitian !! ([Specification](../page/specs/stdlib_linalg.html# !! is_hermitian-checks-if-a-matrix-is-hermitian)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_hermitian_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_hermitian ! Check for triangularity interface is_triangular !! version: experimental !! !! Checks if a matrix (rank-2 array) is triangular !! ([Specification](../page/specs/stdlib_linalg.html# !! is_triangular-checks-if-a-matrix-is-triangular)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_triangular_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_triangular ! Check for matrix being Hessenberg interface is_hessenberg !! version: experimental !! !! Checks if a matrix (rank-2 array) is Hessenberg !! ([Specification](../page/specs/stdlib_linalg.html# !! is_hessenberg-checks-if-a-matrix-is-hessenberg)) # : for k1 , t1 in RCI_KINDS_TYPES module procedure is_Hessenberg_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface is_hessenberg ! Solve linear system system Ax=b. interface solve !! version: experimental !! !! Solves the linear system A \\cdot x = b for the unknown vector x from a square matrix A . !! ([Specification](../page/specs/stdlib_linalg.html#solve-solves-a-linear-matrix-equation-or-a-linear-system-of-equations)) !! !!### Summary !! Interface for solving a linear system arising from a general matrix. !! !!### Description !! !! This interface provides methods for computing the solution of a linear matrix system. !! Supported data types include `real` and `complex`. No assumption is made on the matrix !! structure. !! The function can solve simultaneously either one (from a 1-d right-hand-side vector `b(:)`) !! or several (from a 2-d right-hand-side vector `b(:,:)`) systems. !! !!@note The solution is based on LAPACK's generic LU decomposition based solvers `*GESV`. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ ( a , b , overwrite_a , err ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ end function stdlib_linalg_$ { ri }$_ solve_$ { ndsuf }$ pure module function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ ( a , b ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ end function stdlib_linalg_$ { ri }$_ pure_solve_$ { ndsuf }$ # : endif # : endfor # : endfor end interface solve ! Solve linear system Ax = b using LU decomposition (subroutine interface). interface solve_lu !! version: experimental !! !! Solves the linear system A \\cdot x = b for the unknown vector x from a square matrix A . !! ([Specification](../page/specs/stdlib_linalg.html#solve-lu-solves-a-linear-matrix-equation-or-a-linear-system-of-equations-subroutine-interface)) !! !!### Summary !! Subroutine interface for solving a linear system using LU decomposition. !! !!### Description !! !! This interface provides methods for computing the solution of a linear matrix system using !! a subroutine. Supported data types include `real` and `complex`. No assumption is made on the matrix !! structure. Preallocated space for the solution vector `x` is user-provided, and it may be provided !! for the array of pivot indices, `pivot`. If all pre-allocated work spaces are provided, no internal !! memory allocations take place when using this interface. !! The function can solve simultaneously either one (from a 1-d right-hand-side vector `b(:)`) !! or several (from a 2-d right-hand-side vector `b(:,:)`) systems. !! !!@note The solution is based on LAPACK's generic LU decomposition based solvers `*GESV`. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" pure module subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ ( a , b , x , pivot , overwrite_a , err ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] Storage array for the diagonal pivot indices integer ( ilp ), optional , intent ( inout ), target :: pivot (:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err end subroutine stdlib_linalg_$ { ri }$_ solve_lu_$ { ndsuf }$ # : endif # : endfor # : endfor end interface solve_lu ! Least squares solution to system Ax=b, i.e. such that the 2-norm abs(b-Ax) is minimized. interface lstsq !! version: experimental !! !! Computes the squares solution to system A \\cdot x = b . !! ([Specification](../page/specs/stdlib_linalg.html#lstsq-computes-the-least-squares-solution-to-a-linear-matrix-equation)) !! !!### Summary !! Interface for computing least squares, i.e. the 2-norm || (b-A \\cdot x ||_2 minimizing solution. !! !!### Description !! !! This interface provides methods for computing the least squares of a linear matrix system. !! Supported data types include `real` and `complex`. !! !!@note The solution is based on LAPACK's singular value decomposition `*GELSD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ ( a , b , cond , overwrite_a , rank , err ) result ( x ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , allocatable , target :: x$ { nd }$ end function stdlib_linalg_$ { ri }$_ lstsq_$ { ndsuf }$ # : endif # : endfor # : endfor end interface lstsq ! Least squares solution to system Ax=b, i.e. such that the 2-norm abs(b-Ax) is minimized. interface solve_lstsq !! version: experimental !! !! Computes the squares solution to system A \\cdot x = b . !! ([Specification](../page/specs/stdlib_linalg.html#solve-lstsq-compute-the-least-squares-solution-to-a-linear-matrix-equation-subroutine-interface)) !! !!### Summary !! Subroutine interface for computing least squares, i.e. the 2-norm || (b-A \\cdot x ||_2 minimizing solution. !! !!### Description !! !! This interface provides methods for computing the least squares of a linear matrix system using !! a subroutine. Supported data types include `real` and `complex`. If pre-allocated work spaces !! are provided, no internal memory allocations take place when using this interface. !! !!@note The solution is based on LAPACK's singular value decomposition `*GELSD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ ( a , b , x , real_storage , int_storage ,& #{ if rt . startswith ( 'c' ) }# cmpl_storage , #{ endif }# cond , singvals , overwrite_a , rank , err ) !> Input matrix a[n,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Result array/matrix x[n] or x[n,nrhs] ${ rt }$ , intent ( inout ), contiguous , target :: x$ { nd }$ !> [optional] real working storage space real ( ${ rk }$ ), optional , intent ( inout ), target :: real_storage (:) !> [optional] integer working storage space integer ( ilp ), optional , intent ( inout ), target :: int_storage (:) # : if rt . startswith ( 'complex' ) !> [optional] complex working storage space ${ rt }$ , optional , intent ( inout ), target :: cmpl_storage (:) # : endif !> [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. real ( ${ rk }$ ), optional , intent ( in ) :: cond !> [optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD real ( ${ rk }$ ), optional , intent ( out ), target :: singvals (:) !> [optional] Can A,b data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] Return rank of A integer ( ilp ), optional , intent ( out ) :: rank !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err end subroutine stdlib_linalg_$ { ri }$_ solve_lstsq_$ { ndsuf }$ # : endif # : endfor # : endfor end interface solve_lstsq ! Return the working array space required by the least squares solver interface lstsq_space !! version: experimental !! !! Computes the integer, real [, complex] working space required by the least-squares solver !! ([Specification](../page/specs/stdlib_linalg.html#lstsq-space-compute-internal-working-space-requirements-for-the-least-squares-solver)) !! !!### Description !! !! This interface provides sizes of integer, real [, complex] working spaces required by the !! least-squares solver. These sizes can be used to pre-allocated working arrays in case several !! repeated least-squares solutions to a same system are sought. If pre-allocated working arrays !! are provided, no internal allocations will take place. !! # : for nd , ndsuf , nde in ALL_RHS # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" pure module subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ ( a , b , lrwork , liwork #{ if rt . startswith ( 'c' ) }# , lcwork #{ endif }# ) !> Input matrix a[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> Right hand side vector or array, b[n] or b[n,nrhs] ${ rt }$ , intent ( in ) :: b$ { nd }$ !> Size of the working space arrays integer ( ilp ), intent ( out ) :: lrwork , liwork #{ if rt . startswith ( 'c' ) }# , lcwork #{ endif }# end subroutine stdlib_linalg_$ { ri }$_ lstsq_space_$ { ndsuf }$ # : endif # : endfor # : endfor end interface lstsq_space interface det !! version: experimental !! !! Computes the determinant of a square matrix !! ([Specification](../page/specs/stdlib_linalg.html#det-computes-the-determinant-of-a-square-matrix)) !! !!### Summary !! Interface for computing matrix determinant. !! !!### Description !! !! This interface provides methods for computing the determinant of a matrix. !! Supported data types include `real` and `complex`. !! !!@note The provided functions are intended for square matrices only. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! !! real(sp) :: a(3,3), d !! type(linalg_state_type) :: state !! a = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! !! ! ... !! d = det(a,err=state) !! if (state%ok()) then !! print *, 'Success! det=',d !! else !! print *, state%print() !! endif !! ! ... !!``` !! # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" module procedure stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant module procedure stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end interface det interface operator (. det .) !! version: experimental !! !! Determinant operator of a square matrix !! ([Specification](../page/specs/stdlib_linalg.html#det-determinant-operator-of-a-square-matrix)) !! !!### Summary !! Pure operator interface for computing matrix determinant. !! !!### Description !! !! This pure operator interface provides a convenient way to compute the determinant of a matrix. !! Supported data types include real and complex. !! !!@note The provided functions are intended for square matrices. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! !! ! ... !! real(sp) :: matrix(3,3), d !! matrix = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3]) !! d = .det.matrix !! ! ... !! !!``` ! # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" module procedure stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end interface operator (. det .) interface # : for rk , rt in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant ( a , overwrite_a , err ) result ( det ) !> Input matrix a[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> State return flag. type ( linalg_state_type ), intent ( out ) :: err !> Matrix determinant ${ rt }$ :: det end function stdlib_linalg_$ { rt [ 0 ] }{ rk }$ determinant pure module function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant ( a ) result ( det ) !> Input matrix a[m,n] ${ rt }$ , intent ( in ) :: a (:,:) !> Matrix determinant ${ rt }$ :: det end function stdlib_linalg_pure_$ { rt [ 0 ] }{ rk }$ determinant # : endif # : endfor end interface ! Singular value decomposition interface svd !! version: experimental !! !! Computes the singular value decomposition of a `real` or `complex` 2d matrix. !! ([Specification](../page/specs/stdlib_linalg.html#svd-compute-the-singular-value-decomposition-of-a-rank-2-array-matrix)) !! !!### Summary !! Interface for computing the singular value decomposition of a `real` or `complex` 2d matrix. !! !!### Description !! !! This interface provides methods for computing the singular value decomposition of a matrix. !! Supported data types include `real` and `complex`. The subroutine returns a `real` array of !! singular values, and optionally, left- and right- singular vector matrices, `U` and `V`. !! For a matrix `A` with size [m,n], full matrix storage for `U` and `V` should be [m,m] and [n,n]. !! It is possible to use partial storage [m,k] and [k,n], `k=min(m,n)`, choosing `full_matrices=.false.`. !! !!@note The solution is based on LAPACK's singular value decomposition `*GESDD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! real(sp) :: a(2,3), s(2), u(2,2), vt(3,3) !! a = reshape([3,2, 2,3, 2,-2],[2,3]) !! !! call svd(A,s,u,v) !! print *, 'singular values = ',s !!``` !! # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module subroutine stdlib_linalg_svd_$ { ri }$ ( a , s , u , vt , overwrite_a , full_matrices , err ) !!### Summary !! Compute singular value decomposition of a matrix A = U \\cdot S \\cdot \\V^T !! !!### Description !! !! This function computes the singular value decomposition of a `real` or `complex` matrix A , !! and returns the array of singular values, and optionally the left matrix U containing the !! left unitary singular vectors, and the right matrix V^T , containing the right unitary !! singular vectors. !! !! param: a Input matrix of size [m,n]. !! param: s Output `real` array of size [min(m,n)] returning a list of singular values. !! param: u [optional] Output left singular matrix of size [m,m] or [m,min(m,n)] (.not.full_matrices). Contains singular vectors as columns. !! param: vt [optional] Output right singular matrix of size [n,n] or [min(m,n),n] (.not.full_matrices). Contains singular vectors as rows. !! param: overwrite_a [optional] Flag indicating if the input matrix can be overwritten. !! param: full_matrices [optional] If `.true.` (default), matrices U and V^T have size [m,m], [n,n]. Otherwise, they are [m,k], [k,n] with `k=min(m,n)`. !! param: err [optional] State return flag. !! !> Input matrix A[m,n] ${ rt }$ , intent ( inout ), target :: a (:,:) !> Array of singular values real ( ${ rk }$ ), intent ( out ) :: s (:) !> The columns of U contain the left singular vectors ${ rt }$ , optional , intent ( out ), target :: u (:,:) !> The rows of V^T contain the right singular vectors ${ rt }$ , optional , intent ( out ), target :: vt (:,:) !> [optional] Can A data be overwritten and destroyed? logical ( lk ), optional , intent ( in ) :: overwrite_a !> [optional] full matrices have shape(u)==[m,m], shape(vh)==[n,n] (default); otherwise !> they are shape(u)==[m,k] and shape(vh)==[k,n] with k=min(m,n) logical ( lk ), optional , intent ( in ) :: full_matrices !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err end subroutine stdlib_linalg_svd_$ { ri }$ # : endif # : endfor end interface svd ! Singular values interface svdvals !! version: experimental !! !! Computes the singular values of a `real` or `complex` 2d matrix. !! ([Specification](../page/specs/stdlib_linalg.html#svdvals-compute-the-singular-values-of-a-rank-2-array-matrix)) !! !!### Summary !! !! Function interface for computing the array of singular values from the singular value decomposition !! of a `real` or `complex` 2d matrix. !! !!### Description !! !! This interface provides methods for computing the singular values a 2d matrix. !! Supported data types include `real` and `complex`. The function returns a `real` array of !! singular values, with size [min(m,n)]. !! !!@note The solution is based on LAPACK's singular value decomposition `*GESDD` methods. !!@note BLAS/LAPACK backends do not currently support extended precision (``xdp``). !! !!### Example !! !!```fortran !! real(sp) :: a(2,3), s(2) !! a = reshape([3,2, 2,3, 2,-2],[2,3]) !! !! s = svdvals(A) !! print *, 'singular values = ',s !!``` !! # : for rk , rt , ri in RC_KINDS_TYPES # : if rk !=\"xdp\" module function stdlib_linalg_svdvals_$ { ri }$ ( a , err ) result ( s ) !!### Summary !! Compute singular values S from the singular-value decomposition of a matrix A = U \\cdot S \\cdot \\V^T . !! !!### Description !! !! This function returns the array of singular values from the singular value decomposition of a `real` !! or `complex` matrix A = U \\cdot S \\cdot V^T . !! !! param: a Input matrix of size [m,n]. !! param: err [optional] State return flag. !! !!### Return value !! !! param: s `real` array of size [min(m,n)] returning a list of singular values. !! !> Input matrix A[m,n] ${ rt }$ , intent ( in ), target :: a (:,:) !> [optional] state return flag. On error if not requested, the code will stop type ( linalg_state_type ), optional , intent ( out ) :: err !> Array of singular values real ( ${ rk }$ ), allocatable :: s (:) end function stdlib_linalg_svdvals_$ { ri }$ # : endif # : endfor end interface svdvals contains !> Version: experimental !> !> Constructs the identity matrix. !> ([Specification](../page/specs/stdlib_linalg.html#eye-construct-the-identity-matrix)) pure function eye ( dim1 , dim2 ) result ( result ) integer , intent ( in ) :: dim1 integer , intent ( in ), optional :: dim2 integer ( int8 ), allocatable :: result (:, :) integer :: dim2_ integer :: i dim2_ = optval ( dim2 , dim1 ) allocate ( result ( dim1 , dim2_ )) result = 0_int8 do i = 1 , min ( dim1 , dim2_ ) result ( i , i ) = 1_int8 end do end function eye # : for k1 , t1 in RCI_KINDS_TYPES function trace_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) ${ t1 }$ :: res integer :: i res = 0 do i = 1 , minval ( shape ( A )) res = res + A ( i , i ) end do end function trace_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_square_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res res = ( size ( A , 1 ) == size ( A , 2 )) end function is_square_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_diagonal_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res ${ t1 }$ , parameter :: zero = 0 !zero of relevant type integer :: m , n , o , i , j m = size ( A , 1 ) n = size ( A , 2 ) do j = 1 , n !loop over all columns o = min ( j - 1 , m ) !index of row above diagonal (or last row) do i = 1 , o !loop over rows above diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do do i = o + 2 , m !loop over rows below diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do res = . true . !otherwise A is diagonal end function is_diagonal_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_symmetric_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res integer :: n , i , j if (. not . is_square ( A )) then res = . false . return !nonsquare matrices cannot be symmetric end if n = size ( A , 1 ) !symmetric dimension of A do j = 1 , n !loop over all columns do i = 1 , j - 1 !loop over all rows above diagonal if ( A ( i , j ) /= A ( j , i )) then res = . false . return end if end do end do res = . true . !otherwise A is symmetric end function is_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES pure function is_skew_symmetric_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res integer :: n , i , j if (. not . is_square ( A )) then res = . false . return !nonsquare matrices cannot be skew-symmetric end if n = size ( A , 1 ) !symmetric dimension of A do j = 1 , n !loop over all columns do i = 1 , j !loop over all rows above diagonal (and diagonal) if ( A ( i , j ) /= - A ( j , i )) then res = . false . return end if end do end do res = . true . !otherwise A is skew-symmetric end function is_skew_symmetric_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in ( REAL_KINDS_TYPES + INT_KINDS_TYPES ) pure function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res res = is_symmetric ( A ) !symmetry and Hermiticity are equivalent for real matrices end function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES pure function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ ( A ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) logical :: res integer :: n , i , j if (. not . is_square ( A )) then res = . false . return !nonsquare matrices cannot be Hermitian end if n = size ( A , 1 ) !symmetric dimension of A do j = 1 , n !loop over all columns do i = 1 , j !loop over all rows above diagonal (and diagonal) if ( A ( i , j ) /= conjg ( A ( j , i ))) then res = . false . return end if end do end do res = . true . !otherwise A is Hermitian end function is_hermitian_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES function is_triangular_$ { t1 [ 0 ] }{ k1 }$ ( A , uplo ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) character , intent ( in ) :: uplo logical :: res ${ t1 }$ , parameter :: zero = 0 !zero of relevant type integer :: m , n , o , i , j m = size ( A , 1 ) n = size ( A , 2 ) if (( uplo == 'u' ) . or . ( uplo == 'U' )) then !check for upper triangularity do j = 1 , n !loop over all columns o = min ( j - 1 , m ) !index of row above diagonal (or last row) do i = o + 2 , m !loop over rows below diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else if (( uplo == 'l' ) . or . ( uplo == 'L' )) then !check for lower triangularity do j = 1 , n !loop over all columns o = min ( j - 1 , m ) !index of row above diagonal (or last row) do i = 1 , o !loop over rows above diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else call error_stop ( \"ERROR (is_triangular): second argument must be one of {'u','U','l','L'}\" ) end if res = . true . !otherwise A is triangular of the requested type end function is_triangular_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in RCI_KINDS_TYPES function is_hessenberg_$ { t1 [ 0 ] }{ k1 }$ ( A , uplo ) result ( res ) ${ t1 }$ , intent ( in ) :: A (:,:) character , intent ( in ) :: uplo logical :: res ${ t1 }$ , parameter :: zero = 0 !zero of relevant type integer :: m , n , o , i , j m = size ( A , 1 ) n = size ( A , 2 ) if (( uplo == 'u' ) . or . ( uplo == 'U' )) then !check for upper Hessenberg do j = 1 , n !loop over all columns o = min ( j - 2 , m ) !index of row two above diagonal (or last row) do i = o + 4 , m !loop over rows two or more below main diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else if (( uplo == 'l' ) . or . ( uplo == 'L' )) then !check for lower Hessenberg do j = 1 , n !loop over all columns o = min ( j - 2 , m ) !index of row two above diagonal (or last row) do i = 1 , o !loop over rows one or more above main diagonal if ( A ( i , j ) /= zero ) then res = . false . return end if end do end do else call error_stop ( \"ERROR (is_hessenberg): second argument must be one of {'u','U','l','L'}\" ) end if res = . true . !otherwise A is Hessenberg of the requested type end function is_hessenberg_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_linalg","tags":"","loc":"sourcefile/stdlib_linalg.fypp.html"},{"title":"stdlib_strings_to_string.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" submodule ( stdlib_strings ) stdlib_strings_to_string integer , parameter :: buffer_len = 128 character ( len =* ), parameter :: err_sym = \"[*]\" !!TODO: [*]? contains # : for k1 , t1 in REAL_KINDS_TYPES !> Format or transfer a ${t1}$ scalar as a string. pure module function to_string_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ), optional :: format character ( len = :), allocatable :: string character ( len = buffer_len ) :: buffer integer :: stat write ( buffer , '(' // optval ( format , \"g0\" ) // ')' , iostat = stat ) value if ( stat == 0 ) then string = trim ( buffer ) else string = err_sym end if end function to_string_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES !> Format or transfer a ${t1}$ scalar as a string. pure module function to_string_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ), optional :: format character ( len = :), allocatable :: string string = '(' // to_string_r_$ { k1 }$ ( value % re , format ) // ',' // & & to_string_r_$ { k1 }$ ( value % im , format ) // ')' end function to_string_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in INT_KINDS_TYPES !> Represent an integer of kind ${k1}$ as character sequence. pure module function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ ( value ) result ( string ) integer , parameter :: ik = ${ k1 }$ integer ( ik ), intent ( in ) :: value character ( len = :), allocatable :: string integer , parameter :: buffer_len = range ( value ) + 2 character ( len = buffer_len ) :: buffer integer :: pos integer ( ik ) :: n character ( len = 1 ), parameter :: numbers ( - 9 : 0 ) = & [ \"9\" , \"8\" , \"7\" , \"6\" , \"5\" , \"4\" , \"3\" , \"2\" , \"1\" , \"0\" ] if ( value == 0_ik ) then string = numbers ( 0 ) return end if n = sign ( value , - 1_ik ) buffer = \"\" pos = buffer_len + 1 do while ( n < 0_ik ) pos = pos - 1 buffer ( pos : pos ) = numbers ( mod ( n , 10_ik )) n = n / 10_ik end do if ( value < 0_ik ) then pos = pos - 1 buffer ( pos : pos ) = '-' end if string = buffer ( pos :) end function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ pure module function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ) :: format character ( len = :), allocatable :: string character ( len = buffer_len ) :: buffer integer :: stat write ( buffer , \"(\" // format // \")\" , iostat = stat ) value if ( stat == 0 ) then string = trim ( buffer ) else string = err_sym end if end function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor # : for k1 , t1 in LOG_KINDS_TYPES !> Represent an logical of kind ${k1}$ as character sequence. pure module function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ ( value ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len = 1 ) :: string string = merge ( \"T\" , \"F\" , value ) end function to_string_1_$ { t1 [ 0 ] }$_${ k1 }$ pure module function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ ( value , format ) result ( string ) ${ t1 }$ , intent ( in ) :: value character ( len =* ), intent ( in ) :: format character ( len = :), allocatable :: string character ( len = buffer_len ) :: buffer integer :: stat write ( buffer , \"(\" // format // \")\" , iostat = stat ) value if ( stat == 0 ) then string = trim ( buffer ) else string = err_sym end if end function to_string_2_$ { t1 [ 0 ] }$_${ k1 }$ # : endfor end submodule stdlib_strings_to_string","tags":"","loc":"sourcefile/stdlib_strings_to_string.fypp.html"},{"title":"stdlib_quadrature_gauss.f90 – Fortran-lang/stdlib","text":"Source Code submodule ( stdlib_quadrature ) stdlib_quadrature_gauss use stdlib_specialfunctions , only : legendre , dlegendre implicit none real ( dp ), parameter :: pi = acos ( - 1._dp ) real ( dp ), parameter :: tolerance = 4._dp * epsilon ( 1._dp ) integer , parameter :: newton_iters = 100 contains pure module subroutine gauss_legendre_fp64 ( x , w , interval ) real ( dp ), intent ( out ) :: x (:), w (:) real ( dp ), intent ( in ), optional :: interval ( 2 ) associate ( n => size ( x ) - 1 ) select case ( n ) case ( 0 ) x = 0 w = 2 case ( 1 ) x ( 1 ) = - sqrt ( 1._dp / 3._dp ) x ( 2 ) = - x ( 1 ) w = 1 case default block integer :: i , j real ( dp ) :: leg , dleg , delta do i = 0 , ( n + 1 ) / 2 - 1 ! use Gauss-Chebyshev points as an initial guess x ( i + 1 ) = - cos (( 2 * i + 1 ) / ( 2._dp * n + 2._dp ) * pi ) do j = 1 , newton_iters leg = legendre ( n + 1 , x ( i + 1 )) dleg = dlegendre ( n + 1 , x ( i + 1 )) delta = - leg / dleg x ( i + 1 ) = x ( i + 1 ) + delta if ( abs ( delta ) <= tolerance * abs ( x ( i + 1 )) ) exit end do x ( n - i + 1 ) = - x ( i + 1 ) dleg = dlegendre ( n + 1 , x ( i + 1 )) w ( i + 1 ) = 2._dp / (( 1 - x ( i + 1 ) ** 2 ) * dleg ** 2 ) w ( n - i + 1 ) = w ( i + 1 ) end do if ( mod ( n , 2 ) == 0 ) then x ( n / 2 + 1 ) = 0 dleg = dlegendre ( n + 1 , 0.0_dp ) w ( n / 2 + 1 ) = 2._dp / ( dleg ** 2 ) end if end block end select end associate if ( present ( interval )) then associate ( a => interval ( 1 ) , b => interval ( 2 ) ) x = 0.5_dp * ( b - a ) * x + 0.5_dp * ( b + a ) w = 0.5_dp * ( b - a ) * w end associate end if end subroutine pure module subroutine gauss_legendre_lobatto_fp64 ( x , w , interval ) real ( dp ), intent ( out ) :: x (:), w (:) real ( dp ), intent ( in ), optional :: interval ( 2 ) associate ( n => size ( x ) - 1 ) select case ( n ) case ( 1 ) x ( 1 ) = - 1 x ( 2 ) = 1 w = 1 case default block integer :: i , j real ( dp ) :: leg , dleg , delta x ( 1 ) = - 1._dp x ( n + 1 ) = 1._dp w ( 1 ) = 2._dp / ( n * ( n + 1._dp )) w ( n + 1 ) = 2._dp / ( n * ( n + 1._dp )) do i = 1 , ( n + 1 ) / 2 - 1 ! initial guess from an approximate form given by SV Parter (1999) x ( i + 1 ) = - cos ( ( i + 0.25_dp ) * pi / n - 3 / ( 8 * n * pi * ( i + 0.25_dp ))) do j = 1 , newton_iters leg = legendre ( n + 1 , x ( i + 1 )) - legendre ( n - 1 , x ( i + 1 )) dleg = dlegendre ( n + 1 , x ( i + 1 )) - dlegendre ( n - 1 , x ( i + 1 )) delta = - leg / dleg x ( i + 1 ) = x ( i + 1 ) + delta if ( abs ( delta ) <= tolerance * abs ( x ( i + 1 )) ) exit end do x ( n - i + 1 ) = - x ( i + 1 ) leg = legendre ( n , x ( i + 1 )) w ( i + 1 ) = 2._dp / ( n * ( n + 1._dp ) * leg ** 2 ) w ( n - i + 1 ) = w ( i + 1 ) end do if ( mod ( n , 2 ) == 0 ) then x ( n / 2 + 1 ) = 0 leg = legendre ( n , 0.0_dp ) w ( n / 2 + 1 ) = 2._dp / ( n * ( n + 1._dp ) * leg ** 2 ) end if end block end select end associate if ( present ( interval )) then associate ( a => interval ( 1 ) , b => interval ( 2 ) ) x = 0.5_dp * ( b - a ) * x + 0.5_dp * ( b + a ) x ( 1 ) = interval ( 1 ) x ( size ( x )) = interval ( 2 ) w = 0.5_dp * ( b - a ) * w end associate end if end subroutine end submodule","tags":"","loc":"sourcefile/stdlib_quadrature_gauss.f90.html"},{"title":"stdlib_linalg_blas_z.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" module stdlib_linalg_blas_z use stdlib_linalg_constants use stdlib_linalg_blas_aux use stdlib_linalg_blas_s use stdlib_linalg_blas_c use stdlib_linalg_blas_d implicit none ( type , external ) private public :: sp , dp , qp , lk , ilp public :: stdlib_zaxpy public :: stdlib_zcopy public :: stdlib_zdotc public :: stdlib_zdotu public :: stdlib_zdrot public :: stdlib_zdscal public :: stdlib_zgbmv public :: stdlib_zgemm public :: stdlib_zgemv public :: stdlib_zgerc public :: stdlib_zgeru public :: stdlib_zhbmv public :: stdlib_zhemm public :: stdlib_zhemv public :: stdlib_zher public :: stdlib_zher2 public :: stdlib_zher2k public :: stdlib_zherk public :: stdlib_zhpmv public :: stdlib_zhpr public :: stdlib_zhpr2 public :: stdlib_zrotg public :: stdlib_zscal public :: stdlib_zswap public :: stdlib_zsymm public :: stdlib_zsyr2k public :: stdlib_zsyrk public :: stdlib_ztbmv public :: stdlib_ztbsv public :: stdlib_ztpmv public :: stdlib_ztpsv public :: stdlib_ztrmm public :: stdlib_ztrmv public :: stdlib_ztrsm public :: stdlib_ztrsv ! 64-bit real constants real ( dp ), parameter , private :: negone = - 1.00_dp real ( dp ), parameter , private :: zero = 0.00_dp real ( dp ), parameter , private :: half = 0.50_dp real ( dp ), parameter , private :: one = 1.00_dp real ( dp ), parameter , private :: two = 2.00_dp real ( dp ), parameter , private :: three = 3.00_dp real ( dp ), parameter , private :: four = 4.00_dp real ( dp ), parameter , private :: eight = 8.00_dp real ( dp ), parameter , private :: ten = 1 0.00_dp ! 64-bit complex constants complex ( dp ), parameter , private :: czero = ( 0.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: chalf = ( 0.5_dp , 0.0_dp ) complex ( dp ), parameter , private :: cone = ( 1.0_dp , 0.0_dp ) complex ( dp ), parameter , private :: cnegone = ( - 1.0_dp , 0.0_dp ) ! 64-bit scaling constants integer , parameter , private :: maxexp = maxexponent ( zero ) integer , parameter , private :: minexp = minexponent ( zero ) real ( dp ), parameter , private :: rradix = real ( radix ( zero ), dp ) real ( dp ), parameter , private :: ulp = epsilon ( zero ) real ( dp ), parameter , private :: eps = ulp * half real ( dp ), parameter , private :: safmin = rradix ** max ( minexp - 1 , 1 - maxexp ) real ( dp ), parameter , private :: safmax = one / safmin real ( dp ), parameter , private :: smlnum = safmin / ulp real ( dp ), parameter , private :: bignum = safmax * ulp real ( dp ), parameter , private :: rtmin = sqrt ( smlnum ) real ( dp ), parameter , private :: rtmax = sqrt ( bignum ) ! 64-bit Blue's scaling constants ! ssml>=1/s and sbig==1/S with s,S as defined in https://doi.org/10.1145/355769.355771 real ( dp ), parameter , private :: tsml = rradix ** ceiling (( minexp - 1 ) * half ) real ( dp ), parameter , private :: tbig = rradix ** floor (( maxexp - digits ( zero ) + 1 ) * half ) real ( dp ), parameter , private :: ssml = rradix ** ( - floor (( minexp - digits ( zero )) * half )) real ( dp ), parameter , private :: sbig = rradix ** ( - ceiling (( maxexp + digits ( zero ) - 1 ) * half )) contains pure subroutine stdlib_zaxpy ( n , za , zx , incx , zy , incy ) !! ZAXPY constant times a vector plus a vector. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( inout ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( stdlib_dcabs1 ( za ) == 0.0_dp ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zy ( i ) + za * zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zy ( iy ) + za * zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zaxpy pure subroutine stdlib_zcopy ( n , zx , incx , zy , incy ) !! ZCOPY copies a vector, x, to a vector, y. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ) complex ( dp ), intent ( out ) :: zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n zy ( i ) = zx ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n zy ( iy ) = zx ( ix ) ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zcopy pure complex ( dp ) function stdlib_zdotc ( n , zx , incx , zy , incy ) !! ZDOTC forms the dot product of two complex vectors !! ZDOTC = X^H * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ! Intrinsic Functions intrinsic :: conjg ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotc = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( i )) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + conjg ( zx ( ix )) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotc = ztemp return end function stdlib_zdotc pure complex ( dp ) function stdlib_zdotu ( n , zx , incx , zy , incy ) !! ZDOTU forms the dot product of two complex vectors !! ZDOTU = X^T * Y ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( in ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy ztemp = ( 0.0_dp , 0.0_dp ) stdlib_zdotu = ( 0.0_dp , 0.0_dp ) if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = ztemp + zx ( i ) * zy ( i ) end do else ! code for unequal increments or equal increments ! not equal to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = ztemp + zx ( ix ) * zy ( iy ) ix = ix + incx iy = iy + incy end do end if stdlib_zdotu = ztemp return end function stdlib_zdotu pure subroutine stdlib_zdrot ( n , zx , incx , zy , incy , c , s ) !! Applies a plane rotation, where the cos and sin (c and s) are real !! and the vectors cx and cy are complex. !! jack dongarra, linpack, 3/11/78. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n real ( dp ), intent ( in ) :: c , s ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , ix , iy complex ( dp ) :: ctemp ! Executable Statements if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ctemp = c * zx ( i ) + s * zy ( i ) zy ( i ) = c * zy ( i ) - s * zx ( i ) zx ( i ) = ctemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ctemp = c * zx ( ix ) + s * zy ( iy ) zy ( iy ) = c * zy ( iy ) - s * zx ( ix ) zx ( ix ) = ctemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zdrot pure subroutine stdlib_zdscal ( n , da , zx , incx ) !! ZDSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: da integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx ! Intrinsic Functions intrinsic :: cmplx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = cmplx ( da , 0.0_dp , KIND = dp ) * zx ( i ) end do end if return end subroutine stdlib_zdscal pure subroutine stdlib_zgbmv ( trans , m , n , kl , ku , alpha , a , lda , x , incx , beta , y , incy ) !! ZGBMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n band matrix, with kl sub-diagonals and ku super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , kl , ku , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kup1 , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( kl < 0 ) then info = 4 else if ( ku < 0 ) then info = 5 else if ( lda < ( kl + ku + 1 )) then info = 8 else if ( incx == 0 ) then info = 10 else if ( incy == 0 ) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGBMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the band part of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kup1 = ku + 1 if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( i ) = y ( i ) + temp * a ( k + i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky k = kup1 - j do i = max ( 1 , j - ku ), min ( m , j + kl ) y ( iy ) = y ( iy ) + temp * a ( k + i , j ) iy = iy + incy end do jx = jx + incx if ( j > ku ) ky = ky + incy end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( i ) end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx k = kup1 - j if ( noconj ) then do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + a ( k + i , j ) * x ( ix ) ix = ix + incx end do else do i = max ( 1 , j - ku ), min ( m , j + kl ) temp = temp + conjg ( a ( k + i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy if ( j > ku ) kx = kx + incx end do end if end if return end subroutine stdlib_zgbmv pure subroutine stdlib_zgemm ( transa , transb , m , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZGEMM performs one of the matrix-matrix operations !! C := alpha*op( A )*op( B ) + beta*C, !! where op( X ) is one of !! op( X ) = X or op( X ) = X**T or op( X ) = X**H, !! alpha and beta are scalars, and A, B and C are matrices, with op( A ) !! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , m , n character , intent ( in ) :: transa , transb ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa , nrowb logical ( lk ) :: conja , conjb , nota , notb ! set nota and notb as true if a and b respectively are not ! conjugated or transposed, set conja and conjb as true if a and ! b respectively are to be transposed but not conjugated and set ! nrowa and nrowb as the number of rows of a and b respectively. nota = stdlib_lsame ( transa , 'N' ) notb = stdlib_lsame ( transb , 'N' ) conja = stdlib_lsame ( transa , 'C' ) conjb = stdlib_lsame ( transb , 'C' ) if ( nota ) then nrowa = m else nrowa = k end if if ( notb ) then nrowb = k else nrowb = n end if ! test the input parameters. info = 0 if ((. not . nota ) . and . (. not . conja ) . and .(. not . stdlib_lsame ( transa , 'T' ))) then info = 1 else if ((. not . notb ) . and . (. not . conjb ) . and .(. not . stdlib_lsame ( transb , 'T' ))) & then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < max ( 1 , nrowa )) then info = 8 else if ( ldb < max ( 1 , nrowb )) then info = 10 else if ( ldc < max ( 1 , m )) then info = 13 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .((( alpha == czero ). or . ( k == 0 )). and . ( beta == cone ))) & return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( notb ) then if ( nota ) then ! form c := alpha*a*b + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( l , j ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else if ( conja ) then ! form c := alpha*a**h*b + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( nota ) then if ( conjb ) then ! form c := alpha*a*b**h + beta*c. do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * conjg ( b ( j , l )) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do else ! form c := alpha*a*b**t + beta*c do j = 1 , n if ( beta == czero ) then do i = 1 , m c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k temp = alpha * b ( j , l ) do i = 1 , m c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end do end do end if else if ( conja ) then if ( conjb ) then ! form c := alpha*a**h*b**h + beta*c. do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**h*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + conjg ( a ( l , i )) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if else if ( conjb ) then ! form c := alpha*a**t*b**h + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * conjg ( b ( j , l )) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else ! form c := alpha*a**t*b**t + beta*c do j = 1 , n do i = 1 , m temp = czero do l = 1 , k temp = temp + a ( l , i ) * b ( j , l ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zgemm pure subroutine stdlib_zgemv ( trans , m , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZGEMV performs one of the matrix-vector operations !! y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or !! y := alpha*A**H*x + beta*y, !! where alpha and beta are scalars, x and y are vectors and A is an !! m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n character , intent ( in ) :: trans ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky , lenx , leny logical ( lk ) :: noconj ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 1 else if ( m < 0 ) then info = 2 else if ( n < 0 ) then info = 3 else if ( lda < max ( 1 , m )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGEMV ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return noconj = stdlib_lsame ( trans , 'T' ) ! set lenx and leny, the lengths of the vectors x and y, and set ! up the start points in x and y. if ( stdlib_lsame ( trans , 'N' )) then lenx = n leny = m else lenx = m leny = n end if if ( incx > 0 ) then kx = 1 else kx = 1 - ( lenx - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( leny - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , leny y ( i ) = czero end do else do i = 1 , leny y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , leny y ( iy ) = czero iy = iy + incy end do else do i = 1 , leny y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( trans , 'N' )) then ! form y := alpha*a*x + y. jx = kx if ( incy == 1 ) then do j = 1 , n temp = alpha * x ( jx ) do i = 1 , m y ( i ) = y ( i ) + temp * a ( i , j ) end do jx = jx + incx end do else do j = 1 , n temp = alpha * x ( jx ) iy = ky do i = 1 , m y ( iy ) = y ( iy ) + temp * a ( i , j ) iy = iy + incy end do jx = jx + incx end do end if else ! form y := alpha*a**t*x + y or y := alpha*a**h*x + y. jy = ky if ( incx == 1 ) then do j = 1 , n temp = czero if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( i ) end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do else do j = 1 , n temp = czero ix = kx if ( noconj ) then do i = 1 , m temp = temp + a ( i , j ) * x ( ix ) ix = ix + incx end do else do i = 1 , m temp = temp + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do end if y ( jy ) = y ( jy ) + alpha * temp jy = jy + incy end do end if end if return end subroutine stdlib_zgemv pure subroutine stdlib_zgerc ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERC performs the rank 1 operation !! A := alpha*x*y**H + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERC ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * conjg ( y ( jy )) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgerc pure subroutine stdlib_zgeru ( m , n , alpha , x , incx , y , incy , a , lda ) !! ZGERU performs the rank 1 operation !! A := alpha*x*y**T + A, !! where alpha is a scalar, x is an m element vector, y is an n element !! vector and A is an m by n matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , m , n ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jy , kx ! Intrinsic Functions intrinsic :: max ! test the input parameters. info = 0 if ( m < 0 ) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , m )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZGERU ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or . ( alpha == czero )) return ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( incy > 0 ) then jy = 1 else jy = 1 - ( n - 1 ) * incy end if if ( incx == 1 ) then do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) do i = 1 , m a ( i , j ) = a ( i , j ) + x ( i ) * temp end do end if jy = jy + incy end do else if ( incx > 0 ) then kx = 1 else kx = 1 - ( m - 1 ) * incx end if do j = 1 , n if ( y ( jy ) /= czero ) then temp = alpha * y ( jy ) ix = kx do i = 1 , m a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do end if jy = jy + incy end do end if return end subroutine stdlib_zgeru pure subroutine stdlib_zhbmv ( uplo , n , k , alpha , a , lda , x , incx , beta , y , incy ) !! ZHBMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian band matrix, with k super-diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , k , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kplus1 , kx , ky , l ! Intrinsic Functions intrinsic :: real , conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( k < 0 ) then info = 3 else if ( lda < ( k + 1 )) then info = 6 else if ( incx == 0 ) then info = 8 else if ( incy == 0 ) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHBMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array a ! are accessed sequentially with cone pass through a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when upper triangle of a is stored. kplus1 = k + 1 if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky l = kplus1 - j do i = max ( 1 , j - k ), j - 1 y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( kplus1 , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy if ( j > k ) then kx = kx + incx ky = ky + incy end if end do end if else ! form y when lower triangle of a is stored. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j do i = j + 1 , min ( n , j + k ) y ( i ) = y ( i ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( 1 , j ), KIND = dp ) l = 1 - j ix = jx iy = jy do i = j + 1 , min ( n , j + k ) ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( l + i , j ) temp2 = temp2 + conjg ( a ( l + i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhbmv pure subroutine stdlib_zhemm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHEMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is an hermitian matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * conjg ( a ( k , i )) end do if ( beta == czero ) then c ( i , j ) = temp1 * real ( a ( i , i ), KIND = dp ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * real ( a ( i , i ), KIND = dp ) + & alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * real ( a ( j , j ), KIND = dp ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * conjg ( a ( j , k )) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * conjg ( a ( j , k )) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zhemm pure subroutine stdlib_zhemv ( uplo , n , alpha , a , lda , x , incx , beta , y , incy ) !! ZHEMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( lda < max ( 1 , n )) then info = 5 else if ( incx == 0 ) then info = 7 else if ( incy == 0 ) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHEMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return if ( stdlib_lsame ( uplo , 'U' )) then ! form y when a is stored in upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do i = 1 , j - 1 y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if else ! form y when a is stored in lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( a ( j , j ), KIND = dp ) do i = j + 1 , n y ( i ) = y ( i ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( i ) end do y ( j ) = y ( j ) + alpha * temp2 end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( a ( j , j ), KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * a ( i , j ) temp2 = temp2 + conjg ( a ( i , j )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zhemv pure subroutine stdlib_zher ( uplo , n , alpha , x , incx , a , lda ) !! ZHER performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( lda < max ( 1 , n )) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in upper triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp ix = ix + incx end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if else ! form a when a is stored in lower triangle. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do i = j + 1 , n ix = ix + incx a ( i , j ) = a ( i , j ) + x ( ix ) * temp end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx end do end if end if return end subroutine stdlib_zher pure subroutine stdlib_zher2 ( uplo , n , alpha , x , incx , y , incy , a , lda ) !! ZHER2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an n !! by n hermitian matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , lda , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: a ( lda , * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , kx , ky ! Intrinsic Functions intrinsic :: real , conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 else if ( lda < max ( 1 , n )) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through the triangular part ! of a. if ( stdlib_lsame ( uplo , 'U' )) then ! form a when a is stored in the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do i = 1 , j - 1 a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if else ! form a when a is stored in the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) do i = j + 1 , n a ( i , j ) = a ( i , j ) + x ( i ) * temp1 + y ( i ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) a ( j , j ) = real ( a ( j , j ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do i = j + 1 , n ix = ix + incx iy = iy + incy a ( i , j ) = a ( i , j ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else a ( j , j ) = real ( a ( j , j ), KIND = dp ) end if jx = jx + incx jy = jy + incy end do end if end if return end subroutine stdlib_zher2 pure subroutine stdlib_zher2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZHER2K performs one of the hermitian rank 2k operations !! C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C, !! or !! C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C, !! where alpha and beta are scalars with beta real, C is an n by n !! hermitian matrix and A and B are n by k matrices in the first case !! and k by n matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha real ( dp ), intent ( in ) :: beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , conjg , max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHER2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == real ( czero , KIND = dp )) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**h + conjg( alpha )*b*a**h + ! c. if ( upper ) then do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do else do j = 1 , n if ( beta == real ( czero , KIND = dp )) then do i = j , n c ( i , j ) = czero end do else if ( beta /= one ) then do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * conjg ( b ( j , l )) temp2 = conjg ( alpha * a ( j , l )) do i = j + 1 , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( a ( j , l ) * temp1 + b ( j , l ) * temp2 ,& KIND = dp ) end if end do end do end if else ! form c := alpha*a**h*b + conjg( alpha )*b**h*a + ! c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + conjg ( a ( l , i )) * b ( l , j ) temp2 = temp2 + conjg ( b ( l , i )) * a ( l , j ) end do if ( i == j ) then if ( beta == real ( czero , KIND = dp )) then c ( j , j ) = real ( alpha * temp1 + conjg ( alpha ) * temp2 , KIND = dp ) else c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) + real ( alpha * temp1 + conjg (& alpha ) * temp2 , KIND = dp ) end if else if ( beta == real ( czero , KIND = dp )) then c ( i , j ) = alpha * temp1 + conjg ( alpha ) * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + conjg ( alpha ) * temp2 end if end if end do end do end if end if return end subroutine stdlib_zher2k pure subroutine stdlib_zherk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZHERK performs one of the hermitian rank k operations !! C := alpha*A*A**H + beta*C, !! or !! C := alpha*A**H*A + beta*C, !! where alpha and beta are real scalars, C is an n by n hermitian !! matrix and A is an n by k matrix in the first case and a k by n !! matrix in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: real , cmplx , conjg , max ! Local Scalars complex ( dp ) :: temp real ( dp ) :: rtemp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'C' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHERK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == zero ). or .( k == 0 )). and . ( beta == one ))) return ! and when alpha.eq.zero. if ( alpha == zero ) then if ( upper ) then if ( beta == zero ) then do j = 1 , n do i = 1 , j c ( i , j ) = zero end do end do else do j = 1 , n do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) end do end if else if ( beta == zero ) then do j = 1 , n do i = j , n c ( i , j ) = zero end do end do else do j = 1 , n c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**h + beta*c. if ( upper ) then do j = 1 , n if ( beta == zero ) then do i = 1 , j c ( i , j ) = zero end do else if ( beta /= one ) then do i = 1 , j - 1 c ( i , j ) = beta * c ( i , j ) end do c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) do i = 1 , j - 1 c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( i , l ), KIND = dp ) end if end do end do else do j = 1 , n if ( beta == zero ) then do i = j , n c ( i , j ) = zero end do else if ( beta /= one ) then c ( j , j ) = beta * real ( c ( j , j ), KIND = dp ) do i = j + 1 , n c ( i , j ) = beta * c ( i , j ) end do else c ( j , j ) = real ( c ( j , j ), KIND = dp ) end if do l = 1 , k if ( a ( j , l ) /= cmplx ( zero , KIND = dp )) then temp = alpha * conjg ( a ( j , l )) c ( j , j ) = real ( c ( j , j ), KIND = dp ) + real ( temp * a ( j , l ), KIND = dp ) do i = j + 1 , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**h*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j - 1 temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if end do else do j = 1 , n rtemp = zero do l = 1 , k rtemp = rtemp + conjg ( a ( l , j )) * a ( l , j ) end do if ( beta == zero ) then c ( j , j ) = alpha * rtemp else c ( j , j ) = alpha * rtemp + beta * real ( c ( j , j ), KIND = dp ) end if do i = j + 1 , n temp = zero do l = 1 , k temp = temp + conjg ( a ( l , i )) * a ( l , j ) end do if ( beta == zero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zherk pure subroutine stdlib_zhpmv ( uplo , n , alpha , ap , x , incx , beta , y , incy ) !! ZHPMV performs the matrix-vector operation !! y := alpha*A*x + beta*y, !! where alpha and beta are scalars, x and y are n element vectors and !! A is an n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ), x ( * ) complex ( dp ), intent ( inout ) :: y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 6 else if ( incy == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPMV ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . (( alpha == czero ). and . ( beta == cone ))) return ! set up the start points in x and y. if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. ! first form y := beta*y. if ( beta /= cone ) then if ( incy == 1 ) then if ( beta == czero ) then do i = 1 , n y ( i ) = czero end do else do i = 1 , n y ( i ) = beta * y ( i ) end do end if else iy = ky if ( beta == czero ) then do i = 1 , n y ( iy ) = czero iy = iy + incy end do else do i = 1 , n y ( iy ) = beta * y ( iy ) iy = iy + incy end do end if end if end if if ( alpha == czero ) return kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form y when ap contains the upper triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero k = kk do i = 1 , j - 1 y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 kk = kk + j end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero ix = kx iy = ky do k = kk , kk + j - 2 y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) ix = ix + incx iy = iy + incy end do y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk + j - 1 ), KIND = dp ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form y when ap contains the lower triangle. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n temp1 = alpha * x ( j ) temp2 = czero y ( j ) = y ( j ) + temp1 * real ( ap ( kk ), KIND = dp ) k = kk + 1 do i = j + 1 , n y ( i ) = y ( i ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( i ) k = k + 1 end do y ( j ) = y ( j ) + alpha * temp2 kk = kk + ( n - j + 1 ) end do else jx = kx jy = ky do j = 1 , n temp1 = alpha * x ( jx ) temp2 = czero y ( jy ) = y ( jy ) + temp1 * real ( ap ( kk ), KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy y ( iy ) = y ( iy ) + temp1 * ap ( k ) temp2 = temp2 + conjg ( ap ( k )) * x ( ix ) end do y ( jy ) = y ( jy ) + alpha * temp2 jx = jx + incx jy = jy + incy kk = kk + ( n - j + 1 ) end do end if end if return end subroutine stdlib_zhpmv pure subroutine stdlib_zhpr ( uplo , n , alpha , x , incx , ap ) !! ZHPR performs the hermitian rank 1 operation !! A := alpha*x*x**H + A, !! where alpha is a real scalar, x is an n element vector and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments real ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == real ( czero , KIND = dp ))) return ! set the start point in x if the increment is not unity. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ix = kx do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp ix = ix + incx end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp , KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = alpha * conjg ( x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( j ), KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = alpha * conjg ( x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( temp * x ( jx ), KIND = dp ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx ap ( k ) = ap ( k ) + x ( ix ) * temp end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr pure subroutine stdlib_zhpr2 ( uplo , n , alpha , x , incx , y , incy , ap ) !! ZHPR2 performs the hermitian rank 2 operation !! A := alpha*x*y**H + conjg( alpha )*y*x**H + A, !! where alpha is a scalar, x and y are n element vectors and A is an !! n by n hermitian matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: incx , incy , n character , intent ( in ) :: uplo ! Array Arguments complex ( dp ), intent ( inout ) :: ap ( * ) complex ( dp ), intent ( in ) :: x ( * ), y ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , ix , iy , j , jx , jy , k , kk , kx , ky ! Intrinsic Functions intrinsic :: real , conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if ( n < 0 ) then info = 2 else if ( incx == 0 ) then info = 5 else if ( incy == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZHPR2 ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ( alpha == czero )) return ! set up the start points in x and y if the increments are not both ! unity. if (( incx /= 1 ) . or . ( incy /= 1 )) then if ( incx > 0 ) then kx = 1 else kx = 1 - ( n - 1 ) * incx end if if ( incy > 0 ) then ky = 1 else ky = 1 - ( n - 1 ) * incy end if jx = kx jy = ky end if ! start the operations. in this version the elements of the array ap ! are accessed sequentially with cone pass through ap. kk = 1 if ( stdlib_lsame ( uplo , 'U' )) then ! form a when upper triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) k = kk do i = 1 , j - 1 ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if kk = kk + j end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ix = kx iy = ky do k = kk , kk + j - 2 ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 ix = ix + incx iy = iy + incy end do ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 ,& KIND = dp ) else ap ( kk + j - 1 ) = real ( ap ( kk + j - 1 ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + j end do end if else ! form a when lower triangle is stored in ap. if (( incx == 1 ) . and . ( incy == 1 )) then do j = 1 , n if (( x ( j ) /= czero ) . or . ( y ( j ) /= czero )) then temp1 = alpha * conjg ( y ( j )) temp2 = conjg ( alpha * x ( j )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( j ) * temp1 + y ( j ) * temp2 , KIND = dp ) k = kk + 1 do i = j + 1 , n ap ( k ) = ap ( k ) + x ( i ) * temp1 + y ( i ) * temp2 k = k + 1 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if kk = kk + n - j + 1 end do else do j = 1 , n if (( x ( jx ) /= czero ) . or . ( y ( jy ) /= czero )) then temp1 = alpha * conjg ( y ( jy )) temp2 = conjg ( alpha * x ( jx )) ap ( kk ) = real ( ap ( kk ), KIND = dp ) + real ( x ( jx ) * temp1 + y ( jy ) * temp2 , KIND = dp ) ix = jx iy = jy do k = kk + 1 , kk + n - j ix = ix + incx iy = iy + incy ap ( k ) = ap ( k ) + x ( ix ) * temp1 + y ( iy ) * temp2 end do else ap ( kk ) = real ( ap ( kk ), KIND = dp ) end if jx = jx + incx jy = jy + incy kk = kk + n - j + 1 end do end if end if return end subroutine stdlib_zhpr2 pure subroutine stdlib_zrotg ( a , b , c , s ) !! The computation uses the formulas !! |x| = sqrt( Re(x)**2 + Im(x)**2 ) !! sgn(x) = x / |x| if x /= 0 !! = 1 if x = 0 !! c = |a| / sqrt(|a|**2 + |b|**2) !! s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2) !! When a and b are real and r /= 0, the formulas simplify to !! r = sgn(a)*sqrt(|a|**2 + |b|**2) !! c = a / r !! s = b / r !! the same as in DROTG when |a| > |b|. When |b| >= |a|, the !! sign of c and s will be different from those computed by DROTG !! if the signs of a and b are not the same. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Constants integer , parameter :: wp = kind ( 1._dp ) ! Scaling Constants ! Scalar Arguments real ( dp ), intent ( out ) :: c complex ( dp ), intent ( inout ) :: a complex ( dp ), intent ( in ) :: b complex ( dp ), intent ( out ) :: s ! Local Scalars real ( dp ) :: d , f1 , f2 , g1 , g2 , h2 , p , u , uu , v , vv , w complex ( dp ) :: f , fs , g , gs , r , t ! Intrinsic Functions intrinsic :: abs , aimag , conjg , max , min , real , sqrt ! Statement Functions real ( dp ) :: abssq ! Statement Function Definitions abssq ( t ) = real ( t , KIND = dp ) ** 2 + aimag ( t ) ** 2 ! Executable Statements f = a g = b if ( g == czero ) then c = one s = czero r = f else if ( f == czero ) then c = zero g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm g2 = abssq ( g ) d = sqrt ( g2 ) s = conjg ( g ) / d r = d else ! use scaled algorithm u = min ( safmax , max ( safmin , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) d = sqrt ( g2 ) s = conjg ( gs ) / d r = d * u end if else f1 = max ( abs ( real ( f , KIND = dp )), abs ( aimag ( f )) ) g1 = max ( abs ( real ( g , KIND = dp )), abs ( aimag ( g )) ) if ( f1 > rtmin . and . f1 < rtmax . and . g1 > rtmin . and . g1 < rtmax ) then ! use unscaled algorithm f2 = abssq ( f ) g2 = abssq ( g ) h2 = f2 + g2 if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = f2 * p s = conjg ( g ) * ( f * p ) r = f * ( h2 * p ) else ! use scaled algorithm u = min ( safmax , max ( safmin , f1 , g1 ) ) uu = one / u gs = g * uu g2 = abssq ( gs ) if ( f1 * uu < rtmin ) then ! f is not well-scaled when scaled by g1. ! use a different scaling for f. v = min ( safmax , max ( safmin , f1 ) ) vv = one / v w = v * uu fs = f * vv f2 = abssq ( fs ) h2 = f2 * w ** 2 + g2 else ! otherwise use the same scaling for f and g. w = one fs = f * uu f2 = abssq ( fs ) h2 = f2 + g2 end if if ( f2 > rtmin . and . h2 < rtmax ) then d = sqrt ( f2 * h2 ) else d = sqrt ( f2 ) * sqrt ( h2 ) end if p = 1 / d c = ( f2 * p ) * w s = conjg ( gs ) * ( fs * p ) r = ( fs * ( h2 * p ) ) * u end if end if a = r return end subroutine stdlib_zrotg pure subroutine stdlib_zscal ( n , za , zx , incx ) !! ZSCAL scales a vector by a constant. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: za integer ( ilp ), intent ( in ) :: incx , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ) ! ===================================================================== ! Local Scalars integer ( ilp ) :: i , nincx if ( n <= 0 . or . incx <= 0 ) return if ( incx == 1 ) then ! code for increment equal to 1 do i = 1 , n zx ( i ) = za * zx ( i ) end do else ! code for increment not equal to 1 nincx = n * incx do i = 1 , nincx , incx zx ( i ) = za * zx ( i ) end do end if return end subroutine stdlib_zscal pure subroutine stdlib_zswap ( n , zx , incx , zy , incy ) !! ZSWAP interchanges two vectors. ! -- reference blas level1 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , incy , n ! Array Arguments complex ( dp ), intent ( inout ) :: zx ( * ), zy ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: ztemp integer ( ilp ) :: i , ix , iy if ( n <= 0 ) return if ( incx == 1 . and . incy == 1 ) then ! code for both increments equal to 1 do i = 1 , n ztemp = zx ( i ) zx ( i ) = zy ( i ) zy ( i ) = ztemp end do else ! code for unequal increments or equal increments not equal ! to 1 ix = 1 iy = 1 if ( incx < 0 ) ix = ( - n + 1 ) * incx + 1 if ( incy < 0 ) iy = ( - n + 1 ) * incy + 1 do i = 1 , n ztemp = zx ( ix ) zx ( ix ) = zy ( iy ) zy ( iy ) = ztemp ix = ix + incx iy = iy + incy end do end if return end subroutine stdlib_zswap pure subroutine stdlib_zsymm ( side , uplo , m , n , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYMM performs one of the matrix-matrix operations !! C := alpha*A*B + beta*C, !! or !! C := alpha*B*A + beta*C, !! where alpha and beta are scalars, A is a symmetric matrix and B and !! C are m by n matrices. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: lda , ldb , ldc , m , n character , intent ( in ) :: side , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: upper ! set nrowa as the number of rows of a. if ( stdlib_lsame ( side , 'L' )) then nrowa = m else nrowa = n end if upper = stdlib_lsame ( uplo , 'U' ) ! test the input parameters. info = 0 if ((. not . stdlib_lsame ( side , 'L' )) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ( m < 0 ) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , m )) then info = 9 else if ( ldc < max ( 1 , m )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYMM ' , info ) return end if ! quick return if possible. if (( m == 0 ) . or . ( n == 0 ) . or .(( alpha == czero ). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( beta == czero ) then do j = 1 , n do i = 1 , m c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , m c ( i , j ) = beta * c ( i , j ) end do end do end if return end if ! start the operations. if ( stdlib_lsame ( side , 'L' )) then ! form c := alpha*a*b + beta*c. if ( upper ) then do j = 1 , n do i = 1 , m temp1 = alpha * b ( i , j ) temp2 = czero do k = 1 , i - 1 c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do else do j = 1 , n do i = m , 1 , - 1 temp1 = alpha * b ( i , j ) temp2 = czero do k = i + 1 , m c ( k , j ) = c ( k , j ) + temp1 * a ( k , i ) temp2 = temp2 + b ( k , j ) * a ( k , i ) end do if ( beta == czero ) then c ( i , j ) = temp1 * a ( i , i ) + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + temp1 * a ( i , i ) + alpha * temp2 end if end do end do end if else ! form c := alpha*b*a + beta*c. loop_170 : do j = 1 , n temp1 = alpha * a ( j , j ) if ( beta == czero ) then do i = 1 , m c ( i , j ) = temp1 * b ( i , j ) end do else do i = 1 , m c ( i , j ) = beta * c ( i , j ) + temp1 * b ( i , j ) end do end if do k = 1 , j - 1 if ( upper ) then temp1 = alpha * a ( k , j ) else temp1 = alpha * a ( j , k ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do do k = j + 1 , n if ( upper ) then temp1 = alpha * a ( j , k ) else temp1 = alpha * a ( k , j ) end if do i = 1 , m c ( i , j ) = c ( i , j ) + temp1 * b ( i , k ) end do end do end do loop_170 end if return end subroutine stdlib_zsymm pure subroutine stdlib_zsyr2k ( uplo , trans , n , k , alpha , a , lda , b , ldb , beta , c , ldc ) !! ZSYR2K performs one of the symmetric rank 2k operations !! C := alpha*A*B**T + alpha*B*A**T + beta*C, !! or !! C := alpha*A**T*B + alpha*B**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A and B are n by k matrices in the first case and k by n !! matrices in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldb , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ), b ( ldb , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp1 , temp2 integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldb < max ( 1 , nrowa )) then info = 9 else if ( ldc < max ( 1 , n )) then info = 12 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYR2K' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*b**t + alpha*b*a**t + c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if (( a ( j , l ) /= czero ) . or . ( b ( j , l ) /= czero )) then temp1 = alpha * b ( j , l ) temp2 = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + a ( i , l ) * temp1 + b ( i , l ) * temp2 end do end if end do end do end if else ! form c := alpha*a**t*b + alpha*b**t*a + c. if ( upper ) then do j = 1 , n do i = 1 , j temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do else do j = 1 , n do i = j , n temp1 = czero temp2 = czero do l = 1 , k temp1 = temp1 + a ( l , i ) * b ( l , j ) temp2 = temp2 + b ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp1 + alpha * temp2 else c ( i , j ) = beta * c ( i , j ) + alpha * temp1 + alpha * temp2 end if end do end do end if end if return end subroutine stdlib_zsyr2k pure subroutine stdlib_zsyrk ( uplo , trans , n , k , alpha , a , lda , beta , c , ldc ) !! ZSYRK performs one of the symmetric rank k operations !! C := alpha*A*A**T + beta*C, !! or !! C := alpha*A**T*A + beta*C, !! where alpha and beta are scalars, C is an n by n symmetric matrix !! and A is an n by k matrix in the first case and a k by n matrix !! in the second case. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha , beta integer ( ilp ), intent ( in ) :: k , lda , ldc , n character , intent ( in ) :: trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: c ( ldc , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , l , nrowa logical ( lk ) :: upper ! test the input parameters. if ( stdlib_lsame ( trans , 'N' )) then nrowa = n else nrowa = k end if upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 1 else if ((. not . stdlib_lsame ( trans , 'N' )) . and .(. not . stdlib_lsame ( trans , 'T' ))) & then info = 2 else if ( n < 0 ) then info = 3 else if ( k < 0 ) then info = 4 else if ( lda < max ( 1 , nrowa )) then info = 7 else if ( ldc < max ( 1 , n )) then info = 10 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZSYRK ' , info ) return end if ! quick return if possible. if (( n == 0 ) . or . ((( alpha == czero ). or .( k == 0 )). and . ( beta == cone ))) return ! and when alpha.eq.czero. if ( alpha == czero ) then if ( upper ) then if ( beta == czero ) then do j = 1 , n do i = 1 , j c ( i , j ) = czero end do end do else do j = 1 , n do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end do end if else if ( beta == czero ) then do j = 1 , n do i = j , n c ( i , j ) = czero end do end do else do j = 1 , n do i = j , n c ( i , j ) = beta * c ( i , j ) end do end do end if end if return end if ! start the operations. if ( stdlib_lsame ( trans , 'N' )) then ! form c := alpha*a*a**t + beta*c. if ( upper ) then do j = 1 , n if ( beta == czero ) then do i = 1 , j c ( i , j ) = czero end do else if ( beta /= cone ) then do i = 1 , j c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = 1 , j c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do else do j = 1 , n if ( beta == czero ) then do i = j , n c ( i , j ) = czero end do else if ( beta /= cone ) then do i = j , n c ( i , j ) = beta * c ( i , j ) end do end if do l = 1 , k if ( a ( j , l ) /= czero ) then temp = alpha * a ( j , l ) do i = j , n c ( i , j ) = c ( i , j ) + temp * a ( i , l ) end do end if end do end do end if else ! form c := alpha*a**t*a + beta*c. if ( upper ) then do j = 1 , n do i = 1 , j temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do else do j = 1 , n do i = j , n temp = czero do l = 1 , k temp = temp + a ( l , i ) * a ( l , j ) end do if ( beta == czero ) then c ( i , j ) = alpha * temp else c ( i , j ) = alpha * temp + beta * c ( i , j ) end if end do end do end if end if return end subroutine stdlib_zsyrk pure subroutine stdlib_ztbmv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular band matrix, with ( k + 1 ) diagonals. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( kplus1 , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = kplus1 - j do i = max ( 1 , j - k ), j - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( kplus1 , j ) end if jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( l + i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( 1 , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx l = 1 - j do i = min ( n , j + k ), j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( l + i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( 1 , j ) end if jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) kx = kx - incx ix = kx l = kplus1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( kplus1 , j ) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + a ( l + i , j ) * x ( ix ) ix = ix - incx end do else if ( nounit ) temp = temp * conjg ( a ( kplus1 , j )) do i = j - 1 , max ( 1 , j - k ), - 1 temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) kx = kx + incx ix = kx l = 1 - j if ( noconj ) then if ( nounit ) temp = temp * a ( 1 , j ) do i = j + 1 , min ( n , j + k ) temp = temp + a ( l + i , j ) * x ( ix ) ix = ix + incx end do else if ( nounit ) temp = temp * conjg ( a ( 1 , j )) do i = j + 1 , min ( n , j + k ) temp = temp + conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztbmv pure subroutine stdlib_ztbsv ( uplo , trans , diag , n , k , a , lda , x , incx ) !! ZTBSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular band matrix, with ( k + 1 ) !! diagonals. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , k , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kplus1 , kx , l logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max , min ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( k < 0 ) then info = 5 else if ( lda < ( k + 1 )) then info = 7 else if ( incx == 0 ) then info = 9 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTBSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed by sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then l = kplus1 - j if ( nounit ) x ( j ) = x ( j ) / a ( kplus1 , j ) temp = x ( j ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 kx = kx - incx if ( x ( jx ) /= czero ) then ix = kx l = kplus1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( kplus1 , j ) temp = x ( jx ) do i = j - 1 , max ( 1 , j - k ), - 1 x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix - incx end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then l = 1 - j if ( nounit ) x ( j ) = x ( j ) / a ( 1 , j ) temp = x ( j ) do i = j + 1 , min ( n , j + k ) x ( i ) = x ( i ) - temp * a ( l + i , j ) end do end if end do else jx = kx do j = 1 , n kx = kx + incx if ( x ( jx ) /= czero ) then ix = kx l = 1 - j if ( nounit ) x ( jx ) = x ( jx ) / a ( 1 , j ) temp = x ( jx ) do i = j + 1 , min ( n , j + k ) x ( ix ) = x ( ix ) - temp * a ( l + i , j ) ix = ix + incx end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kplus1 = k + 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx l = kplus1 - j if ( noconj ) then do i = max ( 1 , j - k ), j - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( kplus1 , j ) else do i = max ( 1 , j - k ), j - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( kplus1 , j )) end if x ( jx ) = temp jx = jx + incx if ( j > k ) kx = kx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx l = 1 - j if ( noconj ) then do i = min ( n , j + k ), j + 1 , - 1 temp = temp - a ( l + i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( 1 , j ) else do i = min ( n , j + k ), j + 1 , - 1 temp = temp - conjg ( a ( l + i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( 1 , j )) end if x ( jx ) = temp jx = jx - incx if (( n - j ) >= k ) kx = kx - incx end do end if end if end if return end subroutine stdlib_ztbsv pure subroutine stdlib_ztpmv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix, supplied in packed form. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x:= a*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = 1 , j - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k + 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk + j - 1 ) end if kk = kk + j end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk + j - 2 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk + j - 1 ) end if jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) k = kk do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * ap ( k ) k = k - 1 end do if ( nounit ) x ( j ) = x ( j ) * ap ( kk - n + j ) end if kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do k = kk , kk - ( n - ( j + 1 )), - 1 x ( ix ) = x ( ix ) + temp * ap ( k ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * ap ( kk - n + j ) end if jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk - 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j - 1 , 1 , - 1 temp = temp + ap ( k ) * x ( i ) k = k - 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( ap ( k )) * x ( i ) k = k - 1 end do end if x ( j ) = temp kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk + 1 if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do i = j + 1 , n temp = temp + ap ( k ) * x ( i ) k = k + 1 end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do i = j + 1 , n temp = temp + conjg ( ap ( k )) * x ( i ) k = k + 1 end do end if x ( j ) = temp kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * ap ( kk ) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + ap ( k ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( ap ( kk )) do k = kk + 1 , kk + n - j ix = ix + incx temp = temp + conjg ( ap ( k )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpmv pure subroutine stdlib_ztpsv ( uplo , trans , diag , n , ap , x , incx ) !! ZTPSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix, supplied in packed form. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: ap ( * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , k , kk , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( incx == 0 ) then info = 7 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTPSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of ap are ! accessed sequentially with cone pass through ap. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk - 1 do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * ap ( k ) k = k - 1 end do end if kk = kk - j end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk - 1 , kk - j + 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx - incx kk = kk - j end do end if else kk = 1 if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / ap ( kk ) temp = x ( j ) k = kk + 1 do i = j + 1 , n x ( i ) = x ( i ) - temp * ap ( k ) k = k + 1 end do end if kk = kk + ( n - j + 1 ) end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / ap ( kk ) temp = x ( jx ) ix = jx do k = kk + 1 , kk + n - j ix = ix + incx x ( ix ) = x ( ix ) - temp * ap ( k ) end do end if jx = jx + incx kk = kk + ( n - j + 1 ) end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then kk = 1 if ( incx == 1 ) then do j = 1 , n temp = x ( j ) k = kk if ( noconj ) then do i = 1 , j - 1 temp = temp - ap ( k ) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do i = 1 , j - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k + 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( j ) = temp kk = kk + j end do else jx = kx do j = 1 , n temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk + j - 2 temp = temp - ap ( k ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / ap ( kk + j - 1 ) else do k = kk , kk + j - 2 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( ap ( kk + j - 1 )) end if x ( jx ) = temp jx = jx + incx kk = kk + j end do end if else kk = ( n * ( n + 1 )) / 2 if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) k = kk if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - ap ( k ) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( ap ( k )) * x ( i ) k = k - 1 end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( j ) = temp kk = kk - ( n - j + 1 ) end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 temp = x ( jx ) ix = kx if ( noconj ) then do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - ap ( k ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / ap ( kk - n + j ) else do k = kk , kk - ( n - ( j + 1 )), - 1 temp = temp - conjg ( ap ( k )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( ap ( kk - n + j )) end if x ( jx ) = temp jx = jx - incx kk = kk - ( n - j + 1 ) end do end if end if end if return end subroutine stdlib_ztpsv pure subroutine stdlib_ztrmm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRMM performs one of the matrix-matrix operations !! B := alpha*op( A )*B, or B := alpha*B*op( A ) !! where alpha is a scalar, B is an m by n matrix, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*a*b. if ( upper ) then do j = 1 , n do k = 1 , m if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do if ( nounit ) temp = temp * a ( k , k ) b ( k , j ) = temp end if end do end do else do j = 1 , n do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then temp = alpha * b ( k , j ) b ( k , j ) = temp if ( nounit ) b ( k , j ) = b ( k , j ) * a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) + temp * a ( i , k ) end do end if end do end do end if else ! form b := alpha*a**t*b or b := alpha*a**h*b. if ( upper ) then do j = 1 , n do i = m , 1 , - 1 temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = 1 , i - 1 temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = 1 , i - 1 temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do else do j = 1 , n do i = 1 , m temp = b ( i , j ) if ( noconj ) then if ( nounit ) temp = temp * a ( i , i ) do k = i + 1 , m temp = temp + a ( k , i ) * b ( k , j ) end do else if ( nounit ) temp = temp * conjg ( a ( i , i )) do k = i + 1 , m temp = temp + conjg ( a ( k , i )) * b ( k , j ) end do end if b ( i , j ) = alpha * temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*a. if ( upper ) then do j = n , 1 , - 1 temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do else do j = 1 , n temp = alpha if ( nounit ) temp = temp * a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do do k = j + 1 , n if ( a ( k , j ) /= czero ) then temp = alpha * a ( k , j ) do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do end do end if else ! form b := alpha*b*a**t or b := alpha*b*a**h. if ( upper ) then loop_280 : do k = 1 , n do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_280 else loop_320 : do k = n , 1 , - 1 do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = alpha * a ( j , k ) else temp = alpha * conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) + temp * b ( i , k ) end do end if end do temp = alpha if ( nounit ) then if ( noconj ) then temp = temp * a ( k , k ) else temp = temp * conjg ( a ( k , k )) end if end if if ( temp /= cone ) then do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if end do loop_320 end if end if end if return end subroutine stdlib_ztrmm pure subroutine stdlib_ztrmv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRMV performs one of the matrix-vector operations !! x := A*x, or x := A**T*x, or x := A**H*x, !! where x is an n element vector and A is an n by n unit, or non-unit, !! upper or lower triangular matrix. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRMV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := a*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then temp = x ( j ) do i = 1 , j - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = 1 , j - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix + incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then temp = x ( j ) do i = n , j + 1 , - 1 x ( i ) = x ( i ) + temp * a ( i , j ) end do if ( nounit ) x ( j ) = x ( j ) * a ( j , j ) end if end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then temp = x ( jx ) ix = kx do i = n , j + 1 , - 1 x ( ix ) = x ( ix ) + temp * a ( i , j ) ix = ix - incx end do if ( nounit ) x ( jx ) = x ( jx ) * a ( j , j ) end if jx = jx - incx end do end if end if else ! form x := a**t*x or x := a**h*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j - 1 , 1 , - 1 ix = ix - incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n temp = temp + a ( i , j ) * x ( i ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n temp = temp + conjg ( a ( i , j )) * x ( i ) end do end if x ( j ) = temp end do else jx = kx do j = 1 , n temp = x ( jx ) ix = jx if ( noconj ) then if ( nounit ) temp = temp * a ( j , j ) do i = j + 1 , n ix = ix + incx temp = temp + a ( i , j ) * x ( ix ) end do else if ( nounit ) temp = temp * conjg ( a ( j , j )) do i = j + 1 , n ix = ix + incx temp = temp + conjg ( a ( i , j )) * x ( ix ) end do end if x ( jx ) = temp jx = jx + incx end do end if end if end if return end subroutine stdlib_ztrmv pure subroutine stdlib_ztrsm ( side , uplo , transa , diag , m , n , alpha , a , lda , b , ldb ) !! ZTRSM solves one of the matrix equations !! op( A )*X = alpha*B, or X*op( A ) = alpha*B, !! where alpha is a scalar, X and B are m by n matrices, A is a unit, or !! non-unit, upper or lower triangular matrix and op( A ) is one of !! op( A ) = A or op( A ) = A**T or op( A ) = A**H. !! The matrix X is overwritten on B. ! -- reference blas level3 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments complex ( dp ), intent ( in ) :: alpha integer ( ilp ), intent ( in ) :: lda , ldb , m , n character , intent ( in ) :: diag , side , transa , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: b ( ldb , * ) ! ===================================================================== ! Intrinsic Functions intrinsic :: conjg , max ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , j , k , nrowa logical ( lk ) :: lside , noconj , nounit , upper ! test the input parameters. lside = stdlib_lsame ( side , 'L' ) if ( lside ) then nrowa = m else nrowa = n end if noconj = stdlib_lsame ( transa , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) upper = stdlib_lsame ( uplo , 'U' ) info = 0 if ((. not . lside ) . and . (. not . stdlib_lsame ( side , 'R' ))) then info = 1 else if ((. not . upper ) . and . (. not . stdlib_lsame ( uplo , 'L' ))) then info = 2 else if ((. not . stdlib_lsame ( transa , 'N' )) . and .(. not . stdlib_lsame ( transa , 'T' )) . and .(& . not . stdlib_lsame ( transa , 'C' ))) then info = 3 else if ((. not . stdlib_lsame ( diag , 'U' )) . and . (. not . stdlib_lsame ( diag , 'N' ))) & then info = 4 else if ( m < 0 ) then info = 5 else if ( n < 0 ) then info = 6 else if ( lda < max ( 1 , nrowa )) then info = 9 else if ( ldb < max ( 1 , m )) then info = 11 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSM ' , info ) return end if ! quick return if possible. if ( m == 0 . or . n == 0 ) return ! and when alpha.eq.czero. if ( alpha == czero ) then do j = 1 , n do i = 1 , m b ( i , j ) = czero end do end do return end if ! start the operations. if ( lside ) then if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*inv( a )*b. if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = m , 1 , - 1 if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = 1 , k - 1 b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do else do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , m if ( b ( k , j ) /= czero ) then if ( nounit ) b ( k , j ) = b ( k , j ) / a ( k , k ) do i = k + 1 , m b ( i , j ) = b ( i , j ) - b ( k , j ) * a ( i , k ) end do end if end do end do end if else ! form b := alpha*inv( a**t )*b ! or b := alpha*inv( a**h )*b. if ( upper ) then do j = 1 , n do i = 1 , m temp = alpha * b ( i , j ) if ( noconj ) then do k = 1 , i - 1 temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = 1 , i - 1 temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do else do j = 1 , n do i = m , 1 , - 1 temp = alpha * b ( i , j ) if ( noconj ) then do k = i + 1 , m temp = temp - a ( k , i ) * b ( k , j ) end do if ( nounit ) temp = temp / a ( i , i ) else do k = i + 1 , m temp = temp - conjg ( a ( k , i )) * b ( k , j ) end do if ( nounit ) temp = temp / conjg ( a ( i , i )) end if b ( i , j ) = temp end do end do end if end if else if ( stdlib_lsame ( transa , 'N' )) then ! form b := alpha*b*inv( a ). if ( upper ) then do j = 1 , n if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = 1 , j - 1 if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do else do j = n , 1 , - 1 if ( alpha /= cone ) then do i = 1 , m b ( i , j ) = alpha * b ( i , j ) end do end if do k = j + 1 , n if ( a ( k , j ) /= czero ) then do i = 1 , m b ( i , j ) = b ( i , j ) - a ( k , j ) * b ( i , k ) end do end if end do if ( nounit ) then temp = cone / a ( j , j ) do i = 1 , m b ( i , j ) = temp * b ( i , j ) end do end if end do end if else ! form b := alpha*b*inv( a**t ) ! or b := alpha*b*inv( a**h ). if ( upper ) then loop_330 : do k = n , 1 , - 1 if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = 1 , k - 1 if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_330 else loop_380 : do k = 1 , n if ( nounit ) then if ( noconj ) then temp = cone / a ( k , k ) else temp = cone / conjg ( a ( k , k )) end if do i = 1 , m b ( i , k ) = temp * b ( i , k ) end do end if do j = k + 1 , n if ( a ( j , k ) /= czero ) then if ( noconj ) then temp = a ( j , k ) else temp = conjg ( a ( j , k )) end if do i = 1 , m b ( i , j ) = b ( i , j ) - temp * b ( i , k ) end do end if end do if ( alpha /= cone ) then do i = 1 , m b ( i , k ) = alpha * b ( i , k ) end do end if end do loop_380 end if end if end if return end subroutine stdlib_ztrsm pure subroutine stdlib_ztrsv ( uplo , trans , diag , n , a , lda , x , incx ) !! ZTRSV solves one of the systems of equations !! A*x = b, or A**T*x = b, or A**H*x = b, !! where b and x are n element vectors and A is an n by n unit, or !! non-unit, upper or lower triangular matrix. !! No test for singularity or near-singularity is included in this !! routine. Such tests must be performed before calling this routine. ! -- reference blas level2 routine -- ! -- reference blas is a software package provided by univ. of tennessee, -- ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..-- ! Scalar Arguments integer ( ilp ), intent ( in ) :: incx , lda , n character , intent ( in ) :: diag , trans , uplo ! Array Arguments complex ( dp ), intent ( in ) :: a ( lda , * ) complex ( dp ), intent ( inout ) :: x ( * ) ! ===================================================================== ! Local Scalars complex ( dp ) :: temp integer ( ilp ) :: i , info , ix , j , jx , kx logical ( lk ) :: noconj , nounit ! Intrinsic Functions intrinsic :: conjg , max ! test the input parameters. info = 0 if (. not . stdlib_lsame ( uplo , 'U' ) . and . . not . stdlib_lsame ( uplo , 'L' )) then info = 1 else if (. not . stdlib_lsame ( trans , 'N' ) . and . . not . stdlib_lsame ( trans , 'T' ) & . and .. not . stdlib_lsame ( trans , 'C' )) then info = 2 else if (. not . stdlib_lsame ( diag , 'U' ) . and . . not . stdlib_lsame ( diag , 'N' )) then info = 3 else if ( n < 0 ) then info = 4 else if ( lda < max ( 1 , n )) then info = 6 else if ( incx == 0 ) then info = 8 end if if ( info /= 0 ) then call stdlib_xerbla ( 'ZTRSV ' , info ) return end if ! quick return if possible. if ( n == 0 ) return noconj = stdlib_lsame ( trans , 'T' ) nounit = stdlib_lsame ( diag , 'N' ) ! set up the start point in x if the increment is not unity. this ! will be ( n - 1 )*incx too small for descending loops. if ( incx <= 0 ) then kx = 1 - ( n - 1 ) * incx else if ( incx /= 1 ) then kx = 1 end if ! start the operations. in this version the elements of a are ! accessed sequentially with cone pass through a. if ( stdlib_lsame ( trans , 'N' )) then ! form x := inv( a )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = n , 1 , - 1 if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j - 1 , 1 , - 1 x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx + ( n - 1 ) * incx do j = n , 1 , - 1 if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j - 1 , 1 , - 1 ix = ix - incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx - incx end do end if else if ( incx == 1 ) then do j = 1 , n if ( x ( j ) /= czero ) then if ( nounit ) x ( j ) = x ( j ) / a ( j , j ) temp = x ( j ) do i = j + 1 , n x ( i ) = x ( i ) - temp * a ( i , j ) end do end if end do else jx = kx do j = 1 , n if ( x ( jx ) /= czero ) then if ( nounit ) x ( jx ) = x ( jx ) / a ( j , j ) temp = x ( jx ) ix = jx do i = j + 1 , n ix = ix + incx x ( ix ) = x ( ix ) - temp * a ( i , j ) end do end if jx = jx + incx end do end if end if else ! form x := inv( a**t )*x or x := inv( a**h )*x. if ( stdlib_lsame ( uplo , 'U' )) then if ( incx == 1 ) then do j = 1 , n temp = x ( j ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else jx = kx do j = 1 , n ix = kx temp = x ( jx ) if ( noconj ) then do i = 1 , j - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = 1 , j - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix + incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx + incx end do end if else if ( incx == 1 ) then do j = n , 1 , - 1 temp = x ( j ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( i ) end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( i ) end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( j ) = temp end do else kx = kx + ( n - 1 ) * incx jx = kx do j = n , 1 , - 1 ix = kx temp = x ( jx ) if ( noconj ) then do i = n , j + 1 , - 1 temp = temp - a ( i , j ) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / a ( j , j ) else do i = n , j + 1 , - 1 temp = temp - conjg ( a ( i , j )) * x ( ix ) ix = ix - incx end do if ( nounit ) temp = temp / conjg ( a ( j , j )) end if x ( jx ) = temp jx = jx - incx end do end if end if end if return end subroutine stdlib_ztrsv end module stdlib_linalg_blas_z","tags":"","loc":"sourcefile/stdlib_linalg_blas_z.fypp.html"},{"title":"stdlib_io.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_io !! Provides a support for file handling !! ([Specification](../page/specs/stdlib_io.html)) use , intrinsic :: iso_fortran_env , only : input_unit use stdlib_kinds , only : sp , dp , xdp , qp , & int8 , int16 , int32 , int64 use stdlib_error , only : error_stop use stdlib_optval , only : optval use stdlib_ascii , only : is_blank use stdlib_string_type , only : string_type implicit none private ! Public API public :: loadtxt , savetxt , open , getline ! Private API that is exposed so that we can test it in tests public :: parse_mode !> Version: experimental !> !> Format strings with edit descriptors for each type and kind !> ([Specification](../page/specs/stdlib_io.html)) character ( * ), parameter :: & !> Format string for integers FMT_INT = '(i0)' , & !> Format string for single precision real numbers FMT_REAL_SP = '(es15.8e2)' , & !> Format string for souble precision real numbers FMT_REAL_DP = '(es24.16e3)' , & !> Format string for extended double precision real numbers FMT_REAL_XDP = '(es26.18e3)' , & !> Format string for quadruple precision real numbers FMT_REAL_QP = '(es44.35e4)' , & !> Format string for single precision complex numbers FMT_COMPLEX_SP = '(es15.8e2,1x,es15.8e2)' , & !> Format string for double precision complex numbers FMT_COMPLEX_DP = '(es24.16e3,1x,es24.16e3)' , & !> Format string for extended double precision complex numbers FMT_COMPLEX_XDP = '(es26.18e3,1x,es26.18e3)' , & !> Format string for quadruple precision complex numbers FMT_COMPLEX_QP = '(es44.35e4,1x,es44.35e4)' public :: FMT_INT , FMT_REAL_SP , FMT_REAL_DP , FMT_REAL_XDP , FMT_REAL_QP public :: FMT_COMPLEX_SP , FMT_COMPLEX_DP , FMT_COMPLEX_XDP , FMT_COMPLEX_QP !> Version: experimental !> !> Read a whole line from a formatted unit into a string variable interface getline module procedure :: getline_char module procedure :: getline_string module procedure :: getline_input_char module procedure :: getline_input_string end interface getline interface loadtxt !! version: experimental !! !! Loads a 2D array from a text file !! ([Specification](../page/specs/stdlib_io.html#description)) # : for k1 , t1 in KINDS_TYPES module procedure loadtxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface loadtxt interface savetxt !! version: experimental !! !! Saves a 2D array into a text file !! ([Specification](../page/specs/stdlib_io.html#description_2)) # : for k1 , t1 in KINDS_TYPES module procedure savetxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface contains # : for k1 , t1 in KINDS_TYPES subroutine loadtxt_$ { t1 [ 0 ] }{ k1 }$ ( filename , d , skiprows , max_rows , fmt ) !! version: experimental !! !! Loads a 2D array from a text file. !! !! Arguments !! --------- !! !! Filename to load the array from character ( len =* ), intent ( in ) :: filename !! The array 'd' will be automatically allocated with the correct dimensions ${ t1 }$ , allocatable , intent ( out ) :: d (:,:) !! Skip the first `skiprows` lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. integer , intent ( in ), optional :: skiprows !! Read `max_rows` lines of content after `skiprows` lines. !! A negative value results in reading all lines. !! A value of zero results in no lines to be read. !! The default value is -1. integer , intent ( in ), optional :: max_rows character ( len =* ), intent ( in ), optional :: fmt character ( len = :), allocatable :: fmt_ !! !! Example !! ------- !! !!```fortran !! ${t1}$, allocatable :: data(:, :) !! call loadtxt(\"log.txt\", data) ! 'data' will be automatically allocated !!``` !! !! Where 'log.txt' contains for example:: !! !! 1 2 3 !! 2 4 6 !! 8 9 10 !! 11 12 13 !! ... !! integer :: s integer :: nrow , ncol , i , skiprows_ , max_rows_ skiprows_ = max ( optval ( skiprows , 0 ), 0 ) max_rows_ = optval ( max_rows , - 1 ) s = open ( filename ) ! determine number or rows nrow = number_of_rows ( s ) skiprows_ = min ( skiprows_ , nrow ) if ( max_rows_ < 0 . or . max_rows_ > ( nrow - skiprows_ ) ) max_rows_ = nrow - skiprows_ ! determine number of columns ncol = 0 if ( skiprows_ < nrow ) ncol = number_of_columns ( s , skiprows = skiprows_ ) # : if 'complex' in t1 ncol = ncol / 2 # : endif allocate ( d ( max_rows_ , ncol )) do i = 1 , skiprows_ read ( s , * ) end do # : if 'real' in t1 ! Default to format used for savetxt if fmt not specified. fmt_ = optval ( fmt , \"(*\" // FMT_REAL_$ { k1 }$ ( 1 : len ( FMT_REAL_$ { k1 }$ ) - 1 ) // \",1x))\" ) if ( fmt_ == '*' ) then ! Use list directed read if user has specified fmt='*' do i = 1 , max_rows_ read ( s , * ) d ( i , :) enddo else ! Otherwise pass default or user specified fmt string. do i = 1 , max_rows_ read ( s , fmt_ ) d ( i , :) enddo endif # : elif 'complex' in t1 ! Default to format used for savetxt if fmt not specified. fmt_ = optval ( fmt , \"(*\" // FMT_COMPLEX_$ { k1 }$ ( 1 : len ( FMT_COMPLEX_$ { k1 }$ ) - 1 ) // \",1x))\" ) if ( fmt_ == '*' ) then ! Use list directed read if user has specified fmt='*' do i = 1 , max_rows_ read ( s , * ) d ( i , :) enddo else ! Otherwise pass default or user specified fmt string. do i = 1 , max_rows_ read ( s , fmt_ ) d ( i , :) enddo endif # : else ! Default to list directed for integer fmt_ = optval ( fmt , \"*\" ) ! Use list directed read if user has specified fmt='*' if ( fmt_ == '*' ) then do i = 1 , max_rows_ read ( s , * ) d ( i , :) enddo else ! Otherwise pass default user specified fmt string. do i = 1 , max_rows_ read ( s , fmt_ ) d ( i , :) enddo endif # : endif close ( s ) end subroutine loadtxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in KINDS_TYPES subroutine savetxt_$ { t1 [ 0 ] }{ k1 }$ ( filename , d ) !! version: experimental !! !! Saves a 2D array into a text file. !! !! Arguments !! --------- !! character ( len =* ), intent ( in ) :: filename ! File to save the array to ${ t1 }$ , intent ( in ) :: d (:,:) ! The 2D array to save !! !! Example !! ------- !! !!```fortran !! ${t1}$ :: data(3, 2) !! call savetxt(\"log.txt\", data) !!``` !! integer :: s , i s = open ( filename , \"w\" ) do i = 1 , size ( d , 1 ) # : if 'real' in t1 write ( s , \"(*\" // FMT_REAL_$ { k1 }$ ( 1 : len ( FMT_REAL_$ { k1 }$ ) - 1 ) // \",1x))\" ) d ( i , :) # : elif 'complex' in t1 write ( s , \"(*\" // FMT_COMPLEX_$ { k1 }$ ( 1 : len ( FMT_COMPLEX_$ { k1 }$ ) - 1 ) // \",1x))\" ) d ( i , :) # : elif 'integer' in t1 write ( s , \"(*\" // FMT_INT ( 1 : len ( FMT_INT ) - 1 ) // \",1x))\" ) d ( i , :) # : else write ( s , * ) d ( i , :) # : endif end do close ( s ) end subroutine savetxt_$ { t1 [ 0 ] }{ k1 }$ # : endfor integer function number_of_columns ( s , skiprows ) !! version: experimental !! !! determine number of columns integer , intent ( in ) :: s integer , intent ( in ), optional :: skiprows integer :: ios , skiprows_ , i character :: c logical :: lastblank skiprows_ = optval ( skiprows , 0 ) rewind ( s ) do i = 1 , skiprows_ read ( s , * ) end do number_of_columns = 0 lastblank = . true . do read ( s , '(a)' , advance = 'no' , iostat = ios ) c if ( ios /= 0 ) exit if ( lastblank . and . . not . is_blank ( c )) number_of_columns = number_of_columns + 1 lastblank = is_blank ( c ) end do rewind ( s ) end function number_of_columns integer function number_of_rows ( s ) result ( nrows ) !! version: experimental !! !! Determine the number or rows in a file integer , intent ( in ) :: s integer :: ios rewind ( s ) nrows = 0 do read ( s , * , iostat = ios ) if ( ios /= 0 ) exit nrows = nrows + 1 end do rewind ( s ) end function number_of_rows integer function open ( filename , mode , iostat ) result ( u ) !! version: experimental !! !! Opens a file !! ([Specification](../page/specs/stdlib_io.html#description_1)) !! !!##### Behavior !! !! !! To open a file to read: !! !!```fortran !! u = open(\"somefile.txt\") ! The default `mode` is \"rt\" !! u = open(\"somefile.txt\", \"r\") !!``` !! !! To open a file to write: !! !!```fortran !! u = open(\"somefile.txt\", \"w\") !!``` !! !! To append to the end of the file if it exists: !! !!```fortran !! u = open(\"somefile.txt\", \"a\") !!``` character ( * ), intent ( in ) :: filename character ( * ), intent ( in ), optional :: mode integer , intent ( out ), optional :: iostat character ( 3 ) :: mode_ character (:), allocatable :: action_ , position_ , status_ , access_ , form_ mode_ = parse_mode ( optval ( mode , \"\" )) select case ( mode_ ( 1 : 2 )) case ( 'r' ) action_ = 'read' position_ = 'asis' status_ = 'old' case ( 'w' ) action_ = 'write' position_ = 'asis' status_ = 'replace' case ( 'a' ) action_ = 'write' position_ = 'append' status_ = 'old' case ( 'x' ) action_ = 'write' position_ = 'asis' status_ = 'new' case ( 'r+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'old' case ( 'w+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'replace' case ( 'a+' ) action_ = 'readwrite' position_ = 'append' status_ = 'old' case ( 'x+' ) action_ = 'readwrite' position_ = 'asis' status_ = 'new' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 1 : 2 )) end select select case ( mode_ ( 3 : 3 )) case ( 't' ) form_ = 'formatted' case ( 'b' ) form_ = 'unformatted' case default call error_stop ( \"Unsupported mode: \" // mode_ ( 3 : 3 )) end select access_ = 'stream' if ( present ( iostat )) then open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ , & iostat = iostat ) else open ( newunit = u , file = filename , & action = action_ , position = position_ , status = status_ , & access = access_ , form = form_ ) end if end function open character ( 3 ) function parse_mode ( mode ) result ( mode_ ) character ( * ), intent ( in ) :: mode integer :: i character (:), allocatable :: a logical :: lfirst ( 3 ) mode_ = 'r t' if ( len_trim ( mode ) == 0 ) return a = trim ( adjustl ( mode )) lfirst = . true . do i = 1 , len ( a ) if ( lfirst ( 1 ) & . and . ( a ( i : i ) == 'r' . or . a ( i : i ) == 'w' . or . a ( i : i ) == 'a' . or . a ( i : i ) == 'x' ) & ) then mode_ ( 1 : 1 ) = a ( i : i ) lfirst ( 1 ) = . false . else if ( lfirst ( 2 ) . and . a ( i : i ) == '+' ) then mode_ ( 2 : 2 ) = a ( i : i ) lfirst ( 2 ) = . false . else if ( lfirst ( 3 ) . and . ( a ( i : i ) == 't' . or . a ( i : i ) == 'b' )) then mode_ ( 3 : 3 ) = a ( i : i ) lfirst ( 3 ) = . false . else if ( a ( i : i ) == ' ' ) then cycle else if ( any (. not . lfirst )) then call error_stop ( \"Wrong mode: \" // trim ( a )) else call error_stop ( \"Wrong character: \" // a ( i : i )) endif end do end function parse_mode !> Version: experimental !> !> Read a whole line from a formatted unit into a deferred length character variable subroutine getline_char ( unit , line , iostat , iomsg ) !> Formatted IO unit integer , intent ( in ) :: unit !> Line to read character ( len = :), allocatable , intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg integer , parameter :: bufsize = 4096 character ( len = bufsize ) :: buffer , msg integer :: chunk , stat logical :: opened if ( unit /= - 1 ) then inquire ( unit = unit , opened = opened ) else opened = . false . end if if ( opened ) then open ( unit = unit , pad = \"yes\" , iostat = stat , iomsg = msg ) else stat = 1 msg = \"Unit is not connected\" end if line = \"\" do while ( stat == 0 ) read ( unit , '(a)' , advance = 'no' , iostat = stat , iomsg = msg , size = chunk ) buffer if ( stat > 0 ) exit line = line // buffer (: chunk ) end do if ( is_iostat_eor ( stat )) stat = 0 if ( stat /= 0 . and . present ( iomsg )) iomsg = trim ( msg ) if ( present ( iostat )) then iostat = stat else if ( stat /= 0 ) then call error_stop ( trim ( msg )) end if end subroutine getline_char !> Version: experimental !> !> Read a whole line from a formatted unit into a string variable subroutine getline_string ( unit , line , iostat , iomsg ) !> Formatted IO unit integer , intent ( in ) :: unit !> Line to read type ( string_type ), intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg character ( len = :), allocatable :: buffer call getline ( unit , buffer , iostat , iomsg ) line = string_type ( buffer ) end subroutine getline_string !> Version: experimental !> !> Read a whole line from the standard input into a deferred length character variable subroutine getline_input_char ( line , iostat , iomsg ) !> Line to read character ( len = :), allocatable , intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg call getline ( input_unit , line , iostat , iomsg ) end subroutine getline_input_char !> Version: experimental !> !> Read a whole line from the standard input into a string variable subroutine getline_input_string ( line , iostat , iomsg ) !> Line to read type ( string_type ), intent ( out ) :: line !> Status of operation integer , intent ( out ), optional :: iostat !> Error message character ( len = :), allocatable , optional :: iomsg call getline ( input_unit , line , iostat , iomsg ) end subroutine getline_input_string end module stdlib_io","tags":"","loc":"sourcefile/stdlib_io.fypp.html"},{"title":"stdlib_math_diff.fypp – Fortran-lang/stdlib","text":"Source Code !> Inspired by original code (MIT license) written in 2016 by Keurfon Luu (keurfonluu@outlook.com) !> https://github.com/keurfonluu/Forlab #:include \"common.fypp\" #:set RI_KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES submodule ( stdlib_math ) stdlib_math_diff implicit none contains !> `diff` computes differences of adjacent elements of an array. # : for k1 , t1 in RI_KINDS_TYPES pure module function diff_1_$ { k1 }$ ( x , n , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:) integer , intent ( in ), optional :: n ${ t1 }$ , intent ( in ), optional :: prepend (:), append (:) ${ t1 }$ , allocatable :: y (:) integer :: size_prepend , size_append , size_x , size_work integer :: n_ , i n_ = optval ( n , 1 ) if ( n_ <= 0 ) then y = x return end if size_prepend = 0 size_append = 0 if ( present ( prepend )) size_prepend = size ( prepend ) if ( present ( append )) size_append = size ( append ) size_x = size ( x ) size_work = size_x + size_prepend + size_append if ( size_work <= n_ ) then allocate ( y ( 0 )) return end if !> Use a quick exit for the common case, to avoid memory allocation. if ( size_prepend == 0 . and . size_append == 0 . and . n_ == 1 ) then y = x ( 2 :) - x ( 1 : size_x - 1 ) return end if block ${ t1 }$ :: work ( size_work ) if ( size_prepend > 0 ) work (: size_prepend ) = prepend work ( size_prepend + 1 : size_prepend + size_x ) = x if ( size_append > 0 ) work ( size_prepend + size_x + 1 :) = append do i = 1 , n_ work ( 1 : size_work - i ) = work ( 2 : size_work - i + 1 ) - work ( 1 : size_work - i ) end do y = work ( 1 : size_work - n_ ) end block end function diff_1_$ { k1 }$ pure module function diff_2_$ { k1 }$ ( x , n , dim , prepend , append ) result ( y ) ${ t1 }$ , intent ( in ) :: x (:, :) integer , intent ( in ), optional :: n , dim ${ t1 }$ , intent ( in ), optional :: prepend (:, :), append (:, :) ${ t1 }$ , allocatable :: y (:, :) integer :: size_prepend , size_append , size_x , size_work integer :: n_ , dim_ , i n_ = optval ( n , 1 ) if ( n_ <= 0 ) then y = x return end if size_prepend = 0 size_append = 0 if ( present ( dim )) then if ( dim == 1 . or . dim == 2 ) then dim_ = dim else dim_ = 1 end if else dim_ = 1 end if if ( present ( prepend )) size_prepend = size ( prepend , dim_ ) if ( present ( append )) size_append = size ( append , dim_ ) size_x = size ( x , dim_ ) size_work = size_x + size_prepend + size_append if ( size_work <= n_ ) then allocate ( y ( 0 , 0 )) return end if !> Use a quick exit for the common case, to avoid memory allocation. if ( size_prepend == 0 . and . size_append == 0 . and . n_ == 1 ) then if ( dim_ == 1 ) then y = x ( 2 :, :) - x ( 1 : size_x - 1 , :) elseif ( dim_ == 2 ) then y = x (:, 2 :) - x (:, 1 : size_x - 1 ) end if return end if if ( dim_ == 1 ) then block ${ t1 }$ :: work ( size_work , size ( x , 2 )) if ( size_prepend > 0 ) work ( 1 : size_prepend , :) = prepend work ( size_prepend + 1 : size_x + size_prepend , :) = x if ( size_append > 0 ) work ( size_x + size_prepend + 1 :, :) = append do i = 1 , n_ work ( 1 : size_work - i , :) = work ( 2 : size_work - i + 1 , :) - work ( 1 : size_work - i , :) end do y = work ( 1 : size_work - n_ , :) end block elseif ( dim_ == 2 ) then block ${ t1 }$ :: work ( size ( x , 1 ), size_work ) if ( size_prepend > 0 ) work (:, 1 : size_prepend ) = prepend work (:, size_prepend + 1 : size_x + size_prepend ) = x if ( size_append > 0 ) work (:, size_x + size_prepend + 1 :) = append do i = 1 , n_ work (:, 1 : size_work - i ) = work (:, 2 : size_work - i + 1 ) - work (:, 1 : size_work - i ) end do y = work (:, 1 : size_work - n_ ) end block end if end function diff_2_$ { k1 }$ # : endfor end submodule stdlib_math_diff","tags":"","loc":"sourcefile/stdlib_math_diff.fypp.html"},{"title":"stdlib_sorting.fypp – Fortran-lang/stdlib","text":"This file is subject both to the Fortran Standard Library license, and\nto additional licensing requirements as it contains translations of\nother software. The Fortran Standard Library, including this file, is distributed under\nthe MIT license that should be included with the library's distribution. Copyright (c) 2021 Fortran stdlib developers Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sellcopies of the Software, and to permit\n persons to whom the Software is furnished to do so, subject to the\n following conditions: The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Two of the generic subroutines, ORD_SORT and SORT_INDEX , are\nsubstantially translations to Fortran 2008 of the \"Rust\" sort sorting\nroutines in slice.rs The rust sort implementation is distributed with the header: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\n file at the top-level directory of this distribution and at\n http://rust-lang.org/COPYRIGHT. Licensed under the Apache License, Version 2.0 or the MIT license , at your\n option. This file may not be copied, modified, or distributed\n except according to those terms. so the license for the original slice.rs code is compatible with the use\nof modified versions of the code in the Fortran Standard Library under\nthe MIT license. One of the generic subroutines, SORT , is substantially a\ntranslation to Fortran 2008, of the introsort of David Musser.\nDavid Musser has given permission to include a variant of introsort in the Fortran Standard Library under the MIT license provided\nwe cite: Musser, D.R., “Introspective Sorting and Selection Algorithms,”\n Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). as the official source of the algorithm. Source Code #:include \"common.fypp\" #:set INT_TYPES_ALT_NAME = list(zip(INT_TYPES, INT_TYPES, INT_KINDS)) #:set REAL_TYPES_ALT_NAME = list(zip(REAL_TYPES, REAL_TYPES, REAL_KINDS)) #:set STRING_TYPES_ALT_NAME = list(zip(STRING_TYPES, STRING_TYPES, STRING_KINDS)) #:set CHAR_TYPES_ALT_NAME = list(zip([\"character(len=*)\"], [\"character(len=len(array))\"], [\"char\"])) #:set BITSET_TYPES_ALT_NAME = list(zip(BITSET_TYPES, BITSET_TYPES, BITSET_KINDS)) #:set INT_INDEX_TYPES_ALT_NAME = list(zip([\"int_index\", \"int_index_low\"], [\"integer(int_index)\", \"integer(int_index_low)\"], [\"default\", \"low\"])) #! For better code reuse in fypp, make lists that contain the input types, #! with each having output types and a separate name prefix for subroutines #! This approach allows us to have the same code for all input types. #:set IRSCB_TYPES_ALT_NAME = INT_TYPES_ALT_NAME + REAL_TYPES_ALT_NAME + STRING_TYPES_ALT_NAME + CHAR_TYPES_ALT_NAME & & + BITSET_TYPES_ALT_NAME !! Licensing: !! !! This file is subject both to the Fortran Standard Library license, and !! to additional licensing requirements as it contains translations of !! other software. !! !! The Fortran Standard Library, including this file, is distributed under !! the MIT license that should be included with the library's distribution. !! !! Copyright (c) 2021 Fortran stdlib developers !! !! Permission is hereby granted, free of charge, to any person obtaining a !! copy of this software and associated documentation files (the !! \"Software\"), to deal in the Software without restriction, including !! without limitation the rights to use, copy, modify, merge, publish, !! distribute, sublicense, and/or sellcopies of the Software, and to permit !! persons to whom the Software is furnished to do so, subject to the !! following conditions: !! !! The above copyright notice and this permission notice shall be included !! in all copies or substantial portions of the Software. !! !! THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS !! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF !! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. !! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY !! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, !! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE !! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !! !! Two of the generic subroutines, `ORD_SORT` and `SORT_INDEX`, are !! substantially translations to Fortran 2008 of the `\"Rust\" sort` sorting !! routines in !! [`slice.rs`](https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs) !! The `rust sort` implementation is distributed with the header: !! !! Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT !! file at the top-level directory of this distribution and at !! http://rust-lang.org/COPYRIGHT. !! !! Licensed under the Apache License, Version 2.0 or the MIT license !! , at your !! option. This file may not be copied, modified, or distributed !! except according to those terms. !! !! so the license for the original`slice.rs` code is compatible with the use !! of modified versions of the code in the Fortran Standard Library under !! the MIT license. !! !! One of the generic subroutines, `SORT`, is substantially a !! translation to Fortran 2008, of the `introsort` of David Musser. !! David Musser has given permission to include a variant of `introsort` !! in the Fortran Standard Library under the MIT license provided !! we cite: !! !! Musser, D.R., “Introspective Sorting and Selection Algorithms,” !! Software—Practice and Experience, Vol. 27(8), 983–993 (August 1997). !! !! as the official source of the algorithm. module stdlib_sorting !! This module implements overloaded sorting subroutines named `ORD_SORT`, !! `SORT_INDEX`, and `SORT`, that each can be used to sort four kinds !! of `INTEGER` arrays, three kinds of `REAL` arrays, `character(len=*)` arrays, !! and arrays of `type(string_type)`. !! ([Specification](../page/specs/stdlib_sorting.html)) !! !! By default sorting is in order of !! increasing value, but there is an option to sort in decreasing order. !! All the subroutines have worst case run time performance of `O(N Ln(N))`, !! but on largely sorted data `ORD_SORT` and `SORT_INDEX` can have a run time !! performance of `O(N)`. !! !! `ORD_SORT` is a translation of the `\"Rust\" sort` sorting algorithm in !! `slice.rs`: !! https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs !! which in turn is inspired by the `timsort` algorithm of Tim Peters, !! http://svn.python.org/projects/python/trunk/Objects/listsort.txt. !! `ORD_SORT` is a hybrid stable comparison algorithm combining `merge sort`, !! and `insertion sort`. It is always at worst O(N Ln(N)) in sorting random !! data, having a performance about 25% slower than `SORT` on such !! data, but has much better performance than `SORT` on partially !! sorted data, having O(N) performance on uniformly non-increasing or !! non-decreasing data. !! !! `SORT_INDEX` is a modification of `ORD_SORT` so that in addition to !! sorting the input array, it returns the indices that map to a !! stable sort of the original array. These indices are !! intended to be used to sort data that is correlated with the input !! array, e.g., different arrays in a database, different columns of a !! rank 2 array, different elements of a derived type. It is less !! efficient than `ORD_SORT` at sorting a simple array. !! !! `SORT` uses the `INTROSORT` sorting algorithm of David Musser, !! http://www.cs.rpi.edu/~musser/gp/introsort.ps. `introsort` is a hybrid !! unstable comparison algorithm combining `quicksort`, `insertion sort`, and !! `heap sort`. While this algorithm is always O(N Ln(N)) it is relatively !! fast on randomly ordered data, but inconsistent in performance on partly !! sorted data, sometimes having `merge sort` performance, sometimes having !! better than `quicksort` performance. `UNORD_SOORT` is about 25% !! more efficient than `ORD_SORT` at sorting purely random data, but af an !! order of `Ln(N)` less efficient at sorting partially sorted data. use stdlib_kinds , only : & int8 , & int16 , & int32 , & int64 , & sp , & dp , & xdp , & qp use stdlib_optval , only : optval use stdlib_string_type , only : string_type , assignment ( = ), operator ( > ), & operator ( >= ), operator ( < ), operator ( <= ) use stdlib_bitsets , only : bitset_64 , bitset_large , & assignment ( = ), operator ( > ), operator ( >= ), operator ( < ), operator ( <= ) implicit none private integer , parameter , public :: int_index = int64 !! Integer kind for indexing integer , parameter , public :: int_index_low = int32 !! Integer kind for indexing using less than `huge(1_int32)` values ! Constants for use by tim_sort integer , parameter :: & ! The maximum number of entries in a run stack, good for an array of ! 2**64 elements see ! https://svn.python.org/projects/python/trunk/Objects/listsort.txt max_merge_stack = int ( ceiling ( log ( 2._dp ** 64 ) / & log ( 1.6180339887_dp ) ) ) #:for ki, ti, namei in INT_INDEX_TYPES_ALT_NAME type run_type_$ { namei }$ !! Version: experimental !! !! Used to pass state around in a stack among helper functions for the !! `ORD_SORT` and `SORT_INDEX` algorithms ${ ti }$ :: base = 0 ${ ti }$ :: len = 0 end type run_type_$ { namei }$ #:endfor public ord_sort !! Version: experimental !! !! The generic subroutine implementing the `ORD_SORT` algorithm to return !! an input array with its elements sorted in order of (non-)decreasing !! value. Its use has the syntax: !! !! call ord_sort( array[, work, reverse] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`, !! `real(real128)`, `character(*)`, `type(string_type)`, !! `type(bitset_64)`, `type(bitset_large)`. If both the !! type of `array` is real and at least one of the elements is a !! `NaN`, then the ordering of the result is undefined. Otherwise it !! is defined to be the original elements in non-decreasing order. !! !! * work (optional): shall be a rank 1 array of the same type as !! `array`, and shall have at least `size(array)/2` elements. It is an !! `intent(out)` argument to be used as \"scratch\" memory !! for internal record keeping. If associated with an array in static !! storage, its use can significantly reduce the stack memory requirements !! for the code. Its value on return is undefined. !! !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `array` will be sorted in order of non-increasing values in stable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in stable order. !! !!#### Example !! !!```fortran !! ... !! ! Read arrays from sorted files !! call read_sorted_file( 'dummy_file1', array1 ) !! call read_sorted_file( 'dummy_file2', array2 ) !! ! Concatenate the arrays !! allocate( array( size(array1) + size(array2) ) ) !! array( 1:size(array1) ) = array1(:) !! array( size(array1)+1:size(array1)+size(array2) ) = array2(:) !! ! Sort the resulting array !! call ord_sort( array, work ) !! ! Process the sorted array !! call array_search( array, values ) !! ... !!``` public sort !! Version: experimental !! !! The generic subroutine implementing the `SORT` algorithm to return !! an input array with its elements sorted in order of (non-)decreasing !! value. Its use has the syntax: !! !! call sort( array[, reverse] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`, !! `real(real128)`, `character(*)`, `type(string_type)`, !! `type(bitset_64)`, `type(bitset_large)`. If both the type !! of `array` is real and at least one of the elements is a `NaN`, then !! the ordering of the result is undefined. Otherwise it is defined to be the !! original elements in non-decreasing order. !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `array` will be sorted in order of non-increasing values in unstable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in unstable order. !! !!#### Example !! !!```fortran !! ... !! ! Read random data from a file !! call read_file( 'dummy_file', array ) !! ! Sort the random data !! call sort( array ) !! ! Process the sorted data !! call array_search( array, values ) !! ... !!``` public radix_sort !! Version: experimental !! !! The generic subroutine implementing the LSD radix sort algorithm to return !! an input array with its elements sorted in order of (non-)decreasing !! value. Its use has the syntax: !! !! call radix_sort( array[, work, reverse] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`. !! If both the type of `array` is real and at least one of the !! elements is a `NaN`, then the ordering of the result is undefined. !! Otherwise it is defined to be the original elements in !! non-decreasing order. Especially, -0.0 is lesser than 0.0. !! !! * work (optional): shall be a rank 1 array of the same type as !! `array`, and shall have at least `size(array)` elements. It is an !! `intent(inout)` argument to be used as buffer. Its value on return is !! undefined. If it is not present, `radix_sort` will allocate a !! buffer for use, and deallocate it before return. If you do several !! similar `radix_sort`s, reusing the `work` array is a good parctice. !! This argument is not present for `int8_radix_sort` because it use !! counting sort, so no buffer is needed. !! !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `array` will be sorted in order of non-increasing values in stable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in stable order. !! !!#### Example !! !!```fortran !! ... !! ! Read random data from a file !! call read_file( 'dummy_file', array ) !! ! Sort the random data !! call radix_sort( array ) !! ... !!``` public sort_index !! Version: experimental !! !! The generic subroutine implementing the `SORT_INDEX` algorithm to !! return an index array whose elements would sort the input array in the !! desired direction. It is primarily intended to be used to sort a !! derived type array based on the values of a component of the array. !! Its use has the syntax: !! !! call sort_index( array, index[, work, iwork, reverse ] ) !! !! with the arguments: !! !! * array: the rank 1 array to be sorted. It is an `intent(inout)` !! argument of any of the types `integer(int8)`, `integer(int16)`, !! `integer(int32)`, `integer(int64)`, `real(real32)`, `real(real64)`, !! `real(real128)`, `character(*)`, `type(string_type)`, !! `type(bitset_64)`, `type(bitset_large)`. If both the !! type of `array` is real and at least one of the elements is a `NaN`, !! then the ordering of the `array` and `index` results is undefined. !! Otherwise it is defined to be as specified by reverse. !! !! * index: a rank 1 array of sorting indices. It is an `intent(out)` !! argument of the type `integer(int_index)`. Its size shall be the !! same as `array`. On return, if defined, its elements would !! sort the input `array` in the direction specified by `reverse`. !! !! * work (optional): shall be a rank 1 array of the same type as !! `array`, and shall have at least `size(array)/2` elements. It is an !! `intent(out)` argument to be used as \"scratch\" memory !! for internal record keeping. If associated with an array in static !! storage, its use can significantly reduce the stack memory requirements !! for the code. Its value on return is undefined. !! !! * iwork (optional): shall be a rank 1 integer array of kind `int_index`, !! and shall have at least `size(array)/2` elements. It is an !! `intent(out)` argument to be used as \"scratch\" memory !! for internal record keeping. If associated with an array in static !! storage, its use can significantly reduce the stack memory requirements !! for the code. Its value on return is undefined. !! !! * `reverse` (optional): shall be a scalar of type default logical. It !! is an `intent(in)` argument. If present with a value of `.true.` then !! `index` will sort `array` in order of non-increasing values in stable !! order. Otherwise index will sort `array` in order of non-decreasing !! values in stable order. !! !!#### Examples !! !! Sorting a related rank one array: !! !!```Fortran !! subroutine sort_related_data( a, b, work, index, iwork ) !! ! Sort `b` in terms or its related array `a` !! integer, intent(inout) :: a(:) !! integer(int32), intent(inout) :: b(:) ! The same size as a !! integer(int32), intent(out) :: work(:) !! integer(int_index), intent(out) :: index(:) !! integer(int_index), intent(out) :: iwork(:) !! ! Find the indices to sort a !! call sort_index(a, index(1:size(a)),& !! work(1:size(a)/2), iwork(1:size(a)/2)) !! ! Sort b based on the sorting of a !! b(:) = b( index(1:size(a)) ) !! end subroutine sort_related_data !!``` !! !! Sorting a rank 2 array based on the data in a column !! !!```Fortran !! subroutine sort_related_data( array, column, work, index, iwork ) !! ! Sort `a_data` in terms or its component `a` !! integer, intent(inout) :: a(:,:) !! integer(int32), intent(in) :: column !! integer(int32), intent(out) :: work(:) !! integer(int_index), intent(out) :: index(:) !! integer(int_index), intent(out) :: iwork(:) !! integer, allocatable :: dummy(:) !! integer :: i !! allocate(dummy(size(a, dim=1))) !! ! Extract a component of `a_data` !! dummy(:) = a(:, column) !! ! Find the indices to sort the column !! call sort_index(dummy, index(1:size(dummy)),& !! work(1:size(dummy)/2), iwork(1:size(dummy)/2)) !! ! Sort a based on the sorting of its column !! do i=1, size(a, dim=2) !! a(:, i) = a(index(1:size(a, dim=1)), i) !! end do !! end subroutine sort_related_data !!``` !! !! Sorting an array of a derived type based on the dsta in one component !!```fortran !! subroutine sort_a_data( a_data, a, work, index, iwork ) !! ! Sort `a_data` in terms or its component `a` !! type(a_type), intent(inout) :: a_data(:) !! integer(int32), intent(inout) :: a(:) !! integer(int32), intent(out) :: work(:) !! integer(int_index), intent(out) :: index(:) !! integer(int_index), intent(out) :: iwork(:) !! ! Extract a component of `a_data` !! a(1:size(a_data)) = a_data(:) % a !! ! Find the indices to sort the component !! call sort_index(a(1:size(a_data)), index(1:size(a_data)),& !! work(1:size(a_data)/2), iwork(1:size(a_data)/2)) !! ! Sort a_data based on the sorting of that component !! a_data(:) = a_data( index(1:size(a_data)) ) !! end subroutine sort_a_data !!``` interface ord_sort !! Version: experimental !! !! 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`. !! ([Specification](../page/specs/stdlib_sorting.html#ord_sort-sorts-an-input-array)) !! !! It is always at worst O(N Ln(N)) in sorting random !! data, having a performance about 25% slower than `SORT` on such !! data, but has much better performance than `SORT` on partially !! sorted data, having O(N) performance on uniformly non-increasing or !! non-decreasing data. #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ ord_sort ( array , work , reverse ) !! Version: experimental !! !! `${name1}$_ord_sort( array )` sorts the input `ARRAY` of type `${t1}$` !! using a hybrid sort based on the `\"Rust\" sort` algorithm found in `slice.rs` ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ t2 }$ , intent ( out ), optional :: work ( 0 :) logical , intent ( in ), optional :: reverse end subroutine ${ name1 }$_ ord_sort #:endfor end interface ord_sort interface radix_sort !! Version: experimental !! !! 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](../page/specs/stdlib_sorting.html#radix_sort-sorts-an-input-array)) !! pure module subroutine int8_radix_sort ( array , reverse ) integer ( kind = int8 ), dimension (:), intent ( inout ) :: array logical , intent ( in ), optional :: reverse end subroutine int8_radix_sort pure module subroutine int16_radix_sort ( array , work , reverse ) integer ( kind = int16 ), dimension (:), intent ( inout ) :: array integer ( kind = int16 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine int16_radix_sort pure module subroutine int32_radix_sort ( array , work , reverse ) integer ( kind = int32 ), dimension (:), intent ( inout ) :: array integer ( kind = int32 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine int32_radix_sort pure module subroutine int64_radix_sort ( array , work , reverse ) integer ( kind = int64 ), dimension (:), intent ( inout ) :: array integer ( kind = int64 ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine int64_radix_sort module subroutine sp_radix_sort ( array , work , reverse ) real ( kind = sp ), dimension (:), intent ( inout ), target :: array real ( kind = sp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine sp_radix_sort module subroutine dp_radix_sort ( array , work , reverse ) real ( kind = dp ), dimension (:), intent ( inout ), target :: array real ( kind = dp ), dimension (:), intent ( inout ), target , optional :: work logical , intent ( in ), optional :: reverse end subroutine dp_radix_sort end interface radix_sort interface sort !! Version: experimental !! !! The generic subroutine interface implementing the `SORT` algorithm, based !! on the `introsort` of David Musser. !! ([Specification](../page/specs/stdlib_sorting.html#sort-sorts-an-input-array)) #:for t1, t2, name1 in IRSCB_TYPES_ALT_NAME pure module subroutine ${ name1 }$_ sort ( array , reverse ) !! Version: experimental !! !! `${name1}$_sort( array[, reverse] )` sorts the input `ARRAY` of type `${t1}$` !! using a hybrid sort based on the `introsort` of David Musser. !! The algorithm is of order O(N Ln(N)) for all inputs. !! Because it relies on `quicksort`, the coefficient of the O(N Ln(N)) !! behavior is small for random data compared to other sorting algorithms. ${ t1 }$ , intent ( inout ) :: array ( 0 :) logical , intent ( in ), optional :: reverse end subroutine ${ name1 }$_ sort #:endfor end interface sort interface sort_index !! Version: experimental !! !! 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. !! ([Specification](../page/specs/stdlib_sorting.html#sort_index-creates-an-array-of-sorting-indices-for-an-input-array-while-also-sorting-the-array)) !! !! The indices by default correspond to a !! non-decreasing sort, but if the optional argument `REVERSE` is present !! with a value of `.TRUE.` the indices correspond to a non-increasing sort. #:for ki, ti, namei in INT_INDEX_TYPES_ALT_NAME # : for t1 , t2 , name1 in IRSCB_TYPES_ALT_NAME module subroutine ${ name1 }$_ sort_index_$ { namei }$ ( array , index , work , iwork , & reverse ) !! Version: experimental !! !! `${name1}$_sort_index_${namei}$( array, index[, work, iwork, reverse] )` sorts !! an input `ARRAY` of type `${t1}$` !! using a hybrid sort based on the `\"Rust\" sort` algorithm found in `slice.rs` !! and returns the sorted `ARRAY` and an array `INDEX` of indices in the !! order that would sort the input `ARRAY` in the desired direction. ${ t1 }$ , intent ( inout ) :: array ( 0 :) ${ ti }$ , intent ( out ) :: index ( 0 :) ${ t2 }$ , intent ( out ), optional :: work ( 0 :) ${ ti }$ , intent ( out ), optional :: iwork ( 0 :) logical , intent ( in ), optional :: reverse end subroutine ${ name1 }$_ sort_index_$ { namei }$ # : endfor #:endfor end interface sort_index end module stdlib_sorting","tags":"","loc":"sourcefile/stdlib_sorting.fypp.html"},{"title":"stdlib_version.fypp – Fortran-lang/stdlib","text":"Source Code ! SPDX-Identifier: MIT #:include \"common.fypp\" !> Version information on stdlib module stdlib_version implicit none private public :: get_stdlib_version public :: stdlib_version_string , stdlib_version_compact !> String representation of the standard library version character ( len =* ), parameter :: stdlib_version_string = \"${PROJECT_VERSION}$\" !> Major version number of the above standard library version integer , parameter :: stdlib_major = ${ PROJECT_VERSION_MAJOR }$ !> Minor version number of the above standard library version integer , parameter :: stdlib_minor = ${ PROJECT_VERSION_MINOR }$ !> Patch version number of the above standard library version integer , parameter :: stdlib_patch = ${ PROJECT_VERSION_PATCH }$ !> Compact numeric representation of the standard library version integer , parameter :: stdlib_version_compact = & & stdlib_major * 10000 + stdlib_minor * 100 + stdlib_patch contains !> Getter function to retrieve standard library version pure subroutine get_stdlib_version ( major , minor , patch , string ) !> Major version number of the standard library version integer , intent ( out ), optional :: major !> Minor version number of the standard library version integer , intent ( out ), optional :: minor !> Patch version number of the standard library version integer , intent ( out ), optional :: patch !> String representation of the standard library version character ( len = :), allocatable , intent ( out ), optional :: string if ( present ( major )) then major = stdlib_major end if if ( present ( minor )) then minor = stdlib_minor end if if ( present ( patch )) then patch = stdlib_patch end if if ( present ( string )) then string = stdlib_version_string end if end subroutine get_stdlib_version end module stdlib_version","tags":"","loc":"sourcefile/stdlib_version.fypp.html"},{"title":"stdlib_stats_distribution_normal.fypp – Fortran-lang/stdlib","text":"Source Code #:include \"common.fypp\" #:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES module stdlib_stats_distribution_normal use ieee_arithmetic , only : ieee_value , ieee_quiet_nan use stdlib_kinds , only : sp , dp , xdp , qp , int32 use stdlib_random , only : dist_rand use stdlib_stats_distribution_uniform , only : uni => rvs_uniform implicit none private real ( dp ), parameter :: HALF = 0.5_dp , ONE = 1.0_dp , TWO = 2.0_dp integer :: kn ( 0 : 127 ) real ( dp ) :: wn ( 0 : 127 ), fn ( 0 : 127 ) logical :: zig_norm_initialized = . false . public :: rvs_normal public :: pdf_normal public :: cdf_normal interface rvs_normal !! version: experimental !! !! Normal Distribution Random Variates !! ([Specification](../page/specs/stdlib_stats_distribution_normal.html# !! rvs_normal-normal-distribution-random-variates)) !! module procedure rvs_norm_0_rsp !0 dummy variable # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_norm_$ { t1 [ 0 ] }{ k1 }$ !2 dummy variables # : endfor # : for k1 , t1 in RC_KINDS_TYPES module procedure rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ !3 dummy variables # : endfor end interface rvs_normal interface pdf_normal !! version: experimental !! !! Normal Distribution Probability Density Function !! ([Specification](../page/specs/stdlib_stats_distribution_normal.html# !! pdf_normal-normal-distribution-probability-density-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure pdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface pdf_normal interface cdf_normal !! version: experimental !! !! Normal Distribution Cumulative Distribution Function !! ([Specification](../page/specs/stdlib_stats_distribution_normal.html# !! cdf_normal-normal-distribution-cumulative-distribution-function)) !! # : for k1 , t1 in RC_KINDS_TYPES module procedure cdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor end interface cdf_normal contains impure subroutine zigset ! Marsaglia & Tsang generator for random normals & random exponentials. ! Translated from C by Alan Miller (amiller@bigpond.net.au), released as public ! domain (https://jblevins.org/mirror/amiller/) ! ! Marsaglia, G. & Tsang, W.W. (2000) `The ziggurat method for generating ! random variables', J. Statist. Software, v5(8). ! ! This is an electronic journal which can be downloaded from: ! http://www.jstatsoft.org/v05/i08 ! ! Latest version - 1 January 2001 ! real ( dp ), parameter :: M1 = 214748364 8.0_dp , vn = 0.00991256303526217_dp real ( dp ) :: dn , tn , q integer :: i dn = 3.442619855899_dp tn = dn !tables for random normals q = vn * exp ( HALF * dn * dn ) kn ( 0 ) = int (( dn / q ) * M1 , kind = int32 ) kn ( 1 ) = 0 wn ( 0 ) = q / M1 wn ( 127 ) = dn / M1 fn ( 0 ) = ONE fn ( 127 ) = exp ( - HALF * dn * dn ) do i = 126 , 1 , - 1 dn = sqrt ( - TWO * log ( vn / dn + exp ( - HALF * dn * dn ))) kn ( i + 1 ) = int (( dn / tn ) * M1 , kind = int32 ) tn = dn fn ( i ) = exp ( - HALF * dn * dn ) wn ( i ) = dn / M1 end do zig_norm_initialized = . true . end subroutine zigset # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_norm_0_$ { t1 [ 0 ] }{ k1 }$ () result ( res ) ! ! Standard normal random variate (0,1) ! ${ t1 }$ :: res ${ t1 }$ , parameter :: r = 3.442619855899 _${ k1 }$ , rr = 1.0 _${ k1 }$ / r ${ t1 }$ :: x , y integer :: hz , iz if (. not . zig_norm_initialized ) call zigset iz = 0 hz = dist_rand ( 1_int32 ) !32bit random integer iz = iand ( hz , 127 ) !random integer in [0, 127] if ( abs ( hz ) < kn ( iz )) then res = hz * wn ( iz ) else L1 : do L2 : if ( iz == 0 ) then do x = - log ( uni ( 1.0 _${ k1 }$ )) * rr y = - log ( uni ( 1.0 _${ k1 }$ )) if ( y + y >= x * x ) exit end do res = r + x if ( hz <= 0 ) res = - res exit L1 end if L2 x = hz * wn ( iz ) if ( fn ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fn ( iz - 1 ) - fn ( iz )) < & exp ( - HALF * x * x )) then res = x exit L1 end if hz = dist_rand ( 1_int32 ) iz = iand ( hz , 127 ) if ( abs ( hz ) < kn ( iz )) then res = hz * wn ( iz ) exit L1 end if end do L1 end if end function rvs_norm_0_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure elemental & function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Normal random variate (loc, scale) ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = rvs_norm_0_$ { t1 [ 0 ] }{ k1 }$ () res = res * scale + loc end if end function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure elemental function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale ) result ( res ) ! ! Normally distributed complex. The real part and imaginary part are & ! independent of each other. ! ${ t1 }$ , intent ( in ) :: loc , scale ${ t1 }$ :: res real ( ${ k1 }$ ) :: tr , ti tr = rvs_norm_r$ { k1 }$ ( loc % re , scale % re ) ti = rvs_norm_r$ { k1 }$ ( loc % im , scale % im ) res = cmplx ( tr , ti , kind = ${ k1 }$ ) end function rvs_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES impure function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: loc , scale integer , intent ( in ) :: array_size ${ t1 }$ :: res ( array_size ) ${ t1 }$ , parameter :: r = 3.442619855899 _${ k1 }$ , rr = 1.0 _${ k1 }$ / r ${ t1 }$ :: x , y , re integer :: hz , iz , i if (. not . zig_norm_initialized ) call zigset if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) return end if do i = 1 , array_size iz = 0 hz = dist_rand ( 1_int32 ) iz = iand ( hz , 127 ) if ( abs ( hz ) < kn ( iz )) then re = hz * wn ( iz ) else L1 : do L2 : if ( iz == 0 ) then do x = - log ( uni ( 1.0 _${ k1 }$ )) * rr y = - log ( uni ( 1.0 _${ k1 }$ )) if ( y + y >= x * x ) exit end do re = r + x if ( hz <= 0 ) re = - re exit L1 end if L2 x = hz * wn ( iz ) if ( fn ( iz ) + uni ( 1.0 _${ k1 }$ ) * ( fn ( iz - 1 ) - fn ( iz )) < & exp ( - HALF * x * x )) then re = x exit L1 end if hz = dist_rand ( 1_int32 ) iz = iand ( hz , 127 ) if ( abs ( hz ) < kn ( iz )) then re = hz * wn ( iz ) exit L1 end if end do L1 end if res ( i ) = re * scale + loc end do end function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES impure function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ ( loc , scale , array_size ) result ( res ) ${ t1 }$ , intent ( in ) :: loc , scale integer , intent ( in ) :: array_size integer :: i ${ t1 }$ :: res ( array_size ) real ( ${ k1 }$ ) :: tr , ti do i = 1 , array_size tr = rvs_norm_r$ { k1 }$ ( loc % re , scale % re ) ti = rvs_norm_r$ { k1 }$ ( loc % im , scale % im ) res ( i ) = cmplx ( tr , ti , kind = ${ k1 }$ ) end do end function rvs_norm_array_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ! ! Normal distribution probability density function ! ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: sqrt_2_pi = sqrt ( 2.0 _${ k1 }$ * acos ( - 1.0 _${ k1 }$ )) if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = exp ( - 0.5 _${ k1 }$ * (( x - loc ) / scale ) * ( x - loc ) / scale ) / & ( sqrt_2_Pi * scale ) end if end function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res res = pdf_norm_r$ { k1 }$ ( x % re , loc % re , scale % re ) res = res * pdf_norm_r$ { k1 }$ ( x % im , loc % im , scale % im ) end function pdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in REAL_KINDS_TYPES elemental function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ! ! Normal distribution cumulative distribution function ! ${ t1 }$ , intent ( in ) :: x , loc , scale ${ t1 }$ :: res ${ t1 }$ , parameter :: sqrt_2 = sqrt ( 2.0 _${ k1 }$ ) if ( scale <= 0. _${ k1 }$ ) then res = ieee_value ( 1. _${ k1 }$ , ieee_quiet_nan ) else res = erfc ( - ( x - loc ) / ( scale * sqrt_2 )) / 2.0 _${ k1 }$ end if end function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor # : for k1 , t1 in CMPLX_KINDS_TYPES elemental function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ ( x , loc , scale ) result ( res ) ${ t1 }$ , intent ( in ) :: x , loc , scale real ( ${ k1 }$ ) :: res res = cdf_norm_r$ { k1 }$ ( x % re , loc % re , scale % re ) res = res * cdf_norm_r$ { k1 }$ ( x % im , loc % im , scale % im ) end function cdf_norm_$ { t1 [ 0 ] }{ k1 }$ # : endfor end module stdlib_stats_distribution_normal","tags":"","loc":"sourcefile/stdlib_stats_distribution_normal.fypp.html"},{"title":"Contributing and specs – Fortran-lang/stdlib","text":"Warning This page is currently under construction! Todo Improve the title of this FORD \"pages\" section, and\nimprove the organization of pages\nto separate end-user, high-level documentation and examples from developer documentation and specs.","tags":"","loc":"page/index.html"},{"title":"Fortran stdlib License (MIT) – Fortran-lang/stdlib","text":"MIT License Copyright (c) 2019-2021 stdlib contributors Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","tags":"","loc":"page/License.html"},{"title":"Changelog – Fortran-lang/stdlib","text":"Version 0.6.1 Full release notes available at v0.6.1 tag. Changes to existing scripts and modules\n - changes in module stdlib_linalg_lapack - Renamed variable for compiler compliance #812 - change of the format in some example programs #813 Version 0.6.0 Full release notes available at v0.6.0 tag. new script fypp_deployment.py to support fpm in combination with fypp files #802 Changes to existing scripts and modules\n - change in module stdlib_hashmap_wrappers - addition of int32 hashmap key type #778 - changes in module stdlib_linalg - addition of the procedure det to compute determinants #798 - addition of the procedures lstsq and lstsq_space #801 #809 - addition of the procedures solve and solve_lu #806 - change in module stdlib_linalg_blas - addition of the documentation for rotm and rotmg #795 - use of macOS 12 in macOS CI #807 Changes to existing documentation\n - Improvement of the documentation linalg #797 Version 0.5.0 Full release notes available at v0.5.0 tag. new module stdlib_linalg_state #774 new derived type: linalg_state_type new procedure: linalg_error_handling Changes to existing scripts and modules\n- addition of implicit none to all example programs #780 - change in module stdlib_hashmaps - fix the procedure remove_chaining_entry #788 - change in module stdlib_linalg - addition of the BLAS/LAPACK backends and interfaces #772 - change in module stdlib_str2num - fix the procedure to_${k1}$_from_stream #789 - upgrade of the Intel-classic compiler in macOS CI #777 Changes to existing documentation\n - Improvement of the documentation #784 #781 #786 - Improvement of the support of fpm #787 #790 Version 0.4.0 Full release notes available at v0.4.0 tag. new module stdlib_str2num #743 new procedures: to_num , to_num_from_stream Changes to existing scripts and modules change in .gitignore addition of the file extensions .dat and .stream #768 addition of .gitignore to stdlib-fpm #769 change in CI/CD support of GCC 13 #737 support of Intel compiler ifx #752 change in script fpm-deployment.sh changes to facilitate fypp preprocessing for the fpm deployment #758 change in module stdlib_ascii Improved procedures to_lower and to_upper #733 change in module stdlib_bitsets initialization in bitset_type #753 improved procedure bit_count_large #756 change in module stdlib_hashmaps new procedure get_all_keys #741 new file permissions #762 change in module stdlib_math new procedure meshgrid #764 change in module stdlib_specialfunctions_gamma fix procedure gamma #730 change in module stdlib_string_type fix procedure move #736 #773 change in SpookyV2Test.cpp Fix undefined use of types #747 Changes to the existing documentation change in the specs stdlib_hashmaps Correction of an intent of the variable \"conflict\" #739 change in README.md instructions to build stdlib with fpm through the fpm-deployment.sh script #757 Version 0.3.0 Full release notes available at v0.3.0 tag. new modules stdlib_hashmap_wrappers and stdlib_hashmap #611 new procedures in stdlib_hashmap_wrappers : copy_key , copy_other , fibonacci_hash , fnv_1_hasher , fnv_1a_hasher , free_key , free_other , get , hasher_fun , operator(==) , seeded_nmhash32_hasher , seeded_nmhash32x_hasher , seeded_water_hasher , set , key_type , other_type new procedures in stdlib_hashmaps : chaining_hashmap_type , hashmap_type , `open_hashmap_type Changes to existing scripts and modules change in script doc-deployment.yml update of the script #681 change in script fpm-deployment.sh fixed a problem with dat and npy files in example dir not being deployed #713 change in module stdlib_bitsets remove define assignment for bitset_64 and bitset_large #727 change in module stdlib_hashmap_open fix access violation in a type-bound procedure of open_hashmap_type #707 change in module stdlib_io_npy_load fix various bugs #708 #711 change in module stdlib_linalg addition of kronecker_product #700 change in module stdlib_quadrature_gauss fix erroneous gaussian quadrature points in gauss_legendre #660 change in module stdlib_sorting addition of radix sort #712 support for sorting arrays of bitset_64 and of bitset_large #723 change in module stdlib_stats_distribution_exponential convert pdf_exp and cdf_exp to pure functions #717 change in module stdlib_stats_distribution_normal convert rvs_norm to an impure elemental function #665 remove unused module stdlib_error from module stdlib_stats_distribution_normal #716 remove support for manual make builds #657 Changes to the existing documentation change in README.md #656 #659 #715 #725 change in stdlib_stats_distribution_normal.md Improvement of the documentation #718 #721 change in stdlib_stats_distribution_exponential.md Improvement of the documentation #721 change in the structure of the project stdlib extraction of the demo programs from the specs in the directory example #662 move the directory src/tests to test #669 fix various docs #663 Version 0.2.1 Full release notes available at v0.2.1 tag. build system related bugfixes Version 0.2.0 Full release notes available at v0.2.0 tag. new module stdlib_hash_32bit #573 new procedures: fibonacci_hash , fnv_1_hash , fnv_1a_hash , new_nmhash32_seed , new_nmhash32x_seed , new_water_hash_seed , nmhash32 , nmhash32x , odd_random_integer , universal_mult_hash , and water_hash new module stdlib_hash_64bit #573 new procedures: fibonacci_hash , fnv_1_hash , fnv_1a_hash , new_pengy_hash_seed , new_spooky_hash_seed , odd_random_integer , pengy_hash , spooky_hash , spookyhash_128 , and universal_mult_hash new module stdlib_array #603 new procedures trueloc , falseloc new module stdlib_distribution_uniform #272 new module stdlib_selection #500 new procedures select , arg_select new module stdlib_version #579 new procedure get_stdlib_version update module stdlib_io 597 new procedure getline new module stdlib_io_npy #581 new procedures save_npy , load_npy update module stdlib_math new procedures is_close and all_close #488 new procedures arg , argd and argpi #498 new procedure diff #605 Changes to existing modules change in module stdlib_math linspace and logspace made pure #549 change in module stdlib_string_type move procedure made pure / elemental #562 support for quadruple precision made optional #565 change in module stdlib_io Modified format constants, and made public #617 change in module stdlib_math Minor update to stdlib_math module and document #624 Version 0.1.0 Full release notes available at v0.1.0 tag. new module stdlib_ascii #32 new module stdlib_bitsets #239 new derived types bitset_64 and bitset_large new abstract base class bitset_type new module stdlib_error #53 new module stdlib_io new procedures loadtxt and savetxt #23 #37 new procedure open #71 #77 new module stdlib_kinds #63 new module stdlib_linalg new procedures diag , eye and trace #170 new procedure outer_product #432 new module stdlib_logger new derived type logger_type #228 #261 new module stdlib_math new procedure clip #355 new procedures linspace and logspace #420 new procedure arange #480 new procedure gcd #539 new module stdlib_optval #73 #96 #139 new module stdlib_quadrature new procedures trapz , trapz_weights , simps and simps_weights #146 new procedures gauss_legendre , gauss_legendre_lobatto #313 new module stdlib_random #271 new module stdlib_sorting new procedures sort , ord_sort and sort_index #408 new module stdlib_specialfunctions new procedures legendre and dlegendre #313 new module stdlib_stats new procedure mean #124 #130 #132 new procedure var #144 new procedure moment #153 new procedure corr #191 new procedure median #426 new module stdlib_string_type new derived types string_type #320 new procedure move #467 new module stdlib_stringlist_type new derived types stringlist_type and stringlist_index_type #470 new module stdlib_strings new procedure to_string #444 new procedures strip and chomp #343 new procedures starts_with and ends_with #384 new procedure slice #414 new procedure find #433 new procedure replace_all #436 new procedures padl and padr #441 new procedure count #453 new module stdlib_system new procedure sleep #54","tags":"","loc":"page/changelog.html"},{"title":"Contributing – Fortran-lang/stdlib","text":"This page aims to provide information that are useful for stdlib contributors.\nIssues can be reported on GitHub .","tags":"","loc":"page/contributing/index.html"},{"title":"Contributor Code of Conduct – Fortran-lang/stdlib","text":"Contributor Covenant Code of Conduct Our Pledge In the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to make participation in our project and\nour community a harassment-free experience for everyone, regardless of age,\nbody size, disability, ethnicity, gender identity and expression, level of\nexperience, nationality, personal appearance, race, religion, or sexual\nidentity and orientation. Our Standards Examples of behavior that contributes to creating a positive environment\ninclude: Using welcoming and inclusive language Being respectful of differing viewpoints and experiences Gracefully accepting constructive criticism Focusing on what is best for the community Showing empathy towards other community members Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or\nadvances Trolling, insulting/derogatory comments, and personal or political attacks Public or private harassment Publishing others' private information, such as a physical or electronic\n address, without explicit permission Other conduct which could reasonably be considered inappropriate in a\n professional setting Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful. Scope This Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may\nbe further defined and clarified by project maintainers. Enforcement Instances of abusive, harassing or otherwise unacceptable behavior may be\nreported by contacting one of the project maintainers at caomaco@gmail.com or \nondrej@certik.us. All complaints will be reviewed and investigated and will\nresult in a response that is deemed necessary and appropriate to the\ncircumstances. The project team is obligated to maintain confidentiality with\nregard to the reporter of an incident. Further details of specific enforcement\npolicies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership. Attribution This Code of Conduct is adapted from the Contributor Covenant , version 1.4,\navailable at https://contributor-covenant.org/version/1/4","tags":"","loc":"page/contributing/CodeOfConduct.html"},{"title":"Style Guide – Fortran-lang/stdlib","text":"Note This is a living document.\nYou are welcome to propose changes to this workflow by opening an issue . Fortran stdlib Style Guide Use (modern) standard Fortran File naming conventions Indentation & whitespace Variable and procedure naming Attributes End block closing statements Document public API code with FORD Fortran stdlib Style Guide Adopting a consistent style can improve code legibility through the choice of good naming conventions.\nIn addition, style checks will be run during CI to flag any severe non-conformance.\nThis allows code review discussions to focus on semantics and substance rather than pedantry.\nConsistent whitespace usage, and not polluting line endings with trailing white space makes git diff s considerably more legible.\nThis style guide is a living document and proposed changes may be adopted after discussing them and coming to a consensus. Use (modern) standard Fortran Do not use obsolescent or deleted language features\n E.g., common , pause , entry , arithmetic if and computed goto Do not use vendor extensions in the form of non-standard syntax and vendor supplied intrinsic procedures\n E.g., real*8 or etime() File naming conventions Source files should contain at most one program , module , or submodule The filename should match the program or module name and have the file extension .f90 or .F90 if preprocessing is required If the interface and implementation is split using submodules the implementation submodule file should have the same name as the\n interface (parent) module but end in _implementation E.g., string_class.f90 and string_class_implementation.f90 Tests should be added in the test subdirectory and have the same name as the module they are testing with the test_ prefix\n added\n E.g., string_class.f90 and test/test_string_class.f90 Indentation & whitespace By setting and following a convention for indentation and whitespace, code reviews and git-diffs can\nfocus on the semantics of the proposed changes rather than style and formatting. The body of every Fortran construct should be indented by four (4) spaces Line length should be limited to 80 characters and must not exceed 132 Please do not use Tab characters for indentation Please remove trailing white space before committing code Variable and procedure naming Variable and procedure names, as well as Fortran keywords, should be written in lowercase Variable and procedure names should be made up of one or more full words separated by an underscore,\n for example has_failed is preferred over hasfailed Where conventional and appropriate shortening of a word is used then the underscore may be omitted,\n for example linspace is preferred over lin_space Attributes Always specify intent for dummy arguments. Don't use dimension attribute to declare arrays because it is more verbose.\n Use this: real, allocatable :: a(:), b(:,:) instead of: real, dimension(:), allocatable :: a real, dimension(:,:), allocatable :: b When defining many arrays of the same dimension, dimension can be used as an exception if it makes the code less verbose. If the optional attribute is used to declare a dummy argument, it should follow the intent attribute. End block closing statements Fortran allows certain block constructs or scopes to include the name of the program unit in the end statement.\nThe convention adopted herein is to include procedure names, module names and program names in the end statement,\nunless the closing statement can reasonably be expected to be on the same screen or page, within about 25 lines. Document public API code with FORD Documentation strings should be provided for all public and protected entities and their arguments or parameters.\nThis is currently accomplished using the FORD tool .\nFor help writing FORD style documentation please see the FORD wiki .\nThe following two sections are most relevant for contributing new code: Writing Documentation Documentation Meta Data Limitations To write the \"spec\" (specification) for a new proposal, please place it in the FORD \"pages\" directory at doc/specs/ .\nTo get help please see the \"Writing Pages\" and \"Writing Documentation\" pages\non the FORD wiki .","tags":"","loc":"page/contributing/StyleGuide.html"},{"title":"Workflow for Contributors – Fortran-lang/stdlib","text":"Note This is a living document.\nYou are welcome to propose changes to this workflow by opening an issue . Workflow for the Fortran stdlib contributors This document describes our current workflow. We welcome everyone and anyone to participate and propose additions to stdlib.\nIt is okay if you do not have experience for specification or implementation,\nbut have an idea for stdlib. If the idea is popular among the community, more\nexperienced contributors will help it through all 5 steps. Idea : You have an idea or a proposal. Open an issue to discuss it. This\n is on the level of \"is there interest in having image reader/writer\n functions in stdlib?\" The goal of this step is to find out if the community\n is interested in having this functionality as part of stdlib. API : When there seems to be significant interest in the proposal (vast\n majority of participants think it is a good idea), move on to discuss the\n specific API. It's OK to propose the API off the bat if you already have an\n idea for it. This step is exploratory and its goal is to find out what the\n API should look and feel like. Specification : Discuss the API and iterate. When there is vast majority\n approval for the API, move on to implement it and submit a PR. Small PRs are\n always better than large. It is OK to implement only a few functions of a\n new module, and continue work on the others in a later PR. All new\n functionality goes into an \"experimental\" namespace\n ( version: experimental ). As part of the PR, when submitting a new\n public facing API, please provide the initial draft of the specification\n document as well as the initial reference implementation of this\n specification. The specification is a document that describes the API and\n the functionality, so that anyone can use it to create an implementation\n from scratch without looking at stdlib . The stdlib library then provides\n the reference implementation. Implementation in experimental: When opening a PR, request reviews from\n one or more people that are most relevant to it. These are likely to be\n people involved in prior steps of the workflow. Other contributors (not\n explicitly invited) are encouraged to provide reviews and suggestions as\n well. Iterate until all (or most) participants are on the same page.\n A merge is permitted if there are unit tests for a majority of the possible\n calling scenarios (with or without optional arguments, with arguments that\n trigger an error) and if there is vast majority approval of the PR. Release : Moving from experimental to release. The experimental\n \"namespace\" contains new functionality together with its specification. In\n order to move from experimental to release, the specification document must\n be approved by the wide community and the standards committee (informally).\n If that happens, it has now been blessed for broad use and we can move the\n code into the main section of stdlib , and the particular specification\n document becomes part of the Fortran Standard Library. Note: the general term \"vast majority\" above means at least 80%, but ultimately\nit is left to our best judgement to ensure that the community agrees that each\nPR and proposal was approved by \"vast majority\". You are welcome to propose changes to this workflow by opening an issue . Build systems This project supports two build systems, fpm and CMake. CMake build files The build files for CMake allow both in-tree, i.e. build artifacts share\nthe same tree as the source files, and out-of-tree builds, i.e. build artifacts\nexist in a separate directory tree.\nBoth build types are explicitly supported and tested, the latter strategy\nis recommended for local development. Sources for the main library target are added in src/CMakeLists.txt relative to the library target, i.e. no absolute paths are required. To add tests, the macro ADDTEST should be used instead of the CMake function add_test , the macro hides creation of the executable target, linking against the \nmain library target and registering the test.\nThe tests themselves are defined as standalone executables in the subdirectories\nin test , a new subdirectory with tests has to be registered in test/CMakeLists.txt . The source tree should be considered read-only. References to PROJECT_SOURCE_DIR and CMAKE_CURRENT_SOURCE_DIR should only be used for accessing source files,\nnever to write build outputs, use PROJECT_BINARY_DIR and CMAKE_CURRENT_BINARY_DIR to write build artifacts instead.\nTo fully support in-tree builds, build artifacts must never have the same name as\nsource files to avoid accidentally overwriting them, e.g. when preprocessing or\nconfiguring a file. The CMAKE_INSTALL_PREFIX should only be written to on install, never in the build\nprocess. To install generated files, create a build output in the build tree and\ninstall it with the install function.\nThis project follows the GNU install conventions, this means that the variables CMAKE_INSTALL_BINDIR , CMAKE_INSTALL_LIBDIR , and CMAKE_INSTALL_INCLUDEDIR must be used instead of bin , lib , and include , respectively.\nLibrary targets should be exported on install to allow correct inclusion of the\nproject in other CMake projects.\nPrefer dashes as in project-config or project-targets over camel-case as in projectConfig or projectTarget for file names as the former allows easier\nconstruction from the PROJECT_NAME variable by concatenation. The project is usable as CMake subproject. Explicit references to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR must be avoided to not\nbreak subproject builds.\nAn example project is available here to test the CMake subproject integration.","tags":"","loc":"page/contributing/Workflow.html"},{"title":"Specifications (specs) – Fortran-lang/stdlib","text":"Fortran stdlib Specifications (specs) This is an index/directory of the specifications (specs) for each new module/feature as described in the workflow document . Fortran stdlib Specifications (specs) Experimental Features & Modules Released/Stable Features & Modules Experimental Features & Modules ansi - Terminal color and style escape sequences array - Procedures for index manipulation and array handling ascii - Procedures for handling ASCII characters constants - Constants bitsets - Bitset data types and procedures error - Catching and handling errors hash - Hashing integer\n vectors or character strings hashmaps - Hash maps/tables io - Input/output helper & convenience kinds - Kind parameters linalg - Linear Algebra linalg_state_type - Linear Algebra state and error handling logger - Runtime logging system math - General purpose mathematical functions optval - Fallback value for optional arguments quadrature - Numerical integration random - Probability Distributions random number generator sorting - Sorting of rank one arrays stats - Descriptive Statistics stats_distributions_uniform - Uniform Probability Distribution stats_distributions_normal - Normal Probability Distribution stats_distributions_exponential - Exponential Probability Distribution string_type - Basic string support stringlist_type - 1-Dimensional list of strings strings - String handling and manipulation routines version - Version information Released/Stable Features & Modules (None yet)","tags":"","loc":"page/specs/index.html"},{"title":"terminal colors – Fortran-lang/stdlib","text":"The stdlib_ansi module The stdlib_ansi module Introduction Derived types provided ansi_code type Status Example Constants provided style_reset style_bold style_dim style_italic style_underline style_blink style_blink_fast style_reverse style_hidden style_strikethrough fg_color_black fg_color_red fg_color_green fg_color_yellow fg_color_blue fg_color_magenta fg_color_cyan fg_color_white fg_color_default bg_color_black bg_color_red bg_color_green bg_color_yellow bg_color_blue bg_color_magenta bg_color_cyan bg_color_white bg_color_default Procedures and methods provided to_string Syntax Class Argument Result value Status Example operator(+) Syntax Class Argument Result value Status Example operator(//) Syntax Class Argument Result value Status Example Introduction Support terminal escape sequences to produce styled and colored terminal output. Derived types provided ansi_code type The ansi_code type represent an ANSI escape sequence with a style, foreground\ncolor and background color attribute. By default the instances of this type are\nempty and represent no escape sequence. Status Experimental Example program demo_color use stdlib_ansi , only : fg_color_blue , style_bold , style_reset , ansi_code , & & operator ( // ), operator ( + ) implicit none type ( ansi_code ) :: highlight , reset print '(a)' , highlight // \"Dull text message\" // reset highlight = fg_color_blue + style_bold reset = style_reset print '(a)' , highlight // \"Colorful text message\" // reset end program demo_color Constants provided style_reset Style enumerator representing a reset escape code. style_bold Style enumerator representing a bold escape code. style_dim Style enumerator representing a dim escape code. style_italic Style enumerator representing an italic escape code. style_underline Style enumerator representing an underline escape code. style_blink Style enumerator representing a blink escape code. style_blink_fast Style enumerator representing a (fast) blink escape code. style_reverse Style enumerator representing a reverse escape code. style_hidden Style enumerator representing a hidden escape code. style_strikethrough Style enumerator representing a strike-through escape code. fg_color_black Foreground color enumerator representing a foreground black color escape code. fg_color_red Foreground color enumerator representing a foreground red color escape code. fg_color_green Foreground color enumerator representing a foreground green color escape code. fg_color_yellow Foreground color enumerator representing a foreground yellow color escape code. fg_color_blue Foreground color enumerator representing a foreground blue color escape code. fg_color_magenta Foreground color enumerator representing a foreground magenta color escape code. fg_color_cyan Foreground color enumerator representing a foreground cyan color escape code. fg_color_white Foreground color enumerator representing a foreground white color escape code. fg_color_default Foreground color enumerator representing a foreground default color escape code. bg_color_black Background color enumerator representing a background black color escape code. bg_color_red Background color enumerator representing a background red color escape code. bg_color_green Background color enumerator representing a background green color escape code. bg_color_yellow Background color enumerator representing a background yellow color escape code. bg_color_blue Background color enumerator representing a background blue color escape code. bg_color_magenta Background color enumerator representing a background magenta color escape code. bg_color_cyan Background color enumerator representing a background cyan color escape code. bg_color_white Background color enumerator representing a background white color escape code. bg_color_default Background color enumerator representing a background default color escape code. Procedures and methods provided to_string Generic interface to turn a style, foreground or background enumerator into an actual escape code string for printout. Syntax string = to_string (code) Class Pure function. Argument code : Style, foreground or background code of ansi_code type,\n this argument is intent(in) . Result value The result is a default character string. Status Experimental Example program demo_string use stdlib_ansi , only : fg_color_green , style_reset , to_string implicit none print '(a)' , to_string ( fg_color_green ) // \"Colorized text message\" // to_string ( style_reset ) end program demo_string operator(+) Add two escape sequences, attributes in the right value override the left value ones. Syntax code = lval + rval Class Pure function. Argument lval : Style, foreground or background code of ansi_code type,\n this argument is intent(in) . rval : Style, foreground or background code of ansi_code type,\n this argument is intent(in) . Result value The result is a style, foreground or background code of ansi_code type. Status Experimental Example program demo_combine use stdlib_ansi , only : fg_color_red , style_bold , ansi_code implicit none type ( ansi_code ) :: bold_red bold_red = fg_color_red + style_bold end program demo_combine operator(//) Concatenate an escape code with a string and turn it into an actual escape sequence Syntax str = lval // rval Class Pure function. Argument lval : Style, foreground or background code of ansi_code type or a character string,\n this argument is intent(in) . rval : Style, foreground or background code of ansi_code type or a character string,\n this argument is intent(in) . Result value The result is a character string with the escape sequence prepended or appended. Status Experimental Example program demo_concat use stdlib_ansi , only : fg_color_red , style_reset , operator ( // ) implicit none print '(a)' , fg_color_red // \"Colorized text message\" // style_reset end program demo_concat","tags":"","loc":"page/specs/stdlib_ansi.html"},{"title":"array – Fortran-lang/stdlib","text":"The stdlib_array module The stdlib_array module Introduction Procedures and methods provided trueloc Status Description Syntax Class Arguments Return value Examples falseloc Status Description Syntax Class Arguments Return value Examples Introduction Module for index manipulation and array handling tasks. Procedures and methods provided trueloc Status Experimental Description Turn a logical mask into an index array by selecting all true values.\nProvides similar functionality like the built-in where or the intrinsic procedures merge and pack when working with logical mask.\nThe built-in / intrinsics are usually preferable to trueloc , unless the access to the index array is required. Syntax loc = trueloc (array[, lbound]) Class Pure function. Arguments array : List of default logical arrays. This argument is intent(in) . lbound : Lower bound of the array to index. This argument is optional and intent(in) . Return value Returns an array of default integer size, with a maximum length of size(array) elements. Examples program example_trueloc use stdlib_array , only : trueloc implicit none real , allocatable :: array (:) allocate ( array ( 500 )) call random_number ( array ) array ( trueloc ( array > 0.5 )) = 0.0 end program example_trueloc falseloc Status Experimental Description Turn a logical mask into an index array by selecting all false values.\nProvides similar functionality like the built-in where or the intrinsic procedures merge and pack when working with logical mask.\nThe built-in / intrinsics are usually preferable to falseloc , unless the access to the index array is required. Syntax loc = falseloc (array[, lbound]) Class Pure function. Arguments array : List of default logical arrays. This argument is intent(in) . lbound : Lower bound of the array to index. This argument is optional and intent(in) . Return value Returns an array of default integer size, with a maximum length of size(array) elements. Examples program example_falseloc use stdlib_array , only : falseloc implicit none real , allocatable :: array (:) allocate ( array ( - 200 : 200 )) call random_number ( array ) array ( falseloc ( array < 0.5 , lbound ( array , 1 ))) = 0.0 end program example_falseloc","tags":"","loc":"page/specs/stdlib_array.html"},{"title":"ascii – Fortran-lang/stdlib","text":"The stdlib_ascii module The stdlib_ascii module Introduction Constants provided by stdlib_ascii Specification of the stdlib_ascii procedures to_lower Status Description Syntax Class Argument Result value Example to_upper Status Description Syntax Class Argument Result value Example to_title Status Description Syntax Class Argument Result value Example to_sentence Status Description Syntax Class Argument Result value Example reverse Status Description Syntax Class Argument Result value Example Introduction The stdlib_ascii module provides procedures for handling and manipulating\nintrinsic character variables and constants. Constants provided by stdlib_ascii Note Specification of constants is currently incomplete. Specification of the stdlib_ascii procedures Note Specification of procedures is currently incomplete. to_lower Status Experimental Description Converts input character variable to all lowercase. Syntax res = to_lower (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_lower use stdlib_ascii , only : to_lower implicit none print '(a)' , to_lower ( \"HELLo!\" ) ! returns \"hello!\" end program example_to_lower to_upper Status Experimental Description Converts input character variable to all uppercase. Syntax res = to_upper (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_upper use stdlib_ascii , only : to_upper implicit none print '(a)' , to_upper ( \"hello!\" ) ! returns \"HELLO!\" end program example_to_upper to_title Status Experimental Description Returns the titlecase version of the input character variable. Title case: First character of every word in the sentence is converted to \nuppercase and the rest of the characters are converted to lowercase. A word is a contiguous sequence of character(s) which consists of alphabetical \ncharacter(s) and numeral(s) only and doesn't exclude any alphabetical character \nor numeral present next to either of its 2 ends. Syntax res = to_title (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_title use stdlib_ascii , only : to_title implicit none print * , to_title ( \"hello there!\" ) ! returns \"Hello There!\" print * , to_title ( \"'enquoted'\" ) ! returns \"'Enquoted'\" print * , to_title ( \"1st\" ) ! returns \"1st\" end program example_to_title to_sentence Status Experimental Description Returns the sentencecase version of the input character variable. The first alphabetical character of the sequence is transformed to uppercase \nunless it follows a numeral. The rest of the characters in the sequence are \ntransformed to lowercase. Syntax res = to_sentence (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_to_sentence use stdlib_ascii , only : to_sentence implicit none print * , to_sentence ( \"hello!\" ) ! returns \"Hello!\" print * , to_sentence ( \"'enquoted'\" ) ! returns \"'Enquoted'\" print * , to_sentence ( \"1st\" ) ! returns \"1st\" end program example_to_sentence reverse Status Experimental Description Reverses the order of all characters in the input character type. Syntax res = reverse (string) Class Pure function. Argument string : shall be an intrinsic character type. It is an intent(in) argument. Result value The result is an intrinsic character type of the same length as string . Example program example_reverse use stdlib_ascii , only : reverse implicit none print '(a)' , reverse ( \"Hello, World!\" ) ! returns \"!dlroW ,olleH\" end program example_reverse","tags":"","loc":"page/specs/stdlib_ascii.html"},{"title":"bitsets – Fortran-lang/stdlib","text":"The stdlib_bitsets module The stdlib_bitsets module Introduction The module's constants The stdlib_bitsets derived types The bitset-literal The binary-literal Summary of the module's operations Table of the bitset_type methods Table of the non-member procedure overloads Assignments Example Table of the non-member comparison operations Specification of the stdlib_bitsets methods and procedures all - determine whether all bits are set in self Status Description Syntax Class Argument Result value Example and - bitwise and of the bits of two bitsets Status Description Syntax Class Arguments Example and_not - Bitwise and of one bitset with the negation of another Status Description Syntax Class Arguments Example any - determine whether any bits are set Status Description Syntax Class Argument Result value Example bit_count - return the number of bits that are set Status Description Syntax Class Argument Result value Example bits - returns the number of bits Status Description Syntax Class Argument Result value Example clear - clears a sequence of one or more bits Status Description Syntax Class Arguments Example extract - create a new bitset from a range in an old bitset Status Description Syntax Class Arguments Example flip - flip the values of a sequence of one or more bits Status Description Syntax Class Arguments Example from_string - initializes a bitset from a binary literal Status Description Syntax Class Arguments Example init - bitset_type initialization routines Status Description Syntax Class Arguments Example input - reads a bitset from an unformatted file Status Description Syntax Class Arguments Example none - determines whether no bits are set Status Description Syntax Class Argument Result value Example not - Performs the logical complement on a bitset Status Description Syntax Class Argument Example or - Bitwise OR of the bits of two bitsets Status Description Syntax Class Arguments Example output - Writes a binary representation of a bitset to a file Status Description Syntax Class Arguments Example read_bitset - initializes self with the value of a bitset_literal Status Description Syntax Class Arguments Example set - sets a sequence of one or more bits to 1 Status Description Syntax Class Arguments Example test - determine whether a bit is set Status Descriptions Syntax Class Arguments Result value Example to_string - represent a bitset as a binary literal Status Description Syntax Class Arguments Example value - determine the value of a bit Status Description Syntax Class Arguments Result value Example write_bitset - writes a bitset-literal Status Description Syntax Class Arguments Example xor - bitwise exclusive or Status Description Syntax Class Arguments Example Specification of the stdlib_bitsets operators == - compare two bitsets to determine whether the bits have the same value Status Description Syntax Class Arguments Result value Example /= - compare two bitsets to determine whether any bits differ in value Status Description Syntax Class Arguments Result value Example >= - compare two bitsets to determine whether the first is greater than or equal to the second Status Description Syntax Class Arguments Result value Example > - compare two bitsets to determine whether the first is greater than the other Status Description Syntax Class Arguments Result value Example <= - compare two bitsets to determine whether the first is less than or equal to the other Status Description Syntax Class Arguments Result value Example < - compare two bitsets to determine whether the first is less than the other Status Description Syntax Class Arguments Result value Example Introduction The stdlib_bitsets module implements bitset types. A bitset is a\ncompact representation of a sequence of bits binary values. It can\nequivalently be considered as a sequence of logical values or as a\nsubset of the integers 0 ... bits-1 . For example, the value 1110 can be considered as defining the subset of integers [1, 2, 3].\nThe bits are indexed from 0 to bits(bitset)-1 .\nA bitset is used when space savings are critical in applications\nthat require a large number of closely related logical values.\nIt may also improve performance by reducing memory traffic. To\nimplement bitsets the module\ndefines three bitset types, multiple constants, a character string\nliteral that can be read to and from strings and formatted files, a\nsimple character string literal that can be read to and from strings,\nassignments, procedures, methods, and operators. Note that the module\nassumes two's complement integers, but all current Fortran 95 and later\nprocessors use such integers. Note that the module defines a number of \"binary\" procedures,\nprocedures with two bitset arguments. These arguments must be of the\nsame type and should have the same number of bits . For reasons of\nperformance the module does not enforce the bits constraint, but\nfailure to obey that constraint results in undefined behavior. This\nundefined behavior includes undefined values for those bits that\nexceed the defined number of bits in the smaller bitset. The\nundefined behavior may also include a \"segmentation fault\" for\nattempting to address bits in the smaller bitset, beyond the defined\nnumber of bits . Other problems are also possible. The module's constants The module defines several public integer constants, almost all\nintended to serve as error codes in reporting problems through an\noptional stat argument. One constant, bits_kind is\nthe integer kind value for indexing bits and reporting counts of\nbits. The other constants that are error codes are summarized below: Error Code Summary success No problems found alloc_fault Failure with a memory allocation array_size_invalid_error Attempt to define either negative bits or more than 64 bits in a bitset_64 char_string_invalid_error Invalid character found in a character string char_string_too_large_error Character string was too large to be encoded in the bitset char_string_too_small_error Character string was too small to hold the expected number of bits index_invalid_error Index to a bitstring was less than zero or greater than the number of bits integer_overflow_error Attempt to define an integer value bigger than huge(0_bits_kind) read_failure Failure on a read statement eof_failure An unexpected \"End-of-File\" on a read statement write_failure Failure on a write statement The stdlib_bitsets derived types The stdlib_bitsets module defines three derived types, bitset_type , bitset_64 , and bitset_large . bitset_type is an abstract\ntype that serves as the ancestor of bitset_64 and bitset_large . bitset_type defines one method, bits , and all of its\nother methods are deferred to its extensions. bitset_64 is a bitset\nthat can handle up to 64 bits. bitset_large is a bitset that can handle\nup huge(0_bits_kind) bits. All attributes of the bitset types are\nprivate. The various types each define a sequence of binary values: 0\nor 1. In some cases it is useful to associate a logical value, test ,\nfor each element of the sequence, where test is .true. if the value\nis 1 and .false. otherwise. The number of such values in an entity\nof that type is to be termed, bits . The bits are ordered in terms of\nposition, that, in turn, is indexed from 0 to bits-1 . bitset_type is\nused only as a class to define entities that can be either a bitset_64 or\na bitset_large . The syntax for using the types are: class( bitset_type ) :: variable type( bitset_64 ) :: variable and type( bitset_large ) :: variable The bitset-literal A bitset value may be represented as a bitset-literal-constant character string in source code or as a bitset-literal in\nformatted files and non-constant strings. bitset-literal-constant is ' bitset-literal '\n or \" bitset-literal \" bitset-literal is bitsize-literal binary-literal bitsize-literal is S digit [ digit ] ... binary-literal is B binary-digit [ binary-digit ] ... digit is 0\n or 1\n or 2\n or 3\n or 4\n or 5\n or 6\n or 7\n or 8\n or 9 binary-digit is 0\n or 1 The bitset-literal consists of two parts: a bitsize-literal and a binary-literal . The sequence of decimal digits that is part of the bitsize-literal is interpreted as the decimal value of bits .\nThe binary-literal value is interpreted as a sequence of bit\nvalues and there must be as many binary digits in the literal as there\nare bits . The sequence of binary digits are treated as if they were\nan unsigned integer with the i-th digit corresponding to the bits-i bit position. The binary-literal In defining the bitset-literal we also defined a binary-literal . While not suitable for file I/0, the binary-literal is suitable for transfer to and from character\nstrings. In that case the length of the string is the number of bits\nand all characters in the string must be either \"0\" or \"1\". Summary of the module's operations The stdlib_bitsets module defines a number of operations: \"unary\" methods of class bitset_type , \"binary\" procedure overloads of type bitset_64 or bitset_large , assignments, and \"binary\" comparison operators of type bitset_64 or bitset_large . Each category will be discussed separately. Table of the bitset_type methods The bitset_type class has a number of methods. All except one, bits ,\nare deferred. The methods consist of all procedures with one argument\nof class bitset_type . The procedures with two arguments of type bitset_64 or bitset_large are not methods and are\nsummarized in a separate table of procedures. The methods are\nsummarized below: Method name Class Summary all function .true. if all bits are 1, .false. otherwise any function .true. if any bits are 1, .false. otherwise bit_count function returns the number of bits that are 1 bits function returns the number of bits in the bitset clear subroutine sets a sequence of one or more bits to 0 flip subroutine flips the value of a sequence of one or more bits from_string subroutine reads the bitset from a string treating it as a binary literal init subroutine creates a new bitset of size bits with no bits set input subroutine reads a bitset from an unformatted I/O unit none function .true. if no bits are 1, .false. otherwise not subroutine performs a logical not operation on all the bits output subroutine writes a bitset to an unformatted I/O unit read_bitset subroutine reads a bitset from a bitset literal in a character string or formatted I/O unit set subroutine sets a sequence of one or more bits to 1 test function .true. if the bit at pos is 1, .false. otherwise to_string subroutine represents the bitset as a binary literal value function 1 if the bit at pos is 1, 0 otherwise write_bitset subroutine writes a bitset as a bitset literal to a character string or formatted I/O unit Table of the non-member procedure overloads The procedures with two arguments of type bitset_large or bitset_64 must have both arguments of the same known type which\nprevents them from being methods. The bitwise \"logical\" procedures, and , and_not , or , and xor also require that the two bitset\narguments have the same number of bits, otherwise the results are\nundefined. These procedures are summarized in the following table: Procedure name Class Summary and elemental subroutine Sets self to the bitwise and of the original bits in self and set2 and_not elemental subroutine Sets self to the bitwise and of the original bits in self and the negation of set2 extract subroutine creates a new bitset, new , from a range in old or elemental subroutine Sets self to the bitwise or of the original bits in self and set2 xor elemental subroutine Sets self to the bitwise exclusive or of the original bits in self and set2 Assignments The module uses the intrinsic assignment operation, = , to create a\nduplicate of an original bitset. It additionally defines assignments to and\nfrom rank one arrays of logical type of kinds int8 , int16 , int32 , and int64 . In the assignment to and from logical arrays\narray index, i , is mapped to bit position, pos=i-1 , and .true. is mapped to a set bit, and .false. is mapped to an unset bit. Example program example_assignment use stdlib_bitsets use stdlib_kinds , only : int8 , int32 implicit none logical ( int8 ) :: logical1 ( 64 ) = . true . logical ( int32 ), allocatable :: logical2 (:) type ( bitset_64 ) :: set0 , set1 set0 = logical1 if ( set0 % bits () /= 64 ) then error stop & ' initialization with logical(int8) failed to set' // & ' the right size.' else if (. not . set0 % all ()) then error stop ' initialization with' // & ' logical(int8) failed to set the right values.' else write ( * , * ) 'Initialization with logical(int8) succeeded.' end if set1 = set0 if ( set1 == set0 ) & write ( * , * ) 'Initialization by assignment succeeded' logical2 = set1 if ( all ( logical2 )) then write ( * , * ) 'Initialization of logical(int32) succeeded.' end if end program example_assignment Table of the non-member comparison operations The comparison operators with two arguments of type bitset_large or bitset_64 must have both arguments of the same known type which\nprevents them from being methods. The operands must also have the same\nnumber of bits otherwise the results are undefined. These operators\nare summarized in the following table: Operator Description == , .eq. .true. if all bits in set1 and set2 have the same value, .false. otherwise /= , .ne. .true. if any bits in set1 and set2 differ in value, .false. otherwise > , .gt. .true. if the bits in set1 and set2 differ in value and the highest order differing bit is 1 in set1 and 0 in set2 , .false. otherwise >= , .ge. .true. if the bits in set1 and set2 are the same or the highest order differing bit is 1 in set1 and 0 in set2 , .false. otherwise < , .lt. .true. if the bits in set1 and set2 differ in value and the highest order differing bit is 0 in set1 and 1 in set2 , .false. otherwise <= , .le. .true. if the bits in set1 and set2 are the same or the highest order differing bit is 0 in set1 and 1 in set2 , .false. otherwise Specification of the stdlib_bitsets methods and procedures all - determine whether all bits are set in self Status Experimental Description Determines whether all bits are set to 1 in self . Syntax result = self % all () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if all bits in self are set,\notherwise it is .false. . Example program example_all use stdlib_bitsets implicit none character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if (. not . set0 % all ()) then error stop \"FROM_STRING failed to interpret\" // & \"BITS_ALL's value properly.\" else write ( * , * ) \"FROM_STRING transferred BITS_ALL properly\" // & \" into set0.\" end if end program example_all and - bitwise and of the bits of two bitsets Status Experimental Description Sets the bits in set1 to the bitwise and of the original bits in set1 and set2 . Note that set1 and set2 must have the same\nnumber of bits, otherwise the result is undefined. Syntax call and (set1, set2) Class Elemental subroutine. Arguments set1 : shall be a bitset_64 or bitset_large scalar variable. It\nis an intent(inout) argument. On return the values of the bits in set1 are the bitwise and of the original bits in set1 with the\ncorresponding bits in set2 . set2 : shall be a scalar expression of the same type as set1 . It is\nan intent(in) argument. Note that set2 must also have the same\nnumber of bits as set1 . Example program example_and use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all none if ( set0 % none ()) write ( * , * ) 'Second test of AND worked.' call set1 % not () call and ( set0 , set1 ) ! none all if ( set0 % none ()) write ( * , * ) 'Third test of AND worked.' call set0 % not () call and ( set0 , set1 ) ! all all if ( set0 % all ()) write ( * , * ) 'Fourth test of AND worked.' end program example_and and_not - Bitwise and of one bitset with the negation of another Status Experimental Description Sets the bits of set1 to bitwise and of the bits of set1 with\nthe bitwise negation of the corresponding bits of set2 . Note that set1 and set2 must have the same number of bits, otherwise the\nresult is undefined. Syntax call and_not (set1, set2) Class Elemental subroutine. Arguments set1 : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(inout) argument. On return the values of the bits in set1 are the bitwise and of the original bits in set1 with the\ncorresponding negation of the bits in set2 . set2 : shall be a scalar expression of the same type as set1 . It is\nan intent(in) argument. Note that it should also have the same\nnumber of bits as set1 , otherwise the result is undefined. Example program example_and_not use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call and_not ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all none if ( set0 % all ()) write ( * , * ) 'Second test of AND_NOT worked.' call set0 % not () call set1 % not () call and_not ( set0 , set1 ) ! none all if ( set0 % none ()) write ( * , * ) 'Third test of AND_NOT worked.' call set0 % not () call and_not ( set0 , set1 ) ! all all if ( set0 % none ()) write ( * , * ) 'Fourth test of AND_NOT worked.' end program example_and_not any - determine whether any bits are set Status Experimental Description Determines whether any bits are set in self . Syntax result = self % any () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is a default logical scalar. The result is .true. if any bits in self are set, otherwise it\nis .false. . Example program example_any use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if (. not . set0 % any ()) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % any ()) then write ( * , * ) \"ANY interpreted SET0's value properly.\" end if end program example_any bit_count - return the number of bits that are set Status Experimental Description Returns the number of bits that are set to one in self . Syntax result = self % bit_count () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is an integer scalar of kind bits_kind ,\nequal to the number of bits that are set in self . Example program example_bit_count use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 type ( bitset_large ) :: set1 logical , allocatable :: logi (:) call set0 % from_string ( bits_0 ) if ( set0 % bit_count () == 0 ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if ( set0 % bit_count () == 1 ) then write ( * , * ) \"BIT_COUNT interpreted SET0's value properly.\" end if allocate ( logi ( 1000 ), source = . false .) logi ( 1 :: 7 ) = . true . set1 = logi if ( set1 % bit_count () == count ( logi )) then write ( * , * ) \"BIT_COUNT interpreted SET1's value properly.\" end if end program example_bit_count bits - returns the number of bits Status Experimental Description Reports the number of bits in self . Syntax result = self % bits () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is an integer scalar of kind bits_kind , equal to\nthe number of defined bits in self . Example program example_bits use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % bits () == 19 ) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's size properly.\" end if end program example_bits clear - clears a sequence of one or more bits Status Experimental Description If only pos is present, clears the bit with position pos in self . If start_pos and end_pos are present with end_pos >= start_pos clears the bits with positions from start_pos to end_pos in self . if start_pos and end_pos are present with end_pos < start_pos self is unmodified. Note: Positions outside the range 0 to bits(set) -1 are ignored. Syntax call self % clear (pos) or call self % clear (start_pos, end_pos) Class Elemental subroutine Arguments self : shall be a scalar variable of class bitset_type . It is an intent(inout) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. start_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. end_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. Example program example_clear use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if (. not . set0 % test ( 165 )) write ( * , * ) 'Bit 165 is cleared.' call set0 % clear ( 0 , 164 ) if ( set0 % none ()) write ( * , * ) 'All bits are cleared.' end program example_clear extract - create a new bitset from a range in an old bitset Status Experimental Description Creates a new bitset, new , from a range, start_pos to stop_pos ,\nin bitset old . If start_pos is greater than stop_pos the new\nbitset is empty. If start_pos is less than zero or stop_pos is\ngreater than bits(old)-1 then if status is present it has the\nvalue index_invalid_error , otherwise processing stops with an\ninformative message. Syntax call extract (new, old, start_pos, stop_pos, status ) Class Subroutine Arguments new : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(out) argument. It will be the new bitset. old : shall be a scalar expression of the same type as new . It is\nan intent(in) argument. It will be the source bitset. start_pos : shall be a scalar integer expression of the kind bits_kind . It is an intent(in) argument. stop_pos : shall be a scalar integer expression of the kind bits_kind . It is an intent(in) argument. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present it shall have one of the values: success - no problems found index_invalid_error - start_pos was less than zero or stop_pos was greater than bits(old)-1 . Example program example_extract use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set0 % set ( 100 , 150 ) call extract ( set1 , set0 , 100 , 150 ) if ( set1 % bits () == 51 ) & write ( * , * ) 'SET1 has the proper size.' if ( set1 % all ()) write ( * , * ) 'SET1 has the proper values.' end program example_extract flip - flip the values of a sequence of one or more bits Status Experimental Description Flip the values of a sequence of one or more bits. If only pos is present flip the bit value with position pos in self .\n* If start_pos and end_pos are present with end_pos >= start_pos flip the bit values with positions from start_pos to end_pos in self . If end_pos < start_pos then self is unmodified. Syntax call self % flip (pos) or call self % flip (start_pos, end_pos) Class Elemental subroutine. Arguments self : shall be a scalar class bitset_type variable It is an intent(inout) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. start_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. end_pos : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. Example program example_flip use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % flip ( 165 ) if ( set0 % test ( 165 )) write ( * , * ) 'Bit 165 is flipped.' call set0 % flip ( 0 , 164 ) if ( set0 % all ()) write ( * , * ) 'All bits are flipped.' end program example_flip from_string - initializes a bitset from a binary literal Status Experimental Description Initializes the bitset self from string , treating string as a\nbinary literal. Syntax call self % from_string (string[, status]) Class Subroutine Arguments self : shall be a scalar class bitset_type variable. It is an intent(out) argument. string : shall be a scalar default character expression. It is an intent(in) argument. It shall consist only of the characters \"0\",\nand \"1\". status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present, on return its value shall be\none of the error codes defined in this module. If absent, and its\nvalue would not have been success , then processing will stop with an\ninformative text as its stop code. It shall have one of the error\ncodes: success - if no problems were found, alloc_fault - if allocation of the bitset failed char_string_too_large_error - if string was too large, or char_string_invalid_error - if string had an invalid character. Example program example_from_string use stdlib_bitsets implicit none character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 call set0 % from_string ( bits_all ) if ( bits ( set0 ) /= 33 ) then error stop \"FROM_STRING failed to interpret \" // & \"BITS_ALL's size properly.\" else if (. not . set0 % all ()) then error stop \"FROM_STRING failed to interpret\" // & \"BITS_ALL's value properly.\" else write ( * , * ) \"FROM_STRING transferred BITS_ALL properly\" // & \" into set0.\" end if end program example_from_string init - bitset_type initialization routines Status Experimental Description bitset_type initialization routine. Syntax call self % init (bits [, status]) Class Subroutine. Arguments self : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(out) argument. bits : shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument that if present\nspecifies the number of bits in set . A negative value, or a value\ngreater than 64 if self is of type bitset_64 , is an error. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument that, if present, returns an error code\nindicating any problem found in processing init , and if absent and\nan error was found result in stopping processing with an informative\nstop code. It can have any of the following error codes: success - no problem found alloc_fault - self was of type bitset_large and memory\n allocation failed array_size_invalid_error - bits was present with either a negative\n value, or a value greater than 64 when self was of type bitset_64 . Example program example_init use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % bits () == 166 ) & write ( * , * ) 'SET0 has the proper size.' if ( set0 % none ()) write ( * , * ) 'SET0 is properly initialized.' end program example_init input - reads a bitset from an unformatted file Status Experimental Description Reads a bitset from its binary representation in an unformatted\nfile. Syntax call self % input (unit [, status]) Class Subroutine Arguments self : shall be a scalar variable of class bitset_64 or bitset_large . It is an intent(out) argument. unit : shall be a scalar default integer expression. It is an intent(in) argument. Its value must be that of a logical unit\nnumber for an open unformatted file with read or readwrite access positioned at the start of a bitset value written by a bitset_type output subroutine by the same processor. status (optional): shall be a scalar default integer variable. If\npresent its value shall be of one of the error codes defined in this\nmodule. If absent and it would have had a value other than success processing will stop with an informative stop code. Allowed error code\nvalues for this status are: success - no problem found alloc_fault - self was of type bitset_large and allocation of\n memory failed. array_size_invalid_error - if the number of bits read from unit is either negative or greater than 64, if class of self is bitset_64 . read_failure - failure during a read statement Example program example_input use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_input none - determines whether no bits are set Status Experimental Description Determines whether no bits are set in self . Syntax result = self % none () Class Elemental function. Argument self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if no bits in self are set, otherwise it is .false. . Example program example_none use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '0000000000000000000' type ( bitset_large ) :: set0 call set0 % from_string ( bits_0 ) if ( set0 % none ()) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % set ( 5 ) if (. not . set0 % none ()) then write ( * , * ) \"NONE interpreted SET0's value properly.\" end if end program example_none not - Performs the logical complement on a bitset Status Experimental Description Performs the logical complement on the bits of self . Syntax call self % not () Class Elemental subroutine. Argument self shall be a scalar variable of class bitset_type . It is an intent(inout) argument. On return its bits shall be the logical\ncomplement of their values on input. Example program example_not use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 155 ) if ( set0 % none ()) then write ( * , * ) \"FROM_STRING interpreted \" // & \"BITS_0's value properly.\" end if call set0 % not () if ( set0 % all ()) then write ( * , * ) \"ALL interpreted SET0's value properly.\" end if end program example_not or - Bitwise OR of the bits of two bitsets Status Experimental Description Replaces the original bits of set1 with the bitwise or of those\nbits with the bits of set2 . Note set1 and set2 must have the\nsame number of bits, otherwise the result is undefined. Syntax call or (set1, set2) Class Elemental subroutine. Arguments set1 : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(inout) argument. On return the values of the bits in setf are the bitwise or of the original bits in set1 with the\ncorresponding bits in set2 . set2 : shall be a scalar expression of the same type as set1 . It is\nan intent(in) argument. Note bits(set2) must equal bits(set1) otherwise the results are undefined. Example program example_or use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call or ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all none if ( set0 % all ()) write ( * , * ) 'Second test of OR worked.' call set0 % not () call set1 % not () call or ( set0 , set1 ) ! none all if ( set0 % all ()) write ( * , * ) 'Third test of OR worked.' call set0 % not () call or ( set0 , set1 ) ! all all if ( set0 % all ()) write ( * , * ) 'Fourth test of OR worked.' end program example_or output - Writes a binary representation of a bitset to a file Status Experimental Description Writes a binary representation of a bitset to an unformatted file. Syntax call self % output (unit[, status]) Class Subroutine. Arguments self : shall be a scalar expression of class bitset_64 or bitset_large . It is an intent(in) argument. unit : shall be a scalar default integer expression. It is an intent(in) argument. Its value must be that of an I/O unit number\nfor an open unformatted file with write or readwrite access. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present on return it will have the value\nof success or write_failure . If absent and it would not have the\nvalue of success then processing will stop with an informative stop\ncode. The two code values have the meaning: success - no problem found write_failure - a failure occurred in a write statement. Example program example_output use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = '000000000000000000000000000000000' , & bits_1 = '000000000000000000000000000000001' , & bits_33 = '100000000000000000000000000000000' integer :: unit type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % from_string ( bits_0 ) call set1 % from_string ( bits_1 ) call set2 % from_string ( bits_33 ) open ( newunit = unit , file = 'test.bin' , status = 'replace' , & form = 'unformatted' , action = 'write' ) call set2 % output ( unit ) call set1 % output ( unit ) call set0 % output ( unit ) close ( unit ) open ( newunit = unit , file = 'test.bin' , status = 'old' , & form = 'unformatted' , action = 'read' ) call set5 % input ( unit ) call set4 % input ( unit ) call set3 % input ( unit ) close ( unit ) if ( set3 /= set0 . or . set4 /= set1 . or . set5 /= set2 ) then error stop 'Transfer to and from units using ' // & ' output and input failed.' else write ( * , * ) 'Transfer to and from units using ' // & 'output and input succeeded.' end if end program example_output read_bitset - initializes self with the value of a bitset_literal Status Experimental Description Reads a bitset-literal and initializes self with the corresponding\nvalue. Syntax call self % read_bitset (string[, status]) or call self % read_bitset (unit[, advance, status]) Class Subroutine Arguments self : shall be a scalar variable of class bitset_type . It is an intent(out) argument. Upon a successful return it is initialized with\nthe value of a bitset-literal . string (optional): shall be a scalar default character\nexpression. It is an intent(in) argument. It will consist of a left \njustified bitset-literal , terminated by either the end of the string\nor a blank. unit (optional): shall be a scalar default integer expression. It is\nan intent(in) argument. Its value must be that of an I/O unit number\nfor an open formatted file with read or readwrite access\npositioned at the start of a bitset-literal . advance (optional): shall be a scalar default character\nexpression. It is an intent(in) argument. It is the advance specifier for the final read of unit . If present it should have\nthe value 'yes' or 'no' . If absent it has the default value of 'yes' . status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present on return it shall have the\nvalue of one of the error codes of this module. If absent and it would\nnot have had the value success processing will stop with a message\nas its error code. The possible error codes are: success - no problems found; alloc_fault - if self is of class bitset_large and allocation\n of the bits failed; array_size_invalid_error - if the bitset-literal has a bits\n value greater than 64 and self is of class bitset_64 ; char_string_invalid_error - if the bitset-literal has an invalid\n character; char_string_too_small_error - if string ends before all the bits\n are read; eof_failure - if a read statement reached an end-of-file before\n completing the read of the bitset literal, integer_overflow_error - if the bitset-literal has a bits value larger than huge(0_bits_kind) ; or read_failure - if a read statement failed. Example program example_read_bitset use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_2 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit , status type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) 'WRITE_BITSET to READ_BITSET through unit worked.' end if end program example_read_bitset set - sets a sequence of one or more bits to 1 Status Experimental Description Sets a sequence of one or more bits in self to 1. If start_pos and end_pos are absent sets the bit at position pos in self to 1. If start_pos and end_pos are present with end_pos >= start_pos set the bits at positions from start_pos to end_pos in self to 1. If start_pos and end_pos are present with end_pos < start_pos self is unchanged. Positions outside the range 0 to bits(self) are ignored. Syntax call self % set (POS) or call self % set (START_POS, END_POS) Class Elemental subroutine Arguments self : shall be a scalar variable of class bitset_type . It is an intent(inout) argument. pos (optional): shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. start_pos (optional): shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. end_pos (optional): shall be a scalar integer expression of kind bits_kind . It is an intent(in) argument. Example program example_set use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) if ( set0 % none ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % set ( 165 ) if ( set0 % test ( 165 )) write ( * , * ) 'Bit 165 is set.' call set0 % set ( 0 , 164 ) if ( set0 % all ()) write ( * , * ) 'All bits are set.' end program example_set test - determine whether a bit is set Status Experimental Descriptions Determine whether the bit at position pos is set to 1 in self . Syntax result = self % test (pos) Class Elemental function. Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bit at pos in self is set,\notherwise it is .false. . If pos is outside the range 0... bits(self)-1 the result is .false. . Example program example_test use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if (. not . set0 % test ( 165 )) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % test ( 165 )) write ( * , * ) 'Bit 165 is set.' end program example_test to_string - represent a bitset as a binary literal Status Experimental Description Represents the value of self as a binary literal in string . Syntax call self % to_string (string[, status]) Class Subroutine Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. string : shall be a scalar default character variable of allocatable\nlength. It is an intent(out) argument. On return it shall have a binary-literal representation of the bitset self . status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present it shall have either the value success or alloc_fault . If absent and it would have had the value alloc_fault then processing will stop with an informative test as\nthe stop code. The values have the following meanings: success - no problem found. alloc_fault - allocation of string failed. Example program example_to_string use stdlib_bitsets implicit none character ( * ), parameter :: & bits_all = '111111111111111111111111111111111' type ( bitset_64 ) :: set0 character (:), allocatable :: new_string call set0 % init ( 33 ) call set0 % not () call set0 % to_string ( new_string ) if ( new_string == bits_all ) then write ( * , * ) \"TO_STRING transferred BITS0 properly\" // & \" into NEW_STRING.\" end if end program example_to_string value - determine the value of a bit Status Experimental Description Determines the value of the bit at position, pos , in self . Syntax result = self % value (pos) Class Elemental function. Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. pos : shall be a scalar integer expression of kind bits_kind . It is\nan intent(in) argument. Result value The result is a default integer scalar.\nThe result is one if the bit at pos in self is set, otherwise it\nis zero. If pos is outside the range 0... bits(set)-1 the result\nis zero. Example program example_value use stdlib_bitsets implicit none type ( bitset_large ) :: set0 call set0 % init ( 166 ) call set0 % not () if ( set0 % all ()) write ( * , * ) 'SET0 is properly initialized.' call set0 % clear ( 165 ) if ( set0 % value ( 165 ) == 0 ) write ( * , * ) 'Bit 165 is cleared.' call set0 % set ( 165 ) if ( set0 % value ( 165 ) == 1 ) write ( * , * ) 'Bit 165 is set.' end program example_value write_bitset - writes a bitset-literal Status Experimental Description Writes a bitset-literal representing self 's current value to a\ncharacter string or formatted file. Syntax call self % write_bitset (string[, status]) or call self % write_bitset (unit[, advance, status]) Class Subroutine Arguments self : shall be a scalar expression of class bitset_type . It is an intent(in) argument. string (optional): shall be a scalar default character variable of\nallocatable length. It is an intent(out) argument. unit (optional): shall be a scalar default logical expression. It is\nan intent(in) argument. Its value must be that of a I/O unit number\nfor an open formatted file with write or readwrite access. advance (optional): shall be a scalar default character\nexpression. It is an intent(in) argument. It is the advance specifier for the write to unit . If present it must have the value 'yes' or 'no' . It has the default value of 'yes' . if advance is not present or is present with a value of 'no' then the bitset's bitset-literal is written to unit followed by a blank, and the current record is not advanced. If advance is present with a value of 'yes' then the\n bitset's bitset-literal is written to unit and the\n record is immediately advanced. status (optional): shall be a scalar default integer variable. It is\nan intent(out) argument. If present on return it shall have the\nvalue of one of the module's error codes. If absent and a problem was\nfound processing will stop with an informative stop code. It may have\nthe following error code values: success - no problem was found alloc_fault - allocation of the string failed write_failure - the write to the unit failed Example program example_write_bitset use stdlib_bitsets implicit none character ( * ), parameter :: & bits_0 = 'S33B000000000000000000000000000000000' , & bits_1 = 'S33B000000000000000000000000000000001' , & bits_2 = 'S33B100000000000000000000000000000000' character (:), allocatable :: test_0 , test_1 , test_2 integer :: unit , status type ( bitset_64 ) :: set0 , set1 , set2 , set3 , set4 , set5 call set0 % read_bitset ( bits_0 , status ) call set1 % read_bitset ( bits_1 , status ) call set2 % read_bitset ( bits_2 , status ) call set0 % write_bitset ( test_0 , status ) call set1 % write_bitset ( test_1 , status ) call set2 % write_bitset ( test_2 , status ) if ( bits_0 == test_0 . and . bits_1 == test_1 . and . & bits_2 == test_2 ) then write ( * , * ) 'READ_BITSET to WRITE_BITSET strings worked.' end if open ( newunit = unit , file = 'test.txt' , status = 'replace' , & form = 'formatted' , action = 'write' ) call set2 % write_bitset ( unit , advance = 'no' ) call set1 % write_bitset ( unit , advance = 'no' ) call set0 % write_bitset ( unit ) close ( unit ) open ( newunit = unit , file = 'test.txt' , status = 'old' , & form = 'formatted' , action = 'read' ) call set3 % read_bitset ( unit , advance = 'no' ) call set4 % read_bitset ( unit , advance = 'no' ) call set5 % read_bitset ( unit ) if ( set3 == set0 . and . set4 == set1 . and . set5 == set2 ) then write ( * , * ) 'WRITE_BITSET to READ_BITSET through unit worked.' end if end program example_write_bitset xor - bitwise exclusive or Status Experimental Description Replaces set1 's bitset with the bitwise exclusive or of the\noriginal bits of set1 and set2 . Note set1 and set2 must have\nthe samee number of bits, otherwise the result is undefined. Syntax result = xor (set1, set2) Class Elemental subroutine Arguments set1 : shall be a scalar bitset_64 or bitset_large variable. It\nis an intent(inout) argument. On return the values of the bits in set1 are the bitwise exclusive or of the original bits in set1 with the corresponding bits in set2 . set2 shall be a scalar expression of the same type as set1 . It is\n an intent(in) argument. Note set1 and set2 must have the\nsamee number of bits, otherwise the result is undefined. Example program example_xor use stdlib_bitsets implicit none type ( bitset_large ) :: set0 , set1 call set0 % init ( 166 ) call set1 % init ( 166 ) call xor ( set0 , set1 ) ! none none if ( set0 % none ()) write ( * , * ) 'First test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all none if ( set0 % all ()) write ( * , * ) 'Second test of XOR worked.' call set0 % not () call set1 % not () call xor ( set0 , set1 ) ! none all if ( set0 % all ()) write ( * , * ) 'Third test of XOR worked.' call set0 % not () call xor ( set0 , set1 ) ! all all if ( set0 % none ()) write ( * , * ) 'Fourth test of XOR worked.' end program example_xor Specification of the stdlib_bitsets operators == - compare two bitsets to determine whether the bits have the same value Status Experimental Description Returns .true. if all bits in set1 and set2 have the same value, .false. otherwise. Syntax result = set1 [[stdlib_bitsets(module):==(interface)]] set2 or result = set1 .EQ. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in both bitsets are set\nto the same value, otherwise the result is .false. . Example program example_equality use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 == set0 . and . set1 == set1 . and . set2 == set2 . and . & . not . set0 == set1 . and . . not . set0 == set2 . and . . not . & set1 == set2 ) then write ( * , * ) 'Passed 64 bit equality tests.' else error stop 'Failed 64 bit equality tests.' end if end program example_equality /= - compare two bitsets to determine whether any bits differ in value Status Experimental Description Returns .true. if any bits in self and set2 differ in value, .false. otherwise. Syntax result = set1 [[stdlib_bitsets(module):/=(interface)]] set2 or result = set1 .NE. set2 Class Elemental function Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if any bits in both bitsets differ, otherwise\nthe result is .false. . Example program example_inequality use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 /= set1 . and . set0 /= set2 . and . set1 /= set2 . and . & . not . set0 /= set0 . and . . not . set1 /= set1 . and . . not . & set2 /= set2 ) then write ( * , * ) 'Passed 64 bit inequality tests.' else error stop 'Failed 64 bit inequality tests.' end if end program example_inequality >= - compare two bitsets to determine whether the first is greater than or equal to the second Status Experimental Description Returns .true. if the bits in set1 and set2 are the same or the\nhighest order different bit is set to 1 in set1 and to 0 in set2 , .false. . otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):>=(interface)]] set2 or result = set1 .GE. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 are the same\nor the highest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. Example program example_ge use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 >= set0 . and . set2 >= set1 . and . set2 >= set0 . and . & set0 >= set0 . and . set1 >= set1 . and . set2 >= set2 . and . & . not . set0 >= set1 . and . . not . set0 >= set2 . and . . not . & set1 >= set2 ) then write ( * , * ) 'Passed 64 bit greater than or equals tests.' else error stop 'Failed 64 bit greater than or equals tests.' end if end program example_ge > - compare two bitsets to determine whether the first is greater than the other Status Experimental Description Returns .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):>(interface)]] set2 or result = set1 .GT. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 1 in set1 and to 0 in set2 , .false. otherwise. Example program example_gt use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set1 > set0 . and . set2 > set1 . and . set2 > set0 . and . & . not . set0 > set0 . and . . not . set0 > set1 . and . . not . & set1 > set2 ) then write ( * , * ) 'Passed 64 bit greater than tests.' else error stop 'Failed 64 bit greater than tests.' end if end program example_gt <= - compare two bitsets to determine whether the first is less than or equal to the other Status Experimental Description Returns .true. if the bits in set1 and set2 are the same or the\nhighest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):<=(interface)]] set2 or result = set1 .LE. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 are the same\nor the highest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. Example program example_le use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 <= set1 . and . set1 <= set2 . and . set0 <= set2 . and . & set0 <= set0 . and . set1 <= set1 . and . set2 <= set2 . and . & . not . set1 <= set0 . and . . not . set2 <= set0 . and . . not . & set2 <= set1 ) then write ( * , * ) 'Passed 64 bit less than or equal tests.' else error stop 'Failed 64 bit less than or equal tests.' end if end program example_le < - compare two bitsets to determine whether the first is less than the other Status Experimental Description Returns .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. The sets must be the same size otherwise the\nresults are undefined. Syntax result = set1 [[stdlib_bitsets(module):<(interface)]] set2 or `result = set1 .LT. set2 Class Elemental operator Arguments set1 : shall be a scalar bitset_64 or bitset_large expression. It\nis an intent(in) argument. set2 : shall be a scalar expression of the same type as self . It\nwill have the same number of bits as set1 . It is an intent(in) argument. Result value The result is a default logical scalar.\nThe result is .true. if the bits in set1 and set2 differ and the\nhighest order different bit is set to 0 in set1 and to 1 in set2 , .false. otherwise. Example program example_lt use stdlib_bitsets implicit none type ( bitset_64 ) :: set0 , set1 , set2 call set0 % init ( 33 ) call set1 % init ( 33 ) call set2 % init ( 33 ) call set1 % set ( 0 ) call set2 % set ( 32 ) if ( set0 < set1 . and . set1 < set2 . and . set0 < set2 . and . & . not . set0 < set0 . and . . not . set2 < set0 . and . . not . & set2 < set1 ) then write ( * , * ) 'Passed 64 bit less than tests.' else error stop 'Failed 64 bit less than tests.' end if end program example_lt","tags":"","loc":"page/specs/stdlib_bitsets.html"},{"title":"constants – Fortran-lang/stdlib","text":"Introduction Codata to_real - Get the constant value or its uncertainty. Status Description Syntax Arguments Return value Example Introduction The stdlib_constants module provides mathematical constants and the most common physical constants. Warning : The names of the most common physical constants are kept short as they are inside a dedicated module. \nNonetheless, in case of overlapping names, they can always be renamed as following: use stdlib_constants , only : clight => c Codata The stdlib_codata module defines all codata (physical) constants as derived \ntype. The module is automatically generated with a simple parser written in Python The latest codata constants were released in 2022 by the NIST All values for the codata constants are provided as double precision reals. \nThe names are quite long and can be aliased with shorter names. The derived type codata_constant_type defines: 4 members: name (string) value (double precision real) uncertainty (double precision real) unit (string) 2 type-bound procedures: print : to print the values of the constant members; to_real : to get the value or the uncertainty to the desired precision. A module level interface to_real is \navailable for getting the constant value or uncertainty of a constant. to_real - Get the constant value or its uncertainty. Status Experimental Description Convert a codata_constant_type to a real (at least sp , or dp ) scalar. Warning : Some constants cannot be converted to single precision sp reals due to the value of the exponents. Syntax r = to_real (c, mold [, uncertainty]) Arguments c : argument has intent(in) and shall be of type codata_constant_type . mold : argument has intent(in) and shall be of real type. Note : The type of the mold argument defines the type of the result. uncertainty (optional): argument has intent(in) and shall be of logical type. \nIt specifies if the uncertainty needs to be returned instead of the value. Default to .false. . Return value Returns a scalar of real type which is either the value or the uncertainty of a codata constant. Example program example_constants use stdlib_constants , only : c , pi => PI_dp use stdlib_codata , only : alpha => ALPHA_PARTICLE_ELECTRON_MASS_RATIO use stdlib_codata_type , only : to_real use stdlib_kinds , only : dp , sp ! Use most common physical constants defined as double precision reals print * , \"speed of light in vacuum= \" , c ! Use of mathematical constants such as PI print * , \"PI as double precision real= \" , pi ! Use codata_constant type for evaluating the value to the desired precision print * , \"Value of alpha... evaluated to double precision=\" , alpha % to_real ( 1.0_dp ) print * , \"Uncertainty of alpha... evaluated to double precision=\" , alpha % to_real ( 1.0_sp , . true .) print * , \"Value of alpha... evaluated to single precision=\" , alpha % to_real ( 1.0_sp ) ! Convert a codata constant to a real print * , \"Value of the alpha... evaluated to double precision=\" , to_real ( alpha , 1.0_dp ) ! Print out codata constant attributes: name, value, uncertainty and unit call alpha % print () end program example_constants","tags":"","loc":"page/specs/stdlib_constants.html"},{"title":"error – Fortran-lang/stdlib","text":"The stdlib_error module The stdlib_error module Introduction Procedures and methods provided check - Checks the value of a logical condition Status Description Syntax Arguments Return value Examples error_stop - aborts the program Status Description Syntax Arguments Output Examples Introduction Catching and handling errors. Procedures and methods provided check - Checks the value of a logical condition Status Experimental Description Checks the value of a logical condition. Syntax call check (condition, msg, code, warn) Arguments condition : Shall be a scalar of type logical . msg (optional): Shall be a character expression containing the message to be printed to stderr . The default msg is 'Check failed.'. code (optional): Shall be a scalar of type integer . The default code is 1 . warn (optional): Shall be a scalar of type logical . The default warn is .true. . Return value If condition is .false. , and: no other arguments are provided, this subroutine stops the program with the default message and exit code 1; msg is provided, this subroutine stops the program and it prints the value of msg ; code is provided, this subroutine stops the program with the given exit code; warn is provided and warn is .true. , this subroutine doesn't stop the program and prints the message. Examples program example_check1 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, stops the program with exit code 1 and prints 'Check failed.' call check ( a == 5 ) end program example_check1 program example_check2 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, stops the program with exit code 1 and prints 'a == 5 failed.' call check ( a == 5 , msg = 'a == 5 failed.' ) end program example_check2 program example_check3 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, prints 'a == 5 failed.', but doesn't stop the program. call check ( a == 5 , msg = 'a == 5 failed.' , warn = . true .) end program example_check3 program example_check4 use stdlib_error , only : check implicit none integer :: a = 1 ! If a /= 5, stops the program with exit code 77 and prints 'a == 5 failed.' call check ( a == 5 , msg = 'a == 5 failed.' , code = 77 ) end program example_check4 error_stop - aborts the program Status Experimental Description Aborts the program with a message and a nonzero exit code. Syntax call error_stop (msg, code) Arguments msg : Shall be a character expression containing the message to be printed to stderr . code (optional): Shall be a scalar of type integer to be returned as exit code. Output Aborts the program with printing the message msg to stderr and a nonzero exit code. The nonzero exit code is equal to code if provided, and 1 otherwise. Examples Without error code: program example_error_stop1 use stdlib_error , only : error_stop implicit none call error_stop ( \"Invalid argument\" ) end program example_error_stop1 With error code: program example_error_stop2 use stdlib_error , only : error_stop implicit none call error_stop ( \"Invalid argument\" , code = 123 ) end program example_error_stop2","tags":"","loc":"page/specs/stdlib_error.html"},{"title":"hash – Fortran-lang/stdlib","text":"The stdlib_hash_32bit and stdlib_hash_64bit modules The stdlib_hash_32bit and stdlib_hash_64bit modules Overview of hash procedures Licensing Glossary The hash codes modules Overview of the modules The stdlib_hash_32bit module Overview of the module The int_hash parameter The little_endian parameter Specifications of the stdlib_hash_32bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example fnv_1_hash- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example fnv_1a_hash- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example new_nmhash32_seed- returns a valid input seed for nmhash32 Status Description Syntax Class Argument Note Example new_nmhash32x_seed- returns a valid input seed for nmhash32x Status Description Syntax Class Argument Note Example new_water_hash_seed- returns a valid input seed for water_hash Status Description Syntax Class Argument Note Example nmhash32- calculates a hash code from a key and a seed Status Description Syntax Class Arguments Result Note Example nmhash32x- calculates a hash code from a key and a seed Status Description Syntax Class Arguments Result Note Example odd_random_integer - returns an odd integer Status Description Syntax Class Argument Note Example universal_mult_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example water_hash- calculates a hash code from a key and a seed Status Description Syntax Class Arguments Result Note Example The stdlib_hash_64bit module Overview of the module The int_hash parameters The little_endian parameter Specifications of the stdlib_hash_64bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example FNV_1- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example FNV_1A- calculates a hash code from a key Status Description Syntax Class Argument Result Note Example new_pengy_hash_seed- returns a valid input seed for pengy_hash Status Description Syntax Class Argument Note Example new_spooky_hash_seed- returns a valid input seed for spooky_hash Status Description Syntax Class Argument Note Example odd_random_integer - returns odd integer Status Description Syntax Class Argument Note Example pengy_hash - maps a character string or integer vector to an integer Status Description Syntax Class Arguments Result Note Example spooky_hash - maps a character string or integer vector to an integer Status Description Syntax Class Arguments Result Note Example universal_mult_hash - maps an integer to a smaller number of bits Status Description Syntax Class Arguments Result Note Example Test Codes Overview of hash procedures The comparison of lexical entities or other objects for equality\ncan be computationally expensive.\nThis cost is often reduced by computing a near unique integer value,\ntermed a hash code, from the structure of the object using a procedure\ntermed a hash function.\nEquality of hash codes is a necessary, but not sufficient, condition\nfor the original objects to be equal.\nAs integer comparisons are very efficient, performing an initial\ncomparison of hash codes and then performing a detailed comparison\nonly if the hash codes are equal can improve performance.\nThe hash codes, in turn, can be mapped to a smaller set of integers,\nthat can be used as an index, termed a hash index, to a rank-1\narray, often termed a hash table.\nThis mapping will be known as a scalar hash.\nThe use of a hash table reduces the number of hash codes that need to\nbe compared, further improving performance.\nA hash function can also be used to generate a checksum to verify that\ndata has not changed.\nThe Fortran Standard Library therefore provides procedures to compute\nhash codes and scalar hashes.\nThis document only discusses the hash codes and scalar hashes in the\nlibrary. Licensing The Fortran Standard Library is distributed under the MIT License.\nHowever components of the library may be based on code released under a\ndifferent license. In particular, the hash codes are often based\non algorithms considered as public domain ( Fibonacci Hash , Universal\nMultiplicative Hash) or released under a different license than the\nMIT license ( FNV-1 Hash , FNV-1A Hash , nmhash32 , nmhash32x , waterhash , pengyhash and SpookyHash )\nThe licensing status of the algorithms are discussed below. fibonacci_hash is a scalar hash. It is an implementation in Fortran\n2008 and signed two's complement integers of the Fibonacci Hash\ndescribed in D. E. Knuth, \"The Art of\nComputer Programming, Second Edition, Volume 3, Sorting and\nSearching\", Addison-Wesley, Upper Saddle River, NJ,\npp. 517-518, 1998. The algorithms in that source are considered public\ndomain, and its use is unrestricted. universal_mult_hash is a scalar hash. It is an implementation in\nFortran 2008 and signed two's complement integers of the\nuniversal multiplicative hash algorithm of M. Dietzfelbinger,\nT. Hagerup, J. Katajainen, and M. Penttonen, \"A Reliable Randomized\nAlgorithm for the Closest-Pair Problem,\" J. Algorithms, Vol. 25,\nNo. 1, Oct. 1997, pp. 19-51. Because of its publication in the Journal\nof Algorithms, the universal multiplicative hash algorithm is public\ndomain. fnv_1_hash and fnv_1a_hash are translations to Fortran 2008 and\nsigned two's complement integers of the FNV-1 and FNV-1a hash functions of Glenn Fowler, Landon Curt Noll,\nand Phong Vo, that has been released into the public\ndomain. Permission has been granted, by Landon Curt Noll, for the use\nof these algorithms in the Fortran Standard Library. A description of\nthese functions is available at https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function .\nThese functions have been modified from their normal forms to also\nencode the structure size in the output hash. Similarly spooky_hash and associated procedures are translations to\nFortran 2008 and signed two's complement integers of the unsigned 64\nbit version 2 SpookyHash functions of Bob\nJenkins https://burtleburtle.net/bob/hash/spooky.html to signed 64\nbit operations. Version 2 was chosen over version 1 as it has better\nperformance and fewer bad seeds\nBob Jenkins has also put this code in the public\ndomain and has given permission to treat this code as public domain in\nthe USA, provided the code can be used under other licenses and he is\ngiven appropriate credit. nmhash32 and nmhash32x are translations to Fortran 2008 and signed\ntwo's complement integers of the unsigned 32-bit\nhashes of James Z. M. Gao's nmhash32 and nmhash32x version of 0.2, https://github.com/gzm55/hash-garage/blob/a8913138bdb3b7539c202edee30a7f0794bbd835/nmhash.h James Z. M. Gao has released his code under the BSD 2 Clause\nLicense. The BSD 2-Clause license is as follows: BSD 2-Clause License Copyright ( c ) 2021 , James Z . M . Gao All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : 1 . Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . water_hash is a translation to Fortran 2008 and signed two's\ncomplement integers of the waterhash algorithm\nof Tommy Ettinger. This algorithm is inspired by the Wy Hash of\nWang Yi. Tommy Ettinger's original C++ code, waterhash.h ,\nis available at URL: https://github.com/tommyettinger/waterhash under\nthe unlicense , https://github.com/tommyettinger/waterhash/blob/master/LICENSE .\nThe unlicense reads as follows: This is free and unencumbered software released into the public domain . Anyone is free to copy , modify , publish , use , compile , sell , or distribute this software , either in source code form or as a compiled binary , for any purpose , commercial or non - commercial , and by any means . In jurisdictions that recognize copyright laws , the author or authors of this software dedicate any and all copyright interest in the software to the public domain . We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors . We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law . THE SOFTWARE IS PROVIDED \"AS IS\" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . For more information , please refer to < http : // unlicense . org > pengy_hash is a translation to Fortran 2008 and signed two's\ncomplement arithmetic of the pengyhash algorithm of Alberto Fajardo,\ncopyright 2020. Alberto Fajardo's original C code, pengyhash.c , is\navailable at the URL:\nhttps://github.com/tinypeng/pengyhash/blob/master/pengyhash.c\nunder the BSD 2-Clause License:\nhttps://github.com/tinypeng/pengyhash/blob/master/LICENSE The BSD 2-Clause license is as follows: BSD 2-Clause License pengyhash Copyright ( c ) 2020 Alberto Fajardo All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : 1 . Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . Glossary There are a few words used in this document that may not be familiar to\nreaders of this document: Key - a value to be used to find entries in a hash table typically\n using its hashed value for the initial search; Salt - see seed, and; Seed - an additional argument to a hash function that changes its\n output making some attacks impractical. The hash codes modules Overview of the modules The Standard Library provides two modules implementing hash\nfunctions and scalar hashes.\nThe stdlib_hash_32bit module provides procedures to\ncompute 32-bit integer hash codes and a scalar hash.\nThe hash codes can be used for tables of up to 2**30 entries, and\nfor keys with a few hundred elements, but performance has only been\ntested for tables up to 2**16 entries and performance may degrade\nfor larger numbers of entries.\nThe stdlib_hash_64bit module provides hash procedures to\ncompute 64-bit integer hash codes and a scalar hash.\nThe hash codes can, in principle, be used for tables of up to 2**62 entries, and for keys with a few thousand elements, but testing of\nperformance has only been been for tables up to 2**16 elements and\nperformance may degrade for larger numbers of entries.\nWhile one of the codes in stdlib_hash_64bit , SPOOKY_HASH , can also be used to calculate 128 bit hash codes, none\nof the current codes can be used to calculate 256 bit hash codes.\nSuch larger hash codes are useful for larger hash tables and keys, and\nfor checksums.\nSuch larger keys and tables are little used, if used at all, in\ncurrent\nFortran codes, but the larger hash codes may be added to the library\nif there is a demand for them. Hash functions are often divided into two categories\n\"cryptographic\" and \"non-cryptographic\".\nCryptographic hash functions produce codes that are infeasible to\nreverse without additional information beyond the identity of\nthe hash function used to generate the code and the resulting codes.\nNon-cryptographic codes, in some circumstances, are believed to be\nreversible.\nThe modules only implement hash\nfunctions that are considered non-cryptographic, with\nimplementations available in the public domain. There are a number of algorithms available for the computation of\nnon-cryptographic 32 and 64-bit hash codes that differ in their\ncomputational complexity,\ntheir relative performance on different size keys, and the\nexpected uniqueness (randomness) of the resulting hash codes.\nTheir relative performance in the analysis of text, in particular,\ncan depend on the compiler, character set, language, and content.\nThe quality of a hash function is often evaluated using\nthe SMHasher test suite, originally written by Austin Appleby , but greatly\nextended by Reini Urban .\nAll except the simplest, FNV_1 and FNV_1A , of the hash functions\ndefined in the modules perform well on the tests in Reini Urban's\nversion of SMHasher. There are two problems in implementing hash functions in Fortran.\nFirst, the static typing of Fortran makes it awkward to define general\npurpose hash functions.\nInstead hash functions are defined for some of the more common\nobjects: character strings and rank-1 arrays of integers.\nOther objects can, in principle, be hashed by using transfer to\nmap their contents to an integer array, typically one of kind int8 .\nThe other problem is that hash codes are typically defined using\nmodular unsigned integer arithmetic.\nAs such integers are not part of the current Fortran standard,\nworkarounds have to be used.\nThese can take two forms.\nIn one, the operations are emulated by using an integer of a\nlarger size, or, for the larger integers, by dividing the integer into\ntwo lower and higher order halves,\nand performing the operations on each half separately using\nthe larger integers.\nIn the second, the unsigned integers may be replaced directly by\nthe corresponding signed integers, but\notherwise not modifying the code logic.\nThe first should be standard conforming on current compilers, but\nis more computationally intensive unless the compilers recognize\nunderlying idioms that are rarely used in Fortran codes. The second is\nnot standard conforming as bit operations involving the sign are\nundefined,\nbut should yield equivalent results with fewer operations on\ncompilers with two's complement integers that do not trap on over\nor under flow. The codes currently use the second method. In order to compile the hash function modules, the compilers must\nimplement much of Fortran 2003, and selected components of Fortran\n2008: submodules, 64-bit integers, and some bit intrinsics.\nThe main limitation on valid compilers is whether they\nimplement the submodules enhancement of Fortran 2008.\nIn order to properly run the hash functions, the compilers must\nuse two's complement integers, and be able to execute them with\nwraparound semantics and no integer overflow exceptions.\nCurrent Fortran 2003+ compilers solely use two's complement\nintegers, and appear to be able to turn off overflow detection,\nso the modules use signed integer arithmetic. For that reason\ntrapping on signed arithmetic must be disabled. The command line\nflags to disable overflow detection for compilers implementing\nsubmodules are summarized in the table below.\nNote that FLANG, gfortran (since version 10), ifort, and NAG all default to\ninteger overflow wrapping. Compiler Legal flag Illegal flag Default ARM Fortran NA? NA? overflow wrapping? Cray Fortran NA? NA? overflow wrapping? FLANG/PGI -fwrapv -ftrapv -fwrapv gfortran -fwrapv -ftrapv -fwrapv IBM Fortran NA? NA? overflow wrapping? ifort NA? NA? overflow wrapping NAG Fortran -C=none -C=intovf -C=none NEC Fortran NA? NA? overflow wrapping? NVIDIA Fortran NA? NA? overflow wrapping? All of the modules' hash functions take one or two arguments.\nAll of them have as their first argument the object to be hashed,\ntermed a key .\nMost have a second argument, termed a seed , that sets the initial\nvalue of the hash code changing the hash function behavior.\nIn particular, inputs that hash to the same hash index with a given\nseed, will often hash to different indexes with a different seed.\nThis difference in behavior makes algorithms that use a seed much\nmore resistant to denial of service attacks that use the properties\nof a known hash to increase the number of hash table collisions.\nThis additional integer must be kept the same for all hashes\nin a given hash table, but can be changed and the objects rehashed\nif collisions are unusually common.\nThe seed can be either a scalar or a two-element array.\nSome of the hash functions have alternatives that allow incremental\nhashing. Algorithm Seed Result FNV-1 None 32 or 64-bit integer FNV-1a None 32 or 64-bit integer nmhash32 32-bit scalar integer 32-bit integer nmhash32x 32-bit scalar integer 32-bit integer pengyhash 32-bit scalar integer 64-bit integer Spooky Hash 64-bit two element vector 64-bit two element vector waterhash 64-bit scalar integer 32-bit integer The hash function modules each provide at least five algorithms for\nhash functions: two optimized for small (< 32 int8 integer elements)\nkeys, and three optimized for large (> 100 int8 integer elements)\nkeys.\nThe core implementation for each algorithm is for keys that are\nvectors of int8 integers.\nThese core implementations are then used in wrappers for keys\nthat are vectors of int16 , int32 and int64 integers, or default\ncharacter strings, in the expectation that inlining will eliminate the\noverhead of transferring the other keys to int8 integer vectors. The stdlib_hash_32bit module provides\nimplementations of five hash code algorithms:\nthe FNV_1 and FNV_1A variants of Glenn Fowler,\nLandon Curt Noll, and Kiem-Phong Vo;\nthe nmhash32 and nmhash32x of James Z. M. Gao;\nand the waterhash of Tommy Ettinger.\nThe detailed implementation of each algorithm is handled in a separate\nsubmodule: stdlib_hash_32bit_fnv , stdlib_hash_32bit_nm , and stdlib_hash_32bit_water ,\nrespectively. The nmhash32 , nmhash32x , and waterhash algorithms\nrequire seeds. The submodules provide separate seed generators\nfor each algorithm.\nThe module itself\nimplements two scalar hash functions, fibonacci_hash and universal_mult_hash .\nIt also implements the subroutine, odd_random_integer , for\ngenerating seeds for universal_mult_hash .\nAll assume a two's complement sign bit, and no out of\nrange checks. The stdlib_hash_64bit module also provides\nimplementations of four hash code algorithms:\nthe FNV_1 and FNV_1A variants of Glenn Fowler,\nLandon Curt Noll, and Kiem-Phong Vo;\nthe pengyhash of Alberto Fajardo;\nand the SpookyHash of Bob Jenkins.\nThe detailed implementation of each algorithm is handled in a separate\nsubmodule: stdlib_hash_64bit_fnv , stdlib_hash_64bit_pengy , and stdlib_hash_64bit_spooky ,\nrespectively.\nThe pengyhash , and Spooky Hash algorithms\nrequire seeds. The submodules provide separate seed generators\nfor each algorithm.\nThe module itself implements two scalar hash functions, fibonacci_hash and universal_mult_hash .\nIt also implements the subroutine, odd_random_integer , for\ngenerating seeds for universal_mult_hash .\nAll assume a two's complement sign bit, and no out of\nrange checks. The stdlib_hash_32bit_fnv and stdlib_hash_64bit_fnv submodules each provide implementations of the FNV-1 and FNV-1A\nalgorithms in the form of two separate overloaded functions: FNV_1 and FNV_1A .\nThe FNV-1 and FNV-2 algorithms differ in their order of the\nmultiplication and exclusive or operations.\nThey differ from their normal implementation in that they also\nencode the structure size in the hash code.\nThe 32 and 64-bit algorithms differ in their initial offsets and in\ntheir multiplicative constants.\nAnalysis suggests that FNV_1A should be better at randomizing the\ninput, but tests with hash tables show negligible difference.\nThese algorithms have the reputation of being particularly useful for\nsmall byte strings, i.e., strings of less than 32 bytes.\nWhile they do not at all perform well on the SMHasher test suite,\nusage indicates that this has little impact on the\nperformance of small hash tables, and the small size of the functions\nallows their quick loading and retainment in the instruction cache,\ngiving a performance boost where the hashing is intermittent.\n(See the SMHasher discussion and S. Richter, V. Alvarez, and J. Dittrich. 2015. A Seven-Dimensional Analysis of Hashing Methods and its Implications on Query Processing, Proceedings of the VLDB Endowment, Vol. 9, No. 3. https://doi.org/10.14778/2850583.2850585 . The stdlib_hash_32bit_nm submodule provides implementations\nof James Z.M. Gao's nmhash32 and nmhash32x algorithms,\nversion 0.2,\nin the form of the overloaded functions, nmhash32 and nmhash32x .\nThe implementations are based on the scalar versions of Gao's\nalgorithms and not the vector versions that require access to\nthe vector instructions of some compilers.\nBoth algorithms perform well on the SMHasher tests, and have no known\nbad seeds. The vector versions of both codes perform well on large\nkeys, with the nmhash32x faster on short keys. To provide randomly\ngenerated seeds for the two functions the submodule also defines the\nsubroutines new_nmhash32_seed and new_nmhash32x_seed . Gao claims\nthat nmhash32x is significantly faster than nmhash32 on short\nseeds, but slower on long seeds, but our limited testing so far shows nmhash32x to be significantly faster on short seeds and slightly\nfaster on long seeds. The stdlib_hash_32bit_water submodule provides implementations\nof Tommy Ettinger's waterhash algorithm in the form of the overloaded\nfunction, water_hash . Water Hash has not been tested by Reini Urban,\nbut Tommy Ettinger has tested it with Urban's SMHasher and presents\nresults that shows Water Hash passing all the tests. So far his\ntesting hasn't found any bad seeds for the algorithm. To provide\nrandomly generated seeds for the hash function the submodule also\ndefines the subroutine new_water_hash_seed . The stdlib_hash_64bit_pengy submodule provides implementations of\nAlberto Fajardo's pengyhash in the form of the overloaded function, pengy_hash . Reini Urban's testing shows that PengyHash passes all\nthe tests and has no bad seeds. To provide randomly generated seeds\nfor the hash function the submodule also defines the subroutine new_pengy_hash_seed . The stdlib_hash_64bit_spooky submodule provides implementations\nof Bob Jenkins' SpookyHash in the form of the overloaded function, spooky_hash . Future implementations may provide the SpookyHash\nincremental hashing procedures.\nSpookyHash is optimized for large objects and should give excellent\nperformance for objects greater than about 96 byes, but has\nsignificant overhead for smaller objects.\nThe code was designed for little-endian compilers, and will give\ndifferent results on big-endian compilers, but the hash quality on\nthose compilers is probably just as good.\nSpookyHash version 2 passes all of Reini Urban's SMHasher tests, and\nhas one bad seed only when reduced to a 32-bit output.\nIts only potential problem is undefined behavior if the key is\nmisaligned. The stdlib_hash_32bit module Overview of the module Thirty two bit hash functions are primarily useful for generating hash\ncodes and hash indices for hash tables.\nThey tend to be less useful for generating checksums, which generally\nbenefit from having a larger number of bits.\nThe stdlib_hash_32bit module defines five public overloaded\n32-bit hash code functions, FNV_1 , FNV-1A , nmhash32 , nmhash32x and water_hash , two scalar hash functions, fibonacci_hash and universal_mult_hash , four seed generators, odd_random_integer for universal_mult_hash , and new_nmhash32_seed , new_nmhash32x_seed ,\nand new_water_hash_seed , for their respective hash code\nfunctions. It also defines the integer kind constant, int_hash , and\na logical constant, little_endian , used to deal with one aspect of\nthe machine dependence of the hash codes. The int_hash parameter It is necessary to define the kind of integer used to return the hash\ncode.\nAs stdlib_hash_32bit deals exclusively with 32-bit hash codes, int_hash is an alias for the integer kind int32 . The little_endian parameter In implementing hash functions it is sometimes necessary to know the\n\"endianess\" of the compiler's integers. To this end the stdlib_hash_32bit module defines the logical parameter little_endian that, if true, indicates that the compiler has\nlittle-endian integers, and that if false indicates that the integers\nare big-endian. Specifications of the stdlib_hash_32bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 32-bit integer. This is useful\nin mapping hash codes into small arrays. Syntax code = fibonacci_hash ( key, nbits ) Class Elemental function Arguments key : Shall be a scalar integer expression of kind int32 . It is an intent(in) argument. nbits Shall be a scalar default integer expression with 0 < nbits <\n32 . It is an intent(in) argument. Result The result is an integer of kind int32 with at most the lowest nbits nonzero, mapping to a range 0 to nbits-1 . Note fibonacci_hash is an implementation of the Fibonacci Hash of Donald\nE. Knuth. It multiplies the key by the odd valued approximation to 2**32/phi , where phi is the golden ratio 1.618..., and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_fibonacci_hash use stdlib_hash_32bit , only : fibonacci_hash use iso_fortran_env , only : int32 implicit none integer , allocatable :: array1 (:) integer ( int32 ) :: hash , source allocate ( array1 ( 0 : 2 ** 6 - 1 )) array1 (:) = 0 source = 42_int32 hash = fibonacci_hash ( source , 6 ) array1 ( hash ) = source print * , hash end program example_fibonacci_hash fnv_1_hash - calculates a hash code from a key Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note fnv_1_hash is an implementation of the original FNV-1 hash code of Glenn\nFowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also encodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1_hash use stdlib_hash_32bit , only : fnv_1_hash use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash hash = fnv_1_hash ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ]) print * , hash end program example_fnv_1_hash fnv_1a_hash - calculates a hash code from a key Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1a_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note fnv_1a_hash is an implementation of the alternative FNV-1a hash code of\nGlenn Fowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also encodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1a_hash use stdlib_hash_32bit , only : fnv_1a_hash use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash hash = fnv_1a_hash ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ]) print * , hash end program example_fnv_1a_hash new_nmhash32_seed - returns a valid input seed for nmhash32 Status Experimental Description Calculates a 32-bit \"random\" integer that is believed to be a valid\nseed for nmhash32 and is also different from the input seed. Syntax call new_nmhash32_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int32 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for nmhash32 , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for nmhash32 . new_nmhash32x_seed - returns a valid input seed for nmhash32x Status Experimental Description Calculates a 32-bit \"random\" integer that is believed to be a valid\nseed for nmhash32x and is also different from the input seed. Syntax call new_nmhash32x_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int32 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for nmhash32x , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for nmhash32x . new_water_hash_seed - returns a valid input seed for water_hash Status Experimental Description Calculates a 64-bit \"random\" integer that is believed to be a valid\nseed for water_hash and is also different from the input seed. Syntax call new_water_hash_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int64 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for water_hash , but if any\nare identified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for water_hash . nmhash32 - calculates a hash code from a key and a seed Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string, and the input seed . Syntax code = nmhash32 ( key, seed ) Class Pure/elemental function Arguments key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. seed : shall be an integer scalar expression of kind int32 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note nmhash32 is an implementation of the nmhash32 hash code of\nJames Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash table\napplications.\nThis code passes the SMHasher tests, and has no known bad seeds.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_nmhash32 use stdlib_hash_32bit , only : nmhash32 , & new_nmhash32_seed use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash integer ( int32 ) :: seed = 42_int32 call new_nmhash32_seed ( seed ) hash = nmhash32 ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ], seed ) print * , seed , hash end program example_nmhash32 nmhash32x - calculates a hash code from a key and a seed Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string, and the input seed . Syntax code = nmhash32x ( key, seed ) Class Pure/elemental function Arguments key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. seed : shall be an integer scalar expression of kind int32 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note nmhash32x is an implementation of the nmhash32x hash code of\nJames Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash table\napplications.\nThis code passes the SMHasher tests, and has no known bad seeds.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_nmhash32x use stdlib_hash_32bit , only : nmhash32x , & new_nmhash32x_seed use iso_fortran_env , only : int32 implicit none integer ( int32 ) :: hash integer ( int32 ) :: seed = 42_int32 call new_nmhash32x_seed ( seed ) hash = nmhash32x ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ], seed ) print * , seed , hash end program example_nmhash32x odd_random_integer - returns an odd integer Status Experimental Description Returns a random 32-bit integer distributed uniformly over the odd values. Syntax call odd_random_integer ( harvest ) Class Subroutine Argument harvest : Shall be a scalar integer variable of kind int32 . It is\nan intent(out) argument. Note odd_random_integer is intended to generate seeds for universal_mult_hash . odd_random_integer uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See universal_mult_hash . universal_mult_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 32-bit integer. This is useful\nin mapping a hash value to a range 0 to 2**nbits-1 . Syntax code = universal_mult_hash ( key, seed, nbits ) Class Elemental function Arguments key : Shall be a scalar integer expression of kind int32 . It is an intent(in) argument. seed : Shall be a scalar integer expression of kind int32 . It is an intent(in) argument. It must have an odd value. nbits Shall be a scalar default integer expression with 0 < nbits <\n32 . It is an intent(in) argument. Result The result is a scalar integer of kind int32 with at most the lowest nbits nonzero. Note universal_mult_hash is an implementation of the Universal\nMultiplicative Hash of M. Dietzfelbinger, et al.\nIt multiplies the key by seed , and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_universal_mult_hash use stdlib_hash_32bit , only : odd_random_integer , & universal_mult_hash use iso_fortran_env , only : int32 implicit none integer , allocatable :: array1 (:) integer ( int32 ) :: hash , i , seed , source seed = 0 allocate ( array1 ( 0 : 2 ** 6 - 1 )) do i = 0 , 2 ** 6 - 1 array1 ( i ) = i end do call odd_random_integer ( seed ) source = 42_int32 hash = universal_mult_hash ( source , seed , 6 ) array1 ( hash ) = source print * , seed , hash , array1 end program example_universal_mult_hash water_hash - calculates a hash code from a key and a seed Status Experimental Description Calculates a 32-bit hash code from a rank-1 integer array or a default\ncharacter string, and the input seed . Syntax code = water_hash ( key, seed ) Class Pure/elemental function Arguments key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. seed : shall be an integer scalar expression of kind int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note water_hash is an implementation of the waterhash hash code of\nTommy Ettinger.\nThis code has excellent performance on long keys, and good performance\non short keys.\nAs a result it should give reasonable performance for typical hash\ntable applications.\nThis code passes the SMHasher tests.\nThe waterhash is based on the wyhash of Wang Yi.\nWhile wyhash has a number of bad seeds, where randomization of the\noutput is poor,\nso far testing has not found any bad seeds for waterhash .\nIt can have undefined behavior if the key is not word aligned,\ni.e. some computer processors can only process a given size integer if\nthe address of the integer is a multiple of the integer size.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_water_hash use stdlib_hash_32bit , only : water_hash , & new_water_hash_seed use iso_fortran_env , only : int32 , int64 implicit none integer ( int32 ) :: hash integer ( int64 ) :: seed = 42_int64 call new_water_hash_seed ( seed ) hash = water_hash ([ 5 , 4 , 3 , 1 , 10 , 4 , 9 ], seed ) print * , hash , seed end program example_water_hash The stdlib_hash_64bit module Overview of the module Sixty-four bit hash functions are generally overkill for hash table\napplications, and are primarily useful for check sums and related\napplications.\nAs checksums often have to deal with extremely large files or\ndirectories, it is often useful to use incremental hashing as well as\ndirect hashing, so 64-bit and higher hash algorithms often provide\nmultiple implementations. The current module, for simplicity of API,\ndoesn't provide any incremental hashes.\nThe stdlib_hash_64bit module defines several public\noverloaded 64-bit hash procedures, FNV_1 , FNV-1A , pengy_hash , and spooky_hash , two scalar hash functions, fibonacci_hash and universal_mult_hash , a seed generator, odd_random_integer , for the universal_mult_hash , and two seed generators, new_pengy_hash_seed and new_spooky_hash_seed for their respective hash functions. It\nalso defines the integer kind constant, int_hash , used to specify\nthe kind of the hash function results, and a logical constant, little_endian , used to deal with one aspect of the machine\ndependence of the hash codes.\nNote that while SpookyHash can be used as a sixty-four bit hash\nalgorithm, its algorithms actually returns two element integer arrays\nof kind int64 , so it can also be used as a 128 bit hash. The int_hash parameters It is necessary to define the kind of integer used to return the hash\ncode.\nAs stdlib_haash_64bit deals exclusively with 64-bit hash codes, int_hash is an alias for the integer kind int64 . The little_endian parameter In implementing hash functions it is sometimes necessary to know the\n\"endianess\" of the compiler's integers. To this end the stdlib_hash_64bit module defines the logical parameter little_endian that if true indicates that the compiler has\nlittle-endian integers, and that if false indicates that the integers\nare big-endian. Specifications of the stdlib_hash_64bit procedures fibonacci_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 64-bit integer. This is useful\nin mapping hash codes into small arrays. Syntax code = fibonacci_hash ( key, nbits ) Class Elemental function Arguments key : Shall be a scalar integer expression of kind int64 . It is an intent(in) argument. nbits Shall be a scalar default integer expression with 0 < nbits <\n64 . It is an intent(in) argument. Result The result is an integer of kind int64 with at most the lowest nbits nonzero, mapping to a range 0 to nbits-1 . Note fibonacci_hash is an implementation of the Fibonacci Hash of Donald\nE. Knuth. It multiplies the key by the odd valued approximation to 2**64/phi , where phi is the golden ratio 1.618..., and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_fibonacci_hash_64 use stdlib_hash_64bit , only : fibonacci_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash , source allocate ( array1 ( 0 : 2 ** 6 - 1 )) array1 (:) = 0 source = int ( Z '1FFFFFFFF' , int64 ) hash = fibonacci_hash ( source , 6 ) array1 ( hash ) = source print * , hash end program example_fibonacci_hash_64 FNV_1 - calculates a hash code from a key Status Experimental Description Calculates a 64-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int64 . Note FNV_1 is an implementation of the original FNV-1 hash code of Glenn\nFowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also ecodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications, although it is rare for them to need 64 bits.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1_hash_64 use stdlib_hash_64bit , only : fnv_1_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash array1 = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] hash = fnv_1_hash ( array1 ) print * , hash end program example_fnv_1_hash_64 FNV_1A - calculates a hash code from a key Status Experimental Description Calculates a 64-bit hash code from a rank-1 integer array or a default\ncharacter string. Syntax code = fnv_1a_hash ( key ) Class Pure/elemental function Argument key : Shall be a deferred length default character scalar expression\nor a rank-1 integer array expression of kind int8 , int16 , int32 , or int64 .\nIt is an intent(in) argument. Result The result is a scalar integer of kind int32 . Note FNV_1A is an implementation of the alternative FNV-1a hash code of\nGlenn Fowler, Landon Curt Noll, and Phong Vo.\nIt differs from typical implementations in that it also encodes the\nsize of the structure in the hash code.\nThis code is relatively fast on short keys, and is small enough that it\nwill often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash table\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_fnv_1a_hash_64 use stdlib_hash_64bit , only : fnv_1a_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash array1 = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] hash = fnv_1a_hash ( array1 ) print * , hash end program example_fnv_1a_hash_64 new_pengy_hash_seed - returns a valid input seed for pengy_hash Status Experimental Description Calculates a 32-bit \"random\" integer that is believed to be a valid\nseed for pengy_hash and is also different from the input seed. Syntax call new_pengy_hash_seed ( seed ) Class Subroutine Argument seed : shall be a defined integer scalar variable of kind int32 .\nIt is an intent(inout) argument. On input seed should be defined,\nand on output it will be different from the input seed . Note Currently there are no known bad seeds for pengy_hash , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for pengy_hash . new_spooky_hash_seed - returns a valid input seed for spooky_hash Status Experimental Description Calculates a 32-bit two element vector of \"random\" integer values that\nis believed to be a valid seed for spooky_hash and is also different\nfrom the input seed. Syntax call new_spooky_hash_seed ( seed ) Class Subroutine Argument seed : shall be a defined two element integer vector variable of kind int32 . It is an intent(inout) argument. On input seed should be\ndefined, and on output it will be different from the input seed . Note Currently there are no known bad seeds for spooky_hash , but if any are\nidentified the procedure will be revised so that they cannot be\nreturned. This subroutine uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See the example for spooky_hash . odd_random_integer - returns odd integer Status Experimental Description Returns a random 64-bit integer distributed uniformly over the odd values. Syntax call odd_random_integer ( harvest ) Class Subroutine Argument harvest : Shall be an integer of kind int64 . It is an intent(out) argument. Note odd_random_integer is intended to generate seeds for universal_mult_hash . odd_random_integer uses Fortran's intrinsic random_number and the values returned can be changed by calling the\n intrinsic random_init . Example See universal_mult_hash . pengy_hash - maps a character string or integer vector to an integer Status Experimental Description Maps a character string or integer vector to a 64-bit integer whose\nvalue also depends on a scalar 32-bit integer, seed . Syntax code = pengy_hash ( key, seed ) Class Pure/elemental function Arguments key : shall be a scalar expression of type default character or a\nrank-1 integer vector expression of kind int8 , int16 , int32 , or int64 . It is an intent(in) argument. seed : shall be an integer expression of kind int64 . It is\nan intent(in) argument. Result The result is an integer of kind int64 . Note pengy_hash is an implementation of the 64-bit pengyhash of Alberto\nFajardo. The hash has acceptable performance on small keys, and good\nperformance on long keys. It passes all the SMHasher tests, and has\nno known bad seeds.\nIt is a pure function for integer arrays, and an elemental function for character strings. Example program example_pengy_hash use stdlib_hash_64bit , only : new_pengy_hash_seed , pengy_hash use iso_fortran_env , only : int32 , int64 implicit none integer , allocatable :: key (:) integer ( int64 ) :: hash integer ( int32 ) :: seed key = [ 0 , 1 , 2 , 3 ] seed = 0_int32 call new_pengy_hash_seed ( seed ) hash = pengy_hash ( key , seed ) print * , seed , hash end program example_pengy_hash spooky_hash - maps a character string or integer vector to an integer Status Experimental Description Maps a character string or integer vector to a 64-bit integer whose\nvalue also depends on a two element vector, seed . Syntax code = spooky_hash ( key, seed ) Class Function Arguments key : shall be a scalar of type default character expression or a\nrank-1 integer vector expression of kind int8 , int16 , int32 , or int64 . It is an intent(in) argument. seed : shall be a two element integer vector expression of kind int64 . It is an intent(in) argument. Result The result is a two element integer vector of kind int64 . Note spooky_hash is an implementation of the 64-bit version 2 of\nSpookyHash of Bob Jenkins. The code was designed for little-endian\ncompilers. The output is different on big-endian compilers, but still\nprobably as good quality. It is often used as a 64-bit hash using the\nfirst element of the returned value, but can be used as a 128 bit\nhash. This version of spooky_hash has good performance on small keys\nand excellent performance on long keys. It passes all the SMHasher tests\nand has no known bad seeds. Example program example_spooky_hash use stdlib_hash_64bit , only : new_spooky_hash_seed , & spooky_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: key (:) integer ( int64 ) :: hash ( 2 ), seed ( 2 ) key = [ 0 , 1 , 2 , 3 ] seed = [ 119_int64 , 2_int64 ** 41 - 1 ] call new_spooky_hash_seed ( seed ) hash = spooky_hash ( key , seed ) print * , seed , hash end program example_spooky_hash universal_mult_hash - maps an integer to a smaller number of bits Status Experimental Description Calculates an nbits hash code from a 64-bit integer. This is useful\nin mapping a hash value to a range 0 to 2**nbits-1 . Syntax code = universal_mult_hash ( key, seed, nbits ) Class Elemental function Arguments key : Shall be an integer of kind int64 . It is an intent(in) argument. seed : Shall be an integer of kind int64 . It is an intent(in) argument. It should be an odd value. nbits Shall be a default integer with 0 < nbits < 64 . It is an intent(in) argument. It must be an odd integer. Result The result is an integer of kind int64 with at most the lowest nbits nonzero. Note universal_mult_hash is an implementation of the Universal\nMultiplicative Hash of M. Dietzfelbinger, et al.\nIt multiplies the key by seed , and returns the nbits upper bits of the product as the lowest bits of the result. Example program example_universal_mult_hash_64 use stdlib_hash_64bit , only : odd_random_integer , & universal_mult_hash use iso_fortran_env , only : int64 implicit none integer , allocatable :: array1 (:) integer ( int64 ) :: hash , seed , source seed = 0 allocate ( array1 ( 0 : 2 ** 6 - 1 )) array1 = 0 call odd_random_integer ( seed ) source = 42_int64 hash = universal_mult_hash ( source , seed , 6 ) array1 ( hash ) = source print * , seed , hash , array1 end program example_universal_mult_hash_64 Test Codes The Fortran Standard Library provides two categories of test\ncodes. One category is tests of the relative performance of the\nvarious hash functions. The other is a comparison of the outputs of\nthe Fortran hash functions, with the outputs of the C and C++ hash\nprocedures that are the inspiration for the Fortran hash functions. In the test/hash_functions_perf subdirectory, the Fortran Standard\nLibrary provides two performance test codes for\nthe hash functions of stdlib_hash_32bit and stdlib_hash_64bit , test_32_bit_hash_performance and test_64_bit_hash_performance respectively. These are primarily set\nup to test runtime performance of the functions. They take a sample of 2**18 integers of kind int8 and break it up into vectors of size\n1, 2, 4, 8, 16, 64, 256, and 1024 elements, yielding 2**18 , 2**17 , 2**16 , 2**15 , 2**14 , 2**12 , 2**10 , and 2**8 vectors respectively. These are then processed by the hash functions\n4 times, and the time for processing is reported. Testing so far has\nbeen on a MacBook Pro with a 2.3 GHz Quad-Core Intel Core i5 and 8 GB\n2133 MHz LPDDR3 of RAM, using GNU Fortran (GCC) 11.1.0 to compile the\ncode. The results for test_32_bit_hash_performance is given by the\nfollowing table: Algorithm Key Size Bytes Key # Time (s) FNV-1 1 1048576 0.02949 FNV-1 2 524288 0.02361 FNV-1 4 262144 0.02016 FNV-1 8 131072 0.01806 FNV-1 16 65536 0.01867 FNV-1 64 16384 0.01717 FNV-1 256 4096 0.01759 FNV-1 1024 1024 0.01659 FNV-1a 1 1048576 0.02897 FNV-1a 2 524288 0.02472 FNV-1a 4 262144 0.02025 FNV-1a 8 131072 0.01901 FNV-1a 16 65536 0.01898 FNV-1a 64 16384 0.01784 FNV-1a 256 4096 0.01723 FNV-1a 1024 1024 0.01673 nmhash32 1 1048576 0.31092 nmhash32 2 524288 0.16230 nmhash32 4 262144 0.07815 nmhash32 8 131072 0.04176 nmhash32 16 65536 0.09261 nmhash32 64 16384 0.04587 nmhash32 256 4096 0.07238 nmhash32 1024 1024 0.07263 nmhash32x 1 1048576 0.04294 nmhash32x 2 524288 0.02937 nmhash32x 4 262144 0.01096 nmhash32x 8 131072 0.00911 nmhash32x 16 65536 0.01291 nmhash32x 64 16384 0.00859 nmhash32x 256 4096 0.07373 nmhash32x 1024 1024 0.07618 water 1 1048576 0.12560 water 2 524288 0.06302 water 4 262144 0.04020 water 8 131072 0.01999 water 16 65536 0.01459 water 64 16384 0.00923 water 256 4096 0.00816 water 1024 1024 0.00792 while for test_64_bit_hash_performance the results are: Algorithm Key Size Bytes Key # Time (s) FNV-1 1 1048576 0.02981 FNV-1 2 524288 0.02697 FNV-1 4 262144 0.02275 FNV-1 8 131072 0.02431 FNV-1 16 65536 0.02158 FNV-1 64 16384 0.02007 FNV-1 256 4096 0.01932 FNV-1 1024 1024 0.02089 FNV-1a 1 1048576 0.03226 FNV-1a 2 524288 0.03076 FNV-1a 4 262144 0.02359 FNV-1a 8 131072 0.02542 FNV-1a 16 65536 0.02364 FNV-1a 64 16384 0.02130 FNV-1a 256 4096 0.01962 FNV-1a 1024 1024 0.01966 Pengy 1 1048576 0.24294 Pengy 2 524288 0.12066 Pengy 4 262144 0.06205 Pengy 8 131072 0.03138 Pengy 16 65536 0.01608 Pengy 64 16384 0.00669 Pengy 256 4096 0.00387 Pengy 1024 1024 0.00295 Spooky 1 1048576 0.11920 Spooky 2 524288 0.07478 Spooky 4 262144 0.03185 Spooky 8 131072 0.01468 Spooky 16 65536 0.01503 Spooky 64 16384 0.00440 Spooky 256 4096 0.00290 Spooky 1024 1024 0.00177 As the tested function will typically reside in the instruction cache\nthese results do not include the costs of reloading the procedure if\nhashing is intermittent. If hashing is intermittent then that can more\nseverely impact the performance of nmhash32 , nmhash32x , water_hash , pengy_hash , and spooky_hash relative to fnv_1_hash and fnv_1a_hash . In the test/hash_functions subdirectory, the Fortran\nStandard Library contains codes to test the validity of\nthe Fortran codes against the original C and C++ codes. It consists of one\nexecutable test_hash_functions that\n1) generates a random sequence of 2048\nintegers of kind int8 , and stores that sequence in the binary file key_array.bin ;\n2) reads the values in key_array.bin , and, for each complicated C/C++-coded\nhash procedure, generates a corresponding binary file containing 2049 hash\nvalues generated from the values in key_array.bin ., and\n3) reads the binary files, and, for each complicated C/C++-coded hash procedure,\ncompares the contents of the binary file\nwith the results of calculating hash values using the corresponding\nFortran hash procedure on the same keys.","tags":"","loc":"page/specs/stdlib_hash_procedures.html"},{"title":"Hash maps – Fortran-lang/stdlib","text":"The stdlib_hashmap_wrappers , and stdlib_hashmaps modules The stdlib_hashmap_wrappers, and stdlib_hashmaps modules Overview of hash maps Licensing The hash map modules The stdlib_hashmap_wrappers module The stdlib_hashmap_wrappers's constant, int_hash The stdlib_hashmap_wrappers' module's derived types Table of stdlib_hashmap_wrappers procedures Specifications of the stdlib_hashmap_wrappers procedures copy_key - Returns a copy of the key Status Description Syntax Class Arguments Example copy_other - Returns a copy of the other data Status Description Syntax Class Arguments Example fibonacci_hash - maps an integer to a smaller number of bits Status Description fnv_1_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example fnv_1a_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example free_key - frees the memory associated with a key Status Description Syntax Class Argument Example free_other - frees the memory associated with other data Status Description Syntax Class Argument Example get - extracts the data from a derived type Status Description Syntax Class Argument Example hasher_fun- serves as a function prototype. Status Description Syntax Class Argument Result character Result value Note Example operator(==) - Compares two keys for equality Status Description Syntax Class Arguments Result character Result value Example seeded_nmhash32_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example seeded_nmhash32x_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example seeded_water_hasher- calculates a hash code from a key Status Description Syntax Class Argument Result character Result value Note Example set - places the data in a derived type Status Description Syntax Class Argument Note Example The stdlib_hashmaps module The stdlib_hashmaps module's public constants The stdlib_hashmaps module's derived types The hashmap_type abstract type The chaining_map_entry_type derived type The chaining_map_entry_ptr derived type The chaining_map_entry_pool derived type The chaining_hashmap_type derived type The open_map_entry_type derived type The open_map_entry_ptr derived type The open_hashmap_type derived type Table of stdlib_hashmap procedures Specifications of the stdlib_hashmaps procedures calls - Returns the number of calls on the hash map Status Description Syntax Class Argument Result character Result value Example entries - Returns the number of entries in the hash map Status Description Syntax Class Argument Result character Result value Example get_all_keys - Returns all the keys contained in a map Status Description Syntax Class Arguments Example get_other_data - Returns other data associated with the key Status Description Syntax Class Arguments Example init - initializes a hash map Status Description Syntax Class Arguments Example key_test - indicates whether key is present Status Description Syntax Class Arguments Example loading - Returns the ratio of entries to slots Status Description Syntax Class Argument Result character Result value Example map_entry - inserts an entry into the hash map Status Description Syntax Class Arguments Example map_probes - returns the number of hash map probes Status Description Syntax Class Argument Result character Result value Example num_slots - returns the number of hash map slots. Status Description Syntax Class Argument Result character Result value Example rehash - changes the hashing function Status Description Syntax Class Arguments Example remove - removes an entry from the hash map Status Description Syntax Class Arguments Example set_other_data - replaces the other data for an entry Status Description Syntax Class Arguments Example slots_bits - returns the number of bits used to address the hash map slots Status Description Syntax Class Argument Result character Result value Example total_depth - returns the total depth of the hash map entries Status Description Syntax Class Argument Result character Result value Example Overview of hash maps A hash map (hash table) is a data structure that maps keys to values . It uses a hash function to compute a hash code from the key that serves as an index into a linear array of slots (buckets) from\nwhich the desired value can be extracted.\nEach key ideally maps to a unique slot, but most hash functions are\nimperfect and can map multiple keys to the same slot resulting in\ncollisions. Hash maps differ in how they deal with such collisions.\nThis document discusses the hash maps in the Fortran Standard Library. Licensing The Fortran Standard Library is distributed under the MIT License.\nHowever components of the library should be evaluated as to whether\nthey are compatible with the MIT License.\nThe current hash maps were inspired by an implementation of David\nChase. While the code has been greatly modified from his\nimplementation, he has give permission for the unrestricted use of\nhis code. The hash map modules The Fortran Standard Library provides two modules for the\nimplementation of simple hash maps. These maps only accept hash\nfunctions with a single argument, the key, and yield a 32 bit\nhash code. The modules will need to be modified if it is desired to\nuse hash functions with a different API. The two modules are: stdlib_hashmap_wrappers , and stdlib_hashmaps corresponding to the\nfiles: stdlib_hashmap_wrappers.f90 , and stdlib_hashmaps.f90 The module stdlib_hashmap_wrappers provides types and procedures for\nuse by stdlib_hashmaps . It provides an\ninterface to the 32 bit hash functions of the Standard Library module, stdlib_hash_32bit , and provides wrappers to some of the\nhash functions so that they no longer need to be supplied seeds. It\nalso defines two data types used to store information in the hash\nmaps, the key_type and the other_type . The key_type is used to\ndefine keys that, in turn, are used to identify the data entered into\na hash map. The other_type is intended to contain the other data\nassociated with the key. The module stdlib_hashmaps defines the API for a parent datatype, hashmap_type and two extensions of that hash map type: chaining_hashmap_type and open_hashmap_type . The hashmap_type defines the Application Programmers\nInterface (API) for the procedures used by its two extensions. It\nexplicitly defines five non-overridable procedures. It also defines\nthe interfaces for eleven deferred procedures. It does not define the\nfinalization routines for the two extension types, or one routine\nprovided by the open_hashmap_type . The chaining_hashmap_type uses separate chaining with linked\nlists to deal with hash index collisions. In separate chaining the\ncolliding indices are handled by using linked lists with their roots\nat the hash index. The chaining_hashmap_type procedures are\nimplemented in the module stdlib_hashmap_chaining corresponding\nto the file, stdlib_hashmap_chaining.f90 . The open_hashmap_type uses linear open addressing to deal with hash index collisions. In\nlinear open addressing the colliding indices are\nhandled by searching from the initial hash index in increasing\nsteps of one (modulo the hash map size) for an open map slot.\nThe open_hashmap_type procedures are implemented in the submodule stdlib_hashmap_open corresponding to the file stdlib_hashmap_open.f90 . The maps use powers of two for their slot sizes, so that the function, fibonacci_hash , can \nbe used to map the hash codes to indices in the map. This is\nexpected to be more efficient than prime number mapping using a\nmodulo operation, and reduces the requirement that the hash\nfunction need to do a good job randomizing its lower order bits.\nThey do require a good randomizing hash method for good performance.\nBoth adjust the map size to reduce collisions, based on \nthe ratio of the number of hash map probes to the number of subroutine \ncalls.\nWile the maps make extensive use of pointers internally, a private\nfinalization subroutine avoids memory leaks.\nThe maps can take entry keys of type key_type , and other data of the\ntype other_type .\nThe maps allow the addition, removal, and lookup of entries, and the\ninclusion of data in addition to the entry key. The stdlib_hashmap_wrappers module The stdlib_hashmap_wrappers module provides data types to\nrepresent keys and associated data stored in a module, but is also, a\nwrapper for the stdlib_hash_32bit module. It allows\ndirect access to the stdlib_hash_32bit procedures: fibonacci_hash , fnv_1_hasher , fnv_1a_hasher ; and provides\nwrapper functions, seeded_nmhash32_hasher , seeded_nmhash32x_hasher , and seeded_water_hasher to the hash\nfunctions: nmhash32 , nmhash32x , and water_hash , respectively. It\ndefines an interface, hasher_fun , compatible with the hash functions\nthat take a non-scalar key . It defines one integer constant used\nas a kind value, int_hash . It also defines two types, key_type and other_type , and associated procedures, for storing and manipulating\nkeys and their associated data. The stdlib_hashmap_wrappers 's constant, int_hash The constant int_hash is used to define the integer kind value for\nthe returned hash codes and variables used to access them. It\ncurrently is imported from stdlib_hash_32bit where it has the\nvalue, int32 . The stdlib_hashmap_wrappers ' module's derived types The stdlib_hashmap_wrappers module defines two derived types: key_type , and other_type . The key_type is intended to be used\nfor the search keys of hash tables. The other_type is intended to\nstore additional data associated with a key. Both types are\nopaque. Their current representations are as follows type :: key_type private integer ( int8 ), allocatable :: value (:) end type key_type type :: other_type private class ( * ), allocatable :: value end type other_type The module also defines six procedures for those types: copy_key , copy_other , equal_keys , free_key , free_other , get , and set , and one operator, == ,\nfor use by the hash maps to manipulate or inquire of components of\nthose types. Table of stdlib_hashmap_wrappers procedures The stdlib_hashmap_wrappers module provides procedures in\nseveral categories: procedures to manipulate data of the key_type ;\nprocedures to manipulate data of the other_type , and 32 bit hash\nfunctions for keys. The procedures in each category are listed\nbelow. It also provides an operator to compare two key type values for\nequality. Procedures to manipulate key_type data: copy_key( key_in, key_out ) - Copies the contents of the key, key_in , to contents of the key, key_out . get( key, value ) - extracts the contents of key into value ,\n an int8 array, int32 array, or character string. free_key( key ) - frees the memory in key . set( key, value ) - sets the content of key to value . Supported key types are int8 array, int32 array, and character\n string. Procedures to manipulate other_type data: copy_other( other_in, other_out ) - Copies the contents of the\n other data, other_in , to the contents of the other data, other_out . get( other, value ) - extracts the contents of other into the class(*) variable value . set( other, value ) - sets the content of other to the class(*) variable value . free_other( other ) - frees the memory in other . Procedures to hash keys to 32 bit integers: fnv_1_hasher( key ) - hashes a key using the FNV-1 algorithm. fnv_1a_hasher( key ) - hashes a key using the FNV-1a algorithm. seeded_nmhash32_hasher( key ) - hashes a key using the nmhash32\n algorithm. seeded_nmhash32x_hasher( key ) - hashes a key using the nmhash32x\n algorithm. seeded_water_hasher( key ) - hashes a key using the waterhash\n algorithm. Operator to compare two key_type values for equality key1 == key2 - compares key1 with key2 for equality Specifications of the stdlib_hashmap_wrappers procedures copy_key - Returns a copy of the key Status Experimental Description Returns a copy of an input of type key_type . Syntax call copy_key ( old_key, new_key ) Class Subroutine. Arguments old_key : shall be a scalar expression of type key_type . It\nis an intent(in) argument. new_key : shall be a scalar variable of type key_type . It\nis an intent(out) argument. Example program example_copy_key use stdlib_hashmap_wrappers , only : & copy_key , operator ( == ), key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ) :: i , value ( 15 ) type ( key_type ) :: old_key , new_key value = [( i , i = 1 , 15 )] call set ( old_key , value ) call copy_key ( old_key , new_key ) print * , \"old_key == new_key = \" , old_key == new_key end program example_copy_key copy_other - Returns a copy of the other data Status Experimental Description Returns a copy of an input of type other_type . Syntax call copy_other ( other_in, other_out ) Class Subroutine. Arguments other_in : shall be a scalar expression of type other_type . It\nis an intent(in) argument. other_out : shall be a scalar variable of type other_type . It\nis an intent(out) argument. Example program example_copy_other use stdlib_hashmap_wrappers , only : & copy_other , other_type use iso_fortran_env , only : int8 implicit none type ( other_type ) :: other_in , other_out integer ( int8 ) :: i type dummy_type integer ( int8 ) :: value ( 15 ) end type type ( dummy_type ) :: dummy_val do i = 1 , 15 dummy_val % value ( i ) = i end do allocate ( other_in % value , source = dummy_val ) call copy_other ( other_in , other_out ) select type ( out => other_out % value ) type is ( dummy_type ) print * , \"other_in == other_out = \" , & all ( dummy_val % value == out % value ) end select end program example_copy_other fibonacci_hash - maps an integer to a smaller number of bits Status Experimental Description fibonacci_hash is just a re-export of the function of the same name\nimplemented in stdlib_hash_32bit .\nIt reduces the value of a 32 bit integer to a smaller number of bits. fnv_1_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = fnv_1_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the FNV-1 algorithm. Note fnv_1_hasher is an implementation of the original FNV-1 hash code of\nGlenn Fowler, Landon Curt Noll, and Phong Vo.\nThis code is relatively fast on short keys, and is small enough that\nit will often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash map\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate. Example program example_fnv_1_hasher use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = fnv_1_hasher ( key ) print * , hash end program example_fnv_1_hasher fnv_1a_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = fnv_1a_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the FNV-1a algorithm. Note fnv_1a_hasher is an implementation of the original FNV-1A hash code\nof Glenn Fowler, Landon Curt Noll, and Phong Vo.\nThis code is relatively fast on short keys, and is small enough that\nit will often be retained in the instruction cache if hashing is\nintermittent.\nAs a result it should give good performance for typical hash map\napplications.\nThis code does not pass any of the SMHasher tests, but the resulting\ndegradation in performance due to its larger number of collisions is\nexpected to be minor compared to its faster hashing rate. Example program example_fnv_1a_hasher use stdlib_hashmap_wrappers , only : & fnv_1a_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = fnv_1a_hasher ( key ) print * , hash end program example_fnv_1a_hasher free_key - frees the memory associated with a key Status Experimental Description Deallocates the memory associated with a variable of type key_type . Syntax call free_key ( key ) Class Subroutine. Argument key : shall be a scalar variable of type key_type . It\nis an intent(out) argument. Example program example_free_key use stdlib_hashmap_wrappers , only : & copy_key , free_key , key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ) :: i , value ( 15 ) type ( key_type ) :: old_key , new_key value = [( i , i = 1 , 15 )] call set ( old_key , value ) call copy_key ( old_key , new_key ) call free_key ( old_key ) end program example_free_key free_other - frees the memory associated with other data Status Experimental Description Deallocates the memory associated with a variable of type other_type . Syntax call free_other ( other ) Class Subroutine. Argument other : shall be a scalar variable of type other_type . It\nis an intent(out) argument. Example program example_free_other use stdlib_hashmap_wrappers , only : & copy_other , free_other , other_type use iso_fortran_env , only : int8 implicit none type dummy_type integer ( int8 ) :: value ( 15 ) end type dummy_type type ( dummy_type ) :: dummy_val type ( other_type ) :: other_in , other_out integer ( int8 ) :: i do i = 1 , 15 dummy_val % value ( i ) = i end do allocate ( other_in % value , source = dummy_val ) call copy_other ( other_in , other_out ) call free_other ( other_out ) end program example_free_other get - extracts the data from a derived type Status Experimental Description Extracts the data from a key_type or other_type and stores it\nin the variable value . Syntax call get ( key, value ) or call get ( other, value ) Class Subroutine. Argument key : shall be a scalar expression of type key_type . It\nis an intent(in) argument. other : shall be a scalar expression of type other_type . It\nis an intent(in) argument. value : if the the first argument is of key_type , value shall be\nan allocatable default character string variable, or \nan allocatable vector variable of type integer and kind int8 or int32 , otherwise the first argument is of other_type and value shall be an allocatable of class(*) . It is an intent(out) argument. Example program example_get use stdlib_hashmap_wrappers , only : & get , key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ), allocatable :: value (:), result (:) type ( key_type ) :: key integer ( int8 ) :: i allocate ( value ( 1 : 15 )) do i = 1 , 15 value ( i ) = i end do call set ( key , value ) call get ( key , result ) print * , 'RESULT == VALUE = ' , all ( value == result ) end program example_get hasher_fun - serves as a function prototype. Status Experimental Description Serves as a prototype for hashing functions with a single, key ,\nargument of type key_type returning an int32 hash value. Syntax type( hasher_fun ), pointer :: fun_pointer Class Pure function prototype Argument key : Shall be a rank one array expression of type integer(int8) .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code. Note hasher_fun is a prototype for defining dummy arguments and function\npointers intended for use as a hash function for the hash maps. Example program example_hasher_fun use stdlib_hashmap_wrappers , only : fnv_1a_hasher , hasher_fun , set , key_type use stdlib_kinds , only : int8 , int32 implicit none procedure ( hasher_fun ), pointer :: hasher_pointer integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key hasher_pointer => fnv_1a_hasher array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = hasher_pointer ( key ) print * , hash end program example_hasher_fun operator(==) - Compares two keys for equality Status Experimental Description Returns .true. if two keys are equal, and .false. otherwise. Syntax test = key1 == key2 Class Pure operator. Arguments key1 : shall be a scalar expression of type key_type . It \nis an intent(in) argument. key2 : shall be a scalar expression of type key_type . It \nis an intent(in) argument. Result character The result is a value of type default logical . Result value The result is .true. if the keys are equal, otherwise .falss. . Example program example_equal_keys use stdlib_hashmap_wrappers , only : & copy_key , operator ( == ), key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ) :: i , value ( 15 ) type ( key_type ) :: old_key , new_key do i = 1 , 15 value ( i ) = i end do call set ( old_key , value ) call copy_key ( old_key , new_key ) print * , \"old_key == new_key = \" , old_key == new_key end program example_equal_keys seeded_nmhash32_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = seeded_nmhash32_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the nmhash32 algorithm. Note seeded_nmhash32_hasher is a wrapper to the NMHASH32_HASH of the\nmodule stdlib_hash_32bit , which supplies a fixed seed\nto the wrapped function. NMHASH32 is an implementation of the nmhash32 hash code of James Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash map\napplications.\nThis code passes the SMHasher tests. Example program example_seeded_nmhash32_hasher use stdlib_hashmap_wrappers , only : & seeded_nmhash32_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = seeded_nmhash32_hasher ( key ) print * , hash end program example_seeded_nmhash32_hasher seeded_nmhash32x_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = seeded_nmhash32x_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the nmhash32x algorithm. Note seeded_nmhash32x_hasher is a wrapper to the nmhash32x_hash of the\nmodule stdlib_hash_32bit , which supplies a fixed seed\nto the wrapped function. nmhash32x is an implementation of the nmhash32x hash code of James Z. M. Gao.\nThis code has good, but not great, performance on long keys, poorer\nperformance on short keys.\nAs a result it should give fair performance for typical hash map\napplications.\nThis code passes the SMHasher tests. Example program example_seeded_nmhash32x_hasher use stdlib_kinds , only : int8 , int32 use stdlib_hashmap_wrappers , only : & seeded_nmhash32x_hasher , key_type , set implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = seeded_nmhash32x_hasher ( key ) print * , hash end program example_seeded_nmhash32x_hasher seeded_water_hasher - calculates a hash code from a key Status Experimental Description Calculates a 32 bit hash code from an input of type key_type . Syntax code = seeded_water_hasher ( key ) Class Pure function Argument key : Shall be a scalar expression of type key_type .\nIt is an intent(in) argument. Result character The result is a scalar integer of kind int32 . Result value The result is a hash code created using the waterhash algorithm. Note seeded_water_hasher is a wrapper to the water_hash of the\nmodule stdlib_hash_32bit , which supplies a fixed seed\nto the wrapped function. water_hash is an implementation of the waterhash hash code of Tommy Ettinger.\nThis code has excellent performance on long keys, and good performance\non short keys.\nAs a result it should give reasonable performance for typical hash\ntable applications.\nThis code passes the SMHasher tests. Example program example_seeded_water_hasher use stdlib_hashmap_wrappers , only : & seeded_water_hasher , key_type , set use iso_fortran_env , only : int8 , int32 implicit none integer ( int8 ), allocatable :: array1 (:) integer ( int32 ) :: hash type ( key_type ) :: key array1 = [ 5_int8 , 4_int8 , 3_int8 , 1_int8 , 10_int8 , 4_int8 ] call set ( key , array1 ) hash = seeded_water_hasher ( key ) print * , hash end program example_seeded_water_hasher set - places the data in a derived type Status Experimental Description Places the data from value in a key_type or an other_type . Syntax call set ( key, value ) or call set ( other, value ) Class Subroutine. Argument key : shall be a scalar variable of type key_type . It\nis an intent(out) argument. other : shall be a scalar variable of type other_type . It\nis an intent(out) argument. value : if the first argument is key , value shall be a default character string scalar expression, or a vector expression of type integer and kind int8 or int32 , while for a first argument of type other value shall be of type class(*) . It is an intent(in) argument. Note Values of types other than a scalar default character or and int8 or int32 vector can be used as the basis of a key by transferring the\nvalue to an int8 vector. Example program example_set use stdlib_hashmap_wrappers , only : & get , key_type , set use iso_fortran_env , only : int8 implicit none integer ( int8 ), allocatable :: value (:), result (:) type ( key_type ) :: key integer ( int8 ) :: i allocate ( value ( 1 : 15 )) do i = 1 , 15 value ( i ) = i end do call set ( key , value ) call get ( key , result ) print * , 'RESULT == VALUE = ' , all ( value == result ) end program example_set The stdlib_hashmaps module The stdlib_hashmaps module defines three public data types,\nassociated procedures and constants that implement two simple hash map\ntypes using separate chaining hashing and open addressing hashing. The\nderived type hashmap_type is the parent type to its two\nextensions: chaining_hashmap_type and open_hashmap_type .\nThe extension types provide \nprocedures to manipulate the structure of a hash map object: init , map_entry , rehash , remove , and set_other_data . They also provide procedures to inquire about\nentries in the hash map: get_other_data , and key_test . Finally they provide procedures to inquire about the\noverall structure and performance of the hash map object: calls , entries , get_other_data , loading , slots , and total_depth . The module also defines a number of public constants: probe_factor , load_factor , map_probe_factor , default_bits , max_bits , int_calls , int_depth , int_index , int_probes , success , alloc_fault , and array_size_error . Generic key interfaces for key_test , map_entry , get_other_data , remove , and set_other_data are povided so that the supported types\nof int8 arrays, int32 arrays and character scalars can be used in the\nkey field as well as the base key type. So for key_test , key_key_test specifies key type for the key field, int8_key_test is int8 for the key field and so on. Procedures other than key_key_test will call\nthe set function to generate a key type and pass to key_key_test . The stdlib_hashmaps module's public constants The module defines several categories of public constants. Some are\nused to parameterize the empirical slot expansion code. Others\nparameterize the slots table size. Some are used to define\ninteger kind values for different applications. Finally, some are used\nto report errors or success. The constants probe_factor , and map_probe_factor are used to\nparameterize the slot expansion code used to determine when in a\nin a procedure call the number \nof slots need to be increased to decrease the search path for an\nentry. The constant probe_factor is used to determine when\nthe ratio of the number of map probes to map calls is too large and \nthe slots need expansion. The constant map_probe_factor is used to\ndetermine when inserting a new entry the ratio of the number of map\nprobes to map calls is too large and the slots need expansion. The constants default_bits , and max_bits are used to parameterize the table's slots size. The default_bits constant defines the default initial number of slots\nwith a current value of 6 resulting in an initial 2**6 == 64 slots. This may optionally be overridden on hash map creation. The max_bits parameter sets the maximum table size as 2**max_bits with\na default value for max_bits of 30. The table will not work for a\nslots size greater than 2**30 . The constants int_calls , int_depth , int_index , and int_probes are used to define integer kind values for various contexts. The\nnumber of calls are reported and stored in entities of kind int_calls . Currently int_calls has the value of int64 . The\ntotal depth, the number of inquiries needed to access all elements\nof the table, is reported and stored in entities of kind int_depth . Currently int_depth has the value of int64 . The\nnumber of entries in the table, is reported and stored in entities of\nkind int_index . Currently int_index has the value of int32 .\nThe number of probes, hash map enquiries, are reported and stored in\nentities of kind int_probes . Currently int_probes has the value of int64 . The constant load_factor is only used by the open_hashmap_type . It\nspecifies the maximum fraction of the available slots that may be\nfilled before expansion occurs. The current load_factor = 0.5625 so\nthe current implementation of open_hashmap_type can only hold a\nlittle more than 2**29 entries. Finally the error codes success , alloc_fault , and array_size_error are used to report the error status of certain\nprocedure calls. The succes code indicates that no problems were\nfound. The alloc_fault code indicates that a memory allocation\nfailed. Finally the array_size_error indicates that on table\ncreation slots_bits is less than default_bits or\ngreater than max_bits . The stdlib_hashmaps module's derived types The stdlib_hashmaps module defines three public derived types and\nseven private types used in the implementation of the public\ntypes. The public types are the abstract hashmap_type and its\nextensions: chaining_hashmap_type and open_hashmap_type . The three\nprivate derived types, chaining_map_entry_type , chaining_map_entry_ptr , and chaining_map_entry_pool are used in\nthe implementation of the chaining_hashmap_type public type. The\nfour private derived types, open_map_entry_type , open_map_entry_list , open_map_entry_ptr , and open_map_entry_pool are used in the implementation of the open_hashmap_type public\ntype. Each of these types are described below. The hashmap_type abstract type The hashmap_type abstract type serves as the parent type for the two\ntypes chaining_hashmap_type and open_hashmap_type . It defines\nseven private components: call_count - the number of procedure calls on the map; nbits - the number of bits used to address the slots; num_entries - the number of entries in the map; num_free - the number of entries in the free list of removed \n entries; probe_count - the number of map probes since the last resizing or\n initialization; total_probes - the number of probes of the map up to the last\n resizing or initialization; and hasher - a pointer to the hash function used by the map. It also defines five non-overridable procedures: calls - returns the number of procedure calls on the map; entries - returns the number of entries in the map; map_probes - returns the number of map probes since\n initialization; num_slots - returns the number of slots in the map; and slots_bits - returns the number of bits used to address the slots; and ten deferred procedures: get_all_keys - gets all the keys contained in a map; get_other_data - gets the other map data associated with the key; init - initializes the hash map; key_test - returns a logical flag indicating whether the key is \n defined in the map. loading - returns the ratio of the number of entries to the number\n of slots; map_entry - inserts a key and its other associated data into the\n map; rehash - rehashes the map with the provided hash function; remove - removes the entry associated wit the key; set_other_data - replaces the other data associated with the key; total_depth - returns the number of probes needed to address all\n the entries in the map; The type's definition is below: type , abstract :: hashmap_type private integer ( int_calls ) :: call_count = 0 integer ( int_calls ) :: probe_count = 0 integer ( int_calls ) :: total_probes = 0 integer ( int_index ) :: num_entries = 0 integer ( int_index ) :: num_free = 0 integer ( int32 ) :: nbits = default_bits procedure ( hasher_fun ), pointer , nopass :: hasher => fnv_1_hasher contains procedure , non_overridable , pass ( map ) :: calls procedure , non_overridable , pass ( map ) :: entries procedure , non_overridable , pass ( map ) :: map_probes procedure , non_overridable , pass ( map ) :: num_slots procedure , non_overridable , pass ( map ) :: slots_bits procedure ( get_all_keys ), deferred , pass ( map ) :: get_all_keys procedure ( init_map ), deferred , pass ( map ) :: init procedure ( loading ), deferred , pass ( map ) :: loading procedure ( rehash_map ), deferred , pass ( map ) :: rehash procedure ( total_depth ), deferred , pass ( map ) :: total_depth !! Generic interfaces for key types. procedure ( key_key_test ), deferred , pass ( map ) :: key_key_test procedure , non_overridable , pass ( map ) :: int8_key_test procedure , non_overridable , pass ( map ) :: int32_key_test procedure , non_overridable , pass ( map ) :: char_key_test procedure ( key_map_entry ), deferred , pass ( map ) :: key_map_entry procedure , non_overridable , pass ( map ) :: int8_map_entry procedure , non_overridable , pass ( map ) :: int32_map_entry procedure , non_overridable , pass ( map ) :: char_map_entry procedure ( key_get_other_data ), deferred , pass ( map ) :: key_get_other_data procedure , non_overridable , pass ( map ) :: int8_get_other_data procedure , non_overridable , pass ( map ) :: int32_get_other_data procedure , non_overridable , pass ( map ) :: char_get_other_data procedure ( key_remove_entry ), deferred , pass ( map ) :: key_remove_entry procedure , non_overridable , pass ( map ) :: int8_remove_entry procedure , non_overridable , pass ( map ) :: int32_remove_entry procedure , non_overridable , pass ( map ) :: char_remove_entry procedure ( key_set_other_data ), deferred , pass ( map ) :: key_set_other_data procedure , non_overridable , pass ( map ) :: int8_set_other_data procedure , non_overridable , pass ( map ) :: int32_set_other_data procedure , non_overridable , pass ( map ) :: char_set_other_data generic , public :: key_test => key_key_test , int8_key_test , int32_key_test , char_key_test generic , public :: map_entry => key_map_entry , int8_map_entry , int32_map_entry , char_map_entry generic , public :: get_other_data => key_get_other_data , int8_get_other_data , int32_get_other_data , char_get_other_data generic , public :: remove => key_remove_entry , int8_remove_entry , int32_remove_entry , char_remove_entry generic , public :: set_other_data => key_set_other_data , int8_set_other_data , int32_set_other_data , char_set_other_data end type hashmap_type The chaining_map_entry_type derived type Entities of the type chaining_map_entry_type are used to define\na linked list structure that stores the\nkey, its other data, the hash of the key, and the resulting index into\nthe inverse table. The type's definition is below: type :: chaining_map_entry_type ! Chaining hash map entry type private integer ( int_hash ) :: hash_val ! Full hash value type ( key_type ) :: key ! The entry's key type ( other_type ) :: other ! Other entry data integer ( int_index ) :: index ! Index into inverse table type ( chaining_map_entry_type ), pointer :: & next => null () ! Next bucket end type chaining_map_entry_type Currently the int_hash and int_index have the value of int32 . The chaining_map_entry_ptr derived type The type chaining_map_entry_ptr is used to define the elements of\nthe hash map that are either empty or link to the linked lists\ncontaining the elements of the table. The type's definition is below: type chaining_map_entry_ptr ! Wrapper for a pointer to a chaining ! map entry type object type ( chaining_map_entry_type ), pointer :: target => null () end type chaining_map_entry_ptr The chaining_map_entry_pool derived type The type chaining_map_entry_pool is used to implement a pool of\nallocated chaining_map_entry_type elements to save on allocation\ncosts. The type's definition is below: type :: chaining_map_entry_pool ! Type implementing a pool of allocated ! `chaining_map_entry_type` objects private ! Index of next bucket integer ( int_index ) :: next = 0 type ( chaining_map_entry_type ), allocatable :: more_map_entries (:) type ( chaining_map_entry_pool ), pointer :: lastpool => null () end type chaining_map_entry_pool The chaining_hashmap_type derived type The chaining_hashmap_type derived type extends the hashmap_type to\nimplements a separate chaining hash map. In addition to the components\nof the hashmap_type it provides the four components: cache - a pool of chaining_map_entry_pool objects used to reduce\nallocation costs; free_list - a free list of map entries; inverse - an array of chaining_map_entry_ptr bucket lists\n(inverses) storing entries at fixed locations once\nentered; and slots - an array of bucket lists serving as the hash map. It also implements all of the deferred procedures of the hashmap_type and a finalizer for its maps. The type's definition is\nas follows: type , extends ( hashmap_type ) :: chaining_hashmap_type private type ( chaining_map_entry_pool ), pointer :: cache => null () type ( chaining_map_entry_type ), pointer :: free_list => null () type ( chaining_map_entry_ptr ), allocatable :: inverse (:) type ( chaining_map_entry_ptr ), allocatable :: slots (:) contains procedure :: get_all_keys => get_all_chaining_keys procedure :: key_get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: loading => chaining_loading procedure :: key_map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map procedure :: key_remove_entry => remove_chaining_entry procedure :: key_set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth procedure :: key_key_test => chaining_key_test final :: free_chaining_map end type chaining_hashmap_type The open_map_entry_type derived type Entities of the type open_map_entry_type are used to define\na linked list structure that stores the\nkey, its other data, the hash of the key, and the resulting index into\nthe inverse table. The type's definition is below: type :: open_map_entry_type ! Open hash map entry type private integer ( int_hash ) :: hash_val ! Full hash value type ( key_type ) :: key ! The entry's key type ( other_type ) :: other ! Other entry data integer ( int_index ) :: index ! Index into inverse table end type open_map_entry_type Currently int_hash and int_index have the value of int32 . The open_map_entry_ptr derived type The type open_map_entry_ptr is used to define the elements of\nthe hash map that are either empty or link to the linked lists\ncontaining the elements of the table. The type's definition is below: type open_map_entry_ptr ! Wrapper for a pointer to a open ! map entry type object type ( open_map_entry_type ), pointer :: target => null () end type open_map_entry_ptr The open_hashmap_type derived type The open_hashmap_type derived type extends the hashmap_type to\nimplement an open addressing hash map. In addition to the components\nof the hashmap_type it provides the four components: cache - a pool of open_map_entry_pool objects used to reduce\nallocation costs; free_list - a free list of map entries; index_mask - an and mask used in linear addressing; inverse - an array of open_map_entry_ptr bucket lists\n(inverses) storing entries at fixed locations once\nentered; and slots - an array of bucket lists serving as the hash map. It also implements all of the deferred procedures of the hashmap_type and a finalizer for its maps. The type's definition is\nas follows: type , extends ( hashmap_type ) :: open_hashmap_type private integer ( int_index ) :: index_mask = 2_int_index ** default_bits - 1 type ( open_map_entry_pool ), pointer :: cache => null () type ( open_map_entry_list ), pointer :: free_list => null () type ( open_map_entry_ptr ), allocatable :: inverse (:) integer ( int_index ), allocatable :: slots (:) contains procedure :: get_all_keys => get_all_open_keys procedure :: key_get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: loading => open_loading procedure :: key_map_entry => map_open_entry procedure :: rehash => rehash_open_map procedure :: key_remove_entry => remove_open_entry procedure :: key_set_other_data => set_other_open_data procedure :: total_depth => total_open_depth procedure :: key_key_test => open_key_test final :: free_open_map end type open_hashmap_type Table of stdlib_hashmap procedures The stdlib_hashmap module provides procedures in\nseveral categories: a procedure to initialize the map; a procedure to\nmodify the structure of a map; procedures to modify the content of a\nmap; procedures to report on the content of a map; and procedures\nto report on the structure of the map. The procedures in each category\nare listed below. Procedure to initialize a chaining hash map: map % init( hasher[, slots_bits, status] ) - Routine\n to initialize a chaining hash map. Procedure to modify the structure of a map: map % rehash( hasher ) - Routine to change the hash function\n for a map. Procedures to modify the content of a map: map % map_entry( key, other, conflict ) - Inserts an entry into the\n hash map. map % remove( key, existed ) - Remove the entry, if any,\n associated with the key . map % set_other_data( key, other, exists ) - Change the other data\n associated with the entry. Procedures to report the content of a map: map % get_all_keys( all_keys ) - Returns all the keys\n contained in the map; map % get_other_data( key, other, exists ) - Returns the other data\n associated with the key ; map % key_test( key, present) - Returns a flag indicating whether\n the key is present in the map. Procedures to report on the structure of the map: map % calls() - the number of subroutine calls on the hash map. map % entries() - the number of entries in a hash map. map % loading() - the number of entries relative to the number of\n slots in a hash map. map % map_probes() - the total number of table probes on a hash\n map. map % slots() - Returns the number of allocated slots in a hash\n map. map % total_depth() - Returns the total number of one's based\noffsets of slot entries from their slot index Specifications of the stdlib_hashmaps procedures calls - Returns the number of calls on the hash map Status Experimental Description Returns the number of procedure calls on a hash map. Syntax value = map % calls () Class Pure function Argument map (pass) - shall be an expression of class hashmap_type .\nIt is an intent(in) argument. Result character The result will be an integer of kind int_calls . Result value The result will be the number of procedure calls on the hash map. Example program example_calls use stdlib_hashmaps , only : chaining_hashmap_type , int_calls use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer ( int_calls ) :: initial_calls call map % init ( fnv_1_hasher ) initial_calls = map % calls () print * , \"INITIAL_CALLS = \" , initial_calls end program example_calls entries - Returns the number of entries in the hash map Status Experimental Description Returns the number of entries in a hash map. Syntax value = map % entries () Class Pure function Argument map (pass) - shall be an expression of class hashmap_type .\nIt is an intent(in) argument. Result character The result will be an integer of kind int_index . Result value The result will be the number of entries in the hash map. Example program example_entries use stdlib_hashmaps , only : open_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( open_hashmap_type ) :: map integer ( int_index ) :: initial_entries call map % init ( fnv_1_hasher ) initial_entries = map % entries () print * , \"INITIAL_ENTRIES = \" , initial_entries end program example_entries get_all_keys - Returns all the keys contained in a map Status Experimental Description Returns all the keys contained in a map. Syntax call map % get_all_keys ( all_keys ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It is an intent(in) argument. It will be \n the hash map used to store and access the other data. all_keys : shall be a rank-1 allocatable array of type key_type . \n It is an intent(out) argument. Example program example_hashmaps_get_all_keys use stdlib_kinds , only : int32 use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , get , & key_type , other_type , set implicit none type ( chaining_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other type ( key_type ), allocatable :: keys (:) integer ( int32 ) :: i character (:), allocatable :: str call map % init ( fnv_1_hasher ) ! adding key-value pairs to the map call set ( key , \"initial key\" ) call set ( other , \"value 1\" ) call map % map_entry ( key , other ) call set ( key , \"second key\" ) call set ( other , \"value 2\" ) call map % map_entry ( key , other ) call set ( key , \"last key\" ) call set ( other , \"value 3\" ) call map % map_entry ( key , other ) ! getting all the keys in the map call map % get_all_keys ( keys ) print '(\"Number of keys in the hashmap = \", I0)' , size ( keys ) !Number of keys in the hashmap = 3 do i = 1 , size ( keys ) call get ( keys ( i ), str ) print '(\"Value of key \", I0, \" = \", A)' , i , str end do !Value of key 1 = initial key !Value of key 2 = second key !Value of key 3 = last key end program example_hashmaps_get_all_keys get_other_data - Returns other data associated with the key Status Experimental Description Returns the other data associated with the key , Syntax value = map % get_other_data ( key, other [, exists] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It is an intent(inout) argument. It will be \n the hash map used to store and access the other data. key : shall be a of type key_type scalar, character scalar, int8 array\nor int32 array. It is an intent(in) argument. other : shall be a variable of type other_data .\n It is an intent(out) argument. It is the other data associated\n with the key . exists (optional): shall be a variable of type logical. It is an intent(out) argument. If .true. an entry with the given key exists in the map and other is defined. If .false. other is\nundefined. Example The following is an example of the retrieval of other data\n associated with a key : program example_get_other_data use stdlib_kinds , only : int8 , int64 use stdlib_hashmaps , only : chaining_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , other_type , set , get implicit none logical :: conflict type ( key_type ) :: key type ( other_type ) :: other type ( chaining_hashmap_type ) :: map type dummy_type integer :: value ( 4 ) end type dummy_type type ( dummy_type ) :: dummy class ( * ), allocatable :: data integer ( int8 ), allocatable :: key_array (:) integer :: int_scalar ! Initialize hashmap call map % init ( fnv_1_hasher ) ! Hashmap functions are setup to store scalar value types (other). Use a dervied ! type wrapper to store arrays. dummy % value = [ 4 , 3 , 2 , 1 ] call set ( other , dummy ) ! Explicitly set key type using set function call set ( key , [ 0 , 1 ]) call map % map_entry ( key , other , conflict ) if (. not . conflict ) then call map % get_other_data ( key , other ) else error stop 'Key is already present in the map.' end if call get ( other , data ) select type ( data ) type is ( dummy_type ) print * , 'Other data % value = ' , data % value class default print * , 'Invalid data type in other' end select ! Also can use map_entry and get_other_data generic key interfaces. ! This is an exmple with integer arrays. call map % map_entry ( [ 2 , 3 ], other , conflict ) if (. not . conflict ) then call map % get_other_data ( [ 2 , 3 ], other ) else error stop 'Key is already present in the map.' end if call get ( other , data ) select type ( data ) type is ( dummy_type ) print * , 'Other data % value = ' , data % value class default print * , 'Invalid data type in other' end select ! Integer scalars need to be passed as an array. int_scalar = 2 call map % map_entry ( [ int_scalar ], other , conflict ) if (. not . conflict ) then call map % get_other_data ( [ int_scalar ], other ) else error stop 'Key is already present in the map.' end if call get ( other , data ) select type ( data ) type is ( dummy_type ) print * , 'Other data % value = ' , data % value class default print * , 'Invalid data type in other' end select ! Example using character type key interface call map % map_entry ( 'key_string' , other , conflict ) if (. not . conflict ) then call map % get_other_data ( 'key_string' , other ) else error stop 'Key is already present in the map.' end if call get ( other , data ) select type ( data ) type is ( dummy_type ) print * , 'Other data % value = ' , data % value class default print * , 'Invalid data type in other' end select ! Transfer to int8 arrays to generate key for unsupported types. key_array = transfer ( [ 0_int64 , 1_int64 ], [ 0_int8 ] ) call map % map_entry ( key_array , other , conflict ) if (. not . conflict ) then call map % get_other_data ( key_array , other ) else error stop 'Key is already present in the map.' end if call get ( other , data ) select type ( data ) type is ( dummy_type ) print * , 'Other data % value = ' , data % value class default print * , 'Invalid data type in other' end select end program example_get_other_data init - initializes a hash map Status Experimental Description Initializes a hashmap_type object. Syntax call map % init ( hasher [, slots_bits, status ] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It is an intent(out) argument. It will \n be a hash map used to store and access the entries. hasher : shall be a procedure with interface hash_fun .\n It is an intent(in) argument. It is the procedure to be used to\n generate the hashes for the table from the keys of the entries. slots_bits (optional): shall be a scalar default integer \n expression. It is an intent(in) argument. The initial number of\n slots in the table will be 2**slots_bits . slots_bits shall be a positive default integer less than max_bits , otherwise processing stops with an informative\n error code. If slots_bits is absent then the effective value for slots_bits is default_bits . status (optional): shall be a scalar integer variable of kind int32 . It is an intent(out) argument. On return if present it\nshall have an error code value. If map was successfully initialized then status has the value success . If allocation of memory for the map arrays fails then status has the value alloc_fault . If slot_bits < 6 or slots_bits > max_bits then status has the value of array_size_error . If status is absent, but status would have a value other than success , then processing stops with an informative stop code. Example program example_init use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map call map % init ( fnv_1_hasher , slots_bits = 10 ) end program example_init key_test - indicates whether key is present Status Experimental Description Returns a logical flag indicating whether key is present for an\nentry in the map. Syntax call map % key_test ( key, present ) Class Subroutine. Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . \nIt is an intent(inout) argument. It is the hash map whose entries\nare examined. key : shall be a of type key_type scalar, character scalar, int8 array\nor int32 array. It is an intent(in) argument. It is a key whose \npresence in the map is being examined. present (optional): shall be a scalar variable of type default logical . It is an intent(out) argument. It is a logical flag where .true. indicates that an entry with that key is present in the map and .false. indicates that no such entry is present. Example program example_key_test use stdlib_kinds , only : int8 use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , set implicit none type ( chaining_hashmap_type ) :: map type ( key_type ) :: key logical :: present call map % init ( fnv_1_hasher ) call set ( key , [ 0_int8 , 1_int8 ]) call map % key_test ( key , present ) print * , \"Initial key of 10 present for empty map = \" , present end program example_key_test loading - Returns the ratio of entries to slots Status Experimental Description Returns the ratio of the number of entries relative to the number of\nslots in the hash map. Syntax value = map % loading ( ) Class Pure function Argument map (pass) - shall be an expression of class chaining_hashmap_type or open_hashmap_type . It is an intent(in) argument. Result character The result will be a default real. Result value The result will be the ratio of the number of entries relative to the\nnumber of slots in the hash map. Example program example_loading use stdlib_hashmaps , only : open_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( open_hashmap_type ) :: map real :: ratio call map % init ( fnv_1_hasher ) ratio = map % loading () print * , \"Initial loading = \" , ratio end program example_loading map_entry - inserts an entry into the hash map Status Experimental Description Inserts an entry into the hash map if it is not already present. Syntax call map % map_entry ( key[, other, conflict ] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It\nis an intent(inout) argument. It is the hash map to receive the\nentry. key : shall be a of type key_type scalar, character scalar, int8 array\nor int32 array. It is an intent(in) argument. It is the key for the entry\nto be placed in the table. other (optional): shall be a scalar expression of type other_type .\n It is an intent(in) argument. If present it is the other data to be\n associated with the key . conflict (optional): shall be a scalar variable of type logical . It is an intent(out) argument. If present, a .true. value indicates that an entry with the value of key already exists\nand the entry was not entered into the map, a .false. value indicates\nthat key was not present in the map and the entry was added to the\nmap. If key is already present in map then the presence of other is ignored. Example program example_map_entry use , intrinsic :: iso_fortran_env , only : int8 , int64 use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , key_type , other_type , set implicit none type ( chaining_hashmap_type ) :: map type ( key_type ) :: key logical :: conflict type ( other_type ) :: other integer :: int_scalar ! Initialize hashmap with 2^10 slots. ! Hashmap will dynamically increase size if needed. call map % init ( fnv_1_hasher , slots_bits = 10 ) ! Initialize other type with data to store. call set ( other , 4 ) ! Explicitly set key using set function call set ( key , [ 1 , 2 , 3 ]) call map % map_entry ( key , other , conflict ) print * , 'CONFLICT = ' , conflict ! Using map_entry int32 array interface call map % map_entry ( [ 4 , 5 , 6 ], other , conflict ) print * , 'CONFLICT = ' , conflict ! Integer scalars need to be passed as an array. int_scalar = 1 call map % map_entry ( [ int_scalar ], other , conflict ) print * , 'CONFLICT = ' , conflict ! Using map_entry character interface call map % map_entry ( 'key_string' , other , conflict ) print * , 'CONFLICT = ' , conflict ! Transfer unsupported key types to int8 arrays. call map % map_entry ( transfer ( [ 1_int64 , 2_int64 , 3_int64 ], [ 0_int8 ] ), other , conflict ) print * , 'CONFLICT = ' , conflict ! Keys can be mapped alone without a corresponding value (other). call map % map_entry ( [ 7 , 8 , 9 ], conflict = conflict ) print * , 'CONFLICT = ' , conflict end program example_map_entry map_probes - returns the number of hash map probes Status Experimental Description Returns the total number of table probes on the hash map. Syntax result = map % map_probes ( ) Class Pure function Argument map (pass): shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the hash map of interest. Result character The result is a scalar integer of kind int_probes . Result value The result is the number of probes of map since initialization or\nrehashing. Example program example_probes use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer :: nprobes call map % init ( fnv_1_hasher ) nprobes = map % map_probes () print * , \"Initial probes = \" , nprobes end program example_probes num_slots - returns the number of hash map slots. Status Experimental Description Returns the total number of slots on a hash map Syntax result = map % num_slots ( ) Class Pure function Argument map : shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the\nhash map of interest. Result character The result is a scalar integer of kind int_index . Result value The result is the number of slots in map . Example program example_num_slots use stdlib_hashmaps , only : chaining_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer ( int_index ) :: initial_slots call map % init ( fnv_1_hasher ) initial_slots = map % num_slots () print * , \"Initial slots = \" , initial_slots end program example_num_slots rehash - changes the hashing function Status Experimental Description Changes the hashing function for the map entries to that of hasher . Syntax call map % rehash ( hasher ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type .\nIt is an intent(inout) argument. It is the hash map whose hashing \nmethod is to be changed. hasher : shall be a function of interface hasher_fun .\nIt is the hash method to be used by map . Example program example_rehash use stdlib_kinds , only : int8 use stdlib_hashmaps , only : open_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , fnv_1a_hasher , & key_type , other_type , set implicit none type ( open_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other class ( * ), allocatable :: dummy allocate ( dummy , source = 'a dummy value' ) call map % init ( fnv_1_hasher , slots_bits = 10 ) call set ( key , [ 5_int8 , 7_int8 , 4_int8 , 13_int8 ]) call set ( other , dummy ) call map % map_entry ( key , other ) call map % rehash ( fnv_1a_hasher ) end program example_rehash remove - removes an entry from the hash map Status Experimental Description Removes an entry from the hash map, map . Syntax call map % remove ( key[, existed ]) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . \nIt is an intent(inout) argument. It is the hash map with the element \nto be removed. key : shall be a of type key_type scalar, character scalar, int8 array\nor int32 array. It is an intent(in) argument. It is the key identifying \nthe entry to be removed. existed (optional): shall be a scalar variable of type default\nlogical. It is an intent(out) argument. If present with the value .true. the entry existed in the map before removal, if .false. the\nentry was not present to be removed and the map is unchanged. If\nabsent, the procedure returns with no entry with the given key. Example program example_remove use stdlib_kinds , only : int8 , int64 use stdlib_hashmaps , only : open_hashmap_type , int_index use stdlib_hashmap_wrappers , only : fnv_1_hasher , & fnv_1a_hasher , key_type , other_type , set implicit none type ( open_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other logical :: existed integer :: int_scalar ! Initialize hashmap with 2^10 slots. ! Hashmap will dynamically increase size if needed. call map % init ( fnv_1_hasher , slots_bits = 10 ) ! Initialize other type with data to store. call set ( other , 4.0 ) ! Explicitly set key type using set function call set ( key , [ 1 , 2 , 3 ]) call map % map_entry ( key , other ) call map % remove ( key , existed ) print * , \"Removed key existed = \" , existed ! Using map_entry and remove int32 generic interface. call map % map_entry ([ 1 , 2 , 3 ], other ) call map % remove ([ 1 , 2 , 3 ], existed ) print * , \"Removed key existed = \" , existed ! Integer scalars need to be passed as an array. int_scalar = 1 call map % map_entry ( [ int_scalar ], other ) call map % remove ( [ int_scalar ], existed ) print * , \"Removed key existed = \" , existed ! Using map_entry and remove character generic interface. call map % map_entry ( 'key_string' , other ) call map % remove ( 'key_string' , existed ) print * , \"Removed key existed = \" , existed ! Use transfer to int8 arrays for unsupported key types. call map % map_entry ( transfer ( [ 1_int64 , 2_int64 ], [ 0_int8 ] ), other ) call map % remove ( transfer ( [ 1_int64 , 2_int64 ], [ 0_int8 ] ), existed ) print * , \"Removed key existed = \" , existed end program example_remove set_other_data - replaces the other data for an entry Status Experimental Description Replaces the other data in the map for the entry with the key value, key . Syntax call map % set_other_data ( key, other[, exists] ) Class Subroutine Arguments map (pass): shall be a scalar variable of class chaining_hashmap_type or open_hashmap_type . It\nis an intent(inout) argument. It will be a hash map used to store\nand access the entry's data. key : shall be a of type key_type scalar, character scalar, int8 array\nor int32 array. It is an intent(in) argument. It is the key to the \nentry whose other data is to be replaced. other : shall be a scalar expression of type other_type .\nIt is an intent(in) argument. It is the data to be stored as\nthe other data for the entry with the key value, key . exists (optional): shall be a scalar variable of type default\nlogical. It is an intent(out) argument. If present with the value .true. an entry with that key existed in the map and its other data was replaced, otherwise if exists is .false. the entry did\nnot exist and nothing was done. Example program example_set_other_data use stdlib_kinds , only : int8 use stdlib_hashmaps , only : open_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher , & fnv_1a_hasher , key_type , other_type , set implicit none logical :: exists type ( open_hashmap_type ) :: map type ( key_type ) :: key type ( other_type ) :: other ! Initialize hashmap with 2^10 slots. ! Hashmap will dynamically increase size if needed. call map % init ( fnv_1_hasher , slots_bits = 10 ) call set ( key , [ 5 , 7 , 4 , 13 ]) call set ( other , 'A value' ) call map % map_entry ( key , other ) call set ( other , 'Another value' ) call map % set_other_data ( key , other , exists ) print * , 'The entry to have its other data replaced exists = ' , exists end program example_set_other_data slots_bits - returns the number of bits used to address the hash map slots Status Experimental Description Returns the total number of bits used to address the hash map slots. Syntax result = map % slots_bits ( ) Class Pure function Argument map (pass): shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the\nhash map of interest. Result character The result is a scalar integer of kind int_index . Result value The result is the number of bits used in addressing the slots in map . Example program example_slots_bits use stdlib_hashmaps , only : chaining_hashmap_type use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer :: bits call map % init ( fnv_1_hasher ) bits = map % slots_bits () print * , \"Initial slot bits = \" , bits end program example_slots_bits total_depth - returns the total depth of the hash map entries Status Experimental Description Returns the total number of one's based offsets of slot entries from\ntheir slot index for a hash map Syntax result = map % total_depth ( ) Class Pure function Argument map (pass): shall be a scalar expression of class hashmap_type . It is an intent(in) argument. It is the\nhash map of interest. Result character The result is a scalar integer of kind int_depth . Result value The result is the total number of one's based offsets of slot entries\nfrom their slot index the map. Example program example_total_depth use stdlib_hashmaps , only : chaining_hashmap_type , int_depth use stdlib_hashmap_wrappers , only : fnv_1_hasher implicit none type ( chaining_hashmap_type ) :: map integer ( int_depth ) :: initial_depth call map % init ( fnv_1_hasher ) initial_depth = map % total_depth () print * , \"Initial total depth = \" , initial_depth end program example_total_depth","tags":"","loc":"page/specs/stdlib_hashmaps.html"},{"title":"io – Fortran-lang/stdlib","text":"IO IO loadtxt - load a 2D array from a text file Status Description Syntax Arguments Return value Example open - open a file Status Description Syntax Arguments Return value Example savetxt - save a 2D array into a text file Status Description Syntax Arguments Output Example load_npy Status Description Syntax Arguments Return value Example save_npy Status Description Syntax Arguments Output Example getline Status Description Syntax Arguments Example Formatting constants Status Description Example loadtxt - load a 2D array from a text file Status Experimental Description Loads a rank-2 array from a text file. Syntax call loadtxt (filename, array [, skiprows] [, max_rows] [, fmt]) Arguments filename : Shall be a character expression containing the file name from which to load the rank-2 array . array : Shall be an allocatable rank-2 array of type real , complex or integer . skiprows (optional): Skip the first skiprows lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0. max_rows (optional): Read max_rows lines of content after skiprows lines. A negative value results in reading all lines. A value of zero results in no lines to be read. The default value is -1. fmt (optional): Fortran format specifier for the text read. Defaults to the write format for the data type. Setting fmt='*' will specify list directed read. Return value Returns an allocated rank-2 array with the content of filename . Example program example_loadtxt use stdlib_io , only : loadtxt implicit none real , allocatable :: x (:, :) call loadtxt ( 'example.dat' , x ) ! Can also use list directed format if the default read fails. call loadtxt ( 'example.dat' , x , fmt = '*' ) end program example_loadtxt open - open a file Status Experimental Description Returns the unit number of a file opened to read, to write, or to read and write. The file might be a text file or a binary file. All files are opened using a streamed access. Syntax u = open (filename [, mode] [, iostat]) Arguments filename : Shall be a character expression containing the name of the file to open. mode (optional): Shall be a character expression containing characters describing the way in which the file will be used. The available modes are: Character Meaning 'r' open for reading (default) 'w' open for writing, truncating the file first 'x' open for exclusive creation, failing if the file already exists 'a' open for writing, appending to the end of the file if it exists '+' open for updating (reading and writing) 'b' binary mode 't' text mode (default) The default mode is 'rt' (i.e. open for reading a text file). The mode may include one of the four different methods for opening a file (i.e., 'r' , 'w' , 'x' , and 'a' ). These four methods can be associated with the character '+' to open the file for updating. In addition, it can be specified if the file should be handled as a binary file ( 'b' ) or a text file ( 't' ). iostat (optional): Shall be a scalar of type integer that receives the error status of open , if provided. If no error exists, iostat is zero. u : Shall be a scalar of type integer that specifies the unit number associated with the file filename . Return value The result is a scalar of type integer . Example program example_open use stdlib_io , only : open implicit none integer :: u u = open ( 'example.dat' , 'wt' ) write ( u , '(a)' ) 'This is an example for open' close ( u ) end program example_open savetxt - save a 2D array into a text file Status Experimental Description Saves a rank-2 array into a text file. Syntax call savetxt (filename, array) Arguments filename : Shall be a character expression containing the name of the file that will contain the 2D array . array : Shall be a rank-2 array of type real , complex or integer . Output Provides a text file called filename that contains the rank-2 array . Example program example_savetxt use stdlib_io , only : savetxt implicit none real :: x ( 3 , 2 ) = 1 call savetxt ( 'example.dat' , x ) end program example_savetxt load_npy Status Experimental Description Loads an array from a npy formatted binary file. Syntax call load_npy (filename, array[, iostat][, iomsg]) Arguments filename : Shall be a character expression containing the file name from which to load the array .\n This argument is intent(in) . array : Shall be an allocatable array of any rank of type real , complex or integer .\n This argument is intent(out) . iostat : Default integer, contains status of loading to file, zero in case of success.\n It is an optional argument, in case not present the program will halt for non-zero status.\n This argument is intent(out) . iomsg : Deferred length character value, contains error message in case iostat is non-zero.\n It is an optional argument, error message will be dropped if not present.\n This argument is intent(out) . Return value Returns an allocated array with the content of filename in case of success. Example program example_loadnpy use stdlib_io_npy , only : load_npy implicit none real , allocatable :: x (:, :) call load_npy ( 'example.npy' , x ) end program example_loadnpy save_npy Status Experimental Description Saves an array into a npy formatted binary file. Syntax call save_npy (filename, array[, iostat][, iomsg]) Arguments filename : Shall be a character expression containing the name of the file that will contain the array .\n This argument is intent(in) . array : Shall be an array of any rank of type real , complex or integer .\n This argument is intent(in) . iostat : Default integer, contains status of saving to file, zero in case of success.\n It is an optional argument, in case not present the program will halt for non-zero status.\n This argument is intent(out) . iomsg : Deferred length character value, contains error message in case iostat is non-zero.\n It is an optional argument, error message will be dropped if not present.\n This argument is intent(out) . Output Provides a npy file called filename that contains the rank-2 array . Example program example_savenpy use stdlib_io_npy , only : save_npy implicit none real :: x ( 3 , 2 ) = 1 call save_npy ( 'example.npy' , x ) end program example_savenpy getline Status Experimental Description Read a whole line from a formatted unit into a string variable Syntax call getline (unit, line[, iostat][, iomsg]) call getline (line[, iostat][, iomsg]) Arguments unit : Formatted input unit.\n This argument is intent(in) .\n If unit is not specified standard input is used. line : Deferred length character or string_type variable.\n This argument is intent(out) . iostat : Default integer, contains status of reading from unit, zero in case of success.\n It is an optional argument, in case not present the program will halt for non-zero status.\n This argument is intent(out) . iomsg : Deferred length character value, contains error message in case iostat is non-zero.\n It is an optional argument, error message will be dropped if not present.\n This argument is intent(out) . Example program example_getline use , intrinsic :: iso_fortran_env , only : input_unit , output_unit use stdlib_io , only : getline implicit none character ( len = :), allocatable :: line integer :: stat call getline ( input_unit , line , stat ) do while ( stat == 0 ) write ( output_unit , '(a)' ) line call getline ( input_unit , line , stat ) end do end program example_getline Formatting constants Status Experimental Description Formatting constants for printing out integer, floating point, and complex numbers at their full precision.\nProvides formats for all kinds as defined in the stdlib_kinds module. Example program example_fmt_constants use stdlib_kinds , only : int32 , int64 , sp , dp use stdlib_io , only : FMT_INT , FMT_REAL_SP , FMT_REAL_DP , FMT_COMPLEX_SP , FMT_COMPLEX_DP implicit none integer ( kind = int32 ) :: i32 integer ( kind = int64 ) :: i64 real ( kind = sp ) :: r32 real ( kind = dp ) :: r64 complex ( kind = sp ) :: c32 complex ( kind = dp ) :: c64 i32 = 100_int32 i64 = 100_int64 r32 = 10 0.0_sp r64 = 10 0.0_dp c32 = cmplx ( 10 0.0_sp , kind = sp ) c64 = cmplx ( 10 0.0_dp , kind = dp ) print \"(2(\" // FMT_INT // \",1x))\" , i32 , i64 ! outputs: 100 100 print FMT_REAL_SP , r32 ! outputs: 1.00000000E+02 print FMT_REAL_DP , r64 ! outputs: 1.0000000000000000E+002 print FMT_COMPLEX_SP , c32 ! outputs: 1.00000000E+02 0.00000000E+00 print FMT_COMPLEX_DP , c64 ! outputs: 1.0000000000000000E+002 0.0000000000000000E+000 end program example_fmt_constants","tags":"","loc":"page/specs/stdlib_io.html"},{"title":"kinds – Fortran-lang/stdlib","text":"The stdlib_kinds module The stdlib_kinds module Introduction Constants provided by stdlib_kinds sp dp xdp qp int8 int16 int32 int64 lk c_bool Introduction The stdlib_kinds module provides kind parameters for the Fortran intrinsic data types, integer , logical , real , and complex . Constants provided by stdlib_kinds sp Single precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 6 significant digits. dp Double precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 15 significant digits. xdp Extended double precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 18 significant digits.\nIf not available it has value -1 . qp Quadruple precision real kind parameter.\nProvides real kind parameter for floating point numbers with a minimal precision of 33 significant digits.\nIf not available it has value -1 . int8 Reexported intrinsic named constant int8 from iso_fortran_env . int16 Reexported intrinsic named constant int16 from iso_fortran_env . int32 Reexported intrinsic named constant int32 from iso_fortran_env . int64 Reexported intrinsic named constant int64 from iso_fortran_env . lk Kind parameter of the default logical data type. c_bool Reexported intrinsic named constant c_bool from iso_c_binding .","tags":"","loc":"page/specs/stdlib_kinds.html"},{"title":"linalg – Fortran-lang/stdlib","text":"Linear Algebra Linear Algebra BLAS and LAPACK Status Description Syntax Example Licensing diag - Create a diagonal array or extract the diagonal elements of an array Status Description Syntax Arguments Return value Example eye - Construct the identity matrix Status Class Description Syntax Arguments Return value Warning Example trace - Trace of a matrix Status Description Syntax Arguments Return value Example outer_product - Computes the outer product of two vectors Status Description Syntax Arguments Return value Example kronecker_product - Computes the Kronecker product of two rank-2 arrays Status Description Syntax Arguments Return value Example cross_product - Computes the cross product of two vectors Status Description Syntax Arguments Return value Example is_square - Checks if a matrix is square Status Description Syntax Arguments Return value Example is_diagonal - Checks if a matrix is diagonal Status Description Syntax Arguments Return value Example is_symmetric - Checks if a matrix is symmetric Status Description Syntax Arguments Return value Example is_skew_symmetric - Checks if a matrix is skew-symmetric Status Description Syntax Arguments Return value Example is_hermitian - Checks if a matrix is Hermitian Status Description Syntax Arguments Return value Example is_triangular - Checks if a matrix is triangular Status Description Syntax Arguments Return value Example is_hessenberg - Checks if a matrix is hessenberg Status Description Syntax Arguments Return value Example solve - Solves a linear matrix equation or a linear system of equations. Status Description Syntax Arguments Return value Example solve_lu - Solves a linear matrix equation or a linear system of equations (subroutine interface). Status Description Syntax Arguments Return value Example lstsq - Computes the least squares solution to a linear matrix equation. Status Description Syntax Arguments Return value Example solve_lstsq - Compute the least squares solution to a linear matrix equation (subroutine interface). Status Description Syntax Arguments Return value Example lstsq_space - Compute internal working space requirements for the least squares solver. Status Description Syntax Arguments det - Computes the determinant of a square matrix Status Description Syntax Arguments Return value Example .det. - Determinant operator of a square matrix Status Description Syntax Arguments Return value Example svd - Compute the singular value decomposition of a rank-2 array (matrix). Status Description Syntax Class Arguments Return values Example svdvals - Compute the singular values of a rank-2 array (matrix). Status Description Syntax Arguments Return values Example The stdlib linear algebra library provides high-level APIs for dealing with common linear algebra operations. BLAS and LAPACK Status Experimental Description BLAS and LAPACK backends provide efficient low level implementations of many linear algebra algorithms, and are employed for non-trivial operators. \nA Modern Fortran version of the Reference-LAPACK 3.10.1 implementation is provided as a backend. \nModern Fortran modules with full explicit typing features are provided after an automated conversion of the legacy codes: \n- [stdlib_linalg_blas(module)], [stdlib_linalg_lapack(module)] provide kind-agnostic interfaces to all functions.\n- Both libraries are available for 32- ( sp ), 64- ( dp ) and 128-bit ( qp ) real and complex numbers (the latter if available in the current build)\n- Free format, lower-case style\n- implicit none(type, external) applied to all procedures and modules\n- intent added and all pure procedures where possible\n- stdlib provides all procedures in two different flavors: (a) original BLAS/LAPACK names with a prefix stdlib_? (ex: stdlib_dgemv , stdlib_sgemv ); (b) A generic, kind agnostic , i.e. gemv . \n- F77-style parameter s removed, and all numeric constants have been generalized with KIND-dependent Fortran intrinsics. \n- preprocessor-based OpenMP directives retained.\nThe single-source module structure hopefully allows for cross-procedural inlining which is otherwise impossible without link-time optimization. When available, highly optimized libraries that take advantage of specialized processor instructions should be preferred over the stdlib implementation. \nExamples of such libraries are: OpenBLAS, MKL (TM), Accelerate, and ATLAS. In order to enable their usage, simply ensure that the following pre-processor macros are defined: STDLIB_EXTERNAL_BLAS wraps all BLAS procedures (except for the 128-bit ones) to an external library STDLIB_EXTERNAL_LAPACK wraps all LAPACK procedures (except for the 128-bit ones) to an external library These can be enabled during the build process. For example, with CMake, one can enable these preprocessor directives using add_compile_definitions(STDLIB_EXTERNAL_BLAS STDLIB_EXTERNAL_LAPACK) .\nThe same is possible from the fpm branch, where the cpp preprocessor is enabled by default. For example, the macros can be added to the project's manifest: # Link against appropriate external BLAS and LAPACK libraries, if necessary [build] link = [ \"blas\" , \"lapack\" ] [dependencies] stdlib = \"*\" # Macros are only needed if using an external library [preprocess] [preprocess.cpp] macros = [ \"STDLIB_EXTERNAL_BLAS\" , \"STDLIB_EXTERNAL_LAPACK\" ] or directly via compiler flags: fpm build --flag \"-DSTDLIB_EXTERNAL_BLAS -DSTDLIB_EXTERNAL_LAPACK -lblas -llapack\" . Syntax All procedures in the BLAS and LAPACK backends follow the standard interfaces from the Reference LAPACK . So, the online Users Guide should be consulted for the full API and descriptions of procedure arguments and their usage. The stdlib implementation makes both kind-agnostic and specific procedure interfaces available via modules\n[stdlib_linalg_blas(module)] and [stdlib_linalg_lapack(module)]. Because all procedures start with a letter that indicates the base datatype , the stdlib generic\ninterface drops the heading letter and contains all kind-dependent implementations. For example, the generic \ninterface to the axpy function looks like: !> AXPY: constant times a vector plus a vector. interface axpy module procedure stdlib_saxpy module procedure stdlib_daxpy module procedure stdlib_qaxpy module procedure stdlib_caxpy module procedure stdlib_zaxpy module procedure stdlib_waxpy end interface axpy The generic interface is the endpoint for using an external library. Whenever the latter is used, references\nto the internal module procedure s are replaced with interfaces to the external library, \nfor example: !> AXPY: constant times a vector plus a vector. interface axpy pure subroutine caxpy ( n , ca , cx , incx , cy , incy ) import sp , dp , qp , ilp , lk implicit none ( type , external ) complex ( sp ), intent ( in ) :: ca , cx ( * ) integer ( ilp ), intent ( in ) :: incx , incy , n complex ( sp ), intent ( inout ) :: cy ( * ) end subroutine caxpy ! [....] module procedure stdlib_qaxpy end interface axpy Note that the 128-bit functions are only provided by stdlib and always point to the internal implementation. \nBecause 128-bit precision is identified as [stdlib_kinds(module):qp], initials for 128-bit procedures were \nlabelled as q (quadruple-precision reals) and w (\"wide\" or quadruple-precision complex numbers). \nExtended precision ([stdlib_kinds(module):xdp]) calculations are currently not supported. Example program example_gemv use stdlib_linalg , only : eye use stdlib_linalg_blas , only : sp , gemv implicit none ( type , external ) real ( sp ) :: A ( 2 , 2 ), B ( 2 ), C ( 2 ) B = [ 1.0 , 2.0 ] A = eye ( 2 ) ! Use legacy BLAS interface call gemv ( 'No transpose' , m = size ( A , 1 ), n = size ( A , 2 ), alpha = 1.0 , a = A , lda = size ( A , 1 ), x = B , incx = 1 , beta = 0.0 , y = C , incy = 1 ) print * , C ! returns 1.0 2.0 end program example_gemv program example_getrf use stdlib_linalg , only : eye use stdlib_linalg_lapack , only : dp , ilp , getrf implicit none ( type , external ) real ( dp ) :: A ( 3 , 3 ) integer ( ilp ) :: ipiv ( 3 ), info A = eye ( 3 ) ! LAPACK matrix factorization interface (overwrite result) call getrf ( size ( A , 1 ), size ( A , 2 ), A , size ( A , 1 ), ipiv , info ) print * , info ! info==0: Success! end program example_getrf Licensing The Fortran Standard Library is distributed under the MIT License. LAPACK and its contained BLAS are a \nfreely-available software package. They are available from netlib via anonymous \nftp and the World Wide Web. Thus, they can be included in commercial software packages (and have been). \nThe license used for the BLAS and LAPACK backends is the modified BSD license . The header of the LICENSE.txt file has as its licensing requirements: Copyright ( c ) 1992-2013 The University of Tennessee and The University of Tennessee Research Foundation . All rights reserved . Copyright ( c ) 2000-2013 The University of California Berkeley . All rights reserved . Copyright ( c ) 2006-2013 The University of Colorado Denver . All rights reserved . $ COPYRIGHT $ Additional copyrights may follow $ HEADER $ Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : - Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer . - Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer listed in this license in the documentation and / or other materials provided with the distribution . - Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission . The copyright holders provide no reassurances that the source code provided does not infringe any patent , copyright , or any other intellectual property rights of third parties . The copyright holders disclaim any liability to any recipient for claims brought against recipient by any third party for infringement of that parties intellectual property rights . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . So the license for the LICENSE.txt code is compatible with the use of\nmodified versions of the code in the Fortran Standard Library under the MIT license. Credit for the BLAS , LAPACK libraries should be given to the LAPACK authors .\nAccording to the original license, we also changed the name of the routines and commented the changes made \nto the original. diag - Create a diagonal array or extract the diagonal elements of an array Status Experimental Description Create a diagonal array or extract the diagonal elements of an array Syntax d = diag (a [, k]) Arguments a : Shall be a rank-1 or or rank-2 array. If a is a rank-1 array (i.e. a vector) then diag returns a rank-2 array with the elements of a on the diagonal. If a is a rank-2 array (i.e. a matrix) then diag returns a rank-1 array of the diagonal elements. k (optional): Shall be a scalar of type integer and specifies the diagonal. The default k = 0 represents the main diagonal, k > 0 are diagonals above the main diagonal, k < 0 are diagonals below the main diagonal. Return value Returns a diagonal array or a vector with the extracted diagonal elements. Example program example_diag1 use stdlib_linalg , only : diag implicit none real , allocatable :: A (:, :) integer :: i A = diag ([( 1 , i = 1 , 10 )]) ! creates a 10 by 10 identity matrix end program example_diag1 program example_diag2 use stdlib_linalg , only : diag implicit none real , allocatable :: v (:) real , allocatable :: A (:, :) v = [ 1 , 2 , 3 , 4 , 5 ] A = diag ( v ) ! creates a 5 by 5 matrix with elements of v on the diagonal end program example_diag2 program example_diag3 use stdlib_linalg , only : diag implicit none integer , parameter :: n = 10 real :: c ( n ), ul ( n - 1 ) real :: A ( n , n ) c = 2 ul = - 1 A = diag ( ul , - 1 ) + diag ( c ) + diag ( ul , 1 ) ! Gil Strang's favorite matrix end program example_diag3 program example_diag4 use stdlib_linalg , only : diag implicit none integer , parameter :: n = 12 real :: A ( n , n ) real :: v ( n ) call random_number ( A ) v = diag ( A ) ! v contains diagonal elements of A end program example_diag4 program example_diag5 use stdlib_linalg , only : diag implicit none integer , parameter :: n = 3 real :: A ( n , n ) real , allocatable :: v (:) A = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ n , n ]) v = diag ( A , - 1 ) ! v is [2,6] v = diag ( A , 1 ) ! v is [4,8] end program example_diag5 eye - Construct the identity matrix Status Experimental Class Pure function. Description Construct the identity matrix. Syntax I = eye (dim1 [, dim2]) Arguments dim1 : Shall be a scalar of default type integer .\nThis is an intent(in) argument. dim2 : Shall be a scalar of default type integer .\nThis is an intent(in) and optional argument. Return value Return the identity matrix, i.e. a matrix with ones on the main diagonal and zeros elsewhere. The return value is of type integer(int8) .\nThe use of int8 was suggested to save storage. Warning Since the result of eye is of integer(int8) type, one should be careful about using it in arithmetic expressions. For example: !> Be careful A = eye ( 2 , 2 ) / 2 !! A == 0.0 !> Recommend A = eye ( 2 , 2 ) / 2.0 !! A == diag([0.5, 0.5]) Example program example_eye1 use stdlib_linalg , only : eye implicit none integer :: i ( 2 , 2 ) real :: a ( 3 , 3 ) real :: b ( 2 , 3 ) !! Matrix is non-square. complex :: c ( 2 , 2 ) I = eye ( 2 ) !! [1,0; 0,1] A = eye ( 3 ) !! [1.0,0.0,0.0; 0.0,1.0,0.0; 0.0,0.0,1.0] A = eye ( 3 , 3 ) !! [1.0,0.0,0.0; 0.0,1.0,0.0; 0.0,0.0,1.0] B = eye ( 2 , 3 ) !! [1.0,0.0,0.0; 0.0,1.0,0.0] C = eye ( 2 , 2 ) !! [(1.0,0.0),(0.0,0.0); (0.0,0.0),(1.0,0.0)] C = ( 1.0 , 1.0 ) * eye ( 2 , 2 ) !! [(1.0,1.0),(0.0,0.0); (0.0,0.0),(1.0,1.0)] end program example_eye1 program example_eye2 use stdlib_linalg , only : eye , diag implicit none print * , all ( eye ( 4 ) == diag ([ 1 , 1 , 1 , 1 ])) ! prints .true. end program example_eye2 trace - Trace of a matrix Status Experimental Description Trace of a matrix (rank-2 array) Syntax result = trace (A) Arguments A : Shall be a rank-2 array. If A is not square, then trace(A) will return the sum of diagonal values from the square sub-section of A . Return value Returns the trace of the matrix, i.e. the sum of diagonal elements. Example program example_trace use stdlib_linalg , only : trace implicit none real :: A ( 3 , 3 ) A = reshape ([ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ], [ 3 , 3 ]) print * , trace ( A ) ! 1 + 5 + 9 end program example_trace outer_product - Computes the outer product of two vectors Status Experimental Description Computes the outer product of two vectors Syntax d = outer_product (u, v) Arguments u : Shall be a rank-1 array v : Shall be a rank-1 array Return value Returns a rank-2 array equal to u v^T (where u, v are considered column vectors). The shape of the returned array is [size(u), size(v)] . Example program example_outer_product use stdlib_linalg , only : outer_product implicit none real , allocatable :: A (:, :), u (:), v (:) u = [ 1. , 2. , 3. ] v = [ 3. , 4. ] A = outer_product ( u , v ) !A = reshape([3., 6., 9., 4., 8., 12.], [3,2]) end program example_outer_product kronecker_product - Computes the Kronecker product of two rank-2 arrays Status Experimental Description Computes the Kronecker product of two rank-2 arrays Syntax C = kronecker_product (A, B) Arguments A : Shall be a rank-2 array with dimensions M1, N1 B : Shall be a rank-2 array with dimensions M2, N2 Return value Returns a rank-2 array equal to A \\otimes B . The shape of the returned array is [M1*M2, N1*N2] . Example program example_kronecker_product use stdlib_linalg , only : kronecker_product implicit none integer , parameter :: m1 = 1 , n1 = 2 , m2 = 2 , n2 = 3 integer :: i , j real :: A ( m1 , n1 ), B ( m2 , n2 ) real , allocatable :: C (:,:) do j = 1 , n1 do i = 1 , m1 A ( i , j ) = i * j ! A = [1, 2] end do end do do j = 1 , n2 do i = 1 , m2 ! B = [ 1, 2, 3 ] B ( i , j ) = i * j ! [ 2, 4, 6 ] end do end do C = kronecker_product ( A , B ) ! C = [ a(1,1) * B(:,:) | a(1,2) * B(:,:) ] ! or in other words, ! C = [ 1.00 2.00 3.00 2.00 4.00 6.00 ] ! [ 2.00 4.00 6.00 4.00 8.00 12.00 ] end program example_kronecker_product cross_product - Computes the cross product of two vectors Status Experimental Description Computes the cross product of two vectors Syntax c = cross_product (a, b) Arguments a : Shall be a rank-1 and size-3 array b : Shall be a rank-1 and size-3 array Return value Returns a rank-1 and size-3 array which is perpendicular to both a and b . Example program demo_cross_product use stdlib_linalg , only : cross_product implicit none real :: a ( 3 ), b ( 3 ), c ( 3 ) a = [ 1. , 0. , 0. ] b = [ 0. , 1. , 0. ] c = cross_product ( a , b ) !c = [0., 0., 1.] end program demo_cross_product is_square - Checks if a matrix is square Status Experimental Description Checks if a matrix is square Syntax d = is_square (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is square, and .false. otherwise. Example program example_is_square use stdlib_linalg , only : is_square implicit none real :: A ( 2 , 2 ), B ( 3 , 2 ) logical :: res A = reshape ([ 1. , 2. , 3. , 4. ], shape ( A )) B = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], shape ( B )) res = is_square ( A ) ! returns .true. res = is_square ( B ) ! returns .false. end program example_is_square is_diagonal - Checks if a matrix is diagonal Status Experimental Description Checks if a matrix is diagonal Syntax d = is_diagonal (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is diagonal, and .false. otherwise.\nNote that nonsquare matrices may be diagonal, so long as a_ij = 0 when i /= j . Example program example_is_diagonal use stdlib_linalg , only : is_diagonal implicit none real :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ 1. , 0. , 0. , 4. ], shape ( A )) B = reshape ([ 1. , 0. , 3. , 4. ], shape ( B )) res = is_diagonal ( A ) ! returns .true. res = is_diagonal ( B ) ! returns .false. end program example_is_diagonal is_symmetric - Checks if a matrix is symmetric Status Experimental Description Checks if a matrix is symmetric Syntax d = is_symmetric (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is symmetric, and .false. otherwise. Example program example_is_symmetric use stdlib_linalg , only : is_symmetric implicit none real :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ 1. , 3. , 3. , 4. ], shape ( A )) B = reshape ([ 1. , 0. , 3. , 4. ], shape ( B )) res = is_symmetric ( A ) ! returns .true. res = is_symmetric ( B ) ! returns .false. end program example_is_symmetric is_skew_symmetric - Checks if a matrix is skew-symmetric Status Experimental Description Checks if a matrix is skew-symmetric Syntax d = is_skew_symmetric (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is skew-symmetric, and .false. otherwise. Example program example_is_skew_symmetric use stdlib_linalg , only : is_skew_symmetric implicit none real :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ 0. , - 3. , 3. , 0. ], shape ( A )) B = reshape ([ 0. , 3. , 3. , 0. ], shape ( B )) res = is_skew_symmetric ( A ) ! returns .true. res = is_skew_symmetric ( B ) ! returns .false. end program example_is_skew_symmetric is_hermitian - Checks if a matrix is Hermitian Status Experimental Description Checks if a matrix is Hermitian Syntax d = is_hermitian (A) Arguments A : Shall be a rank-2 array Return value Returns a logical scalar that is .true. if the input matrix is Hermitian, and .false. otherwise. Example program example_is_hermitian use stdlib_linalg , only : is_hermitian implicit none complex :: A ( 2 , 2 ), B ( 2 , 2 ) logical :: res A = reshape ([ cmplx ( 1. , 0. ), cmplx ( 3. , - 1. ), cmplx ( 3. , 1. ), cmplx ( 4. , 0. )], shape ( A )) B = reshape ([ cmplx ( 1. , 0. ), cmplx ( 3. , 1. ), cmplx ( 3. , 1. ), cmplx ( 4. , 0. )], shape ( B )) res = is_hermitian ( A ) ! returns .true. res = is_hermitian ( B ) ! returns .false. end program example_is_hermitian is_triangular - Checks if a matrix is triangular Status Experimental Description Checks if a matrix is triangular Syntax d = is_triangular (A,uplo) Arguments A : Shall be a rank-2 array uplo : Shall be a single character from {'u','U','l','L'} Return value Returns a logical scalar that is .true. if the input matrix is the type of triangular specified by uplo (upper or lower), and .false. otherwise.\nNote that the definition of triangular used in this implementation allows nonsquare matrices to be triangular.\nSpecifically, upper triangular matrices satisfy a_ij = 0 when j < i , and lower triangular matrices satisfy a_ij = 0 when j > i . Example program example_is_triangular use stdlib_linalg , only : is_triangular implicit none real :: A ( 3 , 3 ), B ( 3 , 3 ) logical :: res A = reshape ([ 1. , 0. , 0. , 4. , 5. , 0. , 7. , 8. , 9. ], shape ( A )) B = reshape ([ 1. , 0. , 3. , 4. , 5. , 0. , 7. , 8. , 9. ], shape ( B )) res = is_triangular ( A , 'u' ) ! returns .true. res = is_triangular ( B , 'u' ) ! returns .false. end program example_is_triangular is_hessenberg - Checks if a matrix is hessenberg Status Experimental Description Checks if a matrix is Hessenberg Syntax d = is_hessenberg (A,uplo) Arguments A : Shall be a rank-2 array uplo : Shall be a single character from {'u','U','l','L'} Return value Returns a logical scalar that is .true. if the input matrix is the type of Hessenberg specified by uplo (upper or lower), and .false. otherwise.\nNote that the definition of Hessenberg used in this implementation allows nonsquare matrices to be Hessenberg.\nSpecifically, upper Hessenberg matrices satisfy a_ij = 0 when j < i-1 , and lower Hessenberg matrices satisfy a_ij = 0 when j > i+1 . Example program example_is_hessenberg use stdlib_linalg , only : is_hessenberg implicit none real :: A ( 3 , 3 ), B ( 3 , 3 ) logical :: res A = reshape ([ 1. , 2. , 0. , 4. , 5. , 6. , 7. , 8. , 9. ], shape ( A )) B = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. , 7. , 8. , 9. ], shape ( B )) res = is_hessenberg ( A , 'u' ) ! returns .true. res = is_hessenberg ( B , 'u' ) ! returns .false. end program example_is_hessenberg solve - Solves a linear matrix equation or a linear system of equations. Status Experimental Description This function computes the solution to a linear matrix equation , where is a square, full-rank, real or complex matrix. Result vector or array x returns the exact solution to within numerical precision, provided that the matrix is not ill-conditioned. \nAn error is returned if the matrix is rank-deficient or singular to working precision. \nThe solver is based on LAPACK's *GESV backends. Syntax Pure interface: x = solve (a, b) Expert interface: x = solve (a, b [, overwrite_a], err) Arguments a : Shall be a rank-2 real or complex square array containing the coefficient matrix. It is normally an intent(in) argument. If overwrite_a=.true. , it is an intent(inout) argument and is destroyed by the call. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing the right-hand-side vector(s). It is an intent(in) argument. overwrite_a (optional): Shall be an input logical flag. if .true. , input matrix a will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. The function is not pure if this argument is provided. Return value For a full-rank matrix, returns an array value that represents the solution to the linear system of equations. Raises LINALG_ERROR if the matrix is singular to working precision.\nRaises LINALG_VALUE_ERROR if the matrix and rhs vectors have invalid/incompatible sizes.\nIf err is not present, exceptions trigger an error stop . Example program example_solve1 use stdlib_linalg_constants , only : sp use stdlib_linalg , only : solve , linalg_state_type implicit none real ( sp ), allocatable :: A (:,:), b (:), x (:) ! Solve a system of 3 linear equations: ! 4x + 3y + 2z = 25 ! -2x + 2y + 3z = -10 ! 3x - 5y + 2z = -4 ! Note: Fortran is column-major! -> transpose A = transpose ( reshape ([ 4 , 3 , 2 , & - 2 , 2 , 3 , & 3 , - 5 , 2 ], [ 3 , 3 ])) b = [ 25 , - 10 , - 4 ] ! Get coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) x = solve ( A , b ) print * , 'solution: ' , x ! 5.0, 3.0, -2.0 end program example_solve1 program example_solve2 use stdlib_linalg_constants , only : sp use stdlib_linalg , only : solve , linalg_state_type implicit none complex ( sp ), allocatable :: A (:,:), b (:), x (:) ! Solve a system of 3 complex linear equations: ! 2x + iy + 2z = (5-i) ! -ix + (4-3i)y + 6z = i ! 4x + 3y + z = 1 ! Note: Fortran is column-major! -> transpose A = transpose ( reshape ([( 2.0 , 0.0 ),( 0.0 , 1.0 ),( 2.0 , 0.0 ), & ( 0.0 , - 1.0 ),( 4.0 , - 3.0 ),( 6.0 , 0.0 ), & ( 4.0 , 0.0 ),( 3.0 , 0.0 ),( 1.0 , 0.0 )] , [ 3 , 3 ])) b = [( 5.0 , - 1.0 ),( 0.0 , 1.0 ),( 1.0 , 0.0 )] ! Get coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) x = solve ( A , b ) print * , 'solution: ' , x ! (1.0947,0.3674) (-1.519,-0.4539) (1.1784,-0.1078) end program example_solve2 solve_lu - Solves a linear matrix equation or a linear system of equations (subroutine interface). Status Experimental Description This subroutine computes the solution to a linear matrix equation , where is a square, full-rank, real or complex matrix. Result vector or array x returns the exact solution to within numerical precision, provided that the matrix is not ill-conditioned. \nAn error is returned if the matrix is rank-deficient or singular to working precision. \nIf all optional arrays are provided by the user, no internal allocations take place.\nThe solver is based on LAPACK's *GESV backends. Syntax Simple ( Pure ) interface: call solve_lu (a, b, x) Expert ( Pure ) interface: call solve_lu (a, b, x [, pivot, overwrite_a, err]) Arguments a : Shall be a rank-2 real or complex square array containing the coefficient matrix. It is normally an intent(in) argument. If overwrite_a=.true. , it is an intent(inout) argument and is destroyed by the call. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing the right-hand-side vector(s). It is an intent(in) argument. x : Shall be a rank-1 or rank-2 array of the same kind and size as b , that returns the solution(s) to the system. It is an intent(inout) argument, and must have the contiguous property. pivot (optional): Shall be a rank-1 array of the same kind and matrix dimension as a , providing storage for the diagonal pivot indices. It is an intent(inout) arguments, and returns the diagonal pivot indices. overwrite_a (optional): Shall be an input logical flag. if .true. , input matrix a will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. Return value For a full-rank matrix, returns an array value that represents the solution to the linear system of equations. Raises LINALG_ERROR if the matrix is singular to working precision.\nRaises LINALG_VALUE_ERROR if the matrix and rhs vectors have invalid/incompatible sizes.\nIf err is not present, exceptions trigger an error stop . Example program example_solve3 use stdlib_linalg_constants , only : sp , ilp use stdlib_linalg , only : solve_lu , linalg_state_type implicit none integer ( ilp ) :: test integer ( ilp ), allocatable :: pivot (:) complex ( sp ), allocatable :: A (:,:), b (:), x (:) ! Solve a system of 3 complex linear equations: ! 2x + iy + 2z = (5-i) ! -ix + (4-3i)y + 6z = i ! 4x + 3y + z = 1 ! Note: Fortran is column-major! -> transpose A = transpose ( reshape ([( 2.0 , 0.0 ),( 0.0 , 1.0 ),( 2.0 , 0.0 ), & ( 0.0 , - 1.0 ),( 4.0 , - 3.0 ),( 6.0 , 0.0 ), & ( 4.0 , 0.0 ),( 3.0 , 0.0 ),( 1.0 , 0.0 )] , [ 3 , 3 ])) ! Pre-allocate x allocate ( b ( size ( A , 2 )), pivot ( size ( A , 2 ))) allocate ( x , mold = b ) ! Call system many times avoiding reallocation do test = 1 , 100 b = test * [( 5.0 , - 1.0 ),( 0.0 , 1.0 ),( 1.0 , 0.0 )] call solve_lu ( A , b , x , pivot ) print \"(i3,'-th solution: ',*(1x,f12.6))\" , test , x end do end program example_solve3 lstsq - Computes the least squares solution to a linear matrix equation. Status Experimental Description This function computes the least-squares solution to a linear matrix equation . Result vector x returns the approximate solution that minimizes the 2-norm , i.e., it contains the least-squares solution to the problem. Matrix A may be full-rank, over-determined, or under-determined. The solver is based on LAPACK's *GELSD backends. Syntax x = lstsq (a, b, [, cond, overwrite_a, rank, err]) Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix. It is an intent(inout) argument. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing one or more right-hand-side vector(s), each in its leading dimension. It is an intent(in) argument. cond (optional): Shall be a scalar real value cut-off threshold for rank evaluation: s_i >= cond*maxval(s), i=1:rank . Shall be a scalar, intent(in) argument. overwrite_a (optional): Shall be an input logical flag. If .true. , input matrix A will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. rank (optional): Shall be an integer scalar value, that contains the rank of input matrix A . This is an intent(out) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return value Returns an array value of the same kind and rank as b , containing the solution(s) to the least squares system. Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix and right-hand-side vector have invalid/incompatible sizes.\nExceptions trigger an error stop . Example ! Least-squares solver: functional interface program example_lstsq1 use stdlib_linalg_constants , only : dp use stdlib_linalg , only : lstsq implicit none integer , allocatable :: x (:), y (:) real ( dp ), allocatable :: A (:,:), b (:), coef (:) ! Data set x = [ 1 , 2 , 2 ] y = [ 5 , 13 , 25 ] ! Fit three points using a parabola, least squares method ! A = [1 x x**2] A = reshape ([[ 1 , 1 , 1 ], x , x ** 2 ],[ 3 , 3 ]) b = y ! Get coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) coef = lstsq ( A , b ) print * , 'parabola: ' , coef ! parabola: -0.42857142857141695 1.1428571428571503 4.2857142857142811 end program example_lstsq1 solve_lstsq - Compute the least squares solution to a linear matrix equation (subroutine interface). Status Experimental Description This subroutine computes the least-squares solution to a linear matrix equation . Result vector x returns the approximate solution that minimizes the 2-norm , i.e., it contains the least-squares solution to the problem. Matrix A may be full-rank, over-determined, or under-determined. The solver is based on LAPACK's *GELSD backends. Syntax call solve_lstsq (a, b, x, [, real_storage, int_storage, [cmpl_storage, ] cond, singvals, overwrite_a, rank, err]) Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix. It is an intent(inout) argument. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing one or more right-hand-side vector(s), each in its leading dimension. It is an intent(in) argument. x : Shall be an array of same kind and rank as b , and leading dimension of at least n , containing the solution(s) to the least squares system. It is an intent(inout) argument. real_storage (optional): Shall be a real rank-1 array of the same kind a , providing working storage for the solver. It minimum size can be determined with a call to lstsq_space . It is an intent(inout) argument. int_storage (optional): Shall be an integer rank-1 array, providing working storage for the solver. It minimum size can be determined with a call to lstsq_space . It is an intent(inout) argument. cmpl_storage (optional): For complex systems, it shall be a complex rank-1 array, providing working storage for the solver. It minimum size can be determined with a call to lstsq_space . It is an intent(inout) argument. cond (optional): Shall be a scalar real value cut-off threshold for rank evaluation: s_i >= cond*maxval(s), i=1:rank . Shall be a scalar, intent(in) argument. singvals (optional): Shall be a real rank-1 array of the same kind a and size at least minval(shape(a)) , returning the list of singular values s(i)>=cond*maxval(s) , in descending order of magnitude. It is an intent(out) argument. overwrite_a (optional): Shall be an input logical flag. If .true. , input matrix A will be used as temporary storage and overwritten. This avoids internal data allocation. This is an intent(in) argument. rank (optional): Shall be an integer scalar value, that contains the rank of input matrix A . This is an intent(out) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return value Returns an array value that represents the solution to the least squares system. Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix and right-hand-side vector have invalid/incompatible sizes.\nExceptions trigger an error stop . Example ! Demonstrate expert subroutine interface with pre-allocated arrays program example_lstsq2 use stdlib_linalg_constants , only : dp , ilp use stdlib_linalg , only : solve_lstsq , lstsq_space , linalg_state_type implicit none integer , allocatable :: x (:), y (:) real ( dp ), allocatable :: A (:,:), b (:), coef (:), real_space (:), singvals (:) integer ( ilp ), allocatable :: int_space (:) integer ( ilp ) :: lrwork , liwork , arank ! Data set x = [ 1 , 2 , 2 ] y = [ 5 , 13 , 25 ] ! Fit three points using a parabola, least squares method ! A = [1 x x**2] A = reshape ([[ 1 , 1 , 1 ], x , x ** 2 ],[ 3 , 3 ]) b = y ! Get storage sizes for the arrays and pre-allocate data call lstsq_space ( A , b , lrwork , liwork ) allocate ( coef ( size ( x )), real_space ( lrwork ), int_space ( liwork ), singvals ( minval ( shape ( A )))) ! Solve coefficients of y = coef(1) + x*coef(2) + x^2*coef(3) ! with no internal allocations call solve_lstsq ( A , b , x = coef , & real_storage = real_space , & int_storage = int_space , & singvals = singvals , & overwrite_a = . true ., & rank = arank ) print * , 'parabola: ' , coef ! parabola: -0.42857142857141695 1.1428571428571503 4.2857142857142811 print * , 'rank: ' , arank ! rank: 2 end program example_lstsq2 lstsq_space - Compute internal working space requirements for the least squares solver. Status Experimental Description This subroutine computes the internal working space requirements for the least-squares solver, solve_lstsq . Syntax call lstsq_space (a, b, lrwork, liwork [, lcwork]) Arguments a : Shall be a rank-2 real or complex array containing the linear system coefficient matrix. It is an intent(in) argument. b : Shall be a rank-1 or rank-2 array of the same kind as a , containing the system's right-hand-side vector(s). It is an intent(in) argument. lrwork : Shall be an integer scalar, that returns the minimum array size required for the real working storage to this system. liwork : Shall be an integer scalar, that returns the minimum array size required for the integer working storage to this system. lcwork ( complex a , b ): For a complex system, shall be an integer scalar, that returns the minimum array size required for the complex working storage to this system. det - Computes the determinant of a square matrix Status Experimental Description This function computes the determinant of a real or complex square matrix. This interface comes with a pure version det(a) , and a non-pure version det(a,overwrite_a,err) that\nallows for more expert control. Syntax c = det (a [, overwrite_a, err]) Arguments a : Shall be a rank-2 square array overwrite_a (optional): Shall be an input logical flag. if .true. , input matrix a will be used as temporary storage and overwritten. This avoids internal data allocation.\n This is an intent(in) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return value Returns a real scalar value of the same kind of a that represents the determinant of the matrix. Raises LINALG_ERROR if the matrix is singular.\nRaises LINALG_VALUE_ERROR if the matrix is non-square.\nExceptions are returned to the err argument if provided; an error stop is triggered otherwise. Example program example_determinant use stdlib_kinds , only : dp use stdlib_linalg , only : det , linalg_state_type implicit none type ( linalg_state_type ) :: err real ( dp ) :: d ! Compute determinate of a real matrix d = det ( reshape ([ real ( dp ) :: 1 , 2 , 3 , 4 ],[ 2 , 2 ])) print * , d ! a*d-b*c = -2.0 end program example_determinant .det. - Determinant operator of a square matrix Status Experimental Description This operator returns the determinant of a real square matrix. This interface is equivalent to the pure version of determinant det . Syntax c = [[stdlib_linalg(module):operator(.det.)(interface)]] (a) Arguments a : Shall be a rank-2 square array of any real or complex kinds. It is an intent(in) argument. Return value Returns a real scalar value that represents the determinnt of the matrix. Raises LINALG_ERROR if the matrix is singular.\nRaises LINALG_VALUE_ERROR if the matrix is non-square.\nExceptions trigger an error stop . Example program example_determinant2 use stdlib_kinds , only : dp use stdlib_linalg , only : operator (. det .) implicit none real ( dp ) :: d ! Compute determinate of a real matrix d = . det . reshape ([ real ( dp ) :: 1 , 2 , 3 , 4 ],[ 2 , 2 ]) print * , d ! a*d-b*c = -2.0 end program example_determinant2 svd - Compute the singular value decomposition of a rank-2 array (matrix). Status Experimental Description This subroutine computes the singular value decomposition of a real or complex rank-2 array (matrix) .\nThe solver is based on LAPACK's *GESDD backends. Result vector s returns the array of singular values on the diagonal of . \nIf requested, u contains the left singular vectors, as columns of .\nIf requested, vt contains the right singular vectors, as rows of . Syntax call svd (a, s, [, u, vt, overwrite_a, full_matrices, err]) Class Subroutine Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix of size [m,n] . It is an intent(inout) argument, but returns unchanged unless overwrite_a=.true. . s : Shall be a rank-1 real array, returning the list of k = min(m,n) singular values. It is an intent(out) argument. u (optional): Shall be a rank-2 array of same kind as a , returning the left singular vectors of a as columns. Its size should be [m,m] unless full_matrices=.false. , in which case, it can be [m,min(m,n)] . It is an intent(out) argument. vt (optional): Shall be a rank-2 array of same kind as a , returning the right singular vectors of a as rows. Its size should be [n,n] unless full_matrices=.false. , in which case, it can be [min(m,n),n] . It is an intent(out) argument. overwrite_a (optional): Shall be an input logical flag. If .true. , input matrix A will be used as temporary storage and overwritten. This avoids internal data allocation. By default, overwrite_a=.false. . It is an intent(in) argument. full_matrices (optional): Shall be an input logical flag. If .true. (default), matrices u and vt shall be full-sized. Otherwise, their secondary dimension can be resized to min(m,n) . See u , v for details. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return values Returns an array s that contains the list of singular values of matrix a .\nIf requested, returns a rank-2 array u that contains the left singular vectors of a along its columns.\nIf requested, returns a rank-2 array vt that contains the right singular vectors of a along its rows. Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix or any of the output arrays invalid/incompatible sizes.\nExceptions trigger an error stop , unless argument err is present. Example svdvals - Compute the singular values of a rank-2 array (matrix). Status Experimental Description This subroutine computes the singular values of a real or complex rank-2 array (matrix) from its singular \nvalue decomposition . The solver is based on LAPACK's *GESDD backends. Result vector s returns the array of singular values on the diagonal of . Syntax s = svdvals (a [, err]) Arguments a : Shall be a rank-2 real or complex array containing the coefficient matrix of size [m,n] . It is an intent(in) argument. err (optional): Shall be a type(linalg_state_type) value. This is an intent(out) argument. Return values Returns an array s that contains the list of singular values of matrix a . Raises LINALG_ERROR if the underlying Singular Value Decomposition process did not converge.\nRaises LINALG_VALUE_ERROR if the matrix or any of the output arrays invalid/incompatible sizes.\nExceptions trigger an error stop , unless argument err is present. Example ! Singular Values program example_svdvals use stdlib_linalg_constants , only : dp use stdlib_linalg , only : svdvals implicit none real ( dp ), allocatable :: A (:,:), s (:) character ( * ), parameter :: fmt = \"(a,*(1x,f12.8))\" ! We want to find the singular values of matrix: ! ! A = [ 3 2 2] ! [ 2 3 -2] ! A = transpose ( reshape ([ 3 , 2 , 2 , & 2 , 3 , - 2 ], [ 3 , 2 ])) ! Get singular values s = svdvals ( A ) ! Singular values: [5, 3] print fmt , ' ' print fmt , 'S = ' , s print fmt , ' ' end program example_svdvals","tags":"","loc":"page/specs/stdlib_linalg.html"},{"title":"linalg_state_type – Fortran-lang/stdlib","text":"Linear Algebra -- State and Error Handling Module Linear Algebra -- State and Error Handling Module Introduction Derived types provided The linalg_state_type derived type Type-bound procedures Status Example Error flags provided Comparison operators provided Introduction The stdlib_linalg_state module provides a derived type holding information on the state of linear algebra operations, and procedures for expert control of linear algebra workflows. \nAll linear algebra procedures are engineered to support returning an optional linalg_state_type variable to holds such information, as a form of expert API. If the user does not require state \ninformation, but fatal errors are encountered during the execution of linear algebra routines, the \nprogram will undergo a hard stop.\nInstead, if the state argument is present, the program will never stop, but will return detailed error \ninformation into the state handler. Derived types provided The linalg_state_type derived type The linalg_state_type is defined as a derived type containing an integer error flag, and \nfixed-size character strings to store an error message and the location of the error state change. \nFixed-size string storage was chosen to facilitate the compiler's memory allocation and ultimately \nensure maximum computational performance. A similarly named generic interface, linalg_state_type , is provided to allow the developer to \ncreate diagnostic messages and raise error flags easily. The call starts with an error flag or \nthe location of the event, and is followed by an arbitrary list of integer , real , complex or character variables. Numeric variables may be provided as either scalars or rank-1 (array) inputs. Type-bound procedures The following convenience type-bound procedures are provided: \n- print() returns an allocatable character string containing state location, message, and error flag; \n- print_message() returns an allocatable character string containing the state message; \n- ok() returns a logical flag that is .true. in case of successful state ( flag==LINALG_SUCCESS );\n- error() returns a logical flag that is .true. in case of error state ( flag/=LINALG_SUCCESS ). Status Experimental Example program example_state1 use stdlib_linalg_state , only : linalg_state_type , LINALG_SUCCESS , LINALG_VALUE_ERROR , & operator ( /= ) implicit none type ( linalg_state_type ) :: err ! To create a state variable, we enter its integer state flag, followed by a list of variables ! that will be automatically assembled into a formatted error message. No need to provide string formats err = linalg_state_type ( LINALG_VALUE_ERROR , 'just an example with scalar ' ,& 'integer=' , 1 , 'real=' , 2.0 , 'complex=' ,( 3.0 , 1.0 ), 'and array ' ,[ 1 , 2 , 3 ], 'inputs' ) ! Print flag print * , err % print () ! Check success print * , 'Check error: ' , err % error () print * , 'Check flag : ' , err /= LINALG_SUCCESS end program example_state1 Error flags provided The module provides the following state flags: \n- LINALG_SUCCESS : Successful execution\n- LINALG_VALUE_ERROR : Numerical errors (such as infinity, not-a-number, range bounds) are encountered.\n- LINALG_ERROR : Linear Algebra errors are encountered, such as: non-converging iterations, impossible operations, etc.\n- LINALG_INTERNAL_ERROR : Provided as a developer safeguard for internal errors that should never occur. Comparison operators provided The module provides overloaded comparison operators for all comparisons of a linalg_state_type variable \nwith an integer error flag: < , <= , == , >= , > , /= .","tags":"","loc":"page/specs/stdlib_linalg_state_type.html"},{"title":"logger – Fortran-lang/stdlib","text":"Loggers Loggers Introduction The stdlib_logger constants The derived type: logger_type Status Description Syntax Private attributes The stdlib_logger variable Public logger_type methods Specification of the logger_type methods add_log_file - open a file and add its unit to self % log_units Status Description Syntax Class Arguments Example add_log_unit - add a unit to the array self % log_units Status Description Syntax Class. Arguments Example configuration - report a logger's configuration Status Description Syntax Class Arguments Example configure - configure the logging process Status Description Syntax Class Arguments Example log_debug - Writes the string message to self % log_units Status Description Syntax Behavior Class Arguments Example log_error - Writes the string message to self % log_units Status Description Syntax Behavior Class Arguments Example log_information - Writes the string message to self % log_units Status Description Syntax Behavior Class Arguments Example log_io_error - Write the string message to self % log_units Status Description Behavior Syntax Class Arguments Example log_message - write the string message to self % log_units Status Description Behavior Syntax Class Arguments Example log_text_error - send a message to self % log_units describing an error Status Description Behavior Syntax Class Arguments Example log_units_assigned - returns the number of active I/O units Status Description Syntax Class Argument Result character Result value Example log_warning - write the string message to log_units Status Description Behavior Syntax Class Arguments Example remove_log_unit - remove unit from self % log_units Status Description Syntax Class Arguments Example Introduction This module defines a derived type, its methods, a variable, and\nconstants to be used for the reporting of errors, displaying messages,\nand other information. The derived type, logger_type , is to be used\nto define both global and local logger variables. The logger_type methods serve to configure the loggers and use the logger variables to\nreport messages to a variable specific list of I/O units termed log_units . The variable, global_logger , of type logger_type ,\nis intended to serve as the default global logger. The constants serve\nas error flags returned by the optional integer stat argument. The logger variables have the option to: change which units receive the log messages; report which units receive the log messages; select which types of messages are logged; precede messages by a blank line; precede messages by a time stamp of the form yyyy-mm-dd hh:mm:ss.sss ; precede messages with the names of a module and procedure; follow a message with the stat and errmsg of the error report\n that prompted the log message; follow a message with the iostat and iomsg of the I/O error\n report that prompted the log message; label a message with one of 'DEBUG: ' , 'INFO: ' , 'WARN: ' , 'ERROR: ' , or 'I/O ERROR: ' ; indent subsequent lines of the messages; and format the text to fit within a maximum column width. While every effort has been made to make the code process and\nasynchronous I/O safe, it is always best to have each process write to\nits own dedicated logger file.\nFor thread parallelism (e.g., with OpenMP), it is advised to put the\nlogger call in a guarding region (e.g., in an OpenMP critical region). Note: Loggers of type logger_type normally report their messages to I/O\nunits in the internal list termed log_units . However if log_units is empty then the messages go to the output_unit of the intrinsic\nmodule iso_fortran_env . The stdlib_logger constants The module defines nine distinct public integer constants for\nreporting errors in the stat arguments of some of the module's\nprocedures. The constants, termed error codes, are as follows: Error Code Description success no error was detected close_failure a close statement for an I/O unit failed index_invalid_error the column was invalid for the given line non_sequential_error the I/O unit did not have SEQUENTIAL access open_failure an open statement failed read_only_error an output unit did not have an access specifier of 'WRITE' or 'READWRITE' unformatted_in_error the unit did not have a form of 'FORMATTED' unopened_in_error the unit was not opened write_fault one of the writes to log_units failed The module also defines eight distinct public integer constants for\nselecting the messages that are logged. These constants, termed\nseverity levels, are (sorted following their increasing order of\nseverity): all_level , debug_level , information_level , warning_level , error_level , io_error_level , text_error_level ,\nand none_level .\nAll log messages with a level (e.g., debug_level ) lower than a\nspecified severity level (e.g., information_level ) will be ignored.\nThe levels error_level and io_error_level have the same severity.\nThe default severity level is information_level . The derived type: logger_type Status Experimental Description Serves to define 'logger' variables to be used in reporting\nsignificant events encountered during the execution of a program. Syntax type( logger_type ) :: variable Private attributes Attribute Type Description Initial value add_blank_line Logical Flag to precede output with a blank line .false. indent_lines Logical Flag to indent subsequent lines by four columns .true. level Integer Severity level information_level log_units Integer array List of I/O units used for output Unallocated max_width Integer Maximum column width of output 0 time_stamp Logical Flag to precede output by a time stamp .true. units Integer Count of the number of active output units 0 The stdlib_logger variable The module defines one public variable, global_logger , of type logger_type . As might be guessed from its name, global_logger is\nintended to serve as the default logger for use throughout an\napplication. Public logger_type methods The module defines twelve public procedures: one function and eleven\nsubroutines. The\nmethods are: Method Class Description add_log_file Subroutine Opens a file using newunit , and adds the resulting unit to the log_units list add_log_unit Subroutine Adds an existing unit to the log_units list configuration Subroutine Reports the details of the logging configuration configure Subroutine Configures the details of the logging process log_debug Subroutine Sends a message prepended by 'DEBUG: ' log_error Subroutine Sends a message prepended by 'ERROR: ' optionally followed by a stat or errmsg log_information Subroutine Sends a message prepended by 'INFO: ' log_io_error Subroutine Sends a message prepended by 'I/O ERROR: ' optionally followed by an iostat or iomsg log_message Subroutine Sends a message log_text_error Subroutine Sends a message describing an error found in a line of text log_units_assigned Function Returns the number of active I/O units in log_units log_warning Subroutine Sends a message prepended by 'WARN: ' remove_log_unit Subroutine Removes the unit number from the log_units array Specification of the logger_type methods add_log_file - open a file and add its unit to self % log_units Status Experimental Description Opens a formatted, sequential access, output file, filename using newunit and adds the resulting unit number to the logger's log_units array. Syntax call self % add_log_file ( filename [, unit, action, position, status, stat ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It shall be the logger to add the file to its log_units . filename : shall be a scalar default character expression. It is\nan intent(in) argument. It shall be the name of the file to be opened. unit (optional): shall be a scalar default integer variable. It is an intent(out) argument. It will be the unit number returned by the newunit specifier of the open statement for filename . action (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It shall be the action specifier of the open statement and must have one of the values 'WRITE' or 'READWRITE' . It has the default value of 'WRITE' . position (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It shall be the position specifier of the open statement and must have one of\n the values 'ASIS' , 'REWIND' , or 'APPEND' . It has the default\n value of 'REWIND' . status (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It shall be the status specifier of the open statement and must have one of\n the values 'OLD' , 'NEW' , 'REPLACE' , or 'UNKNOWN' . It has the\n default value of 'REPLACE' . stat (optional): shall be a scalar default integer variable. It\n is an intent(out) argument. If present, on return it will have the\n value success if filename could be opened, the value read_only_error if the action specifier is \"READ\" , or the value open_failure if filename could not be opened. If absent and filename could not be opened then processing will stop with an informative message as the stop code. Example program example_global_logger use stdlib_logger , global => global_logger implicit none integer :: unit , stat call global % add_log_file ( 'error_log.txt' , unit , & position = 'asis' , stat = stat ) if ( stat /= success ) then error stop 'Unable to open \"error_log.txt\".' end if end program example_global_logger add_log_unit - add a unit to the array self % log_units Status Experimental Description Adds unit to the array of self % log_units . The unit shall\nbe the unit number for an opened, sequential, formatted file with an action specifier of 'WRITE' or 'READWRITE' . Failure of unit to meet\nthose requirements will cause stat , if present, to not be success and unit will not be added to log_units . In this case, if stat is\nnot present, cause processing to stop with an informative string as\nthe stop code. Syntax call self % add_log_unit ( unit [, stat ] ) Class. Subroutine. Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It shall be the logger to direct its output\nto unit . unit : shall be a scalar default integer expression. It is an intent(in) argument. It shall be the unit number for an opened,\n sequential, formatted file with an action specifier of 'WRITE' or 'READWRITE' . stat (optional): shall be a scalar default integer variable. It is\n an intent(out) argument. If absent and unit could not be added\n to self's log_units processing will stop with an informative\n message as the stop code. If present it shall have the value of one\n of the module's error codes indicating any errors found with unit . The codes are\n * success - no problem found\n * non_sequential_error - unit did not have an access specifier of 'SEQUENTIAL' * read_only_error - unit had an action specifier of 'READ' when it needs a specifier of 'WRITE' or 'READWRITE' * unformatted_in_error - unit did not have a form specifier of 'FORMATTED' * unopened_in_error - unit was not opened Example program example_add_log_unit use stdlib_logger , only : global_logger , read_only_error implicit none character ( 256 ) :: iomsg integer :: iostat , unit , stat open ( newunit = unit , file = 'error_log.txt' , & form = 'formatted' , status = 'replace' , & position = 'rewind' , & action = 'write' , iostat = iostat , iomsg = iomsg ) call global_logger % add_log_unit ( unit , stat ) select case ( stat ) case ( read_only_error ) error stop 'Unable to write to \"error_log.txt\".' end select end program example_add_log_unit configuration - report a logger's configuration Status Experimental Description Reports the configuration of a logger. Syntax call self % configuration ( [ add_blankline, indent, level, max_width, time_stamp, log_units ] ) Class Pure subroutine Arguments self : shall be a scalar expression of type logger_type . It is an intent(in) argument. It shall be the logger whose configuration is reported. add_blank_line (optional): shall be a scalar default logical\n variable. It is an intent(out) argument. A value of .true. starts output with a blank line, and .false. otherwise. indent (optional): shall be a scalar default logical variable. It\n is an intent(out) argument. A value of .true. indents subsequent\n lines by four spaces, and .false. otherwise. level (optional): shall be a scalar default integer variable. It is an intent(out) argument. The value corresponds to the severity level for\n ignoring a message. max_width (optional): shall be a scalar default integer\n variable. It is an intent(out) argument. A positive value bigger\n than four defines the maximum width of the output, otherwise there\n is no maximum width. time_stamp (optional): shall be a scalar default logical\n variable. It is an intent(out) argument. A value of .true. precedes output with a time stamp of the form 'yyyy-mm-dd\n hh:mm:ss.sss', and .false. otherwise. log_units (optional): shall be a rank one allocatable array\n variable of type default integer. It is an intent(out) argument. On return it shall be the elements of the self 's log_units array. If there were no elements in self 's log_units , a\n zero-sized array is returned. Example module example_mod use stdlib_logger type ( logger_type ) :: logger contains subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit integer , allocatable :: log_units (:) call logger % configuration ( log_units = log_units ) if ( size ( log_units ) == 0 ) then call add_logger_unit ( unit ) end if end subroutine example_sub end module example_mod configure - configure the logging process Status Experimental Description Configures the logging process for self. Syntax call self % configure ( [ add_blank_line, indent, level, max_width, time_stamp ] ) Class Pure subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It shall be the logger to be configured. add_blank_line (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. Set to .true. to start\n output with a blank line, and to .false. otherwise. indent (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. Set to .true. to\n indent subsequent lines by four spaces, and to .false. to\n not indent. level (optional): shall be a scalar default integer expression. It is\n an intent(in) argument. Set the severity level for ignoring a log\n message. max_width (optional): shall be a scalar default integer\n expression. It is an intent(in) argument. Set to a positive value\n bigger than four to define the maximum width of the output,\n otherwise there is no maximum width. time_stamp (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. Set to .true. to\n precede output with a time stamp of the form 'yyyy-mm-dd\n hh:mm:ss.sss', and to .false. otherwise. Example program example_configure use stdlib_logger , only : global => global_logger implicit none call global % configure ( indent = . false ., max_width = 72 ) end program example_configure log_debug - Writes the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with optional additional text. Syntax call self % log_debug ( message [, module, procedure ] ) Behavior If time stamps are active, a time stamp is written, followed\nby module and procedure if present, and then message is written with the prefix 'DEBUG: ' . It is ignored if the level of self is higher than debug_level . Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_information call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_information call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( selection ) integer , intent ( out ) :: selection character ( 128 ) :: errmsg , message integer :: stat write ( * , '(a)' ) \"Enter an integer to select a widget\" read ( * , '(i0)' ) selection write ( message , '(a, i0)' ) & \"The user selected \" , selection call logger % log_DEBUG ( message , & module = 'EXAMPLE_MOD' , procedure = 'EXAMPLE_SUB' ) end subroutine example_sub end module example_mod log_error - Writes the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with optional additional text. Syntax call self % log_error ( message [, module, procedure, stat, errmsg ] ) Behavior If time stamps are active for self , a time stamp is written,\nfollowed by module and procedure if present, then message is written with the prefix 'ERROR: ' , and then\nif stat or errmsg are present they are written. It is ignored if the level of self is higher than error_level . Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_error call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_error call. stat (optional): shall be a scalar default integer expression. It\n is an intent(in) argument. It should be the stat specifier of\n the subroutine call or intrinsic statement that prompted the log_error call. errmsg (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the errmsg specifier of the subroutine call or intrinsic statement\n that prompted the log_error call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( size ) integer , intent ( in ) :: size character ( 128 ) :: errmsg , message integer :: stat allocate ( a ( size ), stat = stat , errmsg = errmsg ) if ( stat /= 0 ) then write ( message , '(a, i0)' ) & \"Allocation of A failed with SIZE = \" , size call logger % log_error ( message , & module = 'EXAMPLE_MOD' , & procedure = 'EXAMPLE_SUB' , & stat = stat , & errmsg = errmsg ) end if end subroutine example_sub end module example_mod log_information - Writes the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with optional additional text. Syntax call self % log_information ( message [, module, procedure ] ) Behavior If time stamps are active, a time stamp is written, followed\nby module and procedure if present, and then message is written with the prefix 'INFO: ' . It is ignored if the level of self is higher than information_level . Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_information call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_information call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( selection ) integer , intent ( out ) :: selection character ( 128 ) :: errmsg , message integer :: stat write ( * , '(a)' ) \"Enter an integer to select a widget\" read ( * , '(i0)' ) selection write ( message , '(a, i0)' ) & \"The user selected \" , selection call logger % log_information ( message , & module = 'EXAMPLE_MOD' , procedure = 'EXAMPLE_SUB' ) end subroutine example_sub end module example_mod log_io_error - Write the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with\noptional additional text. Behavior If time stamps are active, a time stamp is written\nfirst. Then if module or procedure are present, they are\nwritten. Then message is written with the prefix 'I/O ERROR: ' . Then if iostat or iomsg are present they are\nwritten. It is ignored if the level of self is higher than io_error_level . Syntax call self % log_io_error ( message [, module, procedure, iostat, iomsg ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_io_error call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_io_error call. iostat (optional): shall be a scalar default integer\n expression. It is an intent(in) argument. It should be the iostat specifier of the subroutine call or intrinsic statement\n that prompted the log_io_error call. iomsg (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the iomsg specifier of the subroutine call or intrinsic statement\n that prompted the log_io_error call. Example program example_log_io_error use stdlib_logger , global => global_logger implicit none character ( * ), parameter :: filename = 'nodummy.txt' integer :: iostat , lun character ( 128 ) :: iomsg character ( * ), parameter :: message = & 'Failure in opening \"nodummy.txt\".' open ( newunit = lun , file = filename , form = 'formatted' , & status = 'old' , iostat = iostat , iomsg = iomsg ) if ( iostat /= 0 ) then call global % log_io_error ( message , & procedure = 'EXAMPLE' , & iostat = iostat , & iomsg = iomsg ) error stop 'Error on opening a file' end if end program example_log_io_error log_message - write the string message to self % log_units Status Experimental Description Writes the string message to self % log_units with\n optional additional text. Behavior If time stamps are active, a time stamp is written,\nthen module and procedure are written if present,\nfollowed by prefix \\\\ ': ' , if present, and finally message . No severity level is applied to log_message . Syntax call self % log_message ( message [, module, procedure, prefix ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_message call. procedure (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_message call. prefix (optional): shall be a scalar default character expression.\nIt is an intent(in) argument. It will precede message with an ': ' appended. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( selection ) integer , intent ( out ) :: selection integer :: stat write ( * , '(a)' ) \"Enter an integer to select a widget\" read ( * , '(i0)' ) selection write ( message , '(a, i0)' ) & \"The user selected \" , selection call logger % log_message ( message , & module = 'EXAMPLE_MOD' , & procedure = 'EXAMPLE_SUB' , & prefix = ` INFO ' ) end subroutine example_sub end module example_mod log_text_error - send a message to self % log_units describing an error Status Experimental Description log_text_error sends a message to self % log_units describing an error found in a line of text. Behavior If time stamps are active first a time stamp is\nwritten. Then if filename or line_number are present they are\nwritten with column . Then line is written. Then a caret, '^', is\nwritten below line at the column indicated by column . Then summary is written below the caret. It is ignored if the level of self is higher than text_error_level . Syntax call self % log_text_error ( line, column, summary [, filename, line_number, caret, stat ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. line : shall be a scalar default character expression. It is an intent(in) argument. It should be the line of text in which the\n error was found. column : shall be a scalar default integer expression. It is an intent(in) argument. It should be the one's based column at which\n the error begins. summary : shall be a scalar default character expression. It is an intent(in) argument. It should be a description of the error in line . filename (optional): shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the file, if any, in which line was found. line_number (optional): shall be a scalar default integer\n expression. It is an intent(in) argument. It should be the line\n number in filename associated with line . caret (optional): shall be a scalar default single character\n expression. It is an intent(in) argument. If present it will be\n placed below line on output to indicate the starting location of\n the error. It has a default value of '^'. stat (optional): shall be a scalar default integer variable. It\n is an intent(out) argument. If present it will have the value of success if no errors were encountered, the value index_invalid_error if column is less than one or greater than len(line)+1 , or the value write_fault if the writes to any of log_units failed. If stat is absent and would not have the value success then processing will stop with an informative stop code. Example program example_log_text_error use stdlib_logger implicit none character ( * ), parameter :: filename = 'dummy.txt' integer :: col_no , line_no , lun , status character ( 128 ) :: line character ( * ), parameter :: message = 'Bad text found.' open ( newunit = lun , file = filename , status = 'old' , & form = 'formatted' ) line_no = 0 do read ( lun , fmt = '(a)' , end = 900 ) line line_no = line_no + 1 call check_line ( line , status , col_no ) if ( status /= 0 ) then call global_logger % log_text_error ( line , & col_no , message , filename , line_no ) error stop 'Error in reading ' // filename end if end do 900 continue contains subroutine check_line ( line , status , col_no ) character ( * ), intent ( in ) :: line integer , intent ( inout ) :: status integer , intent ( inout ) :: col_no ! scan the line for forbidden characters col_no = scan ( line , \".$/\" ) ! col_no > 0 means there is a forbidden character status = col_no end subroutine end program example_log_text_error log_units_assigned - returns the number of active I/O units Status Experimental Description Returns the number of active I/O units in self % log_units Syntax result = self % log_units_assigned () Class Elemental function Argument self : shall be a scalar expression of type logger_type . It is an intent(in) argument. It is the logger whose state is queried. Result character The result shall be a scalar of type default integer. Result value The result is the number of I/O units in self % log_units . Example module example_mod use stdlib_logger type ( logger_type ) :: logger contains subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit integer , allocatable :: log_units (:) if ( logger % log_units_assigned () == 0 ) then call logger % add_log_unit ( unit ) end if end subroutine example_sub end module example_mod log_warning - write the string message to log_units Status Experimental Description Writes the string message to log_units with\n optional additional text. Behavior If time stamps are active, a time stamp is written,\nthen module and procedure if present, then message is written with the prefix WARN: ' . Syntax call self % log_warning ( message [, module, procedure ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(in) argument. It is the logger used to send the message. message : shall be a scalar default character expression. It is an intent(in) argument. Note message may have embedded new_line calls. module : (optional) shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the module containing the log_warning call. procedure : (optional) shall be a scalar default character\n expression. It is an intent(in) argument. It should be the name of\n the procedure containing the log_warning call. Example module example_mod use stdlib_logger real , allocatable :: a (:) type ( logger_type ) :: logger contains subroutine example_sub ( size , stat ) integer , intent ( in ) :: size integer , intent ( out ) :: stat allocate ( a ( size ) ) if ( stat /= 0 ) then write ( message , '(a, i0)' ) & \"Allocation of A failed with SIZE = \" , size call logger % log_warning ( message , & module = 'EXAMPLE_MOD' , & procedure = 'EXAMPLE_SUB' ) end if end subroutine example_sub end module example_mod remove_log_unit - remove unit from self % log_units Status Experimental Description Remove unit from the self % log_units list. If close_unit is present and .true. then the corresponding file is\nclosed. If unit is not in self % log_units then nothing is done. Syntax call self % remove_log_unit ( unit [, close_unit, stat ] ) Class Subroutine Arguments self : shall be a scalar variable of type logger_type . It is an intent(inout) argument. It is the logger whose log_units is to be\nmodified. unit : shall be a scalar default integer expression. It is an intent(in) argument. It should be one of the I/O unit numbers\n in self % log_units . If it is not, then nothing is done. close_unit (optional): shall be a scalar default logical\n expression. It is an intent(in) argument. If .true and unit is\n in self % log_units then unit will be closed, otherwise the I/O unit\n will be unaffected. stat (optional): shall be a scalar default integer variable. It is\n an intent(out) argument. If present it has the default value of success , but has the value close_failure if close_unit is\n present with the value .true. , and unit is initially in log_units , and closing unit fails. If stat is absent and\n closing the unit fails then processing stops with an informative\n stop code. Example module example_mod use stdlib_logger , global => global_logger contains subroutine example_sub ( unit , ...) integer , intent ( in ) :: unit call global % remove_log_unit ( unit ) end subroutine example_sub end module example_mod","tags":"","loc":"page/specs/stdlib_logger.html"},{"title":"math – Fortran-lang/stdlib","text":"The stdlib_math module The stdlib_math module Introduction Procedures and Methods provided clip function Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: Example 2: gcd function Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: linspace - Create a linearly spaced rank one array Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: Example 2: logspace - Create a logarithmically spaced rank one array Description Syntax Status Class Argument(s) Output value or Result value Examples Example 1: Example 2: Example 3: arange function Status Class Description Syntax Arguments Warning Return value Example arg function Status Class Description Syntax Arguments Return value Example argd function Status Class Description Syntax Arguments Return value Example argpi function Status Class Description Syntax Arguments Return value Example is_close function Description Syntax Status Class Arguments Result value Example all_close function Description Syntax Status Class Arguments Result value Example diff function Description Syntax Status Class Arguments Result value Example meshgrid subroutine Description Syntax Status Class Arguments Example Introduction stdlib_math module provides general purpose mathematical functions. Procedures and Methods provided clip function Description Returns a value which lies in the given interval [ xmin , xmax ] (interval is xmin and xmax inclusive) and is closest to the input value x . Syntax res = clip (x, xmin, xmax) Status Experimental Class Elemental function. Argument(s) x : scalar of either integer or real type. This argument is intent(in) . xmin : scalar of either integer or real type. This argument is intent(in) . xmax : scalar of either integer or real type, which must be greater than or equal to xmin . This argument is intent(in) . Note: All arguments must have same type and same kind . Output value or Result value The output is a scalar of type and kind same as to that of the arguments. Examples Example 1: Here inputs are of type integer and kind int32 program example_clip_integer use stdlib_math , only : clip use stdlib_kinds , only : int32 implicit none integer ( int32 ) :: x integer ( int32 ) :: xmin integer ( int32 ) :: xmax integer ( int32 ) :: clipped_value xmin = - 5_int32 xmax = 5_int32 x = 12_int32 clipped_value = clip ( x , xmin , xmax ) ! clipped_value <- 5 end program example_clip_integer Example 2: Here inputs are of type real and kind sp program example_clip_real use stdlib_math , only : clip use stdlib_kinds , only : sp implicit none real ( sp ) :: x real ( sp ) :: xmin real ( sp ) :: xmax real ( sp ) :: clipped_value xmin = - 5.769_sp xmax = 3.025_sp x = 3.025_sp clipped_value = clip ( x , xmin , xmax ) ! clipped_value <- 3.02500010 end program example_clip_real gcd function Description Returns the greatest common divisor of two integers. Syntax res = gcd (a, b) Status Experimental Class Elemental function. Argument(s) a : One integer with intent(in) to get the divisor for. b : Another integer with intent(in) to get the divisor for. Note: All arguments must be integers of the same kind . Output value or Result value Returns an integer of the same kind as that of the arguments. Examples Example 1: program example_gcd use stdlib_math , only : gcd implicit none integer :: a , b , c a = 48 b = 18 c = gcd ( a , b ) ! returns 6 end program example_gcd linspace - Create a linearly spaced rank one array Description Returns a linearly spaced rank 1 array from [ start , end ]. Optionally, you can specify the length of the returned array by passing n . Syntax res = linspace (start, end [, n]) Status Experimental Class Pure function. Argument(s) start : Shall be scalar of any numeric type or kind. This argument is intent(in) . end : Shall be the same type and kind as start . This argument is intent(in) . n : Shall be an integer specifying the length of the output. This argument is optional and intent(in) . Output value or Result value The output is a rank 1 array whose length is either 100 (default value) or n . If n == 1, return a rank 1 array whose only element is end .\nIf n <= 0, return a rank 1 array with length 0. If start / end are real or complex types, the result will be of the same type and kind as start / end .\nIf start / end are integer types, the result will default to a real(dp) array. Examples Example 1: Here inputs are of type complex and kind dp program example_linspace_complex use stdlib_math , only : linspace use stdlib_kinds , only : dp implicit none complex ( dp ) :: start = cmplx ( 1 0.0_dp , 5.0_dp , kind = dp ) complex ( dp ) :: end = cmplx ( - 1 0.0_dp , 1 5.0_dp , kind = dp ) complex ( dp ) :: z ( 11 ) z = linspace ( start , end , 11 ) end program example_linspace_complex Example 2: Here inputs are of type integer and kind int16 , with the result defaulting to real(dp) . program example_linspace_int16 use stdlib_math , only : linspace use stdlib_kinds , only : int16 , dp implicit none integer ( int16 ) :: start = 10_int16 integer ( int16 ) :: end = 23_int16 real ( dp ) :: r ( 15 ) r = linspace ( start , end , 15 ) end program example_linspace_int16 logspace - Create a logarithmically spaced rank one array Description Returns a logarithmically spaced rank 1 array from [ base ^ start , base ^ end ]. The default size of the array is 50. Optionally, you can specify the length of the returned array by passing n . You can also specify the base used to compute the range (default 10). Syntax res = logspace (start, end [, n [, base]]) Status Experimental Class Pure function. Argument(s) start : Shall be a scalar of any numeric type. All kinds are supported for real and complex arguments. For integers, only the default kind is currently implemented. This argument is intent(in) . end : Shall be the same type and kind as start . This argument is intent(in) . n : Shall be an integer specifying the length of the output. This argument is optional and intent(in) . base : Shall be a scalar of any numeric type. All kinds are supported for real and complex arguments. For integers, only the default kind is currently implemented. This argument is optional and intent(in) . Output value or Result value The output is a rank 1 array whose length is either 50 (default value) or n . If n == 1, return a rank 1 array whose only element is base ^ end .\nIf n <= 0, return a rank 1 array with length 0 The type and kind of the output is dependent on the type and kind of the passed parameters. For function calls where the base is not specified: logspace(start, end) / logspace(start, end, n) , the type and kind of\nthe output follows the same scheme as above for linspace . If start / end are real or complex types, the result will be the same type and kind as start / end .\nIf start / end are integer types, the result will default to a real(dp) array. For function calls where the base is specified, the type and kind of the result is in accordance with the following table: start / end n base output real(KIND) Integer real(KIND) real(KIND) \" \" \" \" complex(KIND) complex(KIND) \" \" \" \" Integer real(KIND) complex(KIND) \" \" real(KIND) complex(KIND) \" \" \" \" complex(KIND) complex(KIND) \" \" \" \" Integer complex(KIND) Integer \" \" real(KIND) real(KIND) \" \" \" \" complex(KIND) complex(KIND) \" \" \" \" Integer Integer Examples Example 1: Here inputs are of type complex and kind dp . n and base is not specified and thus default to 50 and 10, respectively. program example_logspace_complex use stdlib_math , only : logspace use stdlib_kinds , only : dp implicit none complex ( dp ) :: start = ( 1 0.0_dp , 5.0_dp ) complex ( dp ) :: end = ( - 1 0.0_dp , 1 5.0_dp ) complex ( dp ) :: z ( 11 ) ! Complex values raised to complex powers results in complex values z = logspace ( start , end , 11 ) end program example_logspace_complex Example 2: Here inputs are of type integer and default kind. base is not specified and thus defaults to 10. program example_logspace_int use stdlib_math , only : logspace use stdlib_kinds , only : dp implicit none integer , parameter :: start = 10 integer , parameter :: end = 23 integer , parameter :: n = 15 real ( dp ) :: r ( n ) ! Integer values raised to real powers results in real values r = logspace ( start , end , n ) end program example_logspace_int Example 3: Here start / end are of type real and double precision. base is type complex and also double precision. program example_logspace_rstart_cbase use stdlib_math , only : logspace use stdlib_kinds , only : dp implicit none real ( dp ) :: start = 0.0_dp real ( dp ) :: end = 3.0_dp integer , parameter :: n = 4 complex ( dp ) :: base = ( 0.0_dp , 1.0_dp ) complex ( dp ) :: z ( n ) ! complex values raised to real powers result in complex values z = logspace ( start , end , n , base ) end program example_logspace_rstart_cbase arange function Status Experimental Class Pure function. Description Creates a rank-1 array of the integer/real type with fixed-spaced values of given spacing, within a given interval. Syntax result = arange (start [, end, step]) Arguments All arguments should be the same type and kind. start : Shall be an integer/real scalar.\nThis is an intent(in) argument. The default start value is 1 . end : Shall be an integer/real scalar.\nThis is an intent(in) and optional argument. The default end value is the inputted start value. step : Shall be an integer/real scalar and large than 0 . \nThis is an intent(in) and optional argument. The default step value is 1 . Warning If step = 0 , the step argument will be corrected to 1/1.0 by the internal process of the arange function. If step < 0 , the step argument will be corrected to abs(step) by the internal process of the arange function. Return value Returns a rank-1 array of fixed-spaced values. For integer type arguments, the length of the result vector is (end - start)/step + 1 . For real type arguments, the length of the result vector is floor((end - start)/step) + 1 . Example program example_math_arange use stdlib_math , only : arange implicit none print * , arange ( 3 ) ! [1,2,3] print * , arange ( - 1 ) ! [1,0,-1] print * , arange ( 0 , 2 ) ! [0,1,2] print * , arange ( 1 , - 1 ) ! [1,0,-1] print * , arange ( 0 , 2 , 2 ) ! [0,2] print * , arange ( 3.0 ) ! [1.0,2.0,3.0] print * , arange ( 0.0 , 5.0 ) ! [0.0,1.0,2.0,3.0,4.0,5.0] print * , arange ( 0.0 , 6.0 , 2.5 ) ! [0.0,2.5,5.0] print * , ( 1.0 , 1.0 ) * arange ( 3 ) ! [(1.0,1.0),(2.0,2.0),[3.0,3.0]] print * , arange ( 0.0 , 2.0 , - 2.0 ) ! [0.0,2.0]. Not recommended: `step` argument is negative! print * , arange ( 0.0 , 2.0 , 0.0 ) ! [0.0,1.0,2.0]. Not recommended: `step` argument is zero! end program example_math_arange arg function Status Experimental Class Elemental function. Description arg computes the phase angle (radian version) of complex scalar in the interval (-π,π]. \nThe angles in θ are such that z = abs(z)*exp((0.0, θ)) . Syntax result = arg (z) Arguments z : Shall be a complex scalar/array.\nThis is an intent(in) argument. Return value Returns the real type phase angle (radian version) of the complex argument z . Notes: Although the angle of the complex number 0 is undefined, arg((0,0)) returns the value 0 . Example program example_math_arg use stdlib_math , only : arg implicit none print * , arg (( 0.0 , 0.0 )) ! 0.0 print * , arg (( 3.0 , 4.0 )) ! 0.927 print * , arg ( 2.0 * exp (( 0.0 , 0.5 ))) ! 0.5 print * , arg ([( 0.0 , 1.0 ), ( 1.0 , 0.0 ), ( 0.0 , - 1.0 ), ( - 1.0 , 0.0 )]) ! [π/2, 0.0, -π/2, π] end program example_math_arg argd function Status Experimental Class Elemental function. Description argd computes the phase angle (degree version) of complex scalar in the interval (-180.0,180.0]. \nThe angles in θ are such that z = abs(z)*exp((0.0, θ*π/180.0)) . Syntax result = argd (z) Arguments z : Shall be a complex scalar/array.\nThis is an intent(in) argument. Return value Returns the real type phase angle (degree version) of the complex argument z . Notes: Although the angle of the complex number 0 is undefined, argd((0,0)) returns the value 0 . Example program example_math_argd use stdlib_math , only : argd implicit none print * , argd (( 0.0 , 0.0 )) ! 0.0° print * , argd (( 3.0 , 4.0 )) ! 53.1° print * , argd ( 2.0 * exp (( 0.0 , 0.5 ))) ! 28.64° print * , argd ([( 0.0 , 1.0 ), ( 1.0 , 0.0 ), ( 0.0 , - 1.0 ), ( - 1.0 , 0.0 )]) ! [90°, 0°, -90°, 180°] end program example_math_argd argpi function Status Experimental Class Elemental function. Description argpi computes the phase angle (IEEE circular version) of complex scalar in the interval (-1.0,1.0]. \nThe angles in θ are such that z = abs(z)*exp((0.0, θ*π)) . Syntax result = argpi (z) Arguments z : Shall be a complex scalar/array.\nThis is an intent(in) argument. Return value Returns the real type phase angle (circular version) of the complex argument z . Notes: Although the angle of the complex number 0 is undefined, argpi((0,0)) returns the value 0 . Example program example_math_argpi use stdlib_math , only : argpi implicit none print * , argpi (( 0.0 , 0.0 )) ! 0.0 print * , argpi (( 3.0 , 4.0 )) ! 0.295 print * , argpi ( 2.0 * exp (( 0.0 , 0.5 ))) ! 0.159 print * , argpi ([( 0.0 , 1.0 ), ( 1.0 , 0.0 ), ( 0.0 , - 1.0 ), ( - 1.0 , 0.0 )]) ! [0.5, 0.0, -0.5, 1.0] end program example_math_argpi is_close function Description Returns a boolean scalar/array where two scalars/arrays are element-wise equal within a tolerance. !> For `real` type is_close ( a , b , rel_tol , abs_tol ) = abs ( a - b ) <= max ( rel_tol * ( abs ( a ), abs ( b )), abs_tol ) !> and for `complex` type is_close ( a , b , rel_tol , abs_tol ) = is_close ( a % re , b % re , rel_tol , abs_tol ) . and . & is_close ( a % im , b % im , rel_tol , abs_tol ) Syntax bool = is_close (a, b [, rel_tol, abs_tol, equal_nan]) Status Experimental. Class Elemental function. Arguments Note: All real/complex arguments must have same kind . If the value of rel_tol/abs_tol is negative (not recommended), \nit will be corrected to abs(rel_tol/abs_tol) by the internal process of is_close . a : Shall be a real/complex scalar/array.\nThis argument is intent(in) . b : Shall be a real/complex scalar/array.\nThis argument is intent(in) . rel_tol : Shall be a real scalar/array.\nThis argument is intent(in) and optional , which is sqrt(epsilon(..)) by default. abs_tol : Shall be a real scalar/array.\nThis argument is intent(in) and optional , which is 0.0 by default. equal_nan : Shall be a logical scalar/array.\nThis argument is intent(in) and optional , which is .false. by default.\nWhether to compare NaN values as equal. If .true. , NaN values in a will be considered equal to NaN values in b . Result value Returns a logical scalar/array. Example program example_math_is_close use stdlib_math , only : is_close implicit none real :: x ( 2 ) = [ 1 , 2 ], y , NAN y = - 3 NAN = sqrt ( y ) print * , is_close ( x , [ real :: 1 , 2.1 ]) ! [T, F] print * , is_close ( 2.0 , 2.1 , abs_tol = 0.1 ) ! T print * , NAN , is_close ( 2.0 , NAN ), is_close ( 2.0 , NAN , equal_nan = . true .) ! NAN, F, F print * , is_close ( NAN , NAN ), is_close ( NAN , NAN , equal_nan = . true .) ! F, T end program example_math_is_close all_close function Description Returns a boolean scalar where two arrays are element-wise equal within a tolerance. Syntax bool = all_close (a, b [, rel_tol, abs_tol, equal_nan]) Status Experimental. Class Pure function. Arguments Note: All real/complex arguments must have same kind . If the value of rel_tol/abs_tol is negative (not recommended), \nit will be corrected to abs(rel_tol/abs_tol) by the internal process of all_close . a : Shall be a real/complex array.\nThis argument is intent(in) . b : Shall be a real/complex array.\nThis argument is intent(in) . rel_tol : Shall be a real scalar.\nThis argument is intent(in) and optional , which is sqrt(epsilon(..)) by default. abs_tol : Shall be a real scalar.\nThis argument is intent(in) and optional , which is 0.0 by default. equal_nan : Shall be a logical scalar.\nThis argument is intent(in) and optional , which is .false. by default.\nWhether to compare NaN values as equal. If .true. , NaN values in a will be considered equal to NaN values in b . Result value Returns a logical scalar. Example program example_math_all_close use stdlib_math , only : all_close implicit none real :: y , NAN complex :: z ( 4 , 4 ) y = - 3 NAN = sqrt ( y ) z = ( 1.0 , 1.0 ) print * , all_close ( z + cmplx ( 1.0e-11 , 1.0e-11 ), z ) ! T print * , NAN , all_close ([ NAN ], [ NAN ]), all_close ([ NAN ], [ NAN ], equal_nan = . true .) ! NAN, F, T end program example_math_all_close diff function Description Computes differences between adjacent elements of an array. Syntax For a rank-1 array: y = diff (x [, n, prepend, append]) and for a rank-2 array: y = diff (x [, n, dim, prepend, append]) Status Experimental. Class Pure function. Arguments x : The array to take a difference of.\nShall be a real/integer and rank-1/rank-2 array.\nThis argument is intent(in) . n : How many times to iteratively calculate the difference.\nShall be an integer scalar.\nThis argument is intent(in) and optional , and has value of 1 by default. dim : The dimension of the input array along which to calculate the difference.\nIts value must be between 1 and rank(x) .\nShall be an integer scalar.\nThis argument is intent(in) and optional and has a value of 1 by default. prepend , append : Arrays to prepend or append to a along axis prior to performing the difference.\nThe dimension and shape must match a except along axis.\nShall be a real/integer and rank-1/rank-2 array.\nThis argument is intent(in) and optional , which is no value by default. Note: The x , prepend and append arguments must have the same type , kind and rank . If the value of n is less than or equal to 0 (which is not recommended), the return value of diff is x . If the value of dim is not equal to 1 or 2 (which is not recommended), 1 will be used by the internal process of diff . Result value Returns the finite difference of the input array.\nShall be a real/integer and rank-1/rank-2 array.\nWhen both prepend and append are not present, the result y has one fewer element than x alongside the dimension dim . Example program example_diff use stdlib_math , only : diff implicit none integer :: i ( 7 ) = [ 1 , 1 , 2 , 3 , 5 , 8 , 13 ] real :: x ( 6 ) = [ 0 , 5 , 15 , 30 , 50 , 75 ] integer :: A ( 3 , 3 ) = reshape ([ 1 , 7 , 17 , 3 , 11 , 19 , 5 , 13 , 23 ], [ 3 , 3 ]) integer :: Y ( 3 , 2 ) print * , diff ( i ) ! [0, 1, 1, 2, 3, 5] print * , diff ( x , 2 ) ! [5.0, 5.0, 5.0, 5.0] Y = diff ( A , n = 1 , dim = 2 ) print * , Y ( 1 , :) ! [2, 2] print * , Y ( 2 , :) ! [4, 2] print * , Y ( 3 , :) ! [2, 4] print * , diff ( i , prepend = [ 0 ]) ! [1, 0, 1, 1, 2, 3, 5] print * , diff ( i , append = [ 21 ]) ! [0, 1, 1, 2, 3, 5, 8] end program example_diff meshgrid subroutine Description Computes a list of coordinate matrices from coordinate vectors. For $n \\geq 1$ coordinate vectors $(x_1, x_2, ..., x_n)$ of sizes $(s_1, s_2, ..., s_n)$, meshgrid computes $n$ coordinate matrices $(X_1, X_2, ..., X_n)$ with identical shape corresponding to the selected indexing:\n- Cartesian indexing (default behavior): the shape of the coordinate matrices is $(s_2, s_1, s_3, s_4, ... s_n)$.\n- matrix indexing: the shape of the coordinate matrices is $(s_1, s_2, s_3, s_4, ... s_n)$. Syntax For a 2D problem in Cartesian indexing: call meshgrid (x, y, xm, ym) For a 3D problem in Cartesian indexing: call meshgrid (x, y, z, xm, ym, zm) For a 3D problem in matrix indexing: call meshgrid (x, y, z, xm, ym, zm, indexing=\"ij\") The subroutine can be called in n -dimensional situations, as long as n is inferior to the maximum allowed array rank. Status Experimental. Class Subroutine. Arguments For a n -dimensional problem, with n >= 1 : x1, x2, ..., xn : The coordinate vectors.\nShall be real/integer and rank-1 arrays.\nThese arguments are intent(in) . xm1, xm2, ..., xmn : The coordinate matrices.\nShall be arrays of type real or integer of adequate shape:\n- for Cartesian indexing, the shape of the coordinate matrices must be [size(x2), size(x1), size(x3), ..., size(xn)] .\n- for matrix indexing, the shape of the coordinate matrices must be [size(x1), size(x2), size(x3), ..., size(xn)] . These argument are intent(out) . indexing : the selected indexing.\nShall be an integer equal to stdlib_meshgrid_xy for Cartesian indexing (default), or stdlib_meshgrid_ij for matrix indexing. stdlib_meshgrid_xy and stdlib_meshgrid_ij are public constants defined in the module.\nThis argument is intent(in) and optional , and is equal to stdlib_meshgrid_xy by default. Example program example_meshgrid use stdlib_math , only : meshgrid , linspace , stdlib_meshgrid_ij use stdlib_kinds , only : sp implicit none integer , parameter :: nx = 3 , ny = 2 real ( sp ) :: x ( nx ), y ( ny ), & xm_cart ( ny , nx ), ym_cart ( ny , nx ), & xm_mat ( nx , ny ), ym_mat ( nx , ny ) x = linspace ( 0_sp , 1_sp , nx ) y = linspace ( 0_sp , 1_sp , ny ) call meshgrid ( x , y , xm_cart , ym_cart ) print * , \"xm_cart = \" call print_2d_array ( xm_cart ) print * , \"ym_cart = \" call print_2d_array ( ym_cart ) call meshgrid ( x , y , xm_mat , ym_mat , indexing = stdlib_meshgrid_ij ) print * , \"xm_mat = \" call print_2d_array ( xm_mat ) print * , \"ym_mat = \" call print_2d_array ( ym_mat ) contains subroutine print_2d_array ( array ) real ( sp ), intent ( in ) :: array (:, :) integer :: i do i = 1 , size ( array , dim = 1 ) print * , array ( i , :) end do end subroutine end program example_meshgrid","tags":"","loc":"page/specs/stdlib_math.html"},{"title":"optval – Fortran-lang/stdlib","text":"Default values for optional arguments Default values for optional arguments optval - fallback value for optional arguments Status Description Syntax Arguments Return value Example optval - fallback value for optional arguments Status Experimental Description Returns x if it is present, otherwise default . This function is intended to be called in a procedure with one or more optional arguments, in order to conveniently fall back to a default value if an optional argument is not present. Syntax result = optval (x, default) Arguments x : Shall be of type integer , real , complex , or logical , or a scalar of type character . default : Shall have the same type, kind, and rank as x . Return value If x is present, the result is x , otherwise the result is default . Example program example_optval use stdlib_optval , only : optval implicit none print * , root ( 6 4.0 ) ! 8.0 print * , root ( 6 4.0 , 3 ) ! 4.0 contains real function root ( x , n ) real , intent ( in ) :: x integer , intent ( in ), optional :: n root = x ** ( 1.0 / optval ( n , 2 )) end function root end program example_optval","tags":"","loc":"page/specs/stdlib_optval.html"},{"title":"quadrature – Fortran-lang/stdlib","text":"Numerical integration Numerical integration trapz - integrate sampled values using trapezoidal rule Status Description Syntax Arguments Return value Example trapz_weights - trapezoidal rule weights for given abscissas Status Description Syntax Arguments Return value Example simps - integrate sampled values using Simpson's rule Status Description Syntax Arguments Return value Example simps_weights - Simpson's rule weights for given abscissas Status Description Syntax Arguments Return value Example gauss_legendre - Gauss-Legendre quadrature (a.k.a. Gaussian quadrature) nodes and weights Status Description Syntax Arguments Example gauss_legendre_lobatto - Gauss-Legendre-Lobatto quadrature nodes and weights Status Description Syntax Arguments Example trapz - integrate sampled values using trapezoidal rule Status Experimental Description Returns the trapezoidal rule integral of an array y representing discrete samples of a function. The integral is computed assuming either equidistant abscissas with spacing dx or arbitrary abscissas x . Syntax result = trapz (y, x) result = trapz (y, dx) Arguments y : Shall be a rank-one array of type real . x : Shall be a rank-one array of type real having the same kind and size as y . dx : Shall be a scalar of type real having the same kind as y . Return value The result is a scalar of type real having the same kind as y . If the size of y is zero or one, the result is zero. Example program example_trapz use stdlib_quadrature , only : trapz implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = x ** 2 print * , trapz ( y , x ) ! 22.0 print * , trapz ( y , 0.5 ) ! 11.0 end program example_trapz trapz_weights - trapezoidal rule weights for given abscissas Status Experimental Description Given an array of abscissas x , computes the array of weights w such that if y represented function values tabulated at x , then sum(w*y) produces a trapezoidal rule approximation to the integral. Syntax result = trapz_weights (x) Arguments x : Shall be a rank-one array of type real . Return value The result is a real array with the same size and kind as x . If the size of x is one, then the sole element of the result is zero. Example program example_trapz_weights use stdlib_quadrature , only : trapz_weights implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = x ** 2 real :: w ( 5 ) w = trapz_weights ( x ) print * , sum ( w * y ) ! 22.0 end program example_trapz_weights simps - integrate sampled values using Simpson's rule Status Experimental Description Returns the Simpson's rule integral of an array y representing discrete samples of a function. The integral is computed assuming either equidistant abscissas with spacing dx or arbitrary abscissas x . Simpson's ordinary (\"1/3\") rule is used for odd-length arrays. For even-length arrays, Simpson's 3/8 rule is also utilized in a way that depends on the value of even . If even is negative (positive), the 3/8 rule is used at the beginning (end) of the array. If even is zero or not present, the result is as if the 3/8 rule were first used at the beginning of the array, then at the end of the array, and these two results were averaged. Syntax result = simps (y, x [, even]) result = simps (y, dx [, even]) Arguments y : Shall be a rank-one array of type real . x : Shall be a rank-one array of type real having the same kind and size as y . dx : Shall be a scalar of type real having the same kind as y . even : (Optional) Shall be a default-kind integer . Return value The result is a scalar of type real having the same kind as y . If the size of y is zero or one, the result is zero. If the size of y is two, the result is the same as if trapz had been called instead. Example program example_simps use stdlib_quadrature , only : simps implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = 3. * x ** 2 print * , simps ( y , x ) ! 64.0 print * , simps ( y , 0.5 ) ! 32.0 end program example_simps simps_weights - Simpson's rule weights for given abscissas Status Experimental Description Given an array of abscissas x , computes the array of weights w such that if y represented function values tabulated at x , then sum(w*y) produces a Simpson's rule approximation to the integral. Simpson's ordinary (\"1/3\") rule is used for odd-length arrays. For even-length arrays, Simpson's 3/8 rule is also utilized in a way that depends on the value of even . If even is negative (positive), the 3/8 rule is used at the beginning (end) of the array and the 1/3 rule used elsewhere. If even is zero or not present, the result is as if the 3/8 rule were first used at the beginning of the array, then at the end of the array, and then these two results were averaged. Syntax result = simps_weights (x [, even]) Arguments x : Shall be a rank-one array of type real . even : (Optional) Shall be a default-kind integer . Return value The result is a real array with the same size and kind as x . If the size of x is one, then the sole element of the result is zero. If the size of x is two, then the result is the same as if trapz_weights had been called instead. Example program example_simps_weights use stdlib_quadrature , only : simps_weights implicit none real , parameter :: x ( 5 ) = [ 0. , 1. , 2. , 3. , 4. ] real :: y ( 5 ) = 3. * x ** 2 real :: w ( 5 ) w = simps_weights ( x ) print * , sum ( w * y ) ! 64.0 end program example_simps_weights gauss_legendre - Gauss-Legendre quadrature (a.k.a. Gaussian quadrature) nodes and weights Status Experimental Description Computes Gauss-Legendre quadrature (also known as simply Gaussian quadrature) nodes and weights,\n for any N (number of nodes).\nUsing the nodes x and weights w , you can compute the integral of some function f as follows: integral = sum(f(x) * w) . Only double precision is supported - if lower precision is required, you must do the appropriate conversion yourself.\nAccuracy has been validated up to N=64 by comparing computed results to tablulated values known to be accurate to machine precision\n(maximum difference from those values is 2 epsilon). Syntax subroutine gauss_legendre (x, w[, interval]) Arguments x : Shall be a rank-one array of type real(real64) . It is an output argument, representing the quadrature nodes. w : Shall be a rank-one array of type real(real64) , with the same dimension as x . \nIt is an output argument, representing the quadrature weights. interval : (Optional) Shall be a two-element array of type real(real64) . \nIf present, the nodes and weigts are calculated for integration from interval(1) to interval(2) .\nIf not specified, the default integral is -1 to 1. Example program example_gauss_legendre use iso_fortran_env , dp => real64 use stdlib_quadrature , only : gauss_legendre implicit none integer , parameter :: N = 6 real ( dp ), dimension ( N ) :: x , w call gauss_legendre ( x , w ) print * , \"integral of x**2 from -1 to 1 is\" , sum ( x ** 2 * w ) end program example_gauss_legendre gauss_legendre_lobatto - Gauss-Legendre-Lobatto quadrature nodes and weights Status Experimental Description Computes Gauss-Legendre-Lobatto quadrature nodes and weights,\n for any N (number of nodes).\nUsing the nodes x and weights w , you can compute the integral of some function f as follows: integral = sum(f(x) * w) . Only double precision is supported - if lower precision is required, you must do the appropriate conversion yourself.\nAccuracy has been validated up to N=64 by comparing computed results to tablulated values known to be accurate to machine precision\n(maximum difference from those values is 2 epsilon). Syntax subroutine gauss_legendre_lobatto (x, w[, interval]) Arguments x : Shall be a rank-one array of type real(real64) . It is an output argument, representing the quadrature nodes. w : Shall be a rank-one array of type real(real64) , with the same dimension as x . \nIt is an output argument, representing the quadrature weights. interval : (Optional) Shall be a two-element array of type real(real64) . \nIf present, the nodes and weigts are calculated for integration from interval(1) to interval(2) .\nIf not specified, the default integral is -1 to 1. Example program example_gauss_legendre_lobatto use iso_fortran_env , dp => real64 use stdlib_quadrature , only : gauss_legendre_lobatto implicit none integer , parameter :: N = 6 real ( dp ), dimension ( N ) :: x , w call gauss_legendre_lobatto ( x , w ) print * , \"integral of x**2 from -1 to 1 is\" , sum ( x ** 2 * w ) end program example_gauss_legendre_lobatto","tags":"","loc":"page/specs/stdlib_quadrature.html"},{"title":"random – Fortran-lang/stdlib","text":"Statistical Distributions -- Pseudorandom Number Generator Module Statistical Distributions -- Pseudorandom Number Generator Module random_seed - set or get a value of seed to the probability distribution pseudorandom number generator Status Description Syntax Arguments Return value Example dist_rand - Get a random integer with specified kind Status Description Syntax Arguments Return value Example random_seed - set or get a value of seed to the probability distribution pseudorandom number generator Status Experimental Description Set or get the seed value before calling the probability distribution pseudorandom number generator for variates. Syntax call random_seed (put, get) Arguments put : argument has intent(in) and may be a scalar of type integer . get : argument has intent(out) and is a scalar of type integer . Return value Return a scalar of type integer . Example program example_random_seed use stdlib_random , only : random_seed implicit none integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! set and get current value of seed end program example_random_seed dist_rand - Get a random integer with specified kind Status Experimental Description Generate an integer pseudorandom number in a specific range [-2^k, 2^k - 1] according to the input integer kind n. This pseudorandom number will be operated by bit opeartors instead of normal arithmetic operators. Syntax result = dist_rand (n) Arguments n : argument has intent(in) is a scalar of type integer . Return value Return a scalar of type integer . Example program example_dist_rand use stdlib_kinds , only : int8 , int16 , int32 , int64 use stdlib_random , only : dist_rand , random_seed implicit none integer :: put , get put = 135792468 call random_seed ( put , get ) ! set and get current value of seed print * , dist_rand ( 1_int8 ) ! random integer in [-2^7, 2^7 - 1] ! -90 print * , dist_rand ( 1_int16 ) ! random integer in [-2^15, 2^15 - 1] ! -32725 print * , dist_rand ( 1_int32 ) ! random integer in [-2^31, 2^31 - 1] ! -1601563881 print * , dist_rand ( 1_int64 ) ! random integer in [-2^63, 2^63 - 1] ! 180977695517992208 end program example_dist_rand","tags":"","loc":"page/specs/stdlib_random.html"},{"title":"selection – Fortran-lang/stdlib","text":"The stdlib_selection module The stdlib_selection module Overview of selection Overview of the module select - find the k-th smallest value in an input array Status Description Syntax Class Arguments Notes Example arg_select - find the index of the k-th smallest value in an input array Status Description Syntax Class Arguments Notes Example Comparison with using sort Overview of selection Suppose you wish to find the value of the k-th smallest entry in an array of size N, or\nthe index of that value. While it could be done by sorting the whole array\nusing sort or sort_index from stdlib_sorting and then finding the k-th entry, that would\nrequire O(N x LOG(N)) time. However selection of a single entry can be done in\nO(N) time, which is much faster for large arrays. This is useful, for example,\nto quickly find the median of an array, or some other percentile. The Fortran Standard Library therefore provides a module, stdlib_selection ,\nwhich implements selection algorithms. Overview of the module The module stdlib_selection defines two generic subroutines: select is used to find the k-th smallest entry of an array. The input\narray is also modified in-place, and on return will be partially sorted\nsuch that all(array(1:k) <= array(k))) and all(array(k) <= array((k+1):size(array))) is true.\nThe user can optionally specify left and right indices to constrain the search\nfor the k-th smallest value. This can be useful if you have previously called select to find a smaller or larger rank (that will have led to partial sorting of array , thus implying some constraints on the location). arg_select is used to find the index of the k-th smallest entry of an array.\nIn this case the input array is not modified, but the user must provide an\ninput index array with the same size as array , having indices that are a permutation of 1:size(array) , which is modified instead. On return the index array is modified\nsuch that all(array(index(1:k)) <= array(index(k))) and all(array(k) <= array(k+1:size(array))) .\nThe user can optionally specify left and right indices to constrain the search\nfor the k-th smallest value. This can be useful if you have previously called arg_select to find a smaller or larger rank (that will have led to partial sorting of index , thus implying some constraints on the location). select - find the k-th smallest value in an input array Status Experimental Description Returns the k-th smallest value of array(:) , and also partially sorts array(:) such that all(array(1:k) <= array(k)) and all(array(k) <= array((k+1):size(array))) Syntax call select ( array, k, kth_smallest [, left, right ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(xdp) , real(qp) . It is an intent(inout) argument. k : shall be a scalar with any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) . It\nis an intent(in) argument. We search for the k -th smallest entry of array(:) . kth_smallest : shall be a scalar with the same type as array . It is an intent(out) argument. On return it contains the k-th smallest entry of array(:) . left (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is\ndefinitely contained in array(left:size(array)) . If left is not present,\nthe default is 1. This is typically useful if multiple calls to select are\nmade, because the partial sorting of array implies constraints on where we\nneed to search. right (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is\ndefinitely contained in array(1:right) . If right is not present, the\ndefault is size(array) . This is typically useful if multiple calls to select are made, because the partial sorting of array implies constraints\non where we need to search. Notes Selection of a single value should have runtime of O( size(array) ), so it is\nasymptotically faster than sorting array entirely. The test program at the\nend of this document shows that is the case. The code does not support NaN elements in array ; it will run, but there is\nno consistent interpretation given to the order of NaN entries of array compared to other entries. select was derived from code in the Coretran library by Leon Foks,\nhttps://github.com/leonfoks/coretran. Leon Foks has given permission for the\ncode here to be released under stdlib's MIT license. Example program example_select use stdlib_selection , only : select implicit none real , allocatable :: array (:) real :: kth_smallest integer :: k array = [ 3. , 2. , 7. , 4. , 5. , 1. , 4. , - 1. ] k = 2 call select ( array , k , kth_smallest ) print * , kth_smallest ! print 1.0 k = 7 ! Due to the previous call to select, we know for sure this is in an ! index >= 2 call select ( array , k , kth_smallest , left = 2 ) print * , kth_smallest ! print 5.0 k = 6 ! Due to the previous two calls to select, we know for sure this is in ! an index >= 2 and <= 7 call select ( array , k , kth_smallest , left = 2 , right = 7 ) print * , kth_smallest ! print 4.0 end program example_select arg_select - find the index of the k-th smallest value in an input array Status Experimental Description Returns the index of the k-th smallest value of array(:) , and also partially sorts\nthe index-array indx(:) such that all(array(indx(1:k)) <= array(indx(k))) and all(array(indx(k)) <= array(indx((k+1):size(array)))) Syntax call arg_select ( array, indx, k, kth_smallest [, left, right ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(xdp) , real(qp) . It is an intent(in) argument. On input it is\nthe array in which we search for the k-th smallest entry. indx : shall be a rank one array with the same size as array , containing all integers\nfrom 1:size(array) in any order. It is of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) . It is an intent(inout) argument. On return its elements will define a partial sorting of array(:) such that: all( array(indx(1:k-1)) <= array(indx(k)) ) and all(array(indx(k)) <= array(indx(k+1:size(array)))) . k : shall be a scalar with the same type as indx . It is an intent(in) argument. We search for the k -th smallest entry of array(:) . kth_smallest : a scalar with the same type as indx . It is an intent(out) argument,\nand on return it contains the index of the k-th smallest entry of array(:) . left (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is definitely contained\nin array(indx(left:size(array))) . If left is not present, the default is 1.\nThis is typically useful if multiple calls to arg_select are made, because\nthe partial sorting of indx implies constraints on where we need to search. right (optional): shall be a scalar with the same type as k . It is an intent(in) argument. If specified then we assume the k-th smallest value is definitely contained\nin array(indx(1:right)) . If right is not present, the default is size(array) . This is typically useful if multiple calls to arg_select are\nmade, because the reordering of indx implies constraints on where we need to\nsearch. Notes arg_select does not modify array , unlike select . The partial sorting of indx is not stable, i.e., indices that map to equal\nvalues of array may be reordered. The code does not support NaN elements in array ; it will run, but there is\nno consistent interpretation given to the order of NaN entries of array compared to other entries. While it is essential that indx contains a permutation of the integers 1:size(array) , \nthe code does not check for this. For example if size(array) == 4 , then we could have indx = [4, 2, 1, 3] or indx = [1, 2, 3, 4] , but not indx = [2, 1, 2, 4] . It is the user's\nresponsibility to avoid such errors. Selection of a single value should have runtime of O( size(array) ), so it is\nasymptotically faster than sorting array entirely. The test program at the end of\nthese documents confirms that is the case. arg_select was derived using code from the Coretran library by Leon Foks,\nhttps://github.com/leonfoks/coretran. Leon Foks has given permission for the\ncode here to be released under stdlib's MIT license. Example program example_arg_select use stdlib_selection , only : arg_select implicit none real , allocatable :: array (:) integer , allocatable :: indx (:) integer :: kth_smallest integer :: k array = [ 3. , 2. , 7. , 4. , 5. , 1. , 4. , - 1. ] indx = [( k , k = 1 , size ( array ))] k = 2 call arg_select ( array , indx , k , kth_smallest ) print * , array ( kth_smallest ) ! print 1.0 k = 7 ! Due to the previous call to arg_select, we know for sure this is in an ! index >= 2 call arg_select ( array , indx , k , kth_smallest , left = 2 ) print * , array ( kth_smallest ) ! print 5.0 k = 6 ! Due to the previous two calls to arg_select, we know for sure this is in ! an index >= 2 and <= 7 call arg_select ( array , indx , k , kth_smallest , left = 2 , right = 7 ) print * , array ( kth_smallest ) ! print 4.0 end program example_arg_select Comparison with using sort The following program compares the timings of select and arg_select for\ncomputing the median of an array, vs using sort from stdlib . In theory we\nshould see a speed improvement with the selection routines which grows like\nLOG(size( array )). program selection_vs_sort use stdlib_kinds , only : dp , sp , int64 use stdlib_selection , only : select , arg_select use stdlib_sorting , only : sort implicit none call compare_select_sort_for_median ( 1 ) call compare_select_sort_for_median ( 11 ) call compare_select_sort_for_median ( 101 ) call compare_select_sort_for_median ( 1001 ) call compare_select_sort_for_median ( 10001 ) call compare_select_sort_for_median ( 100001 ) contains subroutine compare_select_sort_for_median ( N ) integer , intent ( in ) :: N integer :: i , k , result_arg_select , indx ( N ), indx_local ( N ) real :: random_vals ( N ), local_random_vals ( N ) integer , parameter :: test_reps = 100 integer ( int64 ) :: t0 , t1 real :: result_sort , result_select integer ( int64 ) :: time_sort , time_select , time_arg_select logical :: select_test_passed , arg_select_test_passed ! Ensure N is odd if ( mod ( N , 2 ) /= 1 ) stop time_sort = 0 time_select = 0 time_arg_select = 0 select_test_passed = . true . arg_select_test_passed = . true . indx = ( / ( i , i = 1 , N ) / ) k = ( N + 1 ) / 2 ! Deliberate integer division do i = 1 , test_reps call random_number ( random_vals ) ! Compute the median with sorting local_random_vals = random_vals call system_clock ( t0 ) call sort ( local_random_vals ) result_sort = local_random_vals ( k ) call system_clock ( t1 ) time_sort = time_sort + ( t1 - t0 ) ! Compute the median with selection, assuming N is odd local_random_vals = random_vals call system_clock ( t0 ) call select ( local_random_vals , k , result_select ) call system_clock ( t1 ) time_select = time_select + ( t1 - t0 ) ! Compute the median with arg_select, assuming N is odd local_random_vals = random_vals indx_local = indx call system_clock ( t0 ) call arg_select ( local_random_vals , indx_local , k , result_arg_select ) call system_clock ( t1 ) time_arg_select = time_arg_select + ( t1 - t0 ) if ( result_select /= result_sort ) select_test_passed = . FALSE . if ( local_random_vals ( result_arg_select ) /= result_sort ) arg_select_test_passed = . FALSE . end do print * , \"select ; N=\" , N , '; ' , merge ( 'PASS' , 'FAIL' , select_test_passed ), & '; Relative-speedup-vs-sort:' , ( 1.0 * time_sort ) / ( 1.0 * time_select ) print * , \"arg_select; N=\" , N , '; ' , merge ( 'PASS' , 'FAIL' , arg_select_test_passed ), & '; Relative-speedup-vs-sort:' , ( 1.0 * time_sort ) / ( 1.0 * time_arg_select ) end subroutine end program The results seem consistent with expectations when the array is large; the program prints: select ; N = 1 ; PASS ; Relative-speedup-vs-sort : 1 . 90928173 arg_select ; N = 1 ; PASS ; Relative-speedup-vs-sort : 1 . 76875830 select ; N = 11 ; PASS ; Relative-speedup-vs-sort : 1 . 14835048 arg_select ; N = 11 ; PASS ; Relative-speedup-vs-sort : 1 . 00794709 select ; N = 101 ; PASS ; Relative-speedup-vs-sort : 2 . 31012774 arg_select ; N = 101 ; PASS ; Relative-speedup-vs-sort : 1 . 92877376 select ; N = 1001 ; PASS ; Relative-speedup-vs-sort : 4 . 24190664 arg_select ; N = 1001 ; PASS ; Relative-speedup-vs-sort : 3 . 54580402 select ; N = 10001 ; PASS ; Relative-speedup-vs-sort : 5 . 61573362 arg_select ; N = 10001 ; PASS ; Relative-speedup-vs-sort : 4 . 79348087 select ; N = 100001 ; PASS ; Relative-speedup-vs-sort : 7 . 28823519 arg_select ; N = 100001 ; PASS ; Relative-speedup-vs-sort : 6 . 03007460","tags":"","loc":"page/specs/stdlib_selection.html"},{"title":"sorting – Fortran-lang/stdlib","text":"The stdlib_sorting module The stdlib_sorting module Overview of sorting Overview of the module The parameters int_index and int_index_low The module subroutines Licensing The ORD_SORT subroutine The SORT_INDEX subroutine The SORT subroutine The RADIX_SORT subroutine Specifications of the stdlib_sorting procedures ord_sort - sorts an input array Status Description Syntax Class Arguments Notes Example sort - sorts an input array Status Description Syntax Class Arguments Notes Example radix_sort - sorts an input array Status Description Syntax Class Arguments Notes Example sort_index - creates an array of sorting indices for an input array, while also sorting the array. Status Description Syntax Class Arguments Notes Examples Performance benchmarks Overview of sorting The sorting of collections of data is useful in the analysis of those\ncollections.\nWith its absence of generics and limited polymorphism, it is\nimpractical, in current Fortran, to provide sorting routines for\narbitrary collections of arbitrary types of data.\nHowever Fortran's arrays are by far its most widely used collection,\nand arrays of arbitrary types of data can often be sorted in terms of\na single component of intrinsic type.\nThe Fortran Standard Library therefore provides a module, stdlib_sorting , with procedures to sort arrays of simple intrinsic\nnumeric types, i.e. the different kinds of integers and reals, the\ndefault assumed length character, and the stdlib_string_type module's string_type type. Overview of the module The module stdlib_sorting defines several public entities, two\ndefault integer parameters, int_index and int_index_low , and four overloaded\nsubroutines: ORD_SORT , SORT , RADIX_SORT and SORT_INDEX . The\noverloaded subroutines also each have several specific names for\nversions corresponding to different types of array arguments. The parameters int_index and int_index_low The parameters int_index and int_index_low are used to specify the kind of integer used\nin indexing the various arrays. Currently the module sets int_index and int_index_low to the value of int64 and int32 from the stdlib_kinds module, respectively. The module subroutines The stdlib_sorting module provides three different overloaded\nsubroutines intended to sort three different kinds of arrays of\ndata: ORD_SORT is intended to sort simple arrays of intrinsic data\n that have significant sections that were partially ordered before\n the sort; SORT_INDEX is based on ORD_SORT , but in addition to sorting the\n input array, it returns indices that map the original array to its\n sorted version. This enables related arrays to be re-ordered in the\n same way; SORT is intended to sort simple arrays of intrinsic data\n that are effectively unordered before the sort; RADIX_SORT is intended to sort fixed width intrinsic data \n types (integers and reals). Licensing The Fortran Standard Library is distributed under the MIT\nLicense. However components of the library may be based on code with\nadditional licensing restrictions. In particular ORD_SORT , SORT_INDEX , and SORT are translations of codes with their\nown distribution restrictions. The ORD_SORT and SORT_INDEX subroutines are essentially\ntranslations to Fortran 2008 of the \"Rust\" sort of the Rust Language\ndistributed as part of slice.rs .\nThe header of the slice.rs file has as its licensing requirements: Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT\nfile at the top-level directory of this distribution and at\nhttp://rust-lang.org/COPYRIGHT.\n\nLicensed under the Apache License, Version 2.0 or the MIT license\n, at your\noption. This file may not be copied, modified, or distributed\nexcept according to those terms. So the license for the slice.rs code is compatible with the use of\nmodified versions of the code in the Fortran Standard Library under\nthe MIT license. The SORT subroutine is essentially a translation to Fortran\n2008 of the\n[ introsort ]((http://www.cs.rpi.edu/~musser/gp/introsort.ps) of David\nMusser. David Musser has given permission to include a variant of introsort in the Fortran Standard Library under the MIT license\nprovided we cite: Musser, D.R., “Introspective Sorting and Selection Algorithms,”\nSoftware—Practice and Experience, Vol. 27(8), 983–993 (August 1997). as the official source of the algorithm. The ORD_SORT subroutine ORD_SORT is a translation of the \"Rust\" sort sorting algorithm\ncontained in [ slice.rs ]\n(https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs). \"Rust\" sort , in turn, is inspired by the [ timsort algorithm]\n(http://svn.python.org/projects/python/trunk/Objects/listsort.txt)\nthat Tim Peters created for the Python Language. ORD_SORT is a hybrid stable comparison algorithm combining merge sort ,\nand insertion sort . It has always at worst O(N Ln(N)) runtime\nperformance in sorting random data, having a performance about 15-25%\nslower than SORT on such data. However it has much better\nperformance than SORT on partially sorted data, having O(N)\nperformance on uniformly increasing or decreasing data. When sorting in an increasing order, ORD_SORT begins by traversing the array\nstarting in its tail attempting to identify runs in the array, where a run is\neither a uniformly decreasing sequence, ARRAY(i-1) > ARRAY(i) , or a\nnon-decreasing, ARRAY(i-1) <= ARRAY(i) , sequence. First delimited decreasing\nsequences are reversed in their order. Then, if the sequence has less than MIN_RUN elements, previous elements in the array are added to the run using insertion sort until the run contains MIN_RUN elements or the array is\ncompletely processed. As each run is identified the start and length of the run\nare then pushed onto a stack and the stack is then processed using merge until\nit obeys the stack invariants: len(i-2) > len(i-1) + len(i) len(i-1) > len(i) ensuring that processing the stack is, at worst, of order O(N\nLn(N)) . However, because of the identification of decreasing and\nnon-decreasing runs, processing of structured data can be much faster,\nwith processing of uniformly decreasing or non-decreasing arrays being\nof order O(N). The result in our tests is that ORD_SORT is about\n25% slower than SORT on purely random data, depending on\nthe compiler, but can be Ln(N) faster than SORT on highly\nstructured data. As a modified merge sort , ORD_SORT requires the\nuse of a \"scratch\" array, that may be provided as an optional work argument or allocated internally on the stack. Arrays can be also sorted in a decreasing order by providing the argument reverse\n= .true. . The SORT_INDEX subroutine The SORT and ORD_SORT subroutines can sort rank 1 isolated\narrays of intrinsic types, but do nothing for the coordinated sorting\nof related data, e.g., multiple related rank 1 arrays, higher rank\narrays, or arrays of derived types. For such related data, what is\nuseful is an array of indices that maps a rank 1 array to its sorted\nform. For such a sort, a stable sort is useful, therefore the module\nprovides a subroutine, SORT_INDEX , that generates such an array of\nindices based on the ORD_SORT algorithm, in addition to sorting\nthe input array. The logic of SORT_INDEX parallels that of ORD_SORT , with\nadditional housekeeping to keep the array of indices consistent with\nthe sorted positions of the input array. Because of this additional\nhousekeeping it has slower runtime performance than ORD_SORT . SORT_INDEX requires the use of two \"scratch\" arrays, that may be\nprovided as optional work and iwork arguments or allocated\ninternally on the stack. The SORT subroutine SORT uses the introsort sorting algorithm of David Musser. introsort is a hybrid unstable comparison algorithm combining quicksort , insertion sort , and heap sort . While this algorithm's\nruntime performance is always O(N Ln(N)), it is relatively fast on\nrandomly ordered data, but does not show the improvement in\nperformance on partly sorted data found for ORD_SORT . First it examines the array and estimates the depth of recursion a\nquick sort would require for ideal (random) data, D =\nCeiling(Ln(N)/Ln(2)) . It then defines a limit to the number of quicksort recursions to be allowed in processing, D_limit = factor * D , where factor is currently 2, and\ncalls introsort proper. introsort proper then: Examines the number of elements remaining to be sorted, and, if\n they are less than 16, sorts them using insertion sort and returns; If they are not less than 16, checks whether the current depth of\n recursion exceeds D_limit and, if it does, processes the remaining\n elements with heap sort and returns; If the current depth of recursion does not exceed D_limit , then\n in effect does a quicksort step: Partitions the remaining array using a median of three, Calls introsort proper on the leftmost partition, Calls introsort proper on the rightmost partition, and then\n returns. The resulting algorithm is of order O(N Ln(N)) run time performance\nfor all inputs. Because it relies on quicksort , the coefficient of\nthe O(N Ln(N)) behavior is typically small compared to other sorting\nalgorithms on random data. On partially sorted data it can show either\nslower heap sort performance, or enhanced performance by up to a\nfactor of six. Still, even when it shows enhanced performance, its\nperformance on partially sorted data is typically an order of\nmagnitude slower than ORD_SORT . Its memory requirements are also\nlow, being of order O(Ln(N)), while the memory requirements of ORD_SORT and SORT_INDEX are of order O(N). The RADIX_SORT subroutine RADIX_SORT is a implementation of LSD radix sort ,\nusing 256 as the radix. It only works for fixed width data,\nthus integers and reals. RADIX_SORT is always of O(N) runtime performance\nfor any input data. For large and random data, it is about five (or more)\ntimes faster than other sort subroutines. The RADIX_SORT needs a buffer that have same size of the input data.\nYour can provide it using work argument, if not the subroutine will\nallocate the buffer and deallocate before return. Specifications of the stdlib_sorting procedures ord_sort - sorts an input array Status Experimental Description Returns an input array with the elements sorted in order of\nincreasing, or decreasing, value. Syntax call ord_sort ( array[, work, reverse ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(qp) , character(*) , type(string_type) , type(bitset_64) , or type(bitset_large) .\nIt is an intent(inout) argument. On input it is\nthe array to be sorted. If both the type of array is real and at\nleast one of the elements is a NaN , then the ordering of the result\nis undefined. Otherwise on return its elements will be sorted in order\nof non-decreasing value. work (optional): shall be a rank one array of the same type as\narray, and shall have at least size(array)/2 elements. It is an intent(out) argument. It is intended to be used as \"scratch\"\nmemory for internal record keeping. If associated with an array in\nstatic storage, its use can significantly reduce the stack memory\nrequirements for the code. Its contents on return are undefined. reverse (optional): shall be a scalar of type default logical. It\nis an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in stable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in stable order. Notes ORD_SORT implements a hybrid sorting algorithm combining merge sort , and insertion sort . For most purposes it behaves like\na merge sort , providing worst case O(N Ln(N)) run time performance\nfor most random arrays, that is typically slower than SORT .\nHowever, if the array has significant runs of decreasing or\nnon-decreasing values, performance can be much better than SORT , with O(N) behavior on uniformly decreasing, or\nnon-decreasing arrays. The optional work array replaces \"scratch\"\nmemory that would otherwise be allocated on the stack. If array is of\nany type REAL the order of its elements on return undefined if any\nelement of array is a NaN . Sorting of CHARACTER(*) and STRING_TYPE arrays are based on the operators > and < , and not on the\nfunction LGT . Example program example_ord_sort use stdlib_sorting , only : ord_sort implicit none integer , allocatable :: array1 (:), work (:) array1 = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] allocate ( work , mold = array1 ) call ord_sort ( array1 , work ) print * , array1 !print [1, 3, 4, 4, 5, 9, 10] end program example_ord_sort sort - sorts an input array Status Experimental Description Returns an input array with the elements sorted in order of increasing, or\ndecreasing, value. Syntax call sort ( array[, reverse] ) Class Pure generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(qp) . character(*) , type(string_type) , type(bitset_64) , or type(bitset_large) .\nIt is an intent(inout) argument. On return its\ninput elements will be sorted in order of non-decreasing value. reverse (optional): shall be a scalar of type default logical. It\nis an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in unstable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in unstable order. Notes SORT implements a hybrid sorting algorithm combining quicksort , merge sort , and insertion sort . For most purposes it\nbehaves like a quicksort with a median of three partition, providing\ngood, O(N Ln(N)) , run time performance for most random arrays, but\ndefaulting to merge sort if the structure of the array results in\nthe quicksort not converging as rapidly as expected. If array is of\nany type REAL , the behavior of the sorting is undefined if any\nelement of array is a NaN . Sorting of CHARACTER(*) and STRING_TYPE arrays are based on the operators < , <= , > , and >= , and not on the functions LLT , LLE , LGT , or LGE . Example program example_sort use stdlib_sorting , only : sort implicit none integer , allocatable :: array (:) array = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] call sort ( array ) print * , array !print [1, 3, 4, 4, 5, 9, 10] end program example_sort radix_sort - sorts an input array Status Experimental Description Returns an input array with the elements sorted in order of increasing, or\ndecreasing, value. Syntax call radix_sort ( array[, work, reverse] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) . It is an intent(inout) argument. On return its\ninput elements will be sorted in order of non-decreasing value. work (optional): shall be a rank one array of the same type as\narray, and shall have at least size(array) elements. It is an intent(inout) argument, and its contents on return are undefined. reverse (optional): shall be a scalar of type default logical . It\nis an intent(in) argument. If present with a value of .true. then array will be sorted in order of non-increasing values in unstable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in unstable order. Notes radix_sort implements a LSD radix sort algorithm with a 256 radix. For any\ninput data it provides O(N) run time performance. If array is of\nany type real the order of its elements on return undefined if any\nelement of array is a NaN . Example program example_radix_sort use iso_fortran_env , only : int8 , int16 , dp => real64 use stdlib_sorting , only : radix_sort implicit none integer ( int8 ), allocatable :: arri8 (:) integer ( int16 ), allocatable :: arri16 (:) real ( dp ) :: x real ( dp ), allocatable :: arrf64 (:) arri8 = [ - 128 , 127 , 0 , - 1 , 1 ] call radix_sort ( arri8 ) print * , arri8 arri16 = [ - 32767 , 32767 , 0 , 0 , - 3 , 2 , - 3 ] call radix_sort ( arri16 , reverse = . true .) print * , arri16 allocate ( arrf64 ( 10 )) x = 0.0_dp ! divide zero will arise compile error arrf64 = [ 1.0_dp / x , 0.0_dp , 0.0_dp / x , - 1.0_dp / x , - 0.0_dp , 1.0_dp , - 1.0_dp , 3.45_dp , - 3.14_dp , 3.44_dp ] call radix_sort ( arrf64 ) print * , arrf64 ! Expected output: ! nan, -inf, -3.14, -1.0, -0.0, 0.0, 1.0, 3.44, 3.45, inf ! Note: the position of nan is undefined end program example_radix_sort sort_index - creates an array of sorting indices for an input array, while also sorting the array. Status Experimental Description Returns the input array sorted in the direction requested while\nretaining order stability, and an integer array whose elements would\nsort the input array to produce the output array . Syntax call sort_index ( array, index[, work, iwork, reverse ] ) Class Generic subroutine. Arguments array : shall be a rank one array of any of the types: integer(int8) , integer(int16) , integer(int32) , integer(int64) , real(sp) , real(dp) , real(qp) , character(*) , type(string_type) , type(bitset_64) , or type(bitset_large) .\nIt is an intent(inout) argument. On input it\nwill be an array whose sorting indices are to be determined. On return\nit will be the sorted array. index : shall be a rank one integer array of kind int_index or int_index_low and of\nthe size of array . It is an intent(out) argument. On return it\nshall have values that are the indices needed to sort the original\narray in the desired direction. work (optional): shall be a rank one array of any of the same type as array , and shall have at least size(array)/2 elements. It is an intent(out) argument. It is intended to be used as \"scratch\"\nmemory for internal record keeping. If associated with an array in\nstatic storage, its use can significantly reduce the stack memory\nrequirements for the code. Its contents on return are undefined. iwork (optional): shall be a rank one integer array of the same kind\nof the array index , and shall have at least size(array)/2 elements. It\nis an intent(out) argument. It is intended to be used as \"scratch\"\nmemory for internal record keeping. If associated with an array in\nstatic storage, its use can significantly reduce the stack memory\nrequirements for the code. Its contents on return are undefined. reverse (optional): shall be a scalar of type default logical. It\nis an intent(in) argument. If present with a value of .true. then index will sort array in order of non-increasing values in stable\norder. Otherwise index will sort array in order of non-decreasing\nvalues in stable order. Notes SORT_INDEX implements the hybrid sorting algorithm of ORD_SORT ,\nkeeping the values of index consistent with the elements of array as it is sorted. As a merge sort based algorithm, it is a stable\nsorting comparison algorithm. The optional work and iwork arrays\nreplace \"scratch\" memory that would otherwise be allocated on the\nstack. If array is of any kind of REAL the order of the elements in index and array on return are undefined if any element of array is a NaN . Sorting of CHARACTER(*) and STRING_TYPE arrays are\nbased on the operator > , and not on the function LGT . It should be emphasized that the order of array will typically be\ndifferent on return Examples Sorting a rank one array with sort_index : program example_sort_index use stdlib_sorting , only : sort_index implicit none integer , allocatable :: array (:) integer , allocatable :: index (:) array = [ 5 , 4 , 3 , 1 , 10 , 4 , 9 ] allocate ( index , mold = array ) call sort_index ( array , index ) print * , array !print [1, 3, 4, 4, 5, 9, 10] print * , index !print [4, 3, 2, 6, 1, 7, 5] end program example_sort_index Sorting a related rank one array: subroutine sort_related_data ( a , b , work , index , iwork ) ! Sort `a`, and also sort `b` to be reorderd the same way as `a` integer , intent ( inout ) :: a (:) integer ( int32 ), intent ( inout ) :: b (:) ! The same size as a integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Find the indices to sort a call sort_index ( a , index ( 1 : size ( a )),& work ( 1 : size ( a ) / 2 ), iwork ( 1 : size ( a ) / 2 )) ! Sort b based on the sorting of a b (:) = b ( index ( 1 : size ( a )) ) end subroutine sort_related_data Sorting a rank 2 array based on the data in a column subroutine sort_related_data ( array , column , work , index , iwork ) ! Reorder rows of `array` such that `array(:, column)` is sorted integer , intent ( inout ) :: array (:,:) integer ( int32 ), intent ( in ) :: column integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) integer , allocatable :: dummy (:) integer :: i allocate ( dummy ( size ( array , dim = 1 ))) ! Extract a column of `array` dummy (:) = array (:, column ) ! Find the indices to sort the column call sort_index ( dummy , index ( 1 : size ( dummy )),& work ( 1 : size ( dummy ) / 2 ), iwork ( 1 : size ( dummy ) / 2 )) ! Sort a based on the sorting of its column do i = 1 , size ( array , dim = 2 ) array (:, i ) = array ( index ( 1 : size ( array , dim = 1 )), i ) end do end subroutine sort_related_data Sorting an array of a derived type based on the data in one component subroutine sort_a_data ( a_data , a , work , index , iwork ) ! Sort `a_data` in terms of its component `a` type ( a_type ), intent ( inout ) :: a_data (:) integer ( int32 ), intent ( inout ) :: a (:) integer ( int32 ), intent ( out ) :: work (:) integer ( int_index ), intent ( out ) :: index (:) integer ( int_index ), intent ( out ) :: iwork (:) ! Extract a component of `a_data` a ( 1 : size ( a_data )) = a_data (:) % a ! Find the indices to sort the component call sort_index ( a ( 1 : size ( a_data )), index ( 1 : size ( a_data )),& work ( 1 : size ( a_data ) / 2 ), iwork ( 1 : size ( a_data ) / 2 )) ! Sort a_data based on the sorting of that component a_data (:) = a_data ( index ( 1 : size ( a_data )) ) end subroutine sort_a_data Performance benchmarks We have performed benchmarks of the procedures on nine different\ninteger arrays each of size 2**16 : Blocks - the array is divided into six blocks, each of distinct\n uniformly increasing integers. Decreasing - values decrease uniformly from 2**16-1 to 0 . Identical - all integers have the same value of 10. Increasing - values increase uniformly from 0 to 2**16-1 . Random dense - the integers are generated randomly from a set of\n values from 0 to 2**14-1 so duplicates are dense. Random order - a set of integers from 0 to 2**16 - 1 in random\n order. Random sparse - the integers are generated randomly from a set of\n values from 0 to 2**18-1 so duplicates are sparse. Random-3 - the increasing array has 3 random exchanges of individual\n elements. Random-10 - the final ten elements of the increasing array are\n replaced by random values. On three different default character arrays, each of length 4 and of\nsize `20**4, with characters drawn from the set \"a\"-\"p\": Char. Decreasing - values decrease uniformly from \"pppp\" to \"aaaa\" . Char. Increasing - values decrease uniformly from \"aaaa\" to \"pppp\" . Char. Random - the set of strings from \"aaaa\" to \"pppp\" in\n random order. On three different string_type arrays, each of length 4 elements and\nof size 16**3 , with characters drawn from the set \"a\"-\"p\": String Decreasing - values decrease uniformly from \"ppp\" to \"aaa\" . String Increasing - values decrease uniformly from \"aaa\" to \"ppp\" . String Random - the set of strings from \"aaa\" to \"ppp\" in\n random order. These benchmarks have been performed on two different compilers, both\non WSL with Ubuntu-20.04, Intel(R) Core(TM) i7-10700 CPU @ 2.9GHz, with\n32 GB DDR4 memory. The first compiler is GNU Fortran (GCC) 9.4.0, with\nthe following results. Type Elements Array Name Method Time (s) Integer 65536 Blocks Ord_Sort 0.001048 Integer 65536 Decreasing Ord_Sort 0.000204 Integer 65536 Identical Ord_Sort 0.000097 Integer 65536 Increasing Ord_Sort 0.000096 Integer 65536 Random dense Ord_Sort 0.006580 Integer 65536 Random order Ord_Sort 0.006886 Integer 65536 Random sparse Ord_Sort 0.006821 Integer 65536 Random 3 Ord_Sort 0.000461 Integer 65536 Random 10 Ord_Sort 0.000226 Character 65536 Char. Decrease Ord_Sort 0.000824 Character 65536 Char. Increase Ord_Sort 0.000370 Character 65536 Char. Random Ord_Sort 0.016020 String_type 4096 String Decrease Ord_Sort 0.000465 String_type 4096 String Increase Ord_Sort 0.000169 String_type 4096 String Random Ord_Sort 0.004194 Integer 65536 Blocks Radix_Sort 0.001610 Integer 65536 Decreasing Radix_Sort 0.001076 Integer 65536 Identical Radix_Sort 0.001074 Integer 65536 Increasing Radix_Sort 0.001060 Integer 65536 Random dense Radix_Sort 0.001161 Integer 65536 Random order Radix_Sort 0.001069 Integer 65536 Random sparse Radix_Sort 0.001005 Integer 65536 Random 3 Radix_Sort 0.001057 Integer 65536 Random 10 Radix_Sort 0.001046 Integer 65536 rand-real32 Radix_Sort 0.001429 Integer 65536 Blocks Sort 0.004269 Integer 65536 Decreasing Sort 0.005108 Integer 65536 Identical Sort 0.006257 Integer 65536 Increasing Sort 0.002093 Integer 65536 Random dense Sort 0.006032 Integer 65536 Random order Sort 0.006030 Integer 65536 Random sparse Sort 0.006126 Integer 65536 Random 3 Sort 0.007930 Integer 65536 Random 10 Sort 0.014729 Character 65536 Char. Decrease Sort 0.020623 Character 65536 Char. Increase Sort 0.008028 Character 65536 Char. Random Sort 0.014258 String_type 4096 String Decrease Sort 0.005542 String_type 4096 String Increase Sort 0.001987 String_type 4096 String Random Sort 0.003267 Integer 65536 Blocks Sort_Index 0.000686 Integer 65536 Decreasing Sort_Index 0.000529 Integer 65536 Identical Sort_Index 0.000218 Integer 65536 Increasing Sort_Index 0.000214 Integer 65536 Random dense Sort_Index 0.008044 Integer 65536 Random order Sort_Index 0.008042 Integer 65536 Random sparse Sort_Index 0.008148 Integer 65536 Random 3 Sort_Index 0.000677 Integer 65536 Random 10 Sort_Index 0.000387 Character 65536 Char. Decrease Sort_Index 0.000932 Character 65536 Char. Increase Sort_Index 0.000487 Character 65536 Char. Random Sort_Index 0.017231 String_type 4096 String Decrease Sort_Index 0.000489 String_type 4096 String Increase Sort_Index 0.000183 String_type 4096 String Random Sort_Index 0.004102 The second compiler is Intel(R) Fortran Intel(R) 64 Compiler Classic\nfor applications running on Intel(R) 64, Version 2021.7.0 Build\n20220726_000000, with the following results: Type Elements Array Name Method Time (s) Integer 65536 Blocks Ord_Sort 0.000135 Integer 65536 Decreasing Ord_Sort 0.000053 Integer 65536 Identical Ord_Sort 0.000033 Integer 65536 Increasing Ord_Sort 0.000034 Integer 65536 Random dense Ord_Sort 0.003291 Integer 65536 Random order Ord_Sort 0.003546 Integer 65536 Random sparse Ord_Sort 0.003313 Integer 65536 Random 3 Ord_Sort 0.000145 Integer 65536 Random 10 Ord_Sort 0.000070 Character 65536 Char. Decrease Ord_Sort 0.000696 Character 65536 Char. Increase Ord_Sort 0.000338 Character 65536 Char. Random Ord_Sort 0.015255 String_type 4096 String Decrease Ord_Sort 0.001276 String_type 4096 String Increase Ord_Sort 0.000153 String_type 4096 String Random Ord_Sort 0.024705 Integer 65536 Blocks Radix_Sort 0.001038 Integer 65536 Decreasing Radix_Sort 0.000910 Integer 65536 Identical Radix_Sort 0.000441 Integer 65536 Increasing Radix_Sort 0.000803 Integer 65536 Random dense Radix_Sort 0.000363 Integer 65536 Random order Radix_Sort 0.000741 Integer 65536 Random sparse Radix_Sort 0.000384 Integer 65536 Random 3 Radix_Sort 0.000877 Integer 65536 Random 10 Radix_Sort 0.000801 Integer 65536 rand-real32 Radix_Sort 0.000604 Integer 65536 Blocks Sort 0.001342 Integer 65536 Decreasing Sort 0.001391 Integer 65536 Identical Sort 0.001485 Integer 65536 Increasing Sort 0.000447 Integer 65536 Random dense Sort 0.002778 Integer 65536 Random order Sort 0.002896 Integer 65536 Random sparse Sort 0.003136 Integer 65536 Random 3 Sort 0.002996 Integer 65536 Random 10 Sort 0.005752 Character 65536 Char. Decrease Sort 0.021973 Character 65536 Char. Increase Sort 0.008391 Character 65536 Char. Random Sort 0.015155 String_type 4096 String Decrease Sort 0.034014 String_type 4096 String Increase Sort 0.010464 String_type 4096 String Random Sort 0.015748 Integer 65536 Blocks Sort_Index 0.000381 Integer 65536 Decreasing Sort_Index 0.000085 Integer 65536 Identical Sort_Index 0.000046 Integer 65536 Increasing Sort_Index 0.000046 Integer 65536 Random dense Sort_Index 0.004020 Integer 65536 Random order Sort_Index 0.004059 Integer 65536 Random sparse Sort_Index 0.004073 Integer 65536 Random 3 Sort_Index 0.000215 Integer 65536 Random 10 Sort_Index 0.000101 Character 65536 Char. Decrease Sort_Index 0.000680 Character 65536 Char. Increase Sort_Index 0.000356 Character 65536 Char. Random Sort_Index 0.016231 String_type 4096 String Decrease Sort_Index 0.001219 String_type 4096 String Increase Sort_Index 0.000125 String_type 4096 String Random Sort_Index 0.018631","tags":"","loc":"page/specs/stdlib_sorting.html"},{"title":"specialfunctions – Fortran-lang/stdlib","text":"Special functions Special functions legendre - Calculate Legendre polynomials Status Description Syntax Arguments Return value dlegendre - Calculate first derivatives of Legendre polynomials Status Description Syntax Arguments Return value legendre - Calculate Legendre polynomials Status Experimental Description Computes the value of the n-th Legendre polynomial at a specified point.\nCurrently only 64 bit floating point is supported. This is an elemental function. Syntax result = legendre (n, x) Arguments n : Shall be a scalar of type real(real64) . x : Shall be a scalar or array (this function is elemental) of type real(real64) . Return value The function result will be the value of the n -th Legendre polynomial, evaluated at x . dlegendre - Calculate first derivatives of Legendre polynomials Status Experimental Description Computes the value of the first derivative of the n-th Legendre polynomial at a specified point.\nCurrently only 64 bit floating point is supported. This is an elemental function. Syntax result = dlegendre (n, x) Arguments n : Shall be a scalar of type real(real64) . x : Shall be a scalar or array (this function is elemental) of type real(real64) . Return value The function result will be the value of the first derivative of the n -th Legendre polynomial, evaluated at x .","tags":"","loc":"page/specs/stdlib_specialfunctions.html"},{"title":"specialfunctions_gamma – Fortran-lang/stdlib","text":"Special functions gamma Special functions gamma gamma - Calculate the gamma function Status Description Syntax Class Arguments Return value Example log_gamma - Calculate the natural logarithm of the gamma function Status Description Syntax Class Arguments Return value Example log_factorial - calculate the logarithm of a factorial Status Description Syntax Class Arguments Return value Example lower_incomplete_gamma - calculate lower incomplete gamma integral Status Description Syntax Class Arguments Return value Example upper_incomplete_gamma - calculate the upper incomplete gamma integral Status Description Syntax Class Arguments Return value Example log_lower_incomplete_gamma - calculate the natural logarithm of the lower incomplete gamma integral Status Description Syntax Class Arguments Return value log_upper_incomplete_gamma - calculate logarithm of the upper incomplete gamma integral Status Description Syntax Class Arguments Return value regularized_gamma_p - calculate the gamma quotient P Status Description Syntax Class Arguments Return value Example regularized_gamma_q - calculate the gamma quotient Q Status Description Syntax Class Arguments Return value Example gamma - Calculate the gamma function Status Experimental Description The gamma function is defined as the analytic continuation of a convergent improper integral function on the whole complex plane except zero and negative integers: Fortran 2018 standard implements the intrinsic gamma function of real type argument in single and double precisions. Here the gamma function is extended to both integer and complex arguments. The values of the gamma function with integer arguments are exact. The values of the gamma function with complex arguments are approximated in single and double precisions by using Lanczos approximation. Syntax result = gamma (x) Class Elemental function Arguments x : should be a positive integer or a complex type number Return value The function returns a value with the same type and kind as input argument. Example program example_gamma use stdlib_kinds , only : dp , int64 use stdlib_specialfunctions_gamma , only : gamma implicit none integer :: i integer ( int64 ) :: n real :: x real ( dp ) :: y complex :: z complex ( dp ) :: z1 i = 10 n = 15_int64 x = 2.5 y = 4.3_dp z = ( 2.3 , 0.6 ) z1 = ( - 4.2_dp , 3.1_dp ) print * , gamma ( i ) !integer gives exact result ! 362880 print * , gamma ( n ) ! 87178291200 print * , gamma ( x ) ! intrinsic function call ! 1.32934034 print * , gamma ( y ) ! intrinsic function call ! 8.8553433604540341 print * , gamma ( z ) ! (0.988054395, 0.383354813) print * , gamma ( z1 ) ! (-2.78916032990983999E-005, 9.83164600163221218E-006) end program example_gamma log_gamma - Calculate the natural logarithm of the gamma function Status Experimental Description Mathematically, logarithm of gamma function is a special function with complex arguments by itself. Due to the different branch cut structures and a different principal branch, natural logarithm of gamma function log_gamma(z) with complex argument is different from the ln(Gamma(z)). The two have the same real part but different imaginary part. Fortran 2018 standard implements intrinsic log_gamma function of absolute value of real type argument in single and double precision. Here the log_gamma function is extended to both integer and complex arguments. The values of log_gamma function with complex arguments are approximated in single and double precisions by using Stirling's approximation. Syntax result = log_gamma (x) Class Elemental function Arguments x : Shall be a positive integer or a complex type number. Return value The function returns real single precision values for integer input arguments, while it returns complex values with the same kind as complex input arguments. Example program example_log_gamma use stdlib_kinds , only : dp use stdlib_specialfunctions_gamma , only : log_gamma implicit none integer :: i real :: x real ( dp ) :: y complex :: z complex ( dp ) :: z1 i = 10 x = 8.76 y = x z = ( 5.345 , - 3.467 ) z1 = z print * , log_gamma ( i ) !default single precision output !12.8018274 print * , log_gamma ( x ) !intrinsic function call !10.0942659 print * , log_gamma ( y ) !intrinsic function call !10.094265528673880 print * , log_gamma ( z ) !same kind as input !(2.56165648, -5.73382425) print * , log_gamma ( z1 ) !(2.5616575105114614, -5.7338247782852498) end program example_log_gamma log_factorial - calculate the logarithm of a factorial Status Experimental Description Compute the natural logarithm of factorial, log(n!) Syntax result = log_factorial (x) Class Elemental function Arguments x : Shall be a positive integer type number. Return value The function returns real type values with single precision. Example program example_log_factorial use stdlib_kinds , only : int64 use stdlib_specialfunctions_gamma , only : lf => log_factorial implicit none integer :: n n = 10 print * , lf ( n ) ! 15.1044130 print * , lf ( 35_int64 ) ! 92.1361771 end program example_log_factorial lower_incomplete_gamma - calculate lower incomplete gamma integral Status Experimental Description The lower incomplete gamma function is defined as: When x < 0, p must be positive integer. Syntax result = lower_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_ligamma use stdlib_specialfunctions_gamma , only : lig => lower_incomplete_gamma implicit none integer :: p real :: p1 p = 3 p1 = 2.3 print * , lig ( p , - 5.0 ) ! -2521.02417 print * , lig ( p1 , 5.0 ) ! 1.09715652 end program example_ligamma upper_incomplete_gamma - calculate the upper incomplete gamma integral Status Experimental Description The upper incomplete gamma function is defined as: When x < 0, p must be a positive integer. Syntax result = upper_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_uigamma use stdlib_specialfunctions_gamma , only : uig => upper_incomplete_gamma implicit none print * , uig ( 3 , - 5.0 ) !2523.02295 print * , uig ( 2.3 , 5.0 ) !6.95552528E-02 end program example_uigamma log_lower_incomplete_gamma - calculate the natural logarithm of the lower incomplete gamma integral Status Experimental Description Compute the natural logarithm of the absolute value of the lower incomplete gamma function. Syntax result = log_lower_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. log_upper_incomplete_gamma - calculate logarithm of the upper incomplete gamma integral Status Experimental Description Compute the natural logarithm of the absolute value of the upper incomplete gamma function. Syntax result = log_upper_incomplete_gamma (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. regularized_gamma_p - calculate the gamma quotient P Status Experimental Description The regularized gamma quotient P, also known as normalized incomplete gamma function, is defined as: The values of regularized gamma P is in the range of [0, 1] Syntax result = regularized_gamma_p (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_gamma_p use stdlib_specialfunctions_gamma , only : rgp => regularized_gamma_p implicit none print * , rgp ( 3.0 , 5.0 ) ! 0.875347972 end program example_gamma_p regularized_gamma_q - calculate the gamma quotient Q Status Experimental Description The regularized gamma quotient Q is defined as: The values of regularized gamma Q is in the range of [0, 1] Syntax result = regularized_gamma_q (p, x) Class Elemental function Arguments p : is a positive integer or real type argument. x : is a real type argument. Return value The function returns a real type value with the same kind as argument x. Example program example_gamma_q use stdlib_specialfunctions_gamma , only : rgq => regularized_gamma_q implicit none print * , rgq ( 3.0 , 5.0 ) ! 0.124652028 end program example_gamma_q","tags":"","loc":"page/specs/stdlib_specialfunctions_gamma.html"},{"title":"stats – Fortran-lang/stdlib","text":"Descriptive statistics Descriptive statistics corr - Pearson correlation of array elements Status Description Syntax Class Arguments Return value Example cov - covariance of array elements Status Description Syntax Class Arguments Return value Example mean - mean of array elements Status Description Syntax Class Arguments Return value Example median - median of array elements Status Description Syntax Class Arguments Return value Example moment - central moments of array elements Status Description Syntax Class Arguments Return value Example var - variance of array elements Status Description Syntax Class Arguments Return value Example corr - Pearson correlation of array elements Status Experimental Description Returns the Pearson correlation of the elements of array along dimension dim if the corresponding element in mask is true . The Pearson correlation between two rows (or columns), say x and y , of array is defined as: corr ( x , y ) = cov ( x , y ) / sqrt ( var ( x ) * var ( y )) Syntax result = corr (array, dim [, mask]) Class Generic subroutine Arguments array : Shall be a rank-1 or a rank-2 array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. Return value If array is of rank 1 and of type real or complex , the result is of type real and has the same kind as array .\nIf array is of rank 2 and of type real or complex , the result is of the same type and kind as array .\nIf array is of type integer , the result is of type real(dp) . If array is of rank 1 and of size larger than 1, a scalar equal to 1 is returned. Otherwise, IEEE NaN is returned.\nIf array is of rank 2, a rank-2 array with the corresponding correlations is returned. If mask is specified, the result is the Pearson correlation of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_corr use stdlib_stats , only : corr implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ - 1. , 4 0. , - 3. , 4. , 1 0. , 6. ], [ 2 , 3 ]) print * , corr ( x , 1 ) !returns 1. print * , corr ( y , 2 ) !returns reshape([ 1., -.32480, -.32480, 1. ], [ 2, 3]) end program example_corr cov - covariance of array elements Status Experimental Description Returns the covariance of the elements of array along dimension dim if the corresponding element in mask is true . Per default, the covariance is defined as: cov(array) = 1/(n-1) sum_i (array(i) - mean(array) * (array(i) - mean(array))) where n is the number of elements. The scaling can be changed with the logical argument corrected . If corrected is .false. , then the sum is scaled with n , otherwise with n-1 . Syntax result = cov (array, dim [, mask [, corrected]]) Class Generic subroutine Arguments array : Shall be a rank-1 or a rank-2 array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. corrected (optional): Shall be a scalar of type logical . If corrected is .true. (default value), the sum is scaled with n-1 . If corrected is .false. , then the sum is scaled with n . It is an intent(in) argument. Return value If array is of rank 1 and of type real or complex , the result is of type real corresponding to the type of array .\nIf array is of rank 2 and of type real or complex , the result is of the same type as array .\nIf array is of type integer , the result is of type real(dp) . If array is of rank 1, a scalar with the covariance (that is the variance) of all elements in array is returned.\nIf array is of rank 2, a rank-2 array is returned. If mask is specified, the result is the covariance of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_cov use stdlib_stats , only : cov implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , cov ( x , 1 ) !returns 3.5 print * , cov ( x , 1 , corrected = . false .) !returns 2.9167 print * , cov ( y , 1 ) !returns a square matrix of size 3 with all elements equal to 0.5 end program example_cov mean - mean of array elements Status Experimental Description Returns the mean of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . Syntax result = mean (array [, mask]) result = mean (array, dim [, mask]) Class Generic subroutine Arguments array : Shall be an array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. Return value If array is of type real or complex , the result is of the same type as array .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the mean of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the mean of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_mean use stdlib_stats , only : mean implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , mean ( x ) !returns 3.5 print * , mean ( y ) !returns 3.5 print * , mean ( y , 1 ) !returns [ 1.5, 3.5, 5.5 ] print * , mean ( y , 1 , y > 3. ) !returns [ NaN, 4.0, 5.5 ] end program example_mean median - median of array elements Status Experimental Description Returns the median of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . The median of the elements of array is defined as the \"middle\"\nelement, after that the elements are sorted in an increasing order, e.g. array_sorted =\nsort(array) . If n = size(array) is an even number, the median is: median(array) = array_sorted( floor( (n + 1) / 2.)) and if n is an odd number, the median is: median(array) = mean( array_sorted( floor( (n + 1) / 2.):floor( (n + 1) / 2.) + 1 ) ) The current implementation relies on a selection algorithm applied on a copy of\nthe whole array, using the subroutine select provided by the stdlib_selection module. Syntax result = median (array [, mask]) result = median (array, dim [, mask]) Class Generic subroutine Arguments array : Shall be an array of type integer or real . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. Return value If array is of type real , the result is of type real with the same kind as array .\nIf array is of type real and contains IEEE NaN , the result is IEEE NaN .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the median of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the median of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_median use stdlib_stats , only : median implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , median ( x ) !returns 3.5 print * , median ( y ) !returns 3.5 print * , median ( y , 1 ) !returns [ 1.5, 3.5, 5.5 ] print * , median ( y , 1 , y > 3. ) !returns [ NaN, 4.0, 5.5 ] end program example_median moment - central moments of array elements Status Experimental Description Returns the k -th order central moment of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . If a scalar or an array center is provided, the function returns the k -th order moment about 'center', of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . The k -th order central moment is defined as : moment(array) = 1/n sum_i (array(i) - mean(array))^k where n is the number of elements. The k -th order moment about center is defined as : moment(array) = 1/n sum_i (array(i) - center)^k Syntax result = moment (array, order [, center [, mask]]) result = moment (array, order, dim [, center [, mask]]) Class Generic subroutine Arguments array : Shall be an array of type integer , real , or complex . order : Shall be an scalar of type integer . dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . center (optional): Shall be a scalar of the same type of result if dim is not provided. If dim is provided, center shall be a scalar or an array (with a shape similar to that of array with dimension dim dropped) of the same type of result . mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . Return value If array is of type real or complex , the result is of the same type as array .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the k -th (central) moment of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the k -th (central) moment of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . Example program example_moment use stdlib_stats , only : moment implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , moment ( x , 2 ) !returns 2.9167 print * , moment ( y , 2 ) !returns 2.9167 print * , moment ( y , 2 , 1 ) !returns [0.25, 0.25, 0.25] print * , moment ( y , 2 , 1 , mask = ( y > 3. )) !returns [NaN, 0., 0.25] print * , moment ( x , 2 , center = 0. ) !returns 15.1667 print * , moment ( y , 1 , 1 , center = 0. ) !returns [1.5, 3.5, 5.5] end program example_moment var - variance of array elements Status Experimental Description Returns the variance of all the elements of array , or of the elements of array along dimension dim if provided, and if the corresponding element in mask is true . Per default, the variance is defined as the best unbiased estimator and is computed as: var ( array ) = 1 / ( n - 1 ) sum_i ( array ( i ) - mean ( array )) ^ 2 where n is the number of elements. The use of the term n-1 for scaling is called Bessel 's correction. The scaling can be changed with the logical argument corrected . If corrected is .false. , then the sum is scaled with n , otherwise with n-1 . Syntax result = var (array [, mask [, corrected]]) result = var (array, dim [, mask [, corrected]]) Class Generic subroutine Arguments array : Shall be an array of type integer , real , or complex . It is an intent(in) argument. dim : Shall be a scalar of type integer with a value in the range from 1 to n , where n is the rank of array . It is an intent(in) argument. mask (optional): Shall be of type logical and either a scalar or an array of the same shape as array . It is an intent(in) argument. corrected (optional): Shall be a scalar of type logical . If corrected is .true. (default value), the sum is scaled with n-1 . If corrected is .false. , then the sum is scaled with n . It is an intent(in) argument. Return value If array is of type real or complex , the result is of type real corresponding to the type of array .\nIf array is of type integer , the result is of type real(dp) . If dim is absent, a scalar with the variance of all elements in array is returned. Otherwise, an array of rank n-1 , where n equals the rank of array , and a shape similar to that of array with dimension dim dropped is returned. If mask is specified, the result is the variance of all elements of array corresponding to true elements of mask . If every element of mask is false , the result is IEEE NaN . If the variance is computed with only one single element, then the result is IEEE NaN if corrected is .true. and is 0. if corrected is .false. . Example program example_var use stdlib_stats , only : var implicit none real :: x ( 1 : 6 ) = [ 1. , 2. , 3. , 4. , 5. , 6. ] real :: y ( 1 : 2 , 1 : 3 ) = reshape ([ 1. , 2. , 3. , 4. , 5. , 6. ], [ 2 , 3 ]) print * , var ( x ) !returns 3.5 print * , var ( x , corrected = . false .) !returns 2.9167 print * , var ( y ) !returns 3.5 print * , var ( y , 1 ) !returns [0.5, 0.5, 0.5] print * , var ( y , 1 , y > 3. ) !returns [NaN, NaN, 0.5] print * , var ( y , 1 , y > 3. , corrected = . false .) !returns [NaN, 0., 0.25] end program example_var","tags":"","loc":"page/specs/stdlib_stats.html"},{"title":"stats_distribution_exponential – Fortran-lang/stdlib","text":"Statistical Distributions -- Exponential Distribution Module Statistical Distributions -- Exponential Distribution Module rvs_exp - exponential distribution random variates Status Description Syntax Class Arguments Return value Example pdf_exp - exponential distribution probability density function Status Description Syntax Class Arguments Return value Example cdf_exp - exponential cumulative distribution function Status Description Syntax Class Arguments Return value Example rvs_exp - exponential distribution random variates Status Experimental Description An exponential distribution is the distribution of time between events in a Poisson point process.\nThe inverse scale parameter lambda specifies the average time between events ( ), also called the rate of events. Without argument, the function returns a random sample from the standard exponential distribution . With a single argument, the function returns a random sample from the exponential distribution .\nFor complex arguments, the real and imaginary parts are sampled independently of each other. With two arguments, the function returns a rank-1 array of exponentially distributed random variates. Note The algorithm used for generating exponential random variates is fundamentally limited to double precision. 1 Syntax result = rvs_exp ([lambda] [[, array_size]]) Class Elemental function Arguments lambda : optional argument has intent(in) and is a scalar of type real or complex .\nIf lambda is real , its value must be positive. If lambda is complex , both the real and imaginary components must be positive. array_size : optional argument has intent(in) and is a scalar of type integer with default kind. Return value The result is a scalar or rank-1 array with a size of array_size , and the same type as lambda .\nIf lambda is non-positive, the result is NaN . Example program example_exponential_rvs use stdlib_random , only : random_seed use stdlib_stats_distribution_exponential , only : rexp => rvs_exp implicit none complex :: scale integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , rexp () !single standard exponential random variate ! 0.358690143 print * , rexp ( 2.0 ) !exponential random variate with lambda=2.0 ! 0.816459715 print * , rexp ( 0.3 , 10 ) !an array of 10 variates with lambda=0.3 ! 1.84008647E-02 3.59742008E-02 0.136567295 0.262772143 3.62352766E-02 ! 0.547133625 0.213591918 4.10784185E-02 0.583882213 0.671128035 scale = ( 2.0 , 0.7 ) print * , rexp ( scale ) !single complex exponential random variate with real part of lambda=2.0; !imagainary part of lambda=0.7 ! (1.41435969,4.081114382E-02) end program example_exponential_rvs pdf_exp - exponential distribution probability density function Status Experimental Description The probability density function (pdf) of the single real variable exponential distribution is: For a complex variable with independent real and imaginary parts, the joint probability density function is the product of the corresponding real and imaginary marginal pdfs: 2 Syntax result = pdf_exp (x, lambda) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . lambda : has intent(in) and is a scalar of type real or complex .\nIf lambda is real , its value must be positive. If lambda is complex , both the real and imaginary components must be positive. All arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If lambda is non-positive, the result is NaN . Example program example_exponential_pdf use stdlib_random , only : random_seed use stdlib_stats_distribution_exponential , only : exp_pdf => pdf_exp , & rexp => rvs_exp implicit none real , dimension ( 2 , 3 , 4 ) :: x , lambda real :: xsum complex :: scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! probability density at x=1.0 in standard exponential print * , exp_pdf ( 1.0 , 1.0 ) ! 0.367879450 ! probability density at x=2.0 with lambda=2.0 print * , exp_pdf ( 2.0 , 2.0 ) ! 3.66312787E-02 ! probability density at x=2.0 with lambda=-1.0 (out of range) print * , exp_pdf ( 2.0 , - 1.0 ) ! NaN ! standard exponential random variates array x = reshape ( rexp ( 0.5 , 24 ), [ 2 , 3 , 4 ]) ! a rank-3 exponential probability density lambda (:, :, :) = 0.5 print * , exp_pdf ( x , lambda ) ! 0.349295378 0.332413018 0.470253497 0.443498343 0.317152828 ! 0.208242029 0.443112582 8.07073265E-02 0.245337561 0.436016470 ! 7.14025944E-02 5.33841923E-02 0.322308093 0.264558554 0.212898195 ! 0.100339092 0.226891592 0.444002301 9.91026312E-02 3.87373678E-02 ! 3.11400592E-02 0.349431813 0.482774824 0.432669312 ! probability density array where lambda<=0.0 for certain elements print * , exp_pdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.367879450 NaN NaN ! `pdf_exp` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( exp_pdf ( x (:,:, i ), lambda (:,:, i ))) end do print * , xsum ! 6.45566940 ! complex exponential probability density function at (1.5,1.0) with real part ! of lambda=1.0 and imaginary part of lambda=2.0 scale = ( 1.0 , 2. ) print * , exp_pdf (( 1.5 , 1.0 ), scale ) ! 6.03947677E-02 ! As above, but with lambda%re < 0 scale = ( - 1.0 , 2. ) print * , exp_pdf (( 1.5 , 1.0 ), scale ) ! NaN end program example_exponential_pdf cdf_exp - exponential cumulative distribution function Status Experimental Description Cumulative distribution function (cdf) of the single real variable exponential distribution: For a complex variable with independent real and imaginary parts, the joint cumulative distribution function is the product of corresponding real and imaginary marginal cdfs: 2 Syntax result = cdf_exp (x, lambda) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . lambda : has intent(in) and is a scalar of type real or complex .\nIf lambda is real , its value must be positive. If lambda is complex , both the real and imaginary components must be positive. All arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If lambda is non-positive, the result is NaN . Example program example_exponential_cdf use stdlib_random , only : random_seed use stdlib_stats_distribution_exponential , only : exp_cdf => cdf_exp , & rexp => rvs_exp implicit none real , dimension ( 2 , 3 , 4 ) :: x , lambda real :: xsum complex :: scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! standard exponential cumulative distribution at x=1.0 print * , exp_cdf ( 1.0 , 1.0 ) ! 0.632120550 ! cumulative distribution at x=2.0 with lambda=2 print * , exp_cdf ( 2.0 , 2.0 ) ! 0.981684387 ! cumulative distribution at x=2.0 with lambda=-1.0 (out of range) print * , exp_cdf ( 2.0 , - 1.0 ) ! NaN ! standard exponential random variates array x = reshape ( rexp ( 0.5 , 24 ), [ 2 , 3 , 4 ]) ! a rank-3 exponential cumulative distribution lambda (:, :, :) = 0.5 print * , exp_cdf ( x , lambda ) ! 0.301409245 0.335173965 5.94930053E-02 0.113003314 ! 0.365694344 0.583515942 0.113774836 0.838585377 ! 0.509324908 0.127967060 0.857194781 0.893231630 ! 0.355383813 0.470882893 0.574203610 0.799321830 ! 0.546216846 0.111995399 0.801794767 0.922525287 ! 0.937719882 0.301136374 3.44503522E-02 0.134661376 ! cumulative distribution array where lambda<=0.0 for certain elements print * , exp_cdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.632120550 NaN NaN ! `cdf_exp` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( exp_cdf ( x (:,:, i ), lambda (:,:, i ))) end do print * , xsum ! 11.0886612 ! complex exponential cumulative distribution at (0.5,0.5) with real part of ! lambda=0.5 and imaginary part of lambda=1.0 scale = ( 0.5 , 1.0 ) print * , exp_cdf (( 0.5 , 0.5 ), scale ) ! 8.70351046E-02 ! As above, but with lambda%im < 0 scale = ( 1.0 , - 2.0 ) print * , exp_cdf (( 1.5 , 1.0 ), scale ) ! NaN end program example_exponential_cdf Marsaglia, George, and Wai Wan Tsang. \"The ziggurat method for generating random variables.\" Journal of statistical software 5 (2000): 1-7. ↩ Miller, Scott, and Donald Childers. Probability and random processes: With applications to signal processing and communications . Academic Press, 2012 (p. 197). ↩ ↩","tags":"","loc":"page/specs/stdlib_stats_distribution_exponential.html"},{"title":"stats_distribution_normal – Fortran-lang/stdlib","text":"Statistical Distributions -- Normal Distribution Module Statistical Distributions -- Normal Distribution Module rvs_normal - normal distribution random variates Status Description Syntax Class Arguments Return value Example pdf_normal - normal distribution probability density function Status Description Syntax Class Arguments Return value Example cdf_normal - normal distribution cumulative distribution function Status Description Syntax Class Arguments Return value Example rvs_normal - normal distribution random variates Status Experimental Description A normal continuous random variate distribution, also known as Gaussian, or Gauss or Laplace-Gauss distribution.\nThe location loc specifies the mean or expectation ( ). The scale specifies the standard deviation ( ). Without argument, the function returns a standard normal distributed random variate . With two arguments, the function returns a normal distributed random variate . For complex arguments, the real and imaginary parts are independent of each other. With three arguments, the function returns a rank-1 array of normal distributed random variates. Note The algorithm used for generating exponential random variates is fundamentally limited to double precision. 1 Syntax result = rvs_normal ([loc, scale] [[, array_size]]) Class Elemental function (passing both loc and scale ). Arguments loc : optional argument has intent(in) and is a scalar of type real or complex . scale : optional argument has intent(in) and is a positive scalar of type real or complex . array_size : optional argument has intent(in) and is a scalar of type integer . loc and scale arguments must be of the same type. Return value The result is a scalar or rank-1 array, with a size of array_size , and the same type as scale and loc . If scale is non-positive, the result is NaN . Example program example_normal_rvs use stdlib_random , only : random_seed use stdlib_stats_distribution_normal , only : norm => rvs_normal implicit none real :: a ( 2 , 3 , 4 ), b ( 2 , 3 , 4 ) complex :: loc , scale integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , norm () !single standard normal random variate ! 0.563655198 print * , norm ( 1.0 , 2.0 ) !normal random variate mu=1.0, sigma=2.0 ! -0.633261681 print * , norm ( 0.0 , 1.0 , 10 ) !an array of 10 standard norml random variates ! -3.38123664E-02 -0.190365672 0.220678389 -0.424612164 -0.249541596 ! 0.865260184 1.11086845 -0.328349441 1.10873628 1.27049923 a (:, :, :) = 1.0 b (:, :, :) = 1.0 print * , norm ( a , b ) ! a rank 3 random variates array !0.152776539 -7.51764774E-02 1.47208166 0.180561781 1.32407105 ! 1.20383692 0.123445868 -0.455737948 -0.469808221 1.60750175 ! 1.05748117 0.720934749 0.407810807 1.48165631 2.31749439 ! 0.414566994 3.06084275 1.86505437 1.36338580 7.26878643E-02 ! 0.178585172 1.39557445 0.828021586 0.872084975 loc = ( - 1.0 , 2.0 ) scale = ( 2.0 , 1.0 ) print * , norm ( loc , scale ) !single complex normal random variate with real part of mu=-1, sigma=2; !imagainary part of mu=2.0 and sigma=1.0 ! (1.22566295,2.12518454) end program example_normal_rvs pdf_normal - normal distribution probability density function Status Experimental Description The probability density function (pdf) of the single real variable normal distribution: For a complex varible with independent real and imaginary parts, the joint probability density function is the product of the the corresponding real and imaginary marginal pdfs: 2 Syntax result = pdf_normal (x, loc, scale) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . loc : has intent(in) and is a scalar of type real or complex . scale : has intent(in) and is a positive scalar of type real or complex . All three arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If scale is non-positive, the result is NaN . Example program example_normal_pdf use stdlib_random , only : random_seed use stdlib_stats_distribution_normal , only : norm_pdf => pdf_normal , & norm => rvs_normal implicit none real , dimension ( 3 , 4 , 5 ) :: x , mu , sigma real :: xsum complex :: loc , scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! probability density at x=1.0 in standard normal print * , norm_pdf ( 1.0 , 0. , 1. ) ! 0.241970733 ! probability density at x=2.0 with mu=-1.0 and sigma=2.0 print * , norm_pdf ( 2.0 , - 1.0 , 2.0 ) ! 6.47588000E-02 ! probability density at x=1.0 with mu=1.0 and sigma=-1.0 (out of range) print * , norm_pdf ( 1.0 , 1.0 , - 1.0 ) ! NaN ! standard normal random variates array x = reshape ( norm ( 0.0 , 1.0 , 60 ), [ 3 , 4 , 5 ]) ! standard normal probability density array mu (:, :, :) = 0.0 sigma (:, :, :) = 1.0 print * , norm_pdf ( x , mu , sigma ) ! 0.340346158 0.285823315 0.398714304 0.391778737 0.389345556 ! 0.364551932 0.386712372 0.274370432 0.215250477 0.378006011 ! 0.215760440 0.177990928 0.278640658 0.223813817 0.356875211 ! 0.285167664 0.378533930 0.390739858 0.271684974 0.138273031 ! 0.135456234 0.331718773 0.398283750 0.383706540 ! probability density array where sigma<=0.0 for certain elements print * , norm_pdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.398942292 NaN NaN ! `pdf_normal` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( norm_pdf ( x (:,:, i ), mu (:,:, i ), sigma (:,:, i ))) end do print * , xsum ! 18.0754433 ! complex normal probability density function at x=(1.5,1.0) with real part ! of mu=1.0, sigma=1.0 and imaginary part of mu=-0.5, sigma=2.0 loc = ( 1.0 , - 0.5 ) scale = ( 1.0 , 2. ) print * , norm_pdf (( 1.5 , 1.0 ), loc , scale ) ! 5.30100204E-02 end program example_normal_pdf cdf_normal - normal distribution cumulative distribution function Status Experimental Description Cumulative distribution function of the single real variable normal distribution: For the complex variable with independent real and imaginary parts, the joint cumulative distribution function is the product of the corresponding real and imaginary marginal cdfs: 2 Syntax result = cdf_normal (x, loc, scale) Class Elemental function Arguments x : has intent(in) and is a scalar of type real or complex . loc : has intent(in) and is a scalar of type real or complex . scale : has intent(in) and is a positive scalar of type real or complex . All three arguments must have the same type. Return value The result is a scalar or an array, with a shape conformable to the arguments, and the same type as the input arguments. If scale is non-positive, the result is NaN . Example program example_normal_cdf use stdlib_random , only : random_seed use stdlib_stats_distribution_normal , only : norm_cdf => cdf_normal , & norm => rvs_normal implicit none real , dimension ( 2 , 3 , 4 ) :: x , mu , sigma real :: xsum complex :: loc , scale integer :: seed_put , seed_get , i seed_put = 1234567 call random_seed ( seed_put , seed_get ) ! standard normal cumulative probability at x=0.0 print * , norm_cdf ( 0.0 , 0.0 , 1.0 ) ! 0.500000000 ! cumulative probability at x=2.0 with mu=-1.0 sigma=2.0 print * , norm_cdf ( 2.0 , - 1.0 , 2.0 ) ! 0.933192849 ! cumulative probability at x=1.0 with mu=1.0 and sigma=-1.0 (out of range) print * , norm_cdf ( 1.0 , 1.0 , - 1.0 ) ! NaN ! standard normal random variates array x = reshape ( norm ( 0.0 , 1.0 , 24 ), [ 2 , 3 , 4 ]) ! standard normal cumulative array mu (:, :, :) = 0.0 sigma (:, :, :) = 1.0 print * , norm_cdf ( x , mu , sigma ) ! 0.713505626 0.207069695 0.486513376 0.424511284 0.587328553 ! 0.335559726 0.401470929 0.806552052 0.866687536 0.371323735 ! 0.866228044 0.898046613 0.198435277 0.141147852 0.681565762 ! 0.206268221 0.627057910 0.580759525 0.190364420 7.27325380E-02 ! 7.08068311E-02 0.728241026 0.522919059 0.390097380 ! cumulative probability array where sigma<=0.0 for certain elements print * , norm_cdf ([ 1.0 , 1.0 , 1.0 ], [ 1.0 , 1.0 , 1.0 ], [ 1.0 , 0.0 , - 1.0 ]) ! 0.500000000 NaN NaN ! `cdf_normal` is pure and, thus, can be called concurrently xsum = 0.0 do concurrent ( i = 1 : size ( x , 3 )) xsum = xsum + sum ( norm_cdf ( x (:,:, i ), mu (:,:, i ), sigma (:,:, i ))) end do print * , xsum ! 11.3751936 ! complex normal cumulative distribution at x=(0.5,-0.5) with real part of ! mu=1.0, sigma=0.5 and imaginary part of mu=0.0, sigma=1.0 loc = ( 1.0 , 0.0 ) scale = ( 0.5 , 1.0 ) print * , norm_cdf (( 0.5 , - 0.5 ), loc , scale ) ! 4.89511043E-02 end program example_normal_cdf Marsaglia, George, and Wai Wan Tsang. \"The ziggurat method for generating random variables.\" Journal of statistical software 5 (2000): 1-7. ↩ Miller, Scott, and Donald Childers. Probability and random processes: With applications to signal processing and communications . Academic Press, 2012 (p. 197). ↩ ↩","tags":"","loc":"page/specs/stdlib_stats_distribution_normal.html"},{"title":"stats_distribution_uniform – Fortran-lang/stdlib","text":"Statistical Distributions -- Uniform Distribution Module Statistical Distributions -- Uniform Distribution Module shuffle - Using Fisher-Yates algorithm to generate a random permutation of a list Status Description Syntax Class Arguments Return value Example rvs_uniform - uniform distribution random variates Status Description Syntax Class Arguments Return value Example pdf_uniform - Uniform distribution probability density function Status Description Syntax Class Arguments Return value Example cdf_uniform - Uniform distribution cumulative distribution function Status Description Syntax Class Arguments Return value Example shuffle - Using Fisher-Yates algorithm to generate a random permutation of a list Status Experimental Description Applying Fisher-Yates algorithm to generate an unbiased permutation for any list of intrinsic numerical data types. Syntax result = shuffle ( list ) Class Function. Arguments list : argument has intent(in) and is a rank one array of integer , real , or complex type. Return value Return a randomized rank one array of the input type. Example program example_shuffle use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : shuffle implicit none integer :: seed_put , seed_get , i real :: x ( 10 ) integer :: n ( 10 ) complex :: z ( 10 ) do i = 1 , 10 n ( i ) = i x ( i ) = real ( i ) z ( i ) = cmplx ( real ( i ), real ( i )) end do seed_put = 32165498 call random_seed ( seed_put , seed_get ) ! set and get current value of seed print * , shuffle ( n ) ! get randomized n !10 6 9 2 8 1 3 5 7 4 print * , shuffle ( x ) ! get randomized x !5.0 10.0 9.0 4.0 3.0 8.0 2.0 1.0 7.0 6.0 print * , shuffle ( z ) ! get randomized z !(8.0, 8.0) (7.0, 7.0) (4.0, 4.0) (1.0, 1.0) (5.0, 5.0) !(9.0, 9.0) (6.0, 6.0) (3.0, 3.0) (2.0, 2.0) (10.0, 10.0) end program example_shuffle rvs_uniform - uniform distribution random variates Status Experimental Description Without argument the function returns a scalar standard uniformly distributed variate U(0,1) of real type with single precision on [0,1]. With single argument scale of integer type the function returns a scalar uniformly distributed variate of integer type on [0,scale]. This is the standard Rectangular distribution. With single argument scale of real or complex type the function returns a scalar uniformly distributed variate of real type on [0, scale] or complex type on [(0, 0i), (scale, i(scale))]. With double arguments loc and scale the function returns a scalar uniformly distributed random variates of integer or real type on [loc, loc + scale], or complex type on [(loc, i(loc)), ((loc + scale), i(loc + scale))], dependent of input type. With triple arguments loc , scale and array_size the function returns a rank one array of uniformly distributed variates of integer , real or complex type with an array size of array_size . For complex type, the real part and imaginary part are independent of each other. Note: the algorithm used for generating uniform random variates is fundamentally limited to double precision. Syntax result = rvs_uniform ([[loc,] scale] [[[,array_size]]]) Class Elemental function (without the third argument). Arguments loc : optional argument has intent(in) and is a scalar of type integer , real or complex . scale : optional argument has intent(in) and is a scalar of type integer , real or complex . array_size : optional argument has intent(in) and is a scalar of type integer with default kind. loc and scale must have the same type and kind when both are present. Return value The result is a scalar or a rank one array with size of array_size , of type integer , real or complex depending on the input type. Example program example_uniform_rvs use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : uni => rvs_uniform implicit none complex :: loc , scale real :: a ( 3 , 4 , 5 ), b ( 3 , 4 , 5 ) integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , uni () !real standard uniform random variate in [0., 1.] ! 0.161520019 print * , uni ( 3.0 ) !an uniform random variate in [0., 3.] ! 1.65974522 print * , uni ( - 0.5 , 1.0 ) !an uniform random variate in [-0.5, 0.5] ! 0.486900032 print * , uni ( - 1.0 , 2.0 , 10 ) !an array of 10 uniform random variates in [-1., 1.] !0.884182811 -0.771520197 0.560377002 0.709313750 -7.12267756E-02 !-0.431066573 0.497536063 -0.396331906 -0.325983286 0.137686729 print * , uni ( 20 ) !a random integer variate in [0, 20] ! 17 print * , uni ( 5 , 13 ) !a random integer variate in [5, 18] ! 15 print * , uni ( 3 , 19 , 10 ) !an array of 10 integer variates in [3,22] !7 16 16 12 9 21 19 4 3 19 loc = ( - 0.5 , - 0.5 ) scale = ( 1.0 , 1.0 ) print * , uni ( scale ) !a complex uniform random variate in unit square !(0.139202669, 0.361759573) print * , uni ( loc , scale ) !a complex uniform random variate in [(-0.5, -0.5), (0.5, 0.5)] !(0.296536088,-0.143987954) print * , uni ( loc , scale , 10 ) !an array of 10 complex uniform random variate in [(-0.5, -0.5), (0.5, 0.5)] !(-0.302334785,-0.401923567) (0.281620383,9.534919262E-02) ! (-0.374348879,0.457528770) (0.442990601,-0.240510434) ! (-0.421572685,0.279313922) (-0.182090610,5.901372433E-02) ! (-7.864198089E-02,0.378484428) (-0.423258364,-0.201292425) ! (0.193327367,-0.353985727) (-0.397661150,0.355926156) a (:, :, :) = - 0.5 b (:, :, :) = 1.0 print * , uni ( a , b ) !a rank 3 array of random variates in [-0.5,0.5] ! -0.249188632 -0.199248433 -0.389813602 2.88307667E-03 0.238479793, ! 0.264856219 -0.205177426 -0.480921626 0.131218433 0.252170086, ! -0.303151041 -8.89462233E-02 -0.377370685 0.341802299 0.323204756, ! 0.358679056 -0.138909757 0.384329498 -0.109372199 0.132353067, ! 0.494320452 0.419343710 -0.103044361 0.461389005 0.403132677 ! 0.121850729 0.403839290 -0.349389791 0.490482628 0.156600773 ! 8.46788883E-02 -0.483680278 0.388107836 0.119698405 0.154214382 ! 0.153113484 0.236523747 0.155937552 -0.135760903 0.219589531 ! 0.394639254 6.30156994E-02 -0.342692465 -0.444846451 -0.215700030 ! 0.204189956 -0.208748132 0.355063021 8.98272395E-02 -0.237928331 ! 2.98077464E-02 -0.485149682 -8.06870461E-02 -0.372713923 ! -0.178335011 0.283877611 -2.13934183E-02 -9.21690464E-03 ! 4.56320047E-02 0.220112979 end program example_uniform_rvs pdf_uniform - Uniform distribution probability density function Status Experimental Description The probability density function of the uniform distribution: f(x) = 0 x < loc or x > loc + scale for all types uniform distributions For random variable x in [loc, loc + scale]: f(x) = 1 / (scale + 1); for discrete uniform distribution. f(x) = 1 / scale; for continuous uniform distribution. f(x) = 1 / (scale%re * scale%im); for complex uniform distribution. Syntax result = pdf_uniform (x, loc, scale) Class Elemental function. Arguments x : has intent(in) and is a scalar of type integer , real or complex . loc : has intent(in) and is a scalar of type integer , real or complex . scale : has intent(in) and is a scalar of type integer , real or complex . All three arguments must have the same type and kind. Return value The result is a scalar or an array, with a shape conformable to arguments, of type real . Example program example_uniform_pdf use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : uni_pdf => pdf_uniform , & uni => rvs_uniform implicit none complex :: loc , scale real :: a ( 3 , 4 , 5 ), b ( 3 , 4 , 5 ), x ( 3 , 4 , 5 ) integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , uni_pdf ( 3 , 2 , 10 ) !probability density at 3 in range [2, 10] ! 9.09090936E-02 print * , uni_pdf ( 0.5 , 0.0 , 1.0 ) !a probability density at 0.5 in [0., 1.] ! 1.00000000 print * , uni_pdf ( 0.7 , - 1.0 , 2.0 ) !a probability density at 0.7 in [-1., 1.] ! 0.500000000 a (:, :, :) = 0.0 b (:, :, :) = 2.0 x = reshape ( uni ( 0. , 2. , 60 ), [ 3 , 4 , 5 ]) ! uniform random variates array in [0., 2.] print * , uni_pdf ( x , a , b ) ! probability density array in [0., 2.] ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 ! 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 0.500000000 loc = ( - 0.5 , - 0.5 ) scale = ( 1.0 , 1.0 ) print * , uni_pdf (( - 0.1 , 0.2 ), loc , scale ) ! joint probability density at (-0.1,0.2) in [(-0.5, -0.5), (0.5, 0.5)] ! 1.00000000 end program example_uniform_pdf cdf_uniform - Uniform distribution cumulative distribution function Status Experimental Description Cumulative distribution function of the uniform distribution: F(x) = 0 x < loc for all types uniform distributions F(x) = 1 x > loc + scale for all types uniform distributions For random variable x in [loc, loc + scale]: F(x) = (x - loc + 1) / (scale + 1); for discrete uniform distribution. F(x) = (x - loc) / scale; for continuous uniform distribution. F(x) = (x%re - loc%re)(x%im - loc%im) / (scale%re * scale%im); for complex uniform distribution. Syntax result = cdf_uniform (x, loc, scale) Class Elemental function. Arguments x : has intent(in) and is a scalar of type integer , real or complex . loc : has intent(in) and is a scalar of type integer , real or complex . scale : has intent(in) and is a scalar of type integer , real or complex . All three arguments must have the same type and kind. Return value The result is a scalar or an array, with a shape conformable to arguments, of type real . Example program example_uniform_cdf use stdlib_random , only : random_seed use stdlib_stats_distribution_uniform , only : uni_cdf => cdf_uniform , & uni => rvs_uniform implicit none real :: x ( 3 , 4 , 5 ), a ( 3 , 4 , 5 ), b ( 3 , 4 , 5 ) complex :: loc , scale integer :: seed_put , seed_get seed_put = 1234567 call random_seed ( seed_put , seed_get ) print * , uni_cdf ( 0.5 , 0. , 1. ) ! a cumulative at 0.5 in [0., 1.] !0.500000000 print * , uni_cdf ( 0.7 , - 1.0 , 2.0 ) ! a cumulative at 0.7 in [-1.0, 1.0] ! 0.850000024 print * , uni_cdf ( 6 , 2 , 10 ) ! a cumulative at 6 in [2, 10] ! 0.454545468 a (:, :, :) = - 1.0 b (:, :, :) = 2.0 x = reshape ( uni ( - 1.0 , 2.0 , 60 ), [ 3 , 4 , 5 ]) ! uniform random variates array print * , uni_cdf ( x , a , b ) ! cumulative array in [-1.0, 1.0] !0.161520004 0.553248405 0.986900032 0.942091405 0.114239901 0.780188501 ! 0.854656875 0.464386612 0.284466714 0.748768032 0.301834047 0.337008357 !0.568843365 0.596165061 0.180993259 0.614166319 0.214835495 7.98164606E-02 !0.641274095 0.607101977 0.701139212 0.230517209 1.97925568E-02 0.857982159 !0.712761045 0.139202654 0.361759573 0.796536088 0.356012046 0.197665215 !9.80764329E-02 0.781620383 0.595349193 0.125651121 0.957528770 0.942990601 !0.259489566 7.84273148E-02 0.779313922 0.317909390 0.559013724 0.421358019 !0.878484428 7.67416358E-02 0.298707575 0.693327367 0.146014273 0.102338850 !0.855926156 0.250811368 0.300751567 0.110186398 0.502883077 0.738479793 !0.764856219 0.294822574 1.90783739E-02 0.631218433 0.752170086 0.196848959 loc = ( 0. , 0. ) scale = ( 2. , 1. ) print * , uni_cdf (( 1.2 , 0.5 ), loc , scale ) ! joint cumulative distribution at (1.2,0.5) in [(0.,0.), (2.,1.)] ! 0.300000012 end program example_uniform_cdf","tags":"","loc":"page/specs/stdlib_stats_distribution_uniform.html"},{"title":"str2num – Fortran-lang/stdlib","text":"The stdlib_str2num module This module proposes a function-style interface for string-to-number conversion. It also profits from Fortran's interfaces to implement precision-dependant algorithms to maximize runtime efficiency. The stdlib_str2num module to_num - conversion of strings to numbers Status Description Syntax Arguments Return value Example to_num_from_stream - conversion of a stream of values in a string to numbers Status Description Syntax Arguments Return value Example Note to_num - conversion of strings to numbers Status Experimental Description Convert a string or an array of strings to numerical types. Syntax number = to_num (string, mold) Arguments string : argument has intent(in) and is of type character(*) . mold : argument has intent(in) and is of numerical type (that is of integer or of real ). Note : The type of the mold argument defines the type of the result. Return value Return a scalar of numerical type (i.e., integer , or real ). Example program example_string_to_number use stdlib_kinds , only : dp use stdlib_str2num , only : to_num implicit none character (:), allocatable :: txt real ( dp ) :: x txt = ' 8.8541878128e−12 ' x = to_num ( txt , x ) end program example_string_to_number to_num_from_stream - conversion of a stream of values in a string to numbers Status Experimental Description Convert a stream of values in a string to an array of values. Syntax number = to_num_from_stream (string, mold) Arguments string : argument has intent(in) and is of type character(:), pointer . mold : argument has intent(in) and is of numerical type (currently of integer or real ). Note : The type of the mold argument defines the type of the result. Return value Return a scalar of numerical type (i.e., integer or real ). Example program example_stream_of_strings_to_numbers use stdlib_kinds , only : dp use stdlib_str2num , only : to_num_from_stream implicit none character (:), allocatable , target :: chain character ( len = :), pointer :: cptr real ( dp ), allocatable :: r (:), p (:) integer :: i chain = \" 1.234 1.E1 1e0 0.1234E0 12.21e+001 -34.5E1\" allocate ( r ( 6 ), p ( 6 ) ) !> Example for streamline conversion using `to_num_from_stream` cptr => chain do i = 1 , 6 r ( i ) = to_num_from_stream ( cptr , r ( i ) ) !> the pointer is shifted within the function end do read ( chain , * ) p print * , \"Reading with to_num_from_stream\" print * , r print * , \"Reading with formatted read\" print * , p end program example_stream_of_strings_to_numbers Note The accuracy of the conversion is implementation dependent; it is recommended that implementers guarantee precision down to the last 3 bits. The current implementation has been tested to provide for : sp : exact match dp : precision up-to epsilon(0.0_dp) qp : precision around 200*epsilon(0.0_qp) Where precision refers to the relative difference between to_num and read . On the other hand, to_num provides speed-ups ranging from 4x to >10x compared to the intrinsic read .","tags":"","loc":"page/specs/stdlib_str2num.html"},{"title":"string_type – Fortran-lang/stdlib","text":"The stdlib_string_type module The stdlib_string_type module Introduction Derived types provided The string_type derived type Status Procedures and methods provided Constructor for empty string Status Description Syntax Class Argument Result value Example Constructor from character scalar Status Description Syntax Class Argument Result value Example Constructor from integer scalar Status Description Syntax Class Argument Result value Example Constructor from logical scalar Status Description Syntax Class Argument Result value Example Assignment of character scalar Status Description Syntax Class Example Len function Status Description Syntax Class Argument Result value Example Len_trim function Status Description Syntax Class Argument Result value Example Trim function Status Description Syntax Class Argument Result value Example Adjustl function Status Description Syntax Class Argument Result value Example Adjustr function Status Description Syntax Class Argument Result value Example Repeat function Status Description Syntax Class Argument Result value Example Char function Status Description Syntax Class Argument Result value Example Char function (position variant) Status Description Syntax Class Argument Result value Example Char function (range variant) Status Description Syntax Class Argument Result value Example Ichar function Status Description Syntax Class Argument Result value Example Iachar function Status Description Syntax Class Argument Result value Example Index function Status Description Syntax Class Argument Result value Example Scan function Status Description Syntax Class Argument Result value Example Verify function Status Description Syntax Class Argument Result value Example Lgt function (lexical greater than) Status Description Syntax Class Argument Result value Example Llt function (lexical less than) Status Description Syntax Class Argument Result value Example Lge function (lexical greater than or equal) Status Description Syntax Class Argument Result value Example Lle function (lexical less than or equal) Status Description Syntax Class Argument Result value Example To_lower function Status Description Syntax Class Argument Result Value Example To_upper function Status Description Syntax Class Argument Result Value Example To_title function Status Description Syntax Class Argument Result Value Example To_sentence function Status Description Syntax Class Argument Result Value Example Reverse function Status Description Syntax Class Argument Result Value Example Comparison operator greater Status Description Syntax Class Argument Result value Example Comparison operator less Status Description Syntax Class Argument Result value Example Comparison operator greater or equal Status Description Syntax Class Argument Result value Example Comparison operator less or equal Status Description Syntax Class Argument Result value Example Comparison operator equal Status Description Syntax Class Argument Result value Example Comparison operator not equal Status Description Syntax Class Argument Result value Example Concatenation operator Status Description Syntax Class Argument Result value Example Unformatted write Status Description Syntax Class Argument Example Formatted write Status Description Syntax Class Argument Example Unformatted read Status Description Syntax Class Argument Example Formatted read Status Description Syntax Class Argument Example move Status Description Syntax Class Argument Example Introduction The stdlib_string_type provides a derived type holding an arbitrary sequence\nof characters compatible with most Fortran intrinsic character procedures as\nwell as operators for working with character variables and constants. Derived types provided The string_type derived type The string_type is defined as a non-extendible derived type representing a\nsequence of characters. The internal representation of the character sequence\nis implementation dependent and not visible for the user of the module. Status Experimental Procedures and methods provided Procedures returning string_type instances can usually be used in elemental\ncontext, while procedures returning scalar character values can only be\nused in a pure way. Constructor for empty string Status Experimental Description The module defines a constructor to create an empty string type. Creates a string instance representing an empty string. Syntax res = string_type () Class Elemental function. Argument None. Result value The result is an instance of string_type with zero length. Example program example_constructor_empty use stdlib_string_type implicit none type ( string_type ) :: string string = string_type () ! len(string) == 0 end program example_constructor_empty Constructor from character scalar Status Experimental Description The module defines a constructor to create a string type from a character scalar. Creates a string instance representing the input character scalar value.\nThe constructor shall create an empty string if an unallocated deferred-length\ncharacter variable is passed. Syntax res = string_type (string) Class Elemental function. Argument string : shall be a scalar character value. It is an intent(in) argument. Result value The result is an instance of string_type . Example program example_constructor_scalar use stdlib_string_type implicit none type ( string_type ) :: string string = string_type ( \"Sequence\" ) ! len(string) == 8 string = string_type ( \" S p a c e d \" ) ! len(string) == 13 end program example_constructor_scalar Constructor from integer scalar Status Experimental Description The module defines a constructor to create a string type from an integer scalar. Syntax res = string_type (string) Class Elemental function. Argument val : shall be a scalar integer value. It is an intent(in) argument. Result value The result is an instance of string_type . Example program example_constructor_integer use stdlib_string_type implicit none type ( string_type ) :: string string = string_type ( 42 ) ! len(string) == 2 string = string_type ( - 289 ) ! len(string) == 4 end program example_constructor_integer Constructor from logical scalar Status Experimental Description The module defines a constructor to create a string type from a logical scalar. Syntax res = string_type (string) Class Elemental function. Argument val : shall be a scalar logical value. It is an intent(in) argument. Result value The result is an instance of string_type . Example program example_constructor_logical use stdlib_string_type implicit none type ( string_type ) :: string string = string_type (. true .) ! len(string) == 1 string = string_type (. false .) ! len(string) == 1 end program example_constructor_logical Assignment of character scalar Status Experimental Description The module defines an assignment operations, = , to create a string type\nfrom a character scalar. Creates a string instance representing the right-hand-side character scalar value. Syntax lhs = rhs Class Elemental subroutine, assignment(=) . Example program example_constructor_character use stdlib_string_type implicit none type ( string_type ) :: string ! len(string) == 0 string = \"Sequence\" ! len(string) == 8 end program example_constructor_character Len function Status Experimental Description Returns the length of the string. Syntax res = len (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_len use stdlib_string_type implicit none type ( string_type ) :: string integer :: length string = \"Some longer sentence for this example.\" length = len ( string ) ! length == 38 string = \"Whitespace \" length = len ( string ) ! length == 38 end program example_len Len_trim function Status Experimental Description Returns the length of the character sequence without trailing spaces\nrepresented by the string. Syntax res = len_trim (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_len_trim use stdlib_string_type implicit none type ( string_type ) :: string integer :: length string = \"Some longer sentence for this example.\" length = len_trim ( string ) ! length == 38 string = \"Whitespace \" length = len_trim ( string ) ! length == 10 end program example_len_trim Trim function Status Experimental Description Returns the character sequence hold by the string without trailing spaces\nrepresented by a string_type . Syntax res = trim (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_trim use stdlib_string_type implicit none type ( string_type ) :: string string = \"Whitespace \" string = trim ( string ) ! len(string) == 10 end program example_trim Adjustl function Status Experimental Description Left-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Syntax res = adjustl (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_adjustl use stdlib_string_type implicit none type ( string_type ) :: string string = \" Whitespace\" string = adjustl ( string ) ! char(string) == \"Whitespace \" end program example_adjustl Adjustr function Status Experimental Description Right-adjust the character sequence represented by the string.\nThe length of the character sequence remains unchanged. Syntax res = adjustr (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_adjustr use stdlib_string_type implicit none type ( string_type ) :: string string = \"Whitespace \" string = adjustr ( string ) ! char(string) == \" Whitespace\" end program example_adjustr Repeat function Status Experimental Description Repeats the character sequence hold by the string by the number of\nspecified copies. Syntax res = repeat (string, ncopies) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . ncopies : Integer of default type. This argument is intent(in) . Result value The result is a scalar string_type value. Example program example_repeat use stdlib_string_type implicit none type ( string_type ) :: string string = \"What? \" string = repeat ( string , 3 ) ! string == \"What? What? What? \" end program example_repeat Char function Status Experimental Description Return the character sequence represented by the string. Syntax res = char (string) Class Pure function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a scalar character value. Example program example_char use stdlib_string_type implicit none type ( string_type ) :: string character ( len = :), allocatable :: dlc string = \"Character sequence\" dlc = char ( string ) ! dlc == \"Character sequence\" end program example_char Char function (position variant) Status Experimental Description Return the character at a certain position in the string. Syntax res = char (string, pos) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . pos : Integer of default type. This argument is intent(in) . Result value The result is a scalar character value. Example program example_char_position use stdlib_string_type implicit none type ( string_type ) :: string character ( len = :), allocatable :: dlc character ( len = 1 ), allocatable :: chars (:) string = \"Character sequence\" dlc = char ( string , 3 ) ! dlc == \"a\" chars = char ( string , [ 3 , 5 , 8 , 12 , 14 , 15 , 18 ]) ! chars == [\"a\", \"a\", \"e\", \"e\", \"u\", \"e\", \"e\"] end program example_char_position Char function (range variant) Status Experimental Description Return a substring from the character sequence of the string. Syntax res = char (string, start, last) Class Pure function. Argument string : Instance of a string_type . This argument is intent(in) . start : Integer of default type. This argument is intent(in) . last : Integer of default type. This argument is intent(in) . Result value The result is a scalar character value. Example program example_char_range use stdlib_string_type implicit none type ( string_type ) :: string character ( len = :), allocatable :: dlc string = \"Fortran\" dlc = char ( string , 1 , 4 ) ! dlc == \"Fort\" end program example_char_range Ichar function Status Experimental Description Character-to-integer conversion function. Returns the code for the character in the first character position of the\ncharacter sequence in the system's native character set. Syntax res = ichar (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_ichar use stdlib_string_type implicit none type ( string_type ) :: string integer :: code string = \"Fortran\" code = ichar ( string ) end program example_ichar Iachar function Status Experimental Description Code in ASCII collating sequence. Returns the code for the ASCII character in the first character position of\nthe character sequences represent by the string. Syntax res = iachar (string) Class Elemental function. Argument string : Instance of a string_type . This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_iachar use stdlib_string_type implicit none type ( string_type ) :: string integer :: code string = \"Fortran\" code = iachar ( string ) end program example_iachar Index function Status Experimental Description Position of a substring within a string . Returns the position of the start of the leftmost or rightmost occurrence\nof string substring in string , counting from one. If substring is not\npresent in string , zero is returned. Syntax res = index (string, substring[, back]) Class Elemental function. Argument string : Either scalar character value or string type. This argument is intent(in) . substring : Either scalar character value or string type. This argument is intent(in) . back : Either absent or a scalar logical value. This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_index use stdlib_string_type implicit none type ( string_type ) :: string integer :: pos string = \"Search this string for this expression\" pos = index ( string , \"this\" ) ! pos == 8 pos = index ( string , \"this\" , back = . true .) ! pos == 24 pos = index ( string , \"This\" ) ! pos == 0 end program example_index Scan function Status Experimental Description Scans a string for the presence any of the characters in a set of characters.\nIf back is either absent or false , this function returns the position\nof the leftmost character of string that is in set . If back is true ,\nthe rightmost position is returned. If no character of set is found in string , the result is zero. Syntax res = scan (string, set[, back]) Class Elemental function. Argument string : Either scalar character value or string type. This argument is intent(in) . set : Either scalar character value or string type. This argument is intent(in) . back : Either absent or a scalar logical value. This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_scan use stdlib_string_type implicit none type ( string_type ) :: string integer :: pos string = \"fortran\" pos = scan ( string , \"ao\" ) ! pos == 2 pos = scan ( string , \"ao\" , . true .) ! pos == 6 pos = scan ( string , \"c++\" ) ! pos == 0 end program example_scan Verify function Status Experimental Description Verifies that all the characters in string belong to the set of characters in set .\nIf back is either absent or false , this function returns the position\nof the leftmost character of string that is not in set . If back is true ,\nthe rightmost position is returned. If all characters of string are found\nin set , the result is zero. Syntax res = verify (string, set[, back]) Class Elemental function. Argument string : Either scalar character value or string type. This argument is intent(in) . set : Either scalar character value or string type. This argument is intent(in) . back : Either absent or a scalar logical value. This argument is intent(in) . Result value The result is a default integer scalar value. Example program example_verify use stdlib_string_type implicit none type ( string_type ) :: string integer :: pos string = \"fortran\" pos = verify ( string , \"ao\" ) ! pos == 1 pos = verify ( string , \"fo\" ) ! pos == 3 pos = verify ( string , \"c++\" ) ! pos == 1 pos = verify ( string , \"c++\" , back = . true .) ! pos == 7 pos = verify ( string , string ) ! pos == 0 end program example_verify Lgt function (lexical greater than) Status Experimental Description Lexically compare the order of two character sequences being greater than. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic lgt procedure. Syntax res = lgt (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lgt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = lgt ( string , \"abc\" ) ! res .eqv. .true. res = lgt ( string , \"bcd\" ) ! res .eqv. .false. res = lgt ( string , \"cde\" ) ! res .eqv. .false. end program example_lgt Llt function (lexical less than) Status Experimental Description Lexically compare the order of two character sequences being less than. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic llt procedure. Syntax res = llt (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_llt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = llt ( string , \"abc\" ) ! res .eqv. .false. res = llt ( string , \"bcd\" ) ! res .eqv. .false. res = llt ( string , \"cde\" ) ! res .eqv. .true. end program example_llt Lge function (lexical greater than or equal) Status Experimental Description Lexically compare the order of two character sequences being greater than\nor equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic lge procedure. Syntax res = lge (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lge use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = lge ( string , \"abc\" ) ! res .eqv. .true. res = lge ( string , \"bcd\" ) ! res .eqv. .true. res = lge ( string , \"cde\" ) ! res .eqv. .false. end program example_lge Lle function (lexical less than or equal) Status Experimental Description Lexically compare the order of two character sequences being less than\nor equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic lle procedure. Syntax res = lle (lhs, rhs) Class Elemental function. Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lle use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = lle ( string , \"abc\" ) ! res .eqv. .false. res = lle ( string , \"bcd\" ) ! res .eqv. .true. res = lle ( string , \"cde\" ) ! res .eqv. .true. end program example_lle To_lower function Status Experimental Description Returns a new string_type instance which holds the lowercase version of the\ncharacter sequence hold by the input string. Syntax lowercase_string = to_lower (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_lower use stdlib_string_type implicit none type ( string_type ) :: string , lowercase_string string = \"Lowercase This String\" ! string <-- \"Lowercase This String\" lowercase_string = to_lower ( string ) ! string <-- \"Lowercase This String\" ! lowercase_string <-- \"lowercase this string\" end program example_to_lower To_upper function Status Experimental Description Returns a new string_type instance which holds the uppercase version of the\ncharacter sequence hold by the input string. Syntax uppercase_string = to_upper (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_upper use stdlib_string_type implicit none type ( string_type ) :: string , uppercase_string string = \"Uppercase This String\" ! string <-- \"Uppercase This String\" uppercase_string = to_upper ( string ) ! string <-- \"Uppercase This String\" ! uppercase_string <-- \"UPPERCASE THIS STRING\" end program example_to_upper To_title function Status Experimental Description Returns a new string_type instance which holds the titlecase version\nof the character sequence hold by the input string.\nTitle case: First character of every word in the sentence is converted to\nuppercase and the rest of the characters are converted to lowercase.\nA word is a contiguous sequence of character(s) which consists of alphabetical\ncharacter(s) and numeral(s) only and doesn't exclude any alphabetical character\nor numeral present next to either of its 2 ends. Syntax titlecase_string = to_title (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_title use stdlib_string_type implicit none type ( string_type ) :: string , titlecase_string string = \"titlecase this string.\" ! string <-- \"titlecase this string.\" titlecase_string = to_title ( string ) ! string <-- \"titlecase this string.\" ! titlecase_string <-- \"Titlecase This String.\" end program example_to_title To_sentence function Status Experimental Description Returns a new string_type instance which holds the sentencecase\nversion of the character sequence hold by the input string.\nSentencecase version: The first alphabetical character of the input character sequence\nis transformed to uppercase unless it follows a numeral and the rest of the\ncharacters in the sequence are transformed to lowercase. Syntax sentencecase_string = to_sentence (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_to_sentence use stdlib_string_type implicit none type ( string_type ) :: string , sentencecase_string string = \"sentencecase this string.\" ! string <-- \"sentencecase this string.\" sentencecase_string = to_sentence ( string ) ! string <-- \"sentencecase this string.\" ! sentencecase_string <-- \"Sentencecase this string.\" end program example_to_sentence Reverse function Status Experimental Description Returns a new string_type instance which holds the reversed version of the\ncharacter sequence hold by the input string. Syntax reverse_string = reverse (string) Class Elemental function. Argument string : Instance of string_type . This argument is intent(in) . Result Value The result is a scalar string_type value. Example program example_reverse use stdlib_string_type implicit none type ( string_type ) :: string , reverse_string string = \"Reverse This String\" ! string <-- \"Reverse This String\" reverse_string = reverse ( string ) ! string <-- \"Reverse This String\" ! reverse_string <-- \"gnirtS sihT esreveR\" end program example_reverse Comparison operator greater Status Experimental Description Compare the order of two character sequences being greater. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(>) and operator(.gt.) . Syntax res = lhs > rhs res = lhs .gt. rhs Class Elemental function, operator(>) and operator(.gt.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_gt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string > \"abc\" ! res .eqv. .true. res = string > \"bcd\" ! res .eqv. .false. res = string > \"cde\" ! res .eqv. .false. end program example_gt Comparison operator less Status Experimental Description Compare the order of two character sequences being less. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(<) and operator(.lt.) . Syntax res = lhs < rhs res = lhs .lt. rhs Class Elemental function, operator(<) and operator(.lt.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_lt use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string < \"abc\" ! res .eqv. .false. res = string < \"bcd\" ! res .eqv. .false. res = string < \"cde\" ! res .eqv. .true. end program example_lt Comparison operator greater or equal Status Experimental Description Compare the order of two character sequences being greater or equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(>=) and operator(.ge.) . Syntax res = lhs >= rhs res = lhs .ge. rhs Class Elemental function, operator(>=) and operator(.ge.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_ge use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string >= \"abc\" ! res .eqv. .true. res = string >= \"bcd\" ! res .eqv. .true. res = string >= \"cde\" ! res .eqv. .false. end program example_ge Comparison operator less or equal Status Experimental Description Compare the order of two character sequences being less or equal. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(<=) and operator(.le.) . Syntax res = lhs <= rhs res = lhs .le. rhs Class Elemental function, operator(<=) and operator(.le.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_le use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string <= \"abc\" ! res .eqv. .false. res = string <= \"bcd\" ! res .eqv. .true. res = string <= \"cde\" ! res .eqv. .true. end program example_le Comparison operator equal Status Experimental Description Compare two character sequences for equality. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(==) and operator(.eq.) . Syntax res = lhs == rhs res = lhs .eq. rhs Class Elemental function, operator(==) and operator(.eq.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_eq use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string == \"abc\" ! res .eqv. .false. res = string == \"bcd\" ! res .eqv. .true. res = string == \"cde\" ! res .eqv. .false. end program example_eq Comparison operator not equal Status Experimental Description Compare two character sequences for inequality. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(/=) and operator(.ne.) . Syntax res = lhs /= rhs res = lhs .ne. rhs Class Elemental function, operator(/=) and operator(.ne.) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_ne use stdlib_string_type implicit none type ( string_type ) :: string logical :: res string = \"bcd\" res = string /= \"abc\" ! res .eqv. .true. res = string /= \"bcd\" ! res .eqv. .false. res = string /= \"cde\" ! res .eqv. .true. end program example_ne Concatenation operator Status Experimental Description Concatenate two character sequences. The left-hand side, the right-hand side or both character sequences can\nbe represented by a string type.\nThis defines three procedures overloading the intrinsic operator(//) . Syntax res = lhs // rhs Class Elemental function, operator(//) . Argument lhs : Either scalar character value or string type. This argument is intent(in) . rhs : Either scalar character value or string type. This argument is intent(in) . Result value The result is an instance of string_type . Example program example_cont use stdlib_string_type implicit none type ( string_type ) :: string string = \"Hello, \" string = string // \"World!\" ! len(string) == 13 end program example_cont Unformatted write Status Experimental Description Write the character sequence hold by the string to a connected unformatted unit.\nThe character sequences is represented by an 64 bit signed integer record,\nholding the length of the following character record. Syntax write(unit, iostat=iostat, iomsg=iomsg) string Class Unformatted user defined derived type output. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for output. This argument is intent(in) . iostat : Status identifier to indicate success of output operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing output operation.\n This argument is intent(inout) . Example program example_uwrite use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"unformatted\" , status = \"scratch\" ) write ( io ) string rewind ( io ) read ( io ) string close ( io ) end program example_uwrite Formatted write Status Experimental Description Write the character sequence hold by the string to a connected formatted unit. The current implementation is limited to list directed output and dt formatted\noutput. Requesting namelist output will raise an error. Syntax write(unit, fmt, iostat=iostat, iomsg=iomsg) string Class Formatted user defined derived type output. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for output. This argument is intent(in) . iotype : Type of formatted data transfer, has the value \"LISTDIRECTED\" for fmt=* , \"NAMELIST\" for namelist output or starts with \"DT\" for derived type output.\n This argument is intent(in) . v_list : Rank one array of default integer type containing the edit descriptors for\n derived type output.\n This argument is intent(in) . iostat : Status identifier to indicate success of output operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing output operation.\n This argument is intent(inout) . Example program example_fwrite use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"formatted\" , status = \"scratch\" ) write ( io , * ) string write ( io , * ) rewind ( io ) read ( io , * ) string close ( io ) end program example_fwrite Unformatted read Status Experimental Description Read a character sequence from a connected unformatted unit into the string.\nThe character sequences is represented by an 64 bit signed integer record,\nholding the length of the following character record. On failure the state the read variable is undefined and implementation dependent. Syntax read(unit, iostat=iostat, iomsg=iomsg) string Class Unformatted derived type input. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for input. This argument is intent(in) . iostat : Status identifier to indicate success of input operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing input operation.\n This argument is intent(inout) . Example program example_uread use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"unformatted\" , status = \"scratch\" ) write ( io ) string rewind ( io ) read ( io ) string close ( io ) end program example_uread Formatted read Status Experimental Description Read a character sequence from a connected formatted unit into the string.\nList-directed input will retrieve the complete record into the string. On failure the state the read variable is undefined and implementation dependent. The current implementation is limited to list directed input.\nRequesting dt formatted input or namelist output will raise an error. Syntax read(unit, fmt, iostat=iostat, iomsg=iomsg) string Class Formatted derived type input. Argument string : Instance of the string type to read. This argument is intent(inout) . unit : Formatted unit for input. This argument is intent(in) . iotype : Type of formatted data transfer, has the value \"LISTDIRECTED\" for fmt=* , \"NAMELIST\" for namelist input or starts with \"DT\" for derived type input.\n This argument is intent(in) . v_list : Rank one array of default integer type containing the edit descriptors for\n derived type input.\n This argument is intent(in) . iostat : Status identifier to indicate success of input operation.\n This argument is intent(out) . iomsg : Buffer to return error message in case of failing input operation.\n This argument is intent(inout) . Example program example_fread use stdlib_string_type implicit none type ( string_type ) :: string integer :: io string = \"Important saved value\" open ( newunit = io , form = \"formatted\" , status = \"scratch\" ) write ( io , * ) string write ( io , * ) rewind ( io ) read ( io , * ) string close ( io ) end program example_fread move Status Experimental Description Moves the allocation from from to to , consequently deallocating from in this process.\nIf from is not allocated before execution, to gets deallocated by the process.\nAn unallocated string_type instance is equivalent to an empty string.\nIf from and to are the same variable, then from remains unchanged. Syntax call move (from, to) Class Pure subroutine (Elemental subroutine, only when both from and to are type(string_type) ) Argument from : Character scalar or string_type .\n This argument is intent(inout) . to : Character scalar or string_type .\n This argument is intent(inout) when both from and to are type(string_type) ,\n otherwise intent(out) . Example program example_move use stdlib_string_type , only : string_type , assignment ( = ), move implicit none type ( string_type ) :: from_string character ( len = :), allocatable :: from_char , to_char from_string = \"move this string\" from_char = \"move this char\" ! from_string <-- \"move this string\" ! from_char <-- \"move this char\" ! to_char <-- (unallocated) call move ( from_string , to_char ) ! from_string <-- \"\" ! to_char <-- \"move this string\" call move ( from_char , to_char ) ! from_char <-- (unallocated) ! to_string <-- \"move this char\" end program example_move","tags":"","loc":"page/specs/stdlib_string_type.html"},{"title":"stringlist_type – Fortran-lang/stdlib","text":"stdlib_stringlist_type module (1-D list of strings) stdlib_stringlist_type module (1-D list of strings) Introduction Derived types provided stringlist_type derived type Status stringlist_index_type derived type Status fidx/bidx Description Syntax Status Class Argument Result value Example Constructor for stringlist_type(or stringlist) Description Syntax Status Class Argument Result value Example insert_at Description Syntax Status Class Argument Example get Description Syntax Status Class Argument Result value Example len Description Syntax Status Class Argument Result value Example clear Description Syntax Status Class Argument Example Comparison operator equal Description Syntax Status Class Argument Result value Example Comparison operator not equal Description Syntax Status Class Argument Result value Example Concatenation operator(//) Description Syntax Status Class Argument Result value Example Introduction The stdlib_stringlist_type module provides with 2 derived types to deal with lists of strings. stringlist_type derived type represents one-dimensional list of variable-length strings (also referred as one-dimensional stringlist) which is compatible with Fortran intrinsic character and stringlist_index_type derived type represents an index to access, modify the elements of a stringlist, insert elements to a stringlist and much more. Derived types provided stringlist_type derived type The stringlist_type derived type represents one-dimensional list of strings (also referred as one-dimensional stringlist). The internal representation of the list is implementation dependent and is not visible to the user of the module. Note: stringlist is an abstract concept which is expressed through the derived type stringlist_type . Status Experimental stringlist_index_type derived type An instance of the derived type stringlist_index_type represents either a forward index OR a backward index. \nThe internal representation is implementation dependent and is not visible to the user of the module. list_head and list_tail are 2 special instances of this type representing the head and the tail of a stringlist respectively.\nAn index is independent of the stringlist(or stringlist_type ) it is used with and hence, an index can be used with multiple stringlists in the same program. Status Experimental fidx/bidx Description fidx : Returns an instance which represents forward index idx . bidx : Returns an instance which represents backward index idx . Syntax For fidx: res = fidx (idx) For bidx: res = bidx (idx) Status Experimental. Class Pure function. Argument idx : Shall be of kind integer .\n This argument is intent(in) . Result value The result is of type stringlist_index_type . Example program example_fidx_bidx use stdlib_stringlist_type , only : stringlist_index_type , fidx , bidx implicit none type ( stringlist_index_type ) :: index index = fidx ( 1 ) ! forward index 1 index = bidx ( 3 ) ! backward index 3 end program example_fidx_bidx Constructor for stringlist_type (or stringlist) Description No arguments given: Initializes an empty stringlist(a stringlist containing no elements in it). With argument: Initializes a stringlist equivalent to the input array array i.e. a stringlist containing all elements of the input array array in the same order. Syntax res = stringlist_type ([array]) Status Experimental Class Pure function. Argument array : Shall be an array of character scalar or array of string_type .\n This argument is intent(in) and optional . Result value The result is an instance of type stringlist_type . Example program example_constructor use stdlib_stringlist_type , only : stringlist_type use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist stringlist = stringlist_type () ! stringlist <-- { } (empty stringlist) stringlist = stringlist_type ([ \"#1\" , \"#2\" , \"#3\" ]) ! stringlist <-- {\"#1\", \"#2\", \"#3\"} stringlist = stringlist_type ([ string_type ( \"#1\" ), string_type ( \"#2\" )]) ! stringlist <-- {\"#1\", \"#2\"} end program example_constructor insert_at Description Inserts the string string AT the index idx , so that the newly added element is present at index idx after insertion. Inserting an element AT index beyond length + 1 inserts the element AT list_tail , and likewise inserting AT a non-positive index inserts the element AT list_head . Syntax call stringlist_type % insert_at (idx, string) Status Experimental. Class Pure subroutine. Argument idx : stringlist_index_type .\n This argument is intent(in) . string : Character scalar or string_type .\n This argument is intent(in) . Example program example_insert_at use stdlib_stringlist_type , only : stringlist_type , stringlist_index_type , fidx , bidx use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( stringlist_index_type ) :: index index = fidx ( 1 ) call stringlist % insert_at ( index , \"Element No. one\" ) ! stringlist <-- {\"Element No. one\"} index = bidx ( 1 ) call stringlist % insert_at ( index , string_type ( \"Element No. two\" )) ! stringlist <-- {\"Element No. one\", \"Element No. two\"} call stringlist % insert_at ( fidx ( 2 ), string_type ( \"Element No. three\" )) ! stringlist <-- {\"Element No. one\", \"Element No. three\", \"Element No. two\"} call stringlist % insert_at ( bidx ( 1 ), \"Element No. four\" ) ! stringlist <-- {\"Element No. one\", \"Element No. three\", \"Element No. two\", \"Element No. four\"} end program example_insert_at get Description Returns the string present currently at the index idx in a stringlist. If index idx is out of bounds, then an empty string is returned. Syntax res = stringlist_type % get (idx) Status Experimental. Class Pure function. Argument idx : stringlist_index_type .\n This argument is intent(in) . Result value The result is a string of type string_type . Example program example_get use stdlib_stringlist_type , only : stringlist_type , fidx , bidx use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( string_type ) :: output !> inserting 4 elements to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"Element No. one\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. two\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. three\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. four\" ) ! stringlist <-- {\"Element No. four\", \"Element No. three\", \"Element No. two\", \"Element No. one\"} output = stringlist % get ( fidx ( 1 )) ! output <-- \"Element No. four\" output = stringlist % get ( bidx ( 1 )) ! output <-- \"Element No. one\" !> accessing out of bounds index output = stringlist % get ( bidx ( 5 )) ! output <-- \"\" output = stringlist % get ( fidx ( 0 )) ! output <-- \"\" end program example_get len Description Returns the number of elements present currently in the stringlist. Syntax res = stringlist_type % len () Status Experimental. Class Pure function. Argument No arguments. Result value The result is of type integer . Example program example_len use stdlib_stringlist_type , only : stringlist_type , bidx implicit none type ( stringlist_type ) :: stringlist integer :: output output = stringlist % len () ! output <-- 0 !> inserting 2 elements to the stringlist call stringlist % insert_at ( bidx ( 1 ), \"Element No. one\" ) call stringlist % insert_at ( bidx ( 1 ), \"Element No. two\" ) ! stringlist <-- {\"Element No. one\", \"Element No. two\"} print '(a)' , stringlist % len () ! 2 end program example_len clear Description Removes all elements from a stringlist. Syntax call stringlist_type % clear () Status Experimental. Class Pure subroutine. Argument No arguments. Example program example_clear use stdlib_stringlist_type , only : stringlist_type , fidx implicit none type ( stringlist_type ) :: stringlist !> inserting 2 elements to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"Element No. one\" ) call stringlist % insert_at ( fidx ( 1 ), \"Element No. two\" ) ! stringlist <-- {\"Element No. two\", \"Element No. one\"} call stringlist % clear () ! stringlist <-- { } (empty stringlist) !> inserting 1 element to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"Element No. one\" ) ! stringlist <-- {\"Element No. one\"} end program example_clear Comparison operator equal Description Compares left hand side (lhs) with right hand side (rhs) for equality. Syntax res = lhs == rhs res = lhs .eq. rhs Status Experimental. Class Pure function, operator(==) and operator(.eq.) . Argument lhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . rhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_equality_operator use stdlib_stringlist_type , only : stringlist_type , fidx , list_head , operator ( == ) use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( string_type ), allocatable :: stringarray (:) logical :: res !> inserting 4 elements to the stringlist call stringlist % insert_at ( fidx ( 1 ), \"#1\" ) call stringlist % insert_at ( list_head , \"#2\" ) call stringlist % insert_at ( fidx ( 1 ), \"#3\" ) call stringlist % insert_at ( list_head , \"#4\" ) ! stringlist <-- {\"#4\", \"#3\", \"#2\", \"#1\"} !> creating an array of 4 string_type elements stringarray = [ string_type ( \"#4\" ), string_type ( \"#3\" ), string_type ( \"#2\" ), string_type ( \"#1\" )] res = ( stringarray == stringlist ) ! res <-- .true. res = ( stringlist == [ \"#4\" , \"#3\" , \"#2\" , \"#1\" ]) ! res <-- .true. print '(a)' , stringlist == [ \"#4\" , \"#3\" , \"#1\" ] ! .false. end program example_equality_operator Comparison operator not equal Description Compares left hand side (lhs) with right hand side (rhs) for inequality. Syntax res = lhs /= rhs res = lhs .ne. rhs Status Experimental. Class Pure function, operator(/=) and operator(.ne.) . Argument lhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . rhs : Shall be an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . Result value The result is a default logical scalar value. Example program example_inequality_operator use stdlib_stringlist_type , only : stringlist_type , bidx , list_tail , operator ( /= ) use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: stringlist type ( string_type ), allocatable :: stringarray (:) logical :: res !> inserting 4 elements to the stringlist call stringlist % insert_at ( bidx ( 1 ), \"#1\" ) call stringlist % insert_at ( list_tail , \"#2\" ) call stringlist % insert_at ( bidx ( 1 ), \"#3\" ) call stringlist % insert_at ( list_tail , \"#4\" ) ! stringlist <-- {\"#1\", \"#2\", \"#3\", \"#4\"} !> creating an array of 4 string_type elements stringarray = [ string_type ( \"#1\" ), string_type ( \"#2\" ), string_type ( \"#3\" ), string_type ( \"#4\" )] res = ( stringarray /= stringlist ) ! res <-- .false. res = ( stringlist /= [ \"#111\" , \"#222\" , \"#333\" , \"#444\" ]) ! res <-- .true. print '(a)' , stringlist /= [ \"#4\" , \"#3\" , \"#1\" ] ! .true. end program example_inequality_operator Concatenation operator(//) Description Returns the concatenated output of left hand side (lhs) and right hand side (rhs). Syntax res = lhs // rhs Status Experimental. Class Pure function, operator(//) . Argument lhs : Shall be a character scalar or string_type OR an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . rhs : Shall be a character scalar or string_type OR an array of character scalar or of string_type OR \na stringlist_type .\n This argument is intent(in) . Result value The result is an instance of stringlist_type . Example program example_concatenate_operator use stdlib_stringlist_type , only : stringlist_type , operator ( // ) use stdlib_string_type , only : string_type implicit none type ( stringlist_type ) :: first_stringlist , second_stringlist type ( string_type ), allocatable :: stringarray (:) first_stringlist = first_stringlist // \"Element No. one\" ! first_stringlist <-- {\"Element No. one\"} second_stringlist = string_type ( \"Element No. two\" ) // first_stringlist ! second_stringlist <-- {Element No. two, \"Element No. one\"} !> Creating an array of 2 string_type elements stringarray = [ string_type ( \"Element No. three\" ), string_type ( \"Element No. four\" )] second_stringlist = first_stringlist // stringarray ! second_stringlist <-- {\"Element No. one\", \"Element No. three\", \"Element No. four\"} second_stringlist = [ \"#1\" , \"#2\" ] // second_stringlist ! second_stringlist <-- {\"#1\", \"#2\", \"Element No. one\", \"Element No. three\", \"Element No. four\"} first_stringlist = first_stringlist // second_stringlist ! first_stringlist <-- {\"Element No. one\", \"#1\", \"#2\", \"Element No. one\", \"Element No. three\", \"Element No. four\"} end program example_concatenate_operator","tags":"","loc":"page/specs/stdlib_stringlist_type.html"},{"title":"strings – Fortran-lang/stdlib","text":"The stdlib_strings module The stdlib_strings module Introduction Procedures and methods provided strip Description Syntax Status Class Argument Result value Example chomp Description Syntax Status Class Argument Result value Example starts_with Description Syntax Status Class Argument Result value Example ends_with Description Syntax Status Class Argument Result value Example slice Description Syntax Status Class Argument Result value Example find Description Syntax Status Class Argument Result value Example replace_all Description Syntax Status Class Argument Result value Example padl Description Syntax Status Class Argument Result value Example padr Description Syntax Status Class Argument Result value Example count Description Syntax Status Class Argument Result value Example zfill Description Syntax Status Class Argument Result value Example to_string Description Syntax Status Class Argument Result value Example Introduction The stdlib_strings module provides basic string handling and manipulation routines. Procedures and methods provided strip Description Remove leading and trailing whitespace characters. Syntax string = strip (string) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). Result value The result is of the same type as string . Example program example_strip use stdlib_ascii , only : TAB , VT , LF , CR , FF use stdlib_strings , only : strip implicit none print '(a)' , strip ( \" hello \" ) ! \"hello\" print '(a)' , strip ( TAB // \"goodbye\" // CR // LF ) ! \"goodbye\" print '(a)' , strip ( \" \" // TAB // LF // VT // FF // CR ) ! \"\" print '(a)' , strip ( \" ! \" ) // \"!\" ! \"!!\" print '(a)' , strip ( \"Hello\" ) ! \"Hello\" end program example_strip chomp Description Remove trailing characters in set or substring from string .\nIf no character set or substring is provided trailing whitespace is removed. Syntax string = chomp (string[, set|substring]) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). set : Array of length one character. This argument is intent(in). substring : Character scalar or string_type .\n This argument is intent(in). Result value The result is of the same type as string . Example program example_chomp use stdlib_ascii , only : TAB , VT , LF , CR , FF use stdlib_strings , only : chomp implicit none print '(a)' , chomp ( \" hello \" ) ! \" hello\" print '(a)' , chomp ( TAB // \"goodbye\" // CR // LF ) ! \"\\tgoodbye\" print '(a)' , chomp ( \" \" // TAB // LF // VT // FF // CR ) ! \"\" print '(a)' , chomp ( \" ! \" ) // \"!\" ! \" !!\" print '(a)' , chomp ( \"Hello\" ) ! \"Hello\" print '(a)' , chomp ( \"hello\" , [ \"l\" , \"o\" ]) ! \"he\" print '(a)' , chomp ( \"hello\" , set = [ \"l\" , \"o\" ]) ! \"he\" print '(a)' , chomp ( \"hello\" , \"lo\" ) ! \"hel\" print '(a)' , chomp ( \"hello\" , substring = \"lo\" ) ! \"hel\" end program example_chomp starts_with Description Check if a string starts with a given substring . Syntax string = starts_with (string, substring) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). substring : Character scalar or string_type .\n This argument is intent(in). Result value The result is of scalar logical type. Example program example_starts_with use stdlib_strings , only : starts_with implicit none print '(l1)' , starts_with ( \"pattern\" , \"pat\" ) ! T print '(l1)' , starts_with ( \"pattern\" , \"ern\" ) ! F end program example_starts_with ends_with Description Check if a string ends with a given substring . Syntax string = ends_with (string, substring) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). substring : Character scalar or string_type .\n This argument is intent(in). Result value The result is of scalar logical type. Example program example_ends_with use stdlib_strings , only : ends_with implicit none print '(l1)' , ends_with ( \"pattern\" , \"ern\" ) ! T print '(l1)' , ends_with ( \"pattern\" , \"pat\" ) ! F end program example_ends_with slice Description Extracts the characters from the defined region of the input string by taking strides. Argument first and last defines this region for extraction by function slice . Argument stride defines the magnitude and direction (+/-) of stride to be taken while extraction. stride when given invalid value 0, is converted to +1. Deduction Process: Function first automatically deduces the optional arguments that are not provided by the user. Deduced first and last argument take +infinity or -infinity value and deduced stride argument \ntakes value +1 or -1 depending upon the actual argument(s) provided by the user. Extraction Process: Extraction starts only if last is crossable from first with stride of stride . Extraction starts from the first valid index in the defined region to take stride of stride and ends when the last valid index in the defined region is crossed. If no valid index exists in the defined region, empty string is returned. Syntax string = slice (string [, first, last, stride]) Status Experimental Class Pure function. Argument string : Character scalar or string_type .\n This argument is intent(in). first : integer.\n This argument is intent(in) and optional. last : integer.\n This argument is intent(in) and optional. stride : integer.\n This argument is intent(in) and optional. Result value The result is of the same type as string . Example program example_slice use stdlib_string_type use stdlib_strings , only : slice implicit none type ( string_type ) :: string character ( len = 10 ) :: chars string = \"abcdefghij\" ! string <-- \"abcdefghij\" chars = \"abcdefghij\" ! chars <-- \"abcdefghij\" print '(a)' , slice ( \"abcdefghij\" , 2 , 6 , 2 ) ! \"bdf\" print '(a)' , slice ( chars , 2 , 6 , 2 ) ! \"bdf\" string = slice ( string , 2 , 6 , 2 ) ! string <-- \"bdf\" end program example_slice find Description Returns the starting index of the occurrence th occurrence of the substring pattern in the input string string . Default value of occurrence is set to 1 . \nIf consider_overlapping is not provided or is set to .true. the function counts two overlapping occurrences of substring pattern as two different occurrences. If occurrence th occurrence is not found, function returns 0 . Syntax string = find (string, pattern [, occurrence, consider_overlapping]) Status Experimental Class Elemental function Argument string : Character scalar or string_type .\n This argument is intent(in). pattern : Character scalar or string_type .\n This argument is intent(in). occurrence : integer.\n This argument is intent(in) and optional. consider_overlapping : logical.\n This argument is intent(in) and optional. Result value The result is a scalar of integer type or an integer array of rank equal to the highest rank among all dummy arguments. Example program example_find use stdlib_string_type , only : string_type , assignment ( = ) use stdlib_strings , only : find implicit none type ( string_type ) :: string string = \"needle in the character-stack\" print * , find ( string , \"needle\" ) ! 1 print * , find ( string , [ \"a\" , \"c\" ], [ 3 , 2 ]) ! [27, 20] print * , find ( \"qwqwqwq\" , \"qwq\" , 3 , [. false ., . true .]) ! [0, 5] end program example_find replace_all Description Replaces all occurrences of substring pattern in the input string with the replacement replacement . Occurrences overlapping on a base occurrence will not be replaced. Syntax string = replace_all (string, pattern, replacement) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). pattern : Character scalar or string_type .\n This argument is intent(in). replacement : Character scalar or string_type .\n This argument is intent(in). Result value The result is of the same type as string . Example program example_replace_all use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : replace_all implicit none type ( string_type ) :: string string = \"hurdles here, hurdles there, hurdles everywhere\" ! string <-- \"hurdles here, hurdles there, hurdles everywhere\" print '(dt)' , replace_all ( string , \"hurdles\" , \"learn from\" ) ! \"learn from here, learn from there, learn from everywhere\" string = replace_all ( string , \"hurdles\" , \"technology\" ) ! string <-- \"technology here, technology there, technology everywhere\" end program example_replace_all padl Description Returns a string of length output_length left padded with pad_with character if it is provided, otherwise with \" \" (1 whitespace). If output_length is less than or equal to the length of string , padding is not performed. Syntax string = padl (string, output_length [, pad_with]) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). output_length : integer.\n This argument is intent(in). pad_with : Character scalar of length 1.\n This argument is intent(in) and optional. Result value The result is of the same type as string . Example program example_padl use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : padl implicit none type ( string_type ) :: string string = \"left pad this string\" ! string <-- \"left pad this string\" print '(dt)' , padl ( string , 25 , \"$\" ) ! \"$left pad this string\" string = padl ( string , 25 ) ! string <-- \" left pad this string\" end program example_padl padr Description Returns a string of length output_length right padded with pad_with character if it is provided, otherwise with \" \" (1 whitespace). If output_length is less than or equal to the length of string , padding is not performed. Syntax string = padr (string, output_length [, pad_with]) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). output_length : integer.\n This argument is intent(in). pad_with : Character scalar of length 1.\n This argument is intent(in) and optional. Result value The result is of the same type as string . Example program example_padr use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : padr implicit none type ( string_type ) :: string string = \"right pad this string\" ! string <-- \"right pad this string\" print '(dt)' , padr ( string , 25 , \"$\" ) ! \"right pad this string\" string = padr ( string , 25 ) ! string <-- \"right pad this string \" end program example_padr count Description Returns the number of times the substring pattern has occurred in the input string string . If consider_overlapping is not provided or is set to .true. the function counts two overlapping occurrences of substring pattern as two different occurrences. Syntax string = count (string, pattern [, consider_overlapping]) Status Experimental Class Elemental function Argument string : Character scalar or string_type .\n This argument is intent(in). pattern : Character scalar or string_type .\n This argument is intent(in). consider_overlapping : logical.\n This argument is intent(in) and optional. Result value The result is a scalar of integer type or an integer array of rank equal to the highest rank among all dummy arguments. Example program example_count use stdlib_string_type , only : string_type , assignment ( = ) use stdlib_strings , only : count implicit none type ( string_type ) :: string string = \"How much wood would a woodchuck chuck if a woodchuck could chuck wood?\" print * , count ( string , \"wood\" ) ! 4 print * , count ( string , [ \"would\" , \"chuck\" , \"could\" ]) ! [1, 4, 1] print * , count ( \"a long queueueueue\" , \"ueu\" , [. false ., . true .]) ! [2, 4] end program example_count zfill Description Returns a string of length output_length left-padded with zeros.\nIf output_length is less than or equal to the length of string , padding is not performed. Syntax string = zfill (string, output_length) Status Experimental Class Pure function Argument string : Character scalar or string_type .\n This argument is intent(in). output_length : integer.\n This argument is intent(in). Result value The result is of the same type as string . Example program example_zfill use stdlib_string_type , only : string_type , assignment ( = ), write ( formatted ) use stdlib_strings , only : zfill implicit none type ( string_type ) :: string string = \"left pad this string with zeros\" ! string <-- \"left pad this string with zeros\" print '(dt)' , zfill ( string , 36 ) ! \"00000left pad this string with zeros\" string = zfill ( string , 36 ) ! string <-- \"00000left pad this string with zeros\" end program example_zfill to_string Description Format or transfer a integer/real/complex/logical scalar as a string. Input a wrong format that cause the internal-IO to fail, the result value is a string of [*] . Syntax string = to_string (value [, format]) Status Experimental Class Pure function. Argument value : Shall be an integer/real/complex/logical scalar.\n This is an intent(in) argument. format : Shall be a character(len=*) scalar like '(F6.2)' or just 'F6.2' .\n This is an intent(in) and optional argument. Contains the edit descriptor to format value into a string, for example '(F6.2)' or '(f6.2)' . to_string will automatically enclose format in a set of parentheses, so passing F6.2 or f6.2 as format is possible as well. Result value The result is an allocatable length character scalar with up to 128 cached character length. Example program example_to_string use stdlib_strings , only : to_string implicit none !> Example for `complex` type print * , to_string (( 1 , 1 )) !! \"(1.00000000,1.00000000)\" print * , to_string (( 1 , 1 ), '(F6.2)' ) !! \"( 1.00, 1.00)\" print * , to_string (( 1000 , 1 ), '(ES0.2)' ), to_string (( 1000 , 1 ), '(SP,F6.3)' ) !! \"(1.00E+3,1.00)\"\"(******,+1.000)\" !! Too narrow formatter for real number !! Normal demonstration(`******` from Fortran Standard) !> Example for `integer` type print * , to_string ( - 3 ) !! \"-3\" print * , to_string ( 42 , '(I4)' ) !! \" 42\" print * , to_string ( 1 , '(I0.4)' ), to_string ( 2 , '(B4)' ) !! \"0001\"\" 10\" !> Example for `real` type print * , to_string ( 1. ) !! \"1.00000000\" print * , to_string ( 1. , '(F6.2)' ) !! \" 1.00\" print * , to_string ( 1. , 'F6.2' ) !! \" 1.00\" print * , to_string ( 1. , '(SP,ES9.2)' ), to_string ( 1 , '(F7.3)' ) !! \"+1.00E+00\"\"[*]\" !! 1 wrong demonstration (`[*]` from `to_string`) !> Example for `logical` type print * , to_string (. true .) !! \"T\" print * , to_string (. true ., '(L2)' ) !! \" T\" print * , to_string (. true ., 'L2' ) !! \" T\" print * , to_string (. false ., '(I5)' ) !! \"[*]\" !! 1 wrong demonstrations(`[*]` from `to_string`) end program example_to_string","tags":"","loc":"page/specs/stdlib_strings.html"},{"title":"version – Fortran-lang/stdlib","text":"The stdlib_version module The stdlib_version module Introduction Constants provided by stdlib_version stdlib_version_string stdlib_version_compact get_stdlib_version Status Description Syntax Class Argument Example Introduction The stdlib_version module contains the version of the standard library.\nThe version information can be used as a compile time constant or retrieved from a getter function at runtime.\nIn case the standard library is dynamically linked, the version number retrieved from the getter might mismatch the compile time constants provided from the version built against.\nTherefore, it is recommended to retrieve the version information always at runtime. Constants provided by stdlib_version stdlib_version_string String constant representing the version number. stdlib_version_compact Compact representation of the version string following the scheme:\nmajor * 10000 + minor * 100 + patch. get_stdlib_version Status Experimental Description Getter function to retrieve version information Syntax res = get_stdlib_version ([major], [minor], [patch], [string]) Class Pure subroutine. Argument major : shall be an intrinsic integer type. It is an optional, intent(out) argument. minor : shall be an intrinsic integer type. It is an optional, intent(out) argument. patch : shall be an intrinsic integer type. It is an optional, intent(out) argument. string : shall be a deferred length character type. It is an optional, intent(out) argument. Example program example_version use stdlib_version , only : get_stdlib_version implicit none character ( len = :), allocatable :: version call get_stdlib_version ( string = version ) print '(a)' , version end program example_version","tags":"","loc":"page/specs/stdlib_version.html"}]} \ No newline at end of file diff --git a/type/ansi_code.html b/type/ansi_code.html index 8bee56bc6..63dab2bfa 100644 --- a/type/ansi_code.html +++ b/type/ansi_code.html @@ -79,7 +79,7 @@

    ansi_code
  • 6 statements + title="

    2.0% of total for derived types.

    Including implementation: 6 statements, 0.4% of total for derived types.">6 statements
  • @@ -177,13 +177,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/type/bitset_64.html b/type/bitset_64.html index bec0855b4..14b84c83c 100644 --- a/type/bitset_64.html +++ b/type/bitset_64.html @@ -80,7 +80,7 @@

    bitset_64
  • 27 statements + title="

    9.0% of total for derived types.

    Including implementation: 33 statements, 2.2% of total for derived types.">27 statements
  • @@ -136,10 +136,10 @@

    Type-Bound Procedures

    - all - any - bit_count - bits + all + any + bit_count + bits clear clear_bit clear_range @@ -150,7 +150,7 @@

    Type-Bound Procedures

    init init_zero input - none + none not output read_bitset @@ -159,9 +159,9 @@

    Type-Bound Procedures

    set set_bit set_range - test + test to_string - value + value write_bitset write_bitset_string write_bitset_unit @@ -197,7 +197,7 @@

    Type-Bound Procedures

    - +

    procedure, public, pass(self) :: all => all_64 @@ -256,7 +256,7 @@

    - +

    procedure, public, pass(self) :: any => any_64 @@ -315,7 +315,7 @@

    - +

    procedure, public, pass(self) :: bit_count => bit_count_64 @@ -374,7 +374,7 @@

    - +

    procedure, public, pass(self) :: bits @@ -1122,7 +1122,7 @@

    Arguments

    - +

    procedure, public, pass(self) :: none => none_64 @@ -1769,7 +1769,7 @@

    Arguments

    - +

    procedure, public, pass(self) :: test => test_64 @@ -1929,7 +1929,7 @@

    Arguments

    - +

    procedure, public, pass(self) :: value => value_64 @@ -2284,13 +2284,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/type/bitset_large.html b/type/bitset_large.html index 6e42736fb..5766a6de7 100644 --- a/type/bitset_large.html +++ b/type/bitset_large.html @@ -80,7 +80,7 @@

    bitset_large
  • 27 statements + title="

    9.0% of total for derived types.

    Including implementation: 33 statements, 2.2% of total for derived types.">27 statements
  • @@ -136,10 +136,10 @@

    Type-Bound Procedures

    - all - any - bit_count - bits + all + any + bit_count + bits clear clear_bit clear_range @@ -150,7 +150,7 @@

    Type-Bound Procedures

    init init_zero input - none + none not output read_bitset @@ -159,9 +159,9 @@

    Type-Bound Procedures

    set set_bit set_range - test + test to_string - value + value write_bitset write_bitset_string write_bitset_unit @@ -197,7 +197,7 @@

    Type-Bound Procedures

    - +

    procedure, public, pass(self) :: all => all_large @@ -256,7 +256,7 @@

    - +

    procedure, public, pass(self) :: any => any_large @@ -315,7 +315,7 @@

    - +

    procedure, public, pass(self) :: bit_count => bit_count_large @@ -374,7 +374,7 @@

    - +

    procedure, public, pass(self) :: bits @@ -1122,7 +1122,7 @@

    Arguments

    - +

    procedure, public, pass(self) :: none => none_large @@ -1769,7 +1769,7 @@

    Arguments

    - +

    procedure, public, pass(self) :: test => test_large @@ -1929,7 +1929,7 @@

    Arguments

    - +

    procedure, public, pass(self) :: value => value_large @@ -2287,13 +2287,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/type/bitset_type.html b/type/bitset_type.html index 40917a494..1df1aa902 100644 --- a/type/bitset_type.html +++ b/type/bitset_type.html @@ -80,7 +80,7 @@

    bitset_type
  • 34 statements + title="

    11.3% of total for derived types.

    Including implementation: 40 statements, 2.7% of total for derived types.">34 statements
  • @@ -136,10 +136,10 @@

    Type-Bound Procedures

    - all - any - bit_count - bits + all + any + bit_count + bits clear clear_bit clear_range @@ -150,18 +150,18 @@

    Type-Bound Procedures

    init init_zero input - none + none not output read_bitset read_bitset_string read_bitset_unit - set + set set_bit set_range - test + test to_string - value + value write_bitset write_bitset_string write_bitset_unit @@ -197,7 +197,7 @@

    Type-Bound Procedures

    - +

    procedure(all_abstract), public, deferred, pass(self) :: all @@ -274,7 +274,7 @@

    - +

    procedure(any_abstract), public, deferred, pass(self) :: any @@ -349,7 +349,7 @@

    - +

    procedure(bit_count_abstract), public, deferred, pass(self) :: bit_count @@ -424,7 +424,7 @@

    - +

    procedure, public, pass(self) :: bits @@ -1251,7 +1251,7 @@

    Arguments

    - +

    procedure(none_abstract), public, deferred, pass(self) :: none @@ -1798,7 +1798,7 @@

    Arguments

    - +

    generic, public :: set => set_bit, set_range @@ -2002,7 +2002,7 @@

    Arguments

    - +

    procedure(test_abstract), public, deferred, pass(self) :: test @@ -2189,7 +2189,7 @@

    Arguments

    - +

    procedure(value_abstract), public, deferred, pass(self) :: value @@ -2602,13 +2602,13 @@

    Source Code

    Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
    © 2024 Creative Commons License -
    ad42828

    +
    d996e43

    Documentation generated by FORD - on 2024-06-19 12:31

    + on 2024-06-19 12:42


    diff --git a/type/chaining_hashmap_type.html b/type/chaining_hashmap_type.html index bfe62f064..f1aa1672c 100644 --- a/type/chaining_hashmap_type.html +++ b/type/chaining_hashmap_type.html @@ -80,7 +80,7 @@

    chaining_hashmap_type
  • 19 statements + title="

    6.3% of total for derived types.

    Including implementation: 228 statements, 15.4% of total for derived types.">19 statements
  • @@ -148,10 +148,30 @@

    Type-Bound Procedures

  • @@ -284,23 +304,20 @@

    - +

    procedure, public, non_overridable, pass(map) :: - entries + char_get_other_data

    • - private pure function entries(map) + private subroutine char_get_other_data(map, value, other, exists)

      -

      Returns the number of entries in a hash map -(Specifications)

      -

      Arguments: - map - an open hash map

      +

      Character key generic interface for get_other_data function

      Arguments

      @@ -318,7 +335,7 @@

      Arguments

      class(hashmap_type), - + @@ -326,16 +343,56 @@

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + +
      intent(in)intent(inout) map +
      + + character(len=*), + intent(in) + + ::value + +
      + + type(other_type), + intent(out) + + ::other + +
      + + logical, + intent(out),optional + + ::exists +
      -

      - Return Value - integer(kind=int_index) -

      -
    @@ -345,24 +402,25 @@

    - +

    - procedure, public :: - get_all_keys => get_all_chaining_keys + procedure, public, non_overridable, pass(map) :: + char_key_test

    • -

      interface

      - private module subroutine get_all_chaining_keys(map, all_keys) + private subroutine char_key_test(map, value, present)

      -

      Returns all the keys contained in a hashmap -Arguments: - map - an chaining hash map - all_keys - all the keys contained in a hash map

      +

      Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

      +

      Arguments: + map - the hash map of interest + value - char array that is the key to lookup.
      + present - a flag indicating whether key is present in the map

      Arguments

      @@ -378,9 +436,9 @@

      Arguments

      - + @@ -393,14 +451,29 @@

      Arguments

      - + - + + + + + + + + + @@ -417,26 +490,21 @@

      Arguments

      - +

      - procedure, public :: - get_other_data => get_other_chaining_data + procedure, public, non_overridable, pass(map) :: + char_map_entry

      • -

        interface

        - private module subroutine get_other_chaining_data(map, key, other, exists) + private subroutine char_map_entry(map, value, other, conflict)

        -

        Returns the other data associated with the inverse table index -Arguments: - map - a chaining hash table - key - the key associated with a map entry - other - the other data associated with the key - exists - a logical flag indicating whether an entry with that key exists

        +

        Inserts an entry into the hash table +(Specifications)

        Arguments

      - class(chaining_hashmap_type), + class(hashmap_type), intent(in)intent(inout)
      - type(key_type), + character(len=*), intent(out),intent(in) - allocatable + ::all_keys(:)value + +
      + + logical, + intent(out) + + ::present
      @@ -452,7 +520,7 @@

      Arguments

      - + @@ -484,8 +552,8 @@

      Arguments

      type(other_type), - - + @@ -504,7 +572,7 @@

      Arguments

      - + @@ -521,32 +589,25 @@

      Arguments

      - +

      - procedure, public :: - init => init_chaining_map + procedure, public, non_overridable, pass(map) :: + char_remove_entry

      • -

        interface

        - private module subroutine init_chaining_map(map, hasher, slots_bits, status) + private subroutine char_remove_entry(map, value, existed)

        -

        Routine to allocate an empty map with HASHER as the hash function, -2SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited -to a maximum of 2MAX_BITS. All fields are initialized. +

        Remove the entry, if any, that has the key Arguments: - map - the chaining hash map to be initialized - hasher - the hash function to be used to map keys to slots - slots_bits - the bits of two used to initialize the number of slots - status - an integer error status flag with the allowed values: - success - no problems were found - alloc_fault - map % slots or map % inverse could not be allocated - array_size_error - slots_bits is less than default_bits or - greater than max_bits

        + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        Arguments

      - class(chaining_hashmap_type), + class(hashmap_type), intent(inout) @@ -467,14 +535,14 @@

      Arguments

      - type(key_type), + character(len=*), intent(in) ::keyvalue intent(out) +intent(in),optional :: ::existsconflict
      @@ -562,9 +623,9 @@

      Arguments

      - + @@ -577,29 +638,14 @@

      Arguments

      - + - - - - - - - - - + @@ -607,14 +653,14 @@

      Arguments

      - + @@ -631,25 +677,26 @@

      Arguments

      - +

      - procedure, public :: - key_test => chaining_key_test + procedure, public, non_overridable, pass(map) :: + char_set_other_data

      • -

        interface

        - private module subroutine chaining_key_test(map, key, present) + private subroutine char_set_other_data(map, value, other, exists)

        -

        Returns a logical flag indicating whether KEY is present in the hash map +

        Change the other data associated with the key Arguments: - map - the hash map of interest - key - the key of interest - present - a logical flag indicating whether key is present in map

        + map - the map with the entry of interest + value - the char value key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        Arguments

      - class(chaining_hashmap_type), + class(hashmap_type), intent(out)intent(inout)
      - procedure(hasher_fun) + character(len=*), intent(in) ::hasher - -
      - - integer, - intent(in),optional - - ::slots_bitsvalue
      - integer(kind=int32), + logical, intent(out), optional ::statusexisted
      @@ -665,7 +712,7 @@

      Arguments

      - + @@ -695,14 +742,29 @@

      Arguments

      - + - + + + + + + + + + @@ -719,23 +781,23 @@

      Arguments

      - +

      - procedure, public :: - loading => chaining_loading + procedure, public, non_overridable, pass(map) :: + entries

      • -

        interface

        - private pure module function chaining_loading(map) + private pure function entries(map)

        -

        Returns the number of entries relative to slots in a hash map -Arguments: - map - a chaining hash map

        +

        Returns the number of entries in a hash map +(Specifications)

        +

        Arguments: + map - an open hash map

        Arguments

      - class(chaining_hashmap_type), + class(hashmap_type), intent(inout) @@ -680,14 +727,14 @@

      Arguments

      - type(key_type), + character(len=*), intent(in) ::keyvalue
      - logical, + type(other_type), intent(out)intent(in) ::presentother + +
      + + logical, + intent(out),optional + + ::exists
      @@ -751,7 +813,7 @@

      Arguments

      - class(chaining_hashmap_type), + class(hashmap_type), intent(in) @@ -768,7 +830,7 @@

      Arguments

      Return Value - real + integer(kind=int_index)

      @@ -780,10 +842,10 @@

      - +

      procedure, public :: - map_entry => map_chain_entry + get_all_keys => get_all_chaining_keys

      @@ -791,14 +853,13 @@

    • interface

      - private module subroutine map_chain_entry(map, key, other, conflict) + private module subroutine get_all_chaining_keys(map, all_keys)

      -

      map - the hash table of interest -key - the key identifying the entry -other - other data associated with the key -conflict - logical flag indicating whether the entry key conflicts - with an existing key

      +

      Returns all the keys contained in a hashmap +Arguments: + map - an chaining hash map + all_keys - all the keys contained in a hash map

      Arguments

      @@ -816,7 +877,7 @@

      Arguments

      class(chaining_hashmap_type), - + @@ -831,27 +892,2702 @@

      Arguments

      type(key_type), - + - + - - - - - - + +
      intent(inout)intent(in) intent(in)intent(out), - + allocatable ::keyall_keys(:)
      - - type(other_type), - intent(in),optional - - ::other
      + + +
    • + +

      + +
      +
      +
      +
      + +

      + generic, public :: + get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data + +

      +
      +
        +
      • +

        + private interface get_other_open_data() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_get_other_data(map, value, other, exists) +

        + +

        Int8 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      • +

        + private subroutine int32_get_other_data(map, value, other, exists) +

        + +

        Int32 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      • +

        + private subroutine char_get_other_data(map, value, other, exists) +

        + +

        Character key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + character(len=*), + intent(in) + + ::value + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + init => init_chaining_map + +

      +
      +
        +
      • +

        interface

        +

        + private module subroutine init_chaining_map(map, hasher, slots_bits, status) +

        + +

        Routine to allocate an empty map with HASHER as the hash function, +2SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited +to a maximum of 2MAX_BITS. All fields are initialized. +Arguments: + map - the chaining hash map to be initialized + hasher - the hash function to be used to map keys to slots + slots_bits - the bits of two used to initialize the number of slots + status - an integer error status flag with the allowed values: + success - no problems were found + alloc_fault - map % slots or map % inverse could not be allocated + array_size_error - slots_bits is less than default_bits or + greater than max_bits

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(out) + + ::map + +
        + + procedure(hasher_fun) + + + ::hasher + +
        + + integer, + intent(in),optional + + ::slots_bits + +
        + + integer(kind=int32), + intent(out),optional + + ::status + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_get_other_data + +

      +
      +
        +
      • +

        + private subroutine int32_get_other_data(map, value, other, exists) +

        + +

        Int32 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_key_test + +

      +
      +
        +
      • +

        + private subroutine int32_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int32 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_map_entry + +

      +
      +
        +
      • +

        + private subroutine int32_map_entry(map, value, other, conflict) +

        + +

        Inserts an entry into the hash table +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_remove_entry + +

      +
      +
        +
      • +

        + private subroutine int32_remove_entry(map, value, existed) +

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + logical, + intent(out),optional + + ::existed + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_set_other_data + +

      +
      +
        +
      • +

        + private subroutine int32_set_other_data(map, value, other, exists) +

        + +

        Change the other data associated with the key +Arguments: + map - the map with the entry of interest + value - the int32 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_get_other_data + +

      +
      +
        +
      • +

        + private subroutine int8_get_other_data(map, value, other, exists) +

        + +

        Int8 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_key_test + +

      +
      +
        +
      • +

        + private subroutine int8_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int8 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_map_entry + +

      +
      +
        +
      • +

        + private subroutine int8_map_entry(map, value, other, conflict) +

        + +

        Int8 generic interface for map entry +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_remove_entry + +

      +
      +
        +
      • +

        + private subroutine int8_remove_entry(map, value, existed) +

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + value - the int8 array key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + logical, + intent(out),optional + + ::existed + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_set_other_data + +

      +
      +
        +
      • +

        + private subroutine int8_set_other_data(map, value, other, exists) +

        + +

        Change the other data associated with the key +Arguments: + map - the map with the entry of interest + value - the int8 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + key_get_other_data => get_other_chaining_data + +

      +
      +
        +
      • +

        interface

        +

        + private module subroutine get_other_chaining_data(map, key, other, exists) +

        + +

        Returns the other data associated with the inverse table index +Arguments: + map - a chaining hash table + key - the key associated with a map entry + other - the other data associated with the key + exists - a logical flag indicating whether an entry with that key exists

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + key_key_test => chaining_key_test + +

      +
      +
        +
      • +

        interface

        +

        + private module subroutine chaining_key_test(map, key, present) +

        + +

        Returns a logical flag indicating whether KEY is present in the hash map +Arguments: + map - the hash map of interest + key - the key of interest + present - a logical flag indicating whether key is present in map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + key_map_entry => map_chain_entry + +

      +
      +
        +
      • +

        interface

        +

        + private module subroutine map_chain_entry(map, key, other, conflict) +

        + +

        map - the hash table of interest +key - the key identifying the entry +other - other data associated with the key +conflict - logical flag indicating whether the entry key conflicts + with an existing key

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + key_remove_entry => remove_chaining_entry + +

      +
      +
        +
      • +

        interface

        +

        + private module subroutine remove_chaining_entry(map, key, existed) +

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + logical, + intent(out),optional + + ::existed + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + key_set_other_data => set_other_chaining_data + +

      +
      +
        +
      • +

        interface

        +

        + private module subroutine set_other_chaining_data(map, key, other, exists) +

        + +

        Change the other data associated with the key +Arguments: + map - the map with the entry of interest + key - the key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + type(other_type), + intent(in) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + generic, public :: + key_test => key_key_test, int8_key_test, int32_key_test, char_key_test + +

      +
      +
        +
      • +

        + private interface open_key_test() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int8 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      • +

        + private subroutine int32_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int32 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      • +

        + private subroutine char_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - char array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + character(len=*), + intent(in) + + ::value + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + loading => chaining_loading + +

      +
      +
        +
      • +

        interface

        +

        + private pure module function chaining_loading(map) +

        + +

        Returns the number of entries relative to slots in a hash map +Arguments: + map - a chaining hash map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(in) + + ::map + +
        + +

        + Return Value + real +

        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + generic, public :: + map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry + +

      +
      +
        +
      • +

        + private interface map_open_entry() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_map_entry(map, value, other, conflict) +

        + +

        Int8 generic interface for map entry +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      • +

        + private subroutine int32_map_entry(map, value, other, conflict) +

        + +

        Inserts an entry into the hash table +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      • +

        + private subroutine char_map_entry(map, value, other, conflict) +

        + +

        Inserts an entry into the hash table +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + character(len=*), + intent(in) + + ::value + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + map_probes + +

      +
      +
        +
      • +

        + private pure function map_probes(map) +

        + +

        Returns the total number of table probes on a hash map +(Specifications)

        +

        Arguments: + map - an open hash map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(in) + + ::map + +
        + +

        + Return Value + integer(kind=int_calls) +

        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + num_slots + +

      +
      +
        +
      • +

        + private pure function num_slots(map) +

        + +

        Returns the number of allocated slots in a hash map +(Specifications)

        +

        Arguments: + map - an open hash map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(in) + + ::map + +
        + +

        + Return Value + integer(kind=int_index) +

        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public :: + rehash => rehash_chaining_map + +

      +
      +
        +
      • +

        interface

        +

        + private module subroutine rehash_chaining_map(map, hasher) +

        + +

        Changes the hashing method of the table entries to that of HASHER. +Arguments: + map the table to be rehashed + hasher the hasher function to be used for the table

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(chaining_hashmap_type), + intent(inout) + + ::map + +
        + + procedure(hasher_fun) + + + ::hasher + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + generic, public :: + remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry + +

      +
      +
        +
      • +

        + private interface remove_open_entry() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_remove_entry(map, value, existed) +

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + value - the int8 array key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + @@ -866,7 +3602,7 @@

        Arguments

        - + @@ -876,30 +3612,17 @@

        Arguments

        - - - - -
        -
        -
        - -

        - procedure, public, non_overridable, pass(map) :: - map_probes - -

        -
        -
        • - private pure function map_probes(map) + private subroutine int32_remove_entry(map, value, existed)

          -

          Returns the total number of table probes on a hash map -(Specifications)

          -

          Arguments: - map - an open hash map

          +

          Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          Arguments

        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) ::conflictexisted
        @@ -917,7 +3640,7 @@

        Arguments

        class(hashmap_type), - + @@ -925,42 +3648,54 @@

        Arguments

        + + + + + + + + + + + + + + + +
        intent(in)intent(inout) map +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + logical, + intent(out),optional + + ::existed +
        -

        - Return Value - integer(kind=int_calls) -

        -
      • -
      -
      - -
      -
      -
      -
      - -

      - procedure, public, non_overridable, pass(map) :: - num_slots - -

      -
      -
      • - private pure function num_slots(map) + private subroutine char_remove_entry(map, value, existed)

        -

        Returns the number of allocated slots in a hash map -(Specifications)

        -

        Arguments: - map - an open hash map

        +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        Arguments

        @@ -978,7 +3713,7 @@

        Arguments

        class(hashmap_type), - + @@ -986,16 +3721,41 @@

        Arguments

        + + + + + + + + + + + + + + + +
        intent(in)intent(inout) map +
        + + character(len=*), + intent(in) + + ::value + +
        + + logical, + intent(out),optional + + ::existed +
        -

        - Return Value - integer(kind=int_index) -

        -
      @@ -1005,24 +3765,37 @@

      - +

      - procedure, public :: - rehash => rehash_chaining_map + generic, public :: + set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data

      • -

        interface

        - private module subroutine rehash_chaining_map(map, hasher) + private interface set_other_open_data()

        -

        Changes the hashing method of the table entries to that of HASHER. + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_set_other_data(map, value, other, exists) +

        + +

        Change the other data associated with the key Arguments: - map the table to be rehashed - hasher the hasher function to be used for the table

        + map - the map with the entry of interest + value - the int8 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        Arguments

        @@ -1038,7 +3811,7 @@

        Arguments

        - + - + + + + + + + + + + + + + + + + + @@ -1070,33 +3873,18 @@

        Arguments

        - - - - -
        -
        -
        - -

        - procedure, public :: - remove => remove_chaining_entry - -

        -
        -
        • -

          interface

          - private module subroutine remove_chaining_entry(map, key, existed) + private subroutine int32_set_other_data(map, value, other, exists)

          -

          Remove the entry, if any, that has the key +

          Change the other data associated with the key Arguments: - map - the table from which the entry is to be removed - key - the key to an entry - existed - a logical flag indicating whether an entry with the key - was present in the original map

          + map - the map with the entry of interest + value - the int32 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

          Arguments

        - class(chaining_hashmap_type), + class(hashmap_type), intent(inout) @@ -1053,14 +3826,44 @@

        Arguments

        - procedure(hasher_fun) + integer(kind=int8), intent(in) ::hashervalue(:) + +
        + + type(other_type), + intent(in) + + ::other + +
        + + logical, + intent(out),optional + + ::exists
        @@ -1112,7 +3900,7 @@

        Arguments

        - + + + + + + + + + @@ -1149,7 +3952,7 @@

        Arguments

        - + @@ -1159,31 +3962,15 @@

        Arguments

        - - - - -
        -
        -
        - -

        - procedure, public :: - set_other_data => set_other_chaining_data - -

        -
        -
        • -

          interface

          - private module subroutine set_other_chaining_data(map, key, other, exists) + private subroutine char_set_other_data(map, value, other, exists)

          Change the other data associated with the key Arguments: map - the map with the entry of interest - key - the key to the entry inthe map + value - the char value key to the entry inthe map other - the new data to be associated with the key exists - a logical flag indicating whether the key is already entered in the map

          @@ -1202,7 +3989,7 @@

          Arguments

        - + @@ -1271,7 +4058,7 @@

        Arguments

        - +

        procedure, public, non_overridable, pass(map) :: slots_bits @@ -1333,7 +4120,7 @@

        - +

        procedure, public :: total_depth => total_chaining_depth @@ -1412,15 +4199,15 @@

        Source Code

        !! Array of bucket lists Note # slots=size(slots) contains procedure :: get_all_keys => get_all_chaining_keys - procedure :: get_other_data => get_other_chaining_data + procedure :: key_get_other_data => get_other_chaining_data procedure :: init => init_chaining_map procedure :: loading => chaining_loading - procedure :: map_entry => map_chain_entry + procedure :: key_map_entry => map_chain_entry procedure :: rehash => rehash_chaining_map - procedure :: remove => remove_chaining_entry - procedure :: set_other_data => set_other_chaining_data + procedure :: key_remove_entry => remove_chaining_entry + procedure :: key_set_other_data => set_other_chaining_data procedure :: total_depth => total_chaining_depth - procedure :: key_test => chaining_key_test + procedure :: key_key_test => chaining_key_test final :: free_chaining_map end type chaining_hashmap_type
        @@ -1436,13 +4223,13 @@

        Source Code

        Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
        © 2024 Creative Commons License -
        ad42828

        +
        d996e43

        Documentation generated by FORD - on 2024-06-19 12:31

        + on 2024-06-19 12:42


        diff --git a/type/codata_constant_type.html b/type/codata_constant_type.html index 20f216e1f..a1e97387f 100644 --- a/type/codata_constant_type.html +++ b/type/codata_constant_type.html @@ -80,7 +80,7 @@

        codata_constant_type
      • 11 statements + title="

        3.7% of total for derived types.

        Including implementation: 39 statements, 2.6% of total for derived types.">11 statements
      • @@ -120,10 +120,10 @@

        Variables

      • @@ -187,7 +187,7 @@

        Components

        @@ -221,7 +221,7 @@

        Components

        @@ -238,7 +238,7 @@

        Components

        @@ -669,13 +669,13 @@

        Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
        © 2024 Creative Commons License -
        ad42828

        +
        d996e43

        Documentation generated by FORD - on 2024-06-19 12:31

        + on 2024-06-19 12:42


        diff --git a/type/hashmap_type.html b/type/hashmap_type.html index 954967cd4..13cc324a3 100644 --- a/type/hashmap_type.html +++ b/type/hashmap_type.html @@ -80,7 +80,7 @@

        hashmap_type
      • 26 statements + title="

        15.3% of total for derived types.

        Including implementation: 200 statements, 13.5% of total for derived types.">46 statements
      • @@ -137,10 +137,30 @@

        Type-Bound Procedures

      • @@ -245,23 +265,20 @@

        - +

        procedure, public, non_overridable, pass(map) :: - entries + char_get_other_data

        • - private pure function entries(map) + private subroutine char_get_other_data(map, value, other, exists)

          -

          Returns the number of entries in a hash map -(Specifications)

          -

          Arguments: - map - an open hash map

          +

          Character key generic interface for get_other_data function

          Arguments

        - class(chaining_hashmap_type), + class(hashmap_type), intent(inout) @@ -1127,14 +3915,29 @@

        Arguments

        - type(key_type), + integer(kind=int32), intent(in) ::keyvalue(:) + +
        + + type(other_type), + intent(in) + + ::other ::existedexists
        - class(chaining_hashmap_type), + class(hashmap_type), intent(inout) @@ -1217,14 +4004,14 @@

        Arguments

        - type(key_type), + character(len=*), intent(in) ::keyvalue
        - + character(len=64), public
        - + character(len=32), public
        - + real(kind=dp), public
        @@ -279,7 +296,7 @@

        Arguments

        class(hashmap_type), - + @@ -287,16 +304,56 @@

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + +
        intent(in)intent(inout) map +
        + + character(len=*), + intent(in) + + ::value + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists +
        -

        - Return Value - integer(kind=int_index) -

        -
      @@ -306,24 +363,25 @@

      - +

      - procedure(get_all_keys), public, deferred, pass(map) :: - get_all_keys + procedure, public, non_overridable, pass(map) :: + char_key_test

      • - subroutine get_all_keys(map, all_keys) -Prototype

        + private subroutine char_key_test(map, value, present) +

      -

      Returns the all keys contained in a hash map -(Specifications)

      +

      Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

      Arguments: - map - a hash map - all_keys - all the keys contained in a hash map

      + map - the hash map of interest + value - char array that is the key to lookup.
      + present - a flag indicating whether key is present in the map

      Arguments

      @@ -341,7 +399,7 @@

      Arguments

      class(hashmap_type), - + @@ -354,14 +412,29 @@

      Arguments

      - + - + + + + + + + + + @@ -378,25 +451,21 @@

      Arguments

      - +

      - procedure(get_other), public, deferred, pass(map) :: - get_other_data + procedure, public, non_overridable, pass(map) :: + char_map_entry

      • - subroutine get_other(map, key, other, exists) -Prototype

        + private subroutine char_map_entry(map, value, other, conflict) + -

        Returns the other data associated with the inverse table index -Arguments: - map - a hash map - key - the key associated with a map entry - other - the other data associated with the key - exists - a logical flag indicating whether an entry with that key exists

        +

        Inserts an entry into the hash table +(Specifications)

        Arguments

      intent(in)intent(inout)
      - type(key_type), + character(len=*), intent(out),intent(in) - allocatable + ::all_keys(:)value + +
      + + logical, + intent(out) + + ::present
      @@ -427,14 +496,14 @@

      Arguments

      - + @@ -444,8 +513,8 @@

      Arguments

      type(other_type), - - + @@ -464,7 +533,7 @@

      Arguments

      - + @@ -481,34 +550,25 @@

      Arguments

      - +

      - procedure(init_map), public, deferred, pass(map) :: - init + procedure, public, non_overridable, pass(map) :: + char_remove_entry

      • - subroutine init_map(map, hasher, slots_bits, status) -Prototype

        + private subroutine char_remove_entry(map, value, existed) + -

        Routine to allocate an empty map with HASHER as the hash function, -2SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a -maximum of 2MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots), -map % inverse elements. All fields are initialized. +

        Remove the entry, if any, that has the key Arguments: - map - the hash maap to be initialized - hasher - the hash function to be used to map keys to slots - slots_bits - the number of bits initially used to map to the slots - status - an integer error status flag with the allowed values: - success - no problems were found - alloc_fault - map % slots or map % inverse could not be allocated - array_size_error - slots_bits or max_bits is less than - default_bits or greater than strict_max_bits - real_value_error - load_factor is less than 0.375 or greater than - 0.875

        + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        Arguments

      - type(key_type), + character(len=*), intent(in) ::keyvalue intent(out) +intent(in),optional :: ::existsconflict
      @@ -526,7 +586,7 @@

      Arguments

      class(hashmap_type), - + @@ -539,29 +599,14 @@

      Arguments

      - + - - - - - - - - - + @@ -569,14 +614,14 @@

      Arguments

      - + @@ -593,25 +638,26 @@

      Arguments

      - +

      - procedure(key_test), public, deferred, pass(map) :: - key_test + procedure, public, non_overridable, pass(map) :: + char_set_other_data

      • - subroutine key_test(map, key, present) -Prototype

        + private subroutine char_set_other_data(map, value, other, exists) + -

        Returns a logical flag indicating whether KEY exists in the hash map -(Specifications)

        -

        Arguments: - map - the hash map of interest - key - the key of interest - present - a flag indicating whether key is present in the map

        +

        Change the other data associated with the key +Arguments: + map - the map with the entry of interest + value - the char value key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        Arguments

      intent(out)intent(inout)
      - procedure(hasher_fun) + character(len=*), intent(in) ::hasher - -
      - - integer, - intent(in),optional - - ::slots_bitsvalue
      - integer(kind=int32), + logical, intent(out), optional ::statusexisted
      @@ -642,14 +688,14 @@

      Arguments

      - + @@ -657,14 +703,29 @@

      Arguments

      - + - + + + + + + + + + @@ -681,23 +742,23 @@

      Arguments

      - +

      - procedure(loading), public, deferred, pass(map) :: - loading + procedure, public, non_overridable, pass(map) :: + entries

      • - pure function loading(map) -Prototype

        + private pure function entries(map) + -

        Returns the number of entries relative to slots in a hash map -(Specifications)

        +

        Returns the number of entries in a hash map +(Specifications)

        Arguments: - map - a hash map

        + map - an open hash map

        Arguments

      - type(key_type), + character(len=*), intent(in) ::keyvalue
      - logical, + type(other_type), intent(out)intent(in) ::presentother + +
      + + logical, + intent(out),optional + + ::exists
      @@ -730,7 +791,7 @@

      Arguments

      Return Value - real + integer(kind=int_index)

      @@ -742,21 +803,2781 @@

      - +

      - procedure(map_entry), public, deferred, pass(map) :: - map_entry + procedure(get_all_keys), public, deferred, pass(map) :: + get_all_keys

      • - subroutine map_entry(map, key, other, conflict) -Prototype

        + subroutine get_all_keys(map, all_keys) +Prototype

      + +

      Returns the all keys contained in a hash map +(Specifications)

      +

      Arguments: + map - a hash map + all_keys - all the keys contained in a hash map

      + +

      Arguments

      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(hashmap_type), + intent(in) + + ::map + +
      + + type(key_type), + intent(out), + allocatable + ::all_keys(:) + +
      + + + + +
      + +
      +
      +
      +
      + +

      + generic, public :: + get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data + +

      +
      +
        +
      • +

        + private interface get_other_open_data() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_get_other_data(map, value, other, exists) +

        + +

        Int8 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      • +

        + private subroutine int32_get_other_data(map, value, other, exists) +

        + +

        Int32 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      • +

        + private subroutine char_get_other_data(map, value, other, exists) +

        + +

        Character key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + character(len=*), + intent(in) + + ::value + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(init_map), public, deferred, pass(map) :: + init + +

      +
      +
        +
      • +

        + subroutine init_map(map, hasher, slots_bits, status) +Prototype

        + +

        Routine to allocate an empty map with HASHER as the hash function, +2SLOTS_BITS initial SIZE(map % slots), SIZE(map % slots) limited to a +maximum of 2MAX_BITS, and with up to LOAD_FACTOR * SIZE(map % slots), +map % inverse elements. All fields are initialized. +Arguments: + map - the hash maap to be initialized + hasher - the hash function to be used to map keys to slots + slots_bits - the number of bits initially used to map to the slots + status - an integer error status flag with the allowed values: + success - no problems were found + alloc_fault - map % slots or map % inverse could not be allocated + array_size_error - slots_bits or max_bits is less than + default_bits or greater than strict_max_bits + real_value_error - load_factor is less than 0.375 or greater than + 0.875

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(out) + + ::map + +
        + + procedure(hasher_fun) + + + ::hasher + +
        + + integer, + intent(in),optional + + ::slots_bits + +
        + + integer(kind=int32), + intent(out),optional + + ::status + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_get_other_data + +

      +
      +
        +
      • +

        + private subroutine int32_get_other_data(map, value, other, exists) +

        + +

        Int32 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_key_test + +

      +
      +
        +
      • +

        + private subroutine int32_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int32 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_map_entry + +

      +
      +
        +
      • +

        + private subroutine int32_map_entry(map, value, other, conflict) +

        + +

        Inserts an entry into the hash table +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_remove_entry + +

      +
      +
        +
      • +

        + private subroutine int32_remove_entry(map, value, existed) +

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + logical, + intent(out),optional + + ::existed + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int32_set_other_data + +

      +
      +
        +
      • +

        + private subroutine int32_set_other_data(map, value, other, exists) +

        + +

        Change the other data associated with the key +Arguments: + map - the map with the entry of interest + value - the int32 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_get_other_data + +

      +
      +
        +
      • +

        + private subroutine int8_get_other_data(map, value, other, exists) +

        + +

        Int8 key generic interface for get_other_data function

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_key_test + +

      +
      +
        +
      • +

        + private subroutine int8_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int8 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_map_entry + +

      +
      +
        +
      • +

        + private subroutine int8_map_entry(map, value, other, conflict) +

        + +

        Int8 generic interface for map entry +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_remove_entry + +

      +
      +
        +
      • +

        + private subroutine int8_remove_entry(map, value, existed) +

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + value - the int8 array key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + logical, + intent(out),optional + + ::existed + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + int8_set_other_data + +

      +
      +
        +
      • +

        + private subroutine int8_set_other_data(map, value, other, exists) +

        + +

        Change the other data associated with the key +Arguments: + map - the map with the entry of interest + value - the int8 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(key_get_other_data), public, deferred, pass(map) :: + key_get_other_data + +

      +
      +
        +
      • +

        + subroutine key_get_other_data(map, key, other, exists) +Prototype

        + +

        Returns the other data associated with the inverse table index +Arguments: + map - a hash map + key - the key associated with a map entry + other - the other data associated with the key + exists - a logical flag indicating whether an entry with that key exists

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + type(other_type), + intent(out) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(key_key_test), public, deferred, pass(map) :: + key_key_test + +

      +
      +
        +
      • +

        + subroutine key_key_test(map, key, present) +Prototype

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + key - the key of interest + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(key_map_entry), public, deferred, pass(map) :: + key_map_entry + +

      +
      +
        +
      • +

        + subroutine key_map_entry(map, key, other, conflict) +Prototype

        + +

        Inserts an entry into the hash table +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(key_remove_entry), public, deferred, pass(map) :: + key_remove_entry + +

      +
      +
        +
      • +

        + subroutine key_remove_entry(map, key, existed) +Prototype

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + logical, + intent(out),optional + + ::existed + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(key_set_other_data), public, deferred, pass(map) :: + key_set_other_data + +

      +
      +
        +
      • +

        + subroutine key_set_other_data(map, key, other, exists) +Prototype

        + +

        Change the other data associated with the key +Arguments: + map - the map with the entry of interest + key - the key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + type(key_type), + intent(in) + + ::key + +
        + + type(other_type), + intent(in) + + ::other + +
        + + logical, + intent(out),optional + + ::exists + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + generic, public :: + key_test => key_key_test, int8_key_test, int32_key_test, char_key_test + +

      +
      +
        +
      • +

        + private interface open_key_test() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int8 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      • +

        + private subroutine int32_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - int32 array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      • +

        + private subroutine char_key_test(map, value, present) +

        + +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - char array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + character(len=*), + intent(in) + + ::value + +
        + + logical, + intent(out) + + ::present + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(loading), public, deferred, pass(map) :: + loading + +

      +
      +
        +
      • +

        + pure function loading(map) +Prototype

        + +

        Returns the number of entries relative to slots in a hash map +(Specifications)

        +

        Arguments: + map - a hash map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(in) + + ::map + +
        + +

        + Return Value + real +

        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + generic, public :: + map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry + +

      +
      +
        +
      • +

        + private interface map_open_entry() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_map_entry(map, value, other, conflict) +

        + +

        Int8 generic interface for map entry +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      • +

        + private subroutine int32_map_entry(map, value, other, conflict) +

        + +

        Inserts an entry into the hash table +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int32), + intent(in) + + ::value(:) + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      • +

        + private subroutine char_map_entry(map, value, other, conflict) +

        + +

        Inserts an entry into the hash table +(Specifications)

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + character(len=*), + intent(in) + + ::value + +
        + + type(other_type), + intent(in),optional + + ::other + +
        + + logical, + intent(out),optional + + ::conflict + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + map_probes + +

      +
      +
        +
      • +

        + private pure function map_probes(map) +

        + +

        Returns the total number of table probes on a hash map +(Specifications)

        +

        Arguments: + map - an open hash map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(in) + + ::map + +
        + +

        + Return Value + integer(kind=int_calls) +

        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure, public, non_overridable, pass(map) :: + num_slots + +

      +
      +
        +
      • +

        + private pure function num_slots(map) +

        + +

        Returns the number of allocated slots in a hash map +(Specifications)

        +

        Arguments: + map - an open hash map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(in) + + ::map + +
        + +

        + Return Value + integer(kind=int_index) +

        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + procedure(rehash_map), public, deferred, pass(map) :: + rehash + +

      +
      +
        +
      • +

        + subroutine rehash_map(map, hasher) +Prototype

        + +

        Changes the hashing method of the table entries to that of HASHER. +Arguments: + map the table to be rehashed + hasher the hasher function to be used for the table

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + procedure(hasher_fun) + + + ::hasher + +
        + + +
      • +
      +
      + +
      +
      +
      +
      + +

      + generic, public :: + remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry + +

      +
      +
        +
      • +

        + private interface remove_open_entry() +

        + + + +

        Arguments

        + None + +
      • +
      • +

        + private subroutine int8_remove_entry(map, value, existed) +

        + +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + value - the int8 array key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        + +

        Arguments

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeIntentOptional AttributesName
        + + class(hashmap_type), + intent(inout) + + ::map + +
        + + integer(kind=int8), + intent(in) + + ::value(:) + +
        + + logical, + intent(out),optional + + ::existed + +
        + + +
      • +
      • +

        + private subroutine int32_remove_entry(map, value, existed) +

        -

        Inserts an entry into the hash table -(Specifications)

        +

        Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

        Arguments

        @@ -787,29 +3608,14 @@

        Arguments

        - - - - - - - - - + @@ -824,7 +3630,7 @@

        Arguments

        - + @@ -834,30 +3640,17 @@

        Arguments

        - - - - -
        -
        -
        - -

        - procedure, public, non_overridable, pass(map) :: - map_probes - -

        -
        -
        • - private pure function map_probes(map) + private subroutine char_remove_entry(map, value, existed)

          -

          Returns the total number of table probes on a hash map -(Specifications)

          -

          Arguments: - map - an open hash map

          +

          Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          Arguments

        - type(key_type), + integer(kind=int32), intent(in) ::key - -
        - - type(other_type), - intent(in),optional - - ::othervalue(:) ::conflictexisted
        @@ -875,7 +3668,7 @@

        Arguments

        class(hashmap_type), - + @@ -885,63 +3678,32 @@

        Arguments

        - -
        intent(in)intent(inout)
        - -

        - Return Value - integer(kind=int_calls) -

        - - -
      • -
      -
      - -
      -
      -
      -
      - -

      - procedure, public, non_overridable, pass(map) :: - num_slots - -

      -
      -
        -
      • -

        - private pure function num_slots(map) -

        - -

        Returns the number of allocated slots in a hash map -(Specifications)

        -

        Arguments: - map - an open hash map

        - -

        Arguments

        - - - - - - - - - - - + + + + + + + + + @@ -949,11 +3711,6 @@

        Arguments

        TypeIntentOptional AttributesName
        - class(hashmap_type), + character(len=*), intent(in) ::mapvalue + +
        + + logical, + intent(out),optional + + ::existed
        -

        - Return Value - integer(kind=int_index) -

        -
      @@ -963,23 +3720,37 @@

      - +

      - procedure(rehash_map), public, deferred, pass(map) :: - rehash + generic, public :: + set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data

      • - subroutine rehash_map(map, hasher) -Prototype

        + private interface set_other_open_data() +

      -

      Changes the hashing method of the table entries to that of HASHER. + + +

      Arguments

      + None + + +
    • +

      + private subroutine int8_set_other_data(map, value, other, exists) +

      + +

      Change the other data associated with the key Arguments: - map the table to be rehashed - hasher the hasher function to be used for the table

      + map - the map with the entry of interest + value - the int8 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

      Arguments

      @@ -1010,14 +3781,44 @@

      Arguments

      - + - + + + + + + + + + + + + + + + + + @@ -1027,32 +3828,18 @@

      Arguments

      - - - - -
      -
      -
      - -

      - procedure(remove_entry), public, deferred, pass(map) :: - remove - -

      -
      -
      • - subroutine remove_entry(map, key, existed) -Prototype

        + private subroutine int32_set_other_data(map, value, other, exists) + -

        Remove the entry, if any, that has the key +

        Change the other data associated with the key Arguments: - map - the table from which the entry is to be removed - key - the key to an entry - existed - a logical flag indicating whether an entry with the key - was present in the original map

        + map - the map with the entry of interest + value - the int32 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

        Arguments

      - procedure(hasher_fun) + integer(kind=int8), intent(in) ::hashervalue(:) + +
      + + type(other_type), + intent(in) + + ::other + +
      + + logical, + intent(out),optional + + ::exists
      @@ -1083,14 +3870,29 @@

      Arguments

      - + + + + + + + + + @@ -1105,7 +3907,7 @@

      Arguments

      - + @@ -1115,30 +3917,15 @@

      Arguments

      - - - - -
      -
      -
      - -

      - procedure(set_other), public, deferred, pass(map) :: - set_other_data - -

      -
      -
      • - subroutine set_other(map, key, other, exists) -Prototype

        + private subroutine char_set_other_data(map, value, other, exists) +

        Change the other data associated with the key Arguments: map - the map with the entry of interest - key - the key to the entry inthe map + value - the char value key to the entry inthe map other - the new data to be associated with the key exists - a logical flag indicating whether the key is already entered in the map

        @@ -1172,14 +3959,14 @@

        Arguments

      - + @@ -1226,7 +4013,7 @@

      Arguments

      - +

      procedure, public, non_overridable, pass(map) :: slots_bits @@ -1288,13 +4075,17 @@

      - +

      procedure(total_depth), public, deferred, pass(map) :: total_depth

      +
      + +

      Key_test procedures.

      +
      • @@ -1373,23 +4164,52 @@

        Source Code

        !! Hash function contains - procedure, non_overridable, pass(map) :: calls procedure, non_overridable, pass(map) :: entries procedure, non_overridable, pass(map) :: map_probes procedure, non_overridable, pass(map) :: num_slots procedure, non_overridable, pass(map) :: slots_bits - procedure(get_all_keys), deferred, pass(map) :: get_all_keys - procedure(get_other), deferred, pass(map) :: get_other_data - procedure(init_map), deferred, pass(map) :: init - procedure(key_test), deferred, pass(map) :: key_test - procedure(loading), deferred, pass(map) :: loading - procedure(map_entry), deferred, pass(map) :: map_entry - procedure(rehash_map), deferred, pass(map) :: rehash - procedure(remove_entry), deferred, pass(map) :: remove - procedure(set_other), deferred, pass(map) :: set_other_data - procedure(total_depth), deferred, pass(map) :: total_depth - + procedure(get_all_keys), deferred, pass(map) :: get_all_keys + procedure(init_map), deferred, pass(map) :: init + procedure(loading), deferred, pass(map) :: loading + procedure(rehash_map), deferred, pass(map) :: rehash + procedure(total_depth), deferred, pass(map) :: total_depth + + !! Key_test procedures. + procedure(key_key_test), deferred, pass(map) :: key_key_test + procedure, non_overridable, pass(map) :: int8_key_test + procedure, non_overridable, pass(map) :: int32_key_test + procedure, non_overridable, pass(map) :: char_key_test + generic, public :: key_test => key_key_test, int8_key_test, int32_key_test, char_key_test + + ! Map_entry procedures + procedure(key_map_entry), deferred, pass(map) :: key_map_entry + procedure, non_overridable, pass(map) :: int8_map_entry + procedure, non_overridable, pass(map) :: int32_map_entry + procedure, non_overridable, pass(map) :: char_map_entry + generic, public :: map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry + + ! Get_other_data procedures + procedure(key_get_other_data), deferred, pass(map) :: key_get_other_data + procedure, non_overridable, pass(map) :: int8_get_other_data + procedure, non_overridable, pass(map) :: int32_get_other_data + procedure, non_overridable, pass(map) :: char_get_other_data + generic, public :: get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data + + ! Key_remove_entry procedures + procedure(key_remove_entry), deferred, pass(map) :: key_remove_entry + procedure, non_overridable, pass(map) :: int8_remove_entry + procedure, non_overridable, pass(map) :: int32_remove_entry + procedure, non_overridable, pass(map) :: char_remove_entry + generic, public :: remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry + + ! Set_other_data procedures + procedure(key_set_other_data), deferred, pass(map) :: key_set_other_data + procedure, non_overridable, pass(map) :: int8_set_other_data + procedure, non_overridable, pass(map) :: int32_set_other_data + procedure, non_overridable, pass(map) :: char_set_other_data + generic, public :: set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data + end type hashmap_type
      @@ -1404,13 +4224,13 @@

      Source Code

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/type/key_type.html b/type/key_type.html index 6290e28f6..c85896946 100644 --- a/type/key_type.html +++ b/type/key_type.html @@ -80,7 +80,7 @@

      key_type
    • 3 statements + title="

      1.0% of total for derived types.

      Including implementation: 3 statements, 0.2% of total for derived types.">3 statements
    • @@ -120,7 +120,7 @@

      Variables

      - value + value
    • @@ -175,7 +175,7 @@

      Components

      @@ -221,13 +221,13 @@

      Source Code

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/type/linalg_state_type.html b/type/linalg_state_type.html index 3a71a9b53..fbe2e3244 100644 --- a/type/linalg_state_type.html +++ b/type/linalg_state_type.html @@ -79,7 +79,7 @@

      linalg_state_type
    • 15 statements + title="

      5.0% of total for derived types.

      Including implementation: 45 statements, 3.0% of total for derived types.">15 statements
    • @@ -119,8 +119,8 @@

      Variables

      @@ -204,7 +204,7 @@

      Components

    • @@ -221,7 +221,7 @@

      Components

      @@ -1321,13 +1321,13 @@

      Source Code

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/type/logger_type.html b/type/logger_type.html index 75dbdcc9c..80c8e243e 100644 --- a/type/logger_type.html +++ b/type/logger_type.html @@ -80,7 +80,7 @@

      logger_type
    • 26 statements + title="

      8.6% of total for derived types.

      Including implementation: 474 statements, 31.9% of total for derived types.">26 statements
    • @@ -218,7 +218,7 @@

      Arguments

    • @@ -2152,13 +2152,13 @@

      Source Code

      Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
      © 2024 Creative Commons License -
      ad42828

      +
      d996e43

      Documentation generated by FORD - on 2024-06-19 12:31

      + on 2024-06-19 12:42


      diff --git a/type/open_hashmap_type.html b/type/open_hashmap_type.html index db03a1c4d..f95d82311 100644 --- a/type/open_hashmap_type.html +++ b/type/open_hashmap_type.html @@ -80,7 +80,7 @@

      open_hashmap_type
    • 20 statements + title="

      6.6% of total for derived types.

      Including implementation: 229 statements, 15.4% of total for derived types.">20 statements
    • @@ -148,10 +148,30 @@

      Type-Bound Procedures

    • @@ -283,23 +303,20 @@

      - +

      procedure, public, non_overridable, pass(map) :: - entries + char_get_other_data

      • - private pure function entries(map) + private subroutine char_get_other_data(map, value, other, exists)

        -

        Returns the number of entries in a hash map -(Specifications)

        -

        Arguments: - map - an open hash map

        +

        Character key generic interface for get_other_data function

        Arguments

      - type(key_type), + integer(kind=int32), intent(in) ::keyvalue(:) + +
      + + type(other_type), + intent(in) + + ::other ::existedexists
      - type(key_type), + character(len=*), intent(in) ::keyvalue
      - + integer(kind=int8), public,
      - + character(len=MSG_LENGTH), public
      - + integer(kind=ilp), public
      - + type(logger_type), intent(in)
      @@ -317,7 +334,7 @@

      Arguments

      class(hashmap_type), - + @@ -325,16 +342,56 @@

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + +
      intent(in)intent(inout) map +
      + + character(len=*), + intent(in) + + ::value + +
      + + type(other_type), + intent(out) + + ::other + +
      + + logical, + intent(out),optional + + ::exists +
      -

      - Return Value - integer(kind=int_index) -

      -
    • @@ -344,24 +401,25 @@

      - +

      - procedure, public :: - get_all_keys => get_all_open_keys + procedure, public, non_overridable, pass(map) :: + char_key_test

      • -

        interface

        - private module subroutine get_all_open_keys(map, all_keys) + private subroutine char_key_test(map, value, present)

        -

        Returns all the keys contained in a hashmap -Arguments: - map - an open hash map - all_keys - all the keys contained in a hash map

        +

        Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

        +

        Arguments: + map - the hash map of interest + value - char array that is the key to lookup.
        + present - a flag indicating whether key is present in the map

        Arguments

        @@ -377,9 +435,9 @@

        Arguments

        - + @@ -392,14 +450,29 @@

        Arguments

        - + - + + + + + + + + + @@ -416,26 +489,21 @@

        Arguments

        - +

        - procedure, public :: - get_other_data => get_other_open_data + procedure, public, non_overridable, pass(map) :: + char_map_entry

        • -

          interface

          - private module subroutine get_other_open_data(map, key, other, exists) + private subroutine char_map_entry(map, value, other, conflict)

          -

          Returns the other data associated with the inverse table index -Arguments: - map - an open hash table - key - the key associated with a map entry - other - the other data associated with the key - exists - a logical flag indicating whether an entry with that key exists

          +

          Inserts an entry into the hash table +(Specifications)

          Arguments

        - class(open_hashmap_type), + class(hashmap_type), intent(in)intent(inout)
        - type(key_type), + character(len=*), intent(out),intent(in) - allocatable + ::all_keys(:)value + +
        + + logical, + intent(out) + + ::present
        @@ -451,7 +519,7 @@

        Arguments

        - + @@ -483,8 +551,8 @@

        Arguments

        type(other_type), - - + @@ -503,7 +571,7 @@

        Arguments

        - + @@ -520,32 +588,25 @@

        Arguments

        - +

        - procedure, public :: - init => init_open_map + procedure, public, non_overridable, pass(map) :: + char_remove_entry

        • -

          interface

          - private module subroutine init_open_map(map, hasher, slots_bits, status) + private subroutine char_remove_entry(map, value, existed)

          -

          Routine to allocate an empty map with HASHER as the hash function, -2SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a -maximum of 2MAX_BITS. All fields are initialized. +

          Remove the entry, if any, that has the key Arguments: - map - the open hash maap to be initialized - hasher - the hash function to be used to map keys to slots - slots_bits - the number of bits used to map to the slots - status - an integer error status flag with the allowed values: - success - no problems were found - alloc_fault - map % slots or map % inverse could not be allocated - array_size_error - slots_bits is less than default_bitd or - greater than max_bits

          + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          Arguments

        - class(open_hashmap_type), + class(hashmap_type), intent(inout) @@ -466,14 +534,14 @@

        Arguments

        - type(key_type), + character(len=*), intent(in) ::keyvalue intent(out) +intent(in),optional :: ::existsconflict
        @@ -561,9 +622,9 @@

        Arguments

        - + @@ -576,29 +637,14 @@

        Arguments

        - + - - - - - - - - - + @@ -606,14 +652,14 @@

        Arguments

        - + @@ -630,25 +676,26 @@

        Arguments

        - +

        - procedure, public :: - key_test => open_key_test + procedure, public, non_overridable, pass(map) :: + char_set_other_data

        • -

          interface

          - private module subroutine open_key_test(map, key, present) + private subroutine char_set_other_data(map, value, other, exists)

          -

          Returns a logical flag indicating whether KEY exists in the hash map +

          Change the other data associated with the key Arguments: - map - the hash map of interest - key - the key of interest - present - a logical flag indicating whether KEY exists in the hash map

          + map - the map with the entry of interest + value - the char value key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

          Arguments

        - class(open_hashmap_type), + class(hashmap_type), intent(out)intent(inout)
        - procedure(hasher_fun) + character(len=*), intent(in) ::hasher - -
        - - integer, - intent(in),optional - - ::slots_bitsvalue
        - integer(kind=int32), + logical, intent(out), optional ::statusexisted
        @@ -664,7 +711,7 @@

        Arguments

        - + @@ -694,14 +741,29 @@

        Arguments

        - + - + + + + + + + + + @@ -718,23 +780,23 @@

        Arguments

        - +

        - procedure, public :: - loading => open_loading + procedure, public, non_overridable, pass(map) :: + entries

        • -

          interface

          - private pure module function open_loading(map) + private pure function entries(map)

          -

          Returns the number of entries relative to slots in a hash map -Arguments: - map - an open hash map

          +

          Returns the number of entries in a hash map +(Specifications)

          +

          Arguments: + map - an open hash map

          Arguments

        - class(open_hashmap_type), + class(hashmap_type), intent(inout) @@ -679,14 +726,14 @@

        Arguments

        - type(key_type), + character(len=*), intent(in) ::keyvalue
        - logical, + type(other_type), intent(out)intent(in) ::presentother + +
        + + logical, + intent(out),optional + + ::exists
        @@ -750,7 +812,7 @@

        Arguments

        - class(open_hashmap_type), + class(hashmap_type), intent(in) @@ -767,7 +829,7 @@

        Arguments

        Return Value - real + integer(kind=int_index)

        @@ -779,10 +841,10 @@

        - +

        procedure, public :: - map_entry => map_open_entry + get_all_keys => get_all_open_keys

        @@ -790,16 +852,13 @@

      • interface

        - private module subroutine map_open_entry(map, key, other, conflict) + private module subroutine get_all_open_keys(map, all_keys)

        -

        Inserts an entry into the hash table +

        Returns all the keys contained in a hashmap Arguments: - map - the hash table of interest - key - the key identifying the entry - other - other data associated with the key - conflict - logical flag indicating whether the entry key conflicts - with an existing key

        + map - an open hash map + all_keys - all the keys contained in a hash map

        Arguments

        @@ -817,7 +876,7 @@

        Arguments

        class(open_hashmap_type), - + @@ -832,27 +891,2704 @@

        Arguments

        type(key_type), - + - + - - - - + +
        intent(inout)intent(in) intent(in)intent(out), - + allocatable ::keyall_keys(:)
        - - type(other_type), - intent(in),optional - -
        + + +
      • + +

        + +
        +
        +
        +
        + +

        + generic, public :: + get_other_data => key_get_other_data, int8_get_other_data, int32_get_other_data, char_get_other_data + +

        +
        +
          +
        • +

          + private interface get_other_open_data() +

          + + + +

          Arguments

          + None + +
        • +
        • +

          + private subroutine int8_get_other_data(map, value, other, exists) +

          + +

          Int8 key generic interface for get_other_data function

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(out) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        • +

          + private subroutine int32_get_other_data(map, value, other, exists) +

          + +

          Int32 key generic interface for get_other_data function

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(out) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        • +

          + private subroutine char_get_other_data(map, value, other, exists) +

          + +

          Character key generic interface for get_other_data function

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + character(len=*), + intent(in) + + ::value + +
          + + type(other_type), + intent(out) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + init => init_open_map + +

        +
        +
          +
        • +

          interface

          +

          + private module subroutine init_open_map(map, hasher, slots_bits, status) +

          + +

          Routine to allocate an empty map with HASHER as the hash function, +2SLOTS_BITS initial SIZE(map % slots), and SIZE(map % slots) limited to a +maximum of 2MAX_BITS. All fields are initialized. +Arguments: + map - the open hash maap to be initialized + hasher - the hash function to be used to map keys to slots + slots_bits - the number of bits used to map to the slots + status - an integer error status flag with the allowed values: + success - no problems were found + alloc_fault - map % slots or map % inverse could not be allocated + array_size_error - slots_bits is less than default_bitd or + greater than max_bits

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(out) + + ::map + +
          + + procedure(hasher_fun) + + + ::hasher + +
          + + integer, + intent(in),optional + + ::slots_bits + +
          + + integer(kind=int32), + intent(out),optional + + ::status + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int32_get_other_data + +

        +
        +
          +
        • +

          + private subroutine int32_get_other_data(map, value, other, exists) +

          + +

          Int32 key generic interface for get_other_data function

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(out) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int32_key_test + +

        +
        +
          +
        • +

          + private subroutine int32_key_test(map, value, present) +

          + +

          Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

          +

          Arguments: + map - the hash map of interest + value - int32 array that is the key to lookup.
          + present - a flag indicating whether key is present in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + logical, + intent(out) + + ::present + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int32_map_entry + +

        +
        +
          +
        • +

          + private subroutine int32_map_entry(map, value, other, conflict) +

          + +

          Inserts an entry into the hash table +(Specifications)

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(in),optional + + ::other + +
          + + logical, + intent(out),optional + + ::conflict + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int32_remove_entry + +

        +
        +
          +
        • +

          + private subroutine int32_remove_entry(map, value, existed) +

          + +

          Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + logical, + intent(out),optional + + ::existed + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int32_set_other_data + +

        +
        +
          +
        • +

          + private subroutine int32_set_other_data(map, value, other, exists) +

          + +

          Change the other data associated with the key +Arguments: + map - the map with the entry of interest + value - the int32 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(in) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int8_get_other_data + +

        +
        +
          +
        • +

          + private subroutine int8_get_other_data(map, value, other, exists) +

          + +

          Int8 key generic interface for get_other_data function

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(out) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int8_key_test + +

        +
        +
          +
        • +

          + private subroutine int8_key_test(map, value, present) +

          + +

          Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

          +

          Arguments: + map - the hash map of interest + value - int8 array that is the key to lookup.
          + present - a flag indicating whether key is present in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + logical, + intent(out) + + ::present + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int8_map_entry + +

        +
        +
          +
        • +

          + private subroutine int8_map_entry(map, value, other, conflict) +

          + +

          Int8 generic interface for map entry +(Specifications)

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(in),optional + + ::other + +
          + + logical, + intent(out),optional + + ::conflict + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int8_remove_entry + +

        +
        +
          +
        • +

          + private subroutine int8_remove_entry(map, value, existed) +

          + +

          Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + value - the int8 array key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + logical, + intent(out),optional + + ::existed + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + int8_set_other_data + +

        +
        +
          +
        • +

          + private subroutine int8_set_other_data(map, value, other, exists) +

          + +

          Change the other data associated with the key +Arguments: + map - the map with the entry of interest + value - the int8 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(in) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + key_get_other_data => get_other_open_data + +

        +
        +
          +
        • +

          interface

          +

          + private module subroutine get_other_open_data(map, key, other, exists) +

          + +

          Returns the other data associated with the inverse table index +Arguments: + map - an open hash table + key - the key associated with a map entry + other - the other data associated with the key + exists - a logical flag indicating whether an entry with that key exists

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(inout) + + ::map + +
          + + type(key_type), + intent(in) + + ::key + +
          + + type(other_type), + intent(out) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + key_key_test => open_key_test + +

        +
        +
          +
        • +

          interface

          +

          + private module subroutine open_key_test(map, key, present) +

          + +

          Returns a logical flag indicating whether KEY exists in the hash map +Arguments: + map - the hash map of interest + key - the key of interest + present - a logical flag indicating whether KEY exists in the hash map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(inout) + + ::map + +
          + + type(key_type), + intent(in) + + ::key + +
          + + logical, + intent(out) + + ::present + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + key_map_entry => map_open_entry + +

        +
        +
          +
        • +

          interface

          +

          + private module subroutine map_open_entry(map, key, other, conflict) +

          + +

          Inserts an entry into the hash table +Arguments: + map - the hash table of interest + key - the key identifying the entry + other - other data associated with the key + conflict - logical flag indicating whether the entry key conflicts + with an existing key

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(inout) + + ::map + +
          + + type(key_type), + intent(in) + + ::key + +
          + + type(other_type), + intent(in),optional + + ::other + +
          + + logical, + intent(out),optional + + ::conflict + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + key_remove_entry => remove_open_entry + +

        +
        +
          +
        • +

          interface

          +

          + private module subroutine remove_open_entry(map, key, existed) +

          + +

          Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(inout) + + ::map + +
          + + type(key_type), + intent(in) + + ::key + +
          + + logical, + intent(out),optional + + ::existed + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + key_set_other_data => set_other_open_data + +

        +
        +
          +
        • +

          interface

          +

          + private module subroutine set_other_open_data(map, key, other, exists) +

          + +

          Change the other data associated with the key +Arguments: + map - the map with the entry of interest + key - the key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(inout) + + ::map + +
          + + type(key_type), + intent(in) + + ::key + +
          + + type(other_type), + intent(in) + + ::other + +
          + + logical, + intent(out),optional + + ::exists + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + generic, public :: + key_test => key_key_test, int8_key_test, int32_key_test, char_key_test + +

        +
        +
          +
        • +

          + private interface open_key_test() +

          + + + +

          Arguments

          + None + +
        • +
        • +

          + private subroutine int8_key_test(map, value, present) +

          + +

          Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

          +

          Arguments: + map - the hash map of interest + value - int8 array that is the key to lookup.
          + present - a flag indicating whether key is present in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + logical, + intent(out) + + ::present + +
          + + +
        • +
        • +

          + private subroutine int32_key_test(map, value, present) +

          + +

          Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

          +

          Arguments: + map - the hash map of interest + value - int32 array that is the key to lookup.
          + present - a flag indicating whether key is present in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + logical, + intent(out) + + ::present + +
          + + +
        • +
        • +

          + private subroutine char_key_test(map, value, present) +

          + +

          Returns a logical flag indicating whether KEY exists in the hash map +(Specifications)

          +

          Arguments: + map - the hash map of interest + value - char array that is the key to lookup.
          + present - a flag indicating whether key is present in the map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + character(len=*), + intent(in) + + ::value + +
          + + logical, + intent(out) + + ::present + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + loading => open_loading + +

        +
        +
          +
        • +

          interface

          +

          + private pure module function open_loading(map) +

          + +

          Returns the number of entries relative to slots in a hash map +Arguments: + map - an open hash map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(in) + + ::map + +
          + +

          + Return Value + real +

          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + generic, public :: + map_entry => key_map_entry, int8_map_entry, int32_map_entry, char_map_entry + +

        +
        +
          +
        • +

          + private interface map_open_entry() +

          + + + +

          Arguments

          + None + +
        • +
        • +

          + private subroutine int8_map_entry(map, value, other, conflict) +

          + +

          Int8 generic interface for map entry +(Specifications)

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(in),optional + + ::other + +
          + + logical, + intent(out),optional + + ::conflict + +
          + + +
        • +
        • +

          + private subroutine int32_map_entry(map, value, other, conflict) +

          + +

          Inserts an entry into the hash table +(Specifications)

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + type(other_type), + intent(in),optional + + ::other + +
          + + logical, + intent(out),optional + + ::conflict + +
          + + +
        • +
        • +

          + private subroutine char_map_entry(map, value, other, conflict) +

          + +

          Inserts an entry into the hash table +(Specifications)

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + character(len=*), + intent(in) + + ::value + +
          + + type(other_type), + intent(in),optional + + ::other + +
          + + logical, + intent(out),optional + + ::conflict + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + map_probes + +

        +
        +
          +
        • +

          + private pure function map_probes(map) +

          + +

          Returns the total number of table probes on a hash map +(Specifications)

          +

          Arguments: + map - an open hash map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(in) + + ::map + +
          + +

          + Return Value + integer(kind=int_calls) +

          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public, non_overridable, pass(map) :: + num_slots + +

        +
        +
          +
        • +

          + private pure function num_slots(map) +

          + +

          Returns the number of allocated slots in a hash map +(Specifications)

          +

          Arguments: + map - an open hash map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(in) + + ::map + +
          + +

          + Return Value + integer(kind=int_index) +

          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + procedure, public :: + rehash => rehash_open_map + +

        +
        +
          +
        • +

          interface

          +

          + private module subroutine rehash_open_map(map, hasher) +

          + +

          Changes the hashing method of the table entries to that of HASHER. +Arguments: + map the table to be rehashed + hasher the hasher function to be used for the table

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          TypeIntentOptional AttributesName
          + + class(open_hashmap_type), + intent(inout) + + ::map + +
          + + procedure(hasher_fun) + + + ::hasher + +
          + + +
        • +
        +
        + +
        +
        +
        +
        + +

        + generic, public :: + remove => key_remove_entry, int8_remove_entry, int32_remove_entry, char_remove_entry + +

        +
        +
          +
        • +

          + private interface remove_open_entry() +

          + + + +

          Arguments

          + None + +
        • +
        • +

          + private subroutine int8_remove_entry(map, value, existed) +

          + +

          Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + value - the int8 array key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          + +

          Arguments

          + + + + + + + + + + + + + + + + + + + + + + - + @@ -867,7 +3603,7 @@

          Arguments

          - + @@ -877,30 +3613,17 @@

          Arguments

          - - - - -
          -
          -
          - -

          - procedure, public, non_overridable, pass(map) :: - map_probes - -

          -
          -
          • - private pure function map_probes(map) + private subroutine int32_remove_entry(map, value, existed)

            -

            Returns the total number of table probes on a hash map -(Specifications)

            -

            Arguments: - map - an open hash map

            +

            Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

            Arguments

          TypeIntentOptional AttributesName
          + + class(hashmap_type), + intent(inout) + + ::map + +
          + + integer(kind=int8), + intent(in) + + ::othervalue(:) ::conflictexisted
          @@ -918,7 +3641,7 @@

          Arguments

          class(hashmap_type), - + @@ -926,42 +3649,54 @@

          Arguments

          + + + + + + + + + + + + + + + +
          intent(in)intent(inout) map +
          + + integer(kind=int32), + intent(in) + + ::value(:) + +
          + + logical, + intent(out),optional + + ::existed +
          -

          - Return Value - integer(kind=int_calls) -

          -
        • -
        -
        - -
        -
        -
        -
        - -

        - procedure, public, non_overridable, pass(map) :: - num_slots - -

        -
        -
        • - private pure function num_slots(map) + private subroutine char_remove_entry(map, value, existed)

          -

          Returns the number of allocated slots in a hash map -(Specifications)

          -

          Arguments: - map - an open hash map

          +

          Remove the entry, if any, that has the key +Arguments: + map - the table from which the entry is to be removed + key - the key to an entry + existed - a logical flag indicating whether an entry with the key + was present in the original map

          Arguments

          @@ -979,7 +3714,7 @@

          Arguments

          class(hashmap_type), - + @@ -987,16 +3722,41 @@

          Arguments

          + + + + + + + + + + + + + + + +
          intent(in)intent(inout) map +
          + + character(len=*), + intent(in) + + ::value + +
          + + logical, + intent(out),optional + + ::existed +
          -

          - Return Value - integer(kind=int_index) -

          -
        @@ -1006,24 +3766,37 @@

        - +

        - procedure, public :: - rehash => rehash_open_map + generic, public :: + set_other_data => key_set_other_data, int8_set_other_data, int32_set_other_data, char_set_other_data

        • -

          interface

          - private module subroutine rehash_open_map(map, hasher) + private interface set_other_open_data()

          -

          Changes the hashing method of the table entries to that of HASHER. + + +

          Arguments

          + None + +
        • +
        • +

          + private subroutine int8_set_other_data(map, value, other, exists) +

          + +

          Change the other data associated with the key Arguments: - map the table to be rehashed - hasher the hasher function to be used for the table

          + map - the map with the entry of interest + value - the int8 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

          Arguments

          @@ -1039,7 +3812,7 @@

          Arguments

          - + - + + + + + + + + + + + + + + + + + @@ -1071,33 +3874,18 @@

          Arguments

          - - - - -
          -
          -
          - -

          - procedure, public :: - remove => remove_open_entry - -

          -
          -
          • -

            interface

            - private module subroutine remove_open_entry(map, key, existed) + private subroutine int32_set_other_data(map, value, other, exists)

            -

            Remove the entry, if any, that has the key +

            Change the other data associated with the key Arguments: - map - the table from which the entry is to be removed - key - the key to an entry - existed - a logical flag indicating whether an entry with the key - was present in the original map

            + map - the map with the entry of interest + value - the int32 array key to the entry inthe map + other - the new data to be associated with the key + exists - a logical flag indicating whether the key is already entered + in the map

            Arguments

          - class(open_hashmap_type), + class(hashmap_type), intent(inout) @@ -1054,14 +3827,44 @@

          Arguments

          - procedure(hasher_fun) + integer(kind=int8), intent(in) ::hashervalue(:) + +
          + + type(other_type), + intent(in) + + ::other + +
          + + logical, + intent(out),optional + + ::exists
          @@ -1113,7 +3901,7 @@

          Arguments

          - + + + + + + + + + @@ -1150,7 +3953,7 @@

          Arguments

          - + @@ -1160,31 +3963,15 @@

          Arguments

          - - - - -
          -
          -
          - -

          - procedure, public :: - set_other_data => set_other_open_data - -

          -
          -
          • -

            interface

            - private module subroutine set_other_open_data(map, key, other, exists) + private subroutine char_set_other_data(map, value, other, exists)

            Change the other data associated with the key Arguments: map - the map with the entry of interest - key - the key to the entry inthe map + value - the char value key to the entry inthe map other - the new data to be associated with the key exists - a logical flag indicating whether the key is already entered in the map

            @@ -1203,7 +3990,7 @@

            Arguments

          - + @@ -1272,7 +4059,7 @@

          Arguments

          - +

          procedure, public, non_overridable, pass(map) :: slots_bits @@ -1334,7 +4121,7 @@

          - +

          procedure, public :: total_depth => total_open_depth @@ -1414,15 +4201,15 @@

          Source Code

          !! Array of indices to the inverse Note # slots=size(slots) contains procedure :: get_all_keys => get_all_open_keys - procedure :: get_other_data => get_other_open_data + procedure :: key_get_other_data => get_other_open_data procedure :: init => init_open_map procedure :: loading => open_loading - procedure :: map_entry => map_open_entry + procedure :: key_map_entry => map_open_entry procedure :: rehash => rehash_open_map - procedure :: remove => remove_open_entry - procedure :: set_other_data => set_other_open_data + procedure :: key_remove_entry => remove_open_entry + procedure :: key_set_other_data => set_other_open_data procedure :: total_depth => total_open_depth - procedure :: key_test => open_key_test + procedure :: key_key_test => open_key_test final :: free_open_map end type open_hashmap_type
          @@ -1438,13 +4225,13 @@

          Source Code

          Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
          © 2024 Creative Commons License -
          ad42828

          +
          d996e43

          Documentation generated by FORD - on 2024-06-19 12:31

          + on 2024-06-19 12:42


          diff --git a/type/other_type.html b/type/other_type.html index c7abb234c..b69e501e4 100644 --- a/type/other_type.html +++ b/type/other_type.html @@ -80,7 +80,7 @@

          other_type
        • 3 statements + title="

          1.0% of total for derived types.

          Including implementation: 3 statements, 0.2% of total for derived types.">3 statements
        • @@ -120,7 +120,7 @@

          Variables

          - value + value
        • @@ -175,7 +175,7 @@

          Components

          @@ -221,13 +221,13 @@

          Source Code

          Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
          © 2024 Creative Commons License -
          ad42828

          +
          d996e43

          Documentation generated by FORD - on 2024-06-19 12:31

          + on 2024-06-19 12:42


          diff --git a/type/string_type.html b/type/string_type.html index 0e5a4a67f..897485290 100644 --- a/type/string_type.html +++ b/type/string_type.html @@ -79,7 +79,7 @@

          string_type
        • 31 statements + title="

          10.3% of total for derived types.

          Including implementation: 5 statements, 0.3% of total for derived types.">31 statements
        • @@ -193,7 +193,7 @@

          Arguments

        • @@ -236,7 +236,7 @@

          Arguments

          @@ -279,7 +279,7 @@

          Arguments

          @@ -322,7 +322,7 @@

          Arguments

          @@ -365,7 +365,7 @@

          Arguments

          @@ -408,7 +408,7 @@

          Arguments

          @@ -461,13 +461,13 @@

          Source Code

          Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
          © 2024 Creative Commons License -
          ad42828

          +
          d996e43

          Documentation generated by FORD - on 2024-06-19 12:31

          + on 2024-06-19 12:42


          diff --git a/type/stringlist_index_type.html b/type/stringlist_index_type.html index 8283eccf7..a005f2ead 100644 --- a/type/stringlist_index_type.html +++ b/type/stringlist_index_type.html @@ -79,7 +79,7 @@

          stringlist_index_type
        • 5 statements + title="

          1.7% of total for derived types.

          Including implementation: 5 statements, 0.3% of total for derived types.">5 statements
        • @@ -174,13 +174,13 @@

          Source Code

          Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
          © 2024 Creative Commons License -
          ad42828

          +
          d996e43

          Documentation generated by FORD - on 2024-06-19 12:31

          + on 2024-06-19 12:42


          diff --git a/type/stringlist_type.html b/type/stringlist_type.html index 880f3a8aa..d801eca53 100644 --- a/type/stringlist_type.html +++ b/type/stringlist_type.html @@ -79,7 +79,7 @@

          stringlist_type
        • 28 statements + title="

          9.3% of total for derived types.

          Including implementation: 141 statements, 9.5% of total for derived types.">28 statements
        • @@ -147,9 +147,9 @@

          Type-Bound Procedures

        • @@ -227,7 +227,7 @@

          Arguments

        • @@ -271,7 +271,7 @@

          Arguments

          @@ -360,7 +360,7 @@

          Arguments

          - +

          generic, public :: get => get_string_idx @@ -794,7 +794,7 @@

          Arguments

          - +

          procedure, public :: len => length_list @@ -906,13 +906,13 @@

          Source Code

          Fortran-lang/stdlib was developed by fortran-lang/stdlib contributors
          © 2024 Creative Commons License -
          ad42828

          +
          d996e43

          Documentation generated by FORD - on 2024-06-19 12:31

          + on 2024-06-19 12:42


          - class(open_hashmap_type), + class(hashmap_type), intent(inout) @@ -1128,14 +3916,29 @@

          Arguments

          - type(key_type), + integer(kind=int32), intent(in) ::keyvalue(:) + +
          + + type(other_type), + intent(in) + + ::other ::existedexists
          - class(open_hashmap_type), + class(hashmap_type), intent(inout) @@ -1218,14 +4005,14 @@

          Arguments

          - type(key_type), + character(len=*), intent(in) ::keyvalue
          - + class(*), public,
          - + character(len=*), intent(in),
          - + integer(kind=int16), intent(in)
          - + integer(kind=int32), intent(in)
          - + integer(kind=int64), intent(in)
          - + integer(kind=int8), intent(in)
          - + logical(kind=lk), intent(in)
          - + character(len=*), intent(in),
          - + type(string_type), intent(in),